Skip to content

Commit cb9ebed

Browse files
committed
Remove ostream and add intrin header file
1 parent bf53427 commit cb9ebed

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

paddle/utils/CpuId.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

paddle/utils/CpuId.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ limitations under the License. */
1111

1212
#pragma once
1313

14-
#include <iostream>
1514
#include "DisableCopy.h"
1615

1716
namespace 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; }

0 commit comments

Comments
 (0)