mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 01:41:51 +03:00
avx512: CPU detection and platform hints
This commit is contained in:
@@ -54,6 +54,7 @@ extern "C"
|
||||
#define HS_PLATFORM_CPU_MASK 0x3F
|
||||
|
||||
#define HS_PLATFORM_NOAVX2 (4<<13)
|
||||
#define HS_PLATFORM_NOAVX512 (8<<13)
|
||||
|
||||
/** \brief Platform features bitmask. */
|
||||
typedef u64a platform_t;
|
||||
@@ -62,6 +63,9 @@ static UNUSED
|
||||
const platform_t hs_current_platform = {
|
||||
#if !defined(HAVE_AVX2)
|
||||
HS_PLATFORM_NOAVX2 |
|
||||
#endif
|
||||
#if !defined(HAVE_AVX512)
|
||||
HS_PLATFORM_NOAVX512 |
|
||||
#endif
|
||||
0,
|
||||
};
|
||||
@@ -69,6 +73,13 @@ const platform_t hs_current_platform = {
|
||||
static UNUSED
|
||||
const platform_t hs_current_platform_no_avx2 = {
|
||||
HS_PLATFORM_NOAVX2 |
|
||||
HS_PLATFORM_NOAVX512 |
|
||||
0,
|
||||
};
|
||||
|
||||
static UNUSED
|
||||
const platform_t hs_current_platform_no_avx512 = {
|
||||
HS_PLATFORM_NOAVX512 |
|
||||
0,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user