Skip to content

Commit

Permalink
Add AVX detection
Browse files Browse the repository at this point in the history
All supported compilers define `__AVX__` when building with the AVX
instruction set enabled.
  • Loading branch information
ebassi committed Aug 12, 2024
1 parent d03fb3d commit df7fa97
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/graphene-config.h.meson
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern "C" {
# if defined(GRAPHENE_USE_SSE)
# include <xmmintrin.h>
# include <emmintrin.h>
#
# if defined(_M_IX86_FP)
# if _M_IX86_FP >= 2
# define GRAPHENE_USE_SSE4_1
Expand All @@ -66,9 +67,18 @@ extern "C" {
# elif defined(_MSC_VER)
# define GRAPHENE_USE_SSE4_1
# endif
#
# if defined(__AVX__)
# #define GRAPHENE_USE_AVX
# endif
#
# if defined(GRAPHENE_USE_SSE4_1)
# include <smmintrin.h>
# endif
#
# if defined(GRAPHENE_USE_AVX)
# include <immintrin.h>
# endif
typedef __m128 graphene_simd4f_t;
# elif defined(GRAPHENE_USE_ARM_NEON)
# if defined (_MSC_VER) && (_MSC_VER < 1920) && defined (_M_ARM64)
Expand Down

0 comments on commit df7fa97

Please sign in to comment.