forked from WojciechMula/sse-popcount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
39 lines (32 loc) · 951 Bytes
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// does your shell supports ansi color seqences?
#define HAVE_ANSI_CONSOLE 1
#if defined(HAVE_AVX512VPOPCNT_INSTRUCTIONS)
# if !defined(HAVE_AVX512BW_INSTRUCTIONS)
# define HAVE_AVX512BW_INSTRUCTIONS
# endif
# define AVX512POPCNT_SW_EMULATOR
#endif
#if defined(HAVE_AVX512BW_INSTRUCTIONS)
// AVX512 implies AVX2 & AVX
# if !defined(HAVE_AVX_INSTRUCTIONS)
# define HAVE_AVX_INSTRUCTIONS
# endif
# if !defined(HAVE_AVX2_INSTRUCTIONS)
# define HAVE_AVX2_INSTRUCTIONS
# endif
#endif
#if defined(HAVE_AVX_INSTRUCTIONS) || defined(HAVE_AVX2_INSTRUCTIONS)
# if !defined(HAVE_SSE_INSTRUCTIONS)
# define HAVE_SSE_INSTRUCTIONS
# endif
#endif
#if !defined(HAVE_NEON_INSTRUCTIONS)
# define HAVE_POPCNT_INSTRUCTION 1
#endif
#if defined(HAVE_NEON_INSTRUCTIONS)
# include <arm_neon.h>
#else
# include <immintrin.h>
# include <x86intrin.h>
#endif
#define FORCE_INLINE inline __attribute__((always_inline))