-
Notifications
You must be signed in to change notification settings - Fork 49
/
config.h
41 lines (35 loc) · 1.03 KB
/
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
39
40
41
// 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
#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) && !defined(HAVE_RVV_INSTRUCTIONS)
# define HAVE_POPCNT_INSTRUCTION 1
#endif
#if defined(HAVE_NEON_INSTRUCTIONS)
# include <arm_neon.h>
#elif defined(HAVE_RVV_INSTRUCTIONS)
# ifdef __riscv_v_intrinsic
# include <riscv_vector.h>
# endif
#else
# include <immintrin.h>
# include <x86intrin.h>
#endif
#define FORCE_INLINE inline __attribute__((always_inline))