mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
avx512: CPU detection and platform hints
This commit is contained in:
@@ -363,7 +363,8 @@ static const unsigned validModes[] = {
|
||||
// Mode bits for switching off various architecture features
|
||||
static const unsigned long long featureMask[] = {
|
||||
~0ULL, /* native */
|
||||
~HS_CPU_FEATURES_AVX2, /* no avx2 */
|
||||
~(HS_CPU_FEATURES_AVX2 | HS_CPU_FEATURES_AVX512), /* no avx2 */
|
||||
~HS_CPU_FEATURES_AVX512, /* no avx512 */
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Single,
|
||||
|
@@ -52,6 +52,10 @@ TEST(DB, flagsToPlatform) {
|
||||
p.cpu_features |= HS_CPU_FEATURES_AVX2;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_AVX512)
|
||||
p.cpu_features |= HS_CPU_FEATURES_AVX512;
|
||||
#endif
|
||||
|
||||
platform_t pp = target_to_platform(target_t(p));
|
||||
ASSERT_EQ(pp, hs_current_platform);
|
||||
}
|
||||
|
Reference in New Issue
Block a user