avx512: CPU detection and platform hints

This commit is contained in:
Matthew Barr
2016-10-04 11:18:10 +11:00
parent 8a56d16d57
commit 91db20d8eb
12 changed files with 164 additions and 27 deletions

View File

@@ -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,
};