File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,21 @@ using namespace BinSearch;
1616
1717#ifdef _MSC_VER
1818#include < intrin.h>
19+
1920static inline bool has_avx512f () {
20- static bool v = []{
21- int info[4 ]; __cpuidex (info, 7 , 0 );
21+ static bool v = [] {
22+ int info[4 ];
23+ __cpuidex (info, 7 , 0 );
2224 return (info[1 ] & (1 << 16 )) != 0 ; // EBX bit16 AVX512F
2325 }();
2426 return v;
2527}
28+
2629static inline bool has_avx512bf16 () {
27- static bool v = []{
28- int info[4 ]; __cpuidex (info, 7 , 1 );
29- return (info[0 ] & (1 << 5 )) != 0 ; // EAX bit5 AVX512_BF16
30+ static bool v = [] {
31+ int info[4 ];
32+ __cpuidex (info, 7 , 1 );
33+ return (info[0 ] & (1 << 5 )) != 0 ; // EAX bit5 AVX512_BF16
3034 }();
3135 return v;
3236}
@@ -35,6 +39,7 @@ bool has_avx512f() {
3539 static const bool supported_avx512f = __builtin_cpu_supports (" avx512f" );
3640 return supported_avx512f;
3741}
42+
3843bool has_avx512bf16 () {
3944 static const bool supported_avx512bf16 = __builtin_cpu_supports (" avx512bf16" );
4045 return supported_avx512bf16;
You can’t perform that action at this time.
0 commit comments