We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bae48fc commit 33ac968Copy full SHA for 33ac968
src/libunicode/simd_detector.cpp
@@ -11,12 +11,12 @@
11
// auto max_simd_size() -> size_t;
12
13
void cpuid(int32_t out[4], int32_t eax, int32_t ecx);
14
+#if _WIN32
15
+__int64 xgetbv(unsigned int x)
16
+#elif defined(__GNUC__) || defined(__clang__)
17
uint64_t xgetbv(unsigned int index);
-enum class Simd_Size
-{
- sse2,
18
- avx,
19
-};
+#endif
+
20
auto detect_os_avx() -> bool;
21
auto detect_os_avx512() -> bool;
22
@@ -65,7 +65,7 @@ auto detect_os_avx() -> bool
65
66
if (osUsesXSAVE_XRSTORE && cpuAVXSuport)
67
{
68
- uint64_t const xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
+ auto const xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
69
avxSupported = (xcrFeatureMask & 0x6) == 0x6;
70
}
71
0 commit comments