We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2a0262 commit 5cfe0c7Copy full SHA for 5cfe0c7
lstm/weightmatrix.cpp
@@ -29,6 +29,7 @@
29
# if defined(__linux__) || defined(__MINGW32__)
30
# include <cpuid.h>
31
# elif defined(_WIN32)
32
+# include <intrin.h>
33
# endif
34
#endif
35
#include "dotproductavx.h"
@@ -71,6 +72,14 @@ class SIMDDetect {
71
72
sse_available_ = (ecx & 0x00080000) != 0;
73
avx_available_ = (ecx & 0x10000000) != 0;
74
}
75
+# elif defined(_WIN32)
76
+ int cpuInfo[4];
77
+ __cpuid(cpuInfo, 0);
78
+ if (cpuInfo[0] >= 1) {
79
+ __cpuid(cpuInfo, 1);
80
+ sse_available_ = (cpuInfo[2] & 0x00080000) != 0;
81
+ avx_available_ = (cpuInfo[2] & 0x10000000) != 0;
82
+ }
83
84
if (avx_available_) tprintf("Found AVX\n");
85
if (sse_available_) tprintf("Found SSE\n");
0 commit comments