only use dynamic AVX for gcc >= 6.0
This commit is contained in:
parent
4e9b37ab3a
commit
ea8d4b4ecd
2 changed files with 4 additions and 8 deletions
|
@ -33,7 +33,7 @@
|
|||
#include "sharp_core_inc0.c"
|
||||
#undef ARCH
|
||||
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=5)
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=6)
|
||||
|
||||
static int have_avx(void)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ void inner_loop (sharp_job *job, const int *ispair,const double *cth,
|
|||
const double *sth, int llim, int ulim, sharp_Ylmgen_C *gen, int mi,
|
||||
const int *mlim)
|
||||
{
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=5)
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=6)
|
||||
if (have_avx())
|
||||
inner_loop_avx (job, ispair, cth, sth, llim, ulim, gen, mi, mlim);
|
||||
else
|
||||
|
@ -65,7 +65,7 @@ void inner_loop (sharp_job *job, const int *ispair,const double *cth,
|
|||
|
||||
int sharp_veclen(void)
|
||||
{
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=5)
|
||||
#if (!defined(__AVX__)) && defined(__GNUC__) && defined (__x86_64__) && (__GNUC__>=6)
|
||||
if (have_avx())
|
||||
return 4;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue