diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -29,7 +29,8 @@ #if defined(__GNUC__) -# define LIBAR2_WEAKLY_LINKED__ __attribute__((weak)) +# define LIBAR2_WEAKLY_LINKED__ __attribute__((__weak__)) +# define LIBAR2_TARGET__(TARGETS) __attribute__((__target__(TARGETS))) #endif @@ -86,6 +87,15 @@ #endif +#if defined(__x86_64__) && defined(LIBAR2_TARGET__) +# define MAX_SIMD_ALIGNMENT 64 +# define SIMD_ALIGNED _Alignas(MAX_SIMD_ALIGNMENT) +#else +# define MAX_SIMD_ALIGNMENT 1 +# define SIMD_ALIGNED /* use the types native alignment */ +#endif + + #define ELEMSOF(ARR) (sizeof(ARR) / sizeof(*(ARR))) #define MAX(A, B) ((A) > (B) ? (A) : (B)) |