The only guaranteed way I can think of to ensure compiler support is to try
compiling source that calls one intrinsic from each of the used groups. I
can see that being "more correct" but I can't really think of a situation
where just checking for the __AVX2__ define will fail to build wither.
-
So this seems to be different across versions as well. It looks like
__AVX__ and __AVX2__ are the only ones we can really count on being there.
I can drop the second check to just __AVX2__. I think it's redundant by
chance though that all CPUs that supported AVX2 also seem to support the
addition
> On Jun 28, 2016, at 8:24 AM, Chuck Atkins wrote:
>
> Encapsulate the test for which flags are needed to get a compiler to
> support certain features. Along with this, give various options to try
> for AVX and AVX2 support. Ideally we want to use specific instruction
> set feature flags, like
Encapsulate the test for which flags are needed to get a compiler to
support certain features. Along with this, give various options to try
for AVX and AVX2 support. Ideally we want to use specific instruction
set feature flags, like -mavx2 for instance instead of -march=haswell,
but the flags re
Encapsulate the test for which flags are needed to get a compiler to
support certain features. Along with this, give various options to try
for AVX and AVX2 support. Ideally we want to use specific instruction
set feature flags, like -mavx2 for instance instead of -march=haswell,
but the flags re