File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ limitations under the License. */
1414
1515#ifdef _WIN32
1616
17+ #include < intrin.h>
18+
1719// / for MSVC
1820#define CPUID (info, x ) __cpuidex(info, x, 0 )
1921
@@ -49,7 +51,7 @@ SIMDFlags::SIMDFlags() {
4951 simd_flags_ |= cpuInfo[2 ] & (1 << 16 ) ? SIMD_FMA4 : SIMD_NONE;
5052}
5153
52- SIMDFlags* SIMDFlags::instance () {
54+ const SIMDFlags* SIMDFlags::instance () {
5355 static SIMDFlags instance;
5456 return &instance;
5557}
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ limitations under the License. */
1111
1212#pragma once
1313
14- #include < iostream>
1514#include " DisableCopy.h"
1615
1716namespace paddle {
@@ -22,7 +21,7 @@ class SIMDFlags final {
2221
2322 SIMDFlags ();
2423
25- static SIMDFlags* instance ();
24+ static const SIMDFlags* instance ();
2625
2726 inline bool isSSE () const { return simd_flags_ & SIMD_SSE; }
2827 inline bool isSSE2 () const { return simd_flags_ & SIMD_SSE2; }
You can’t perform that action at this time.
0 commit comments