Commit deb4c1a 1 parent a3f03f1 commit deb4c1a Copy full SHA for deb4c1a
File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include < cstdint>
8
8
9
+ // aarch64 is currently a noop.
10
+ #ifdef __x86_64__
11
+
9
12
namespace base {
10
13
11
14
namespace {
12
15
13
- // aarch64 is currently a noop.
14
- #ifdef __x86_64__
15
-
16
16
// See <cpuid.h> for constants reference
17
- constexpr unsigned BIT_AVX2 = (1 << 5 );
18
- constexpr unsigned BIT_AVX512F = (1 << 16 );
17
+ constexpr unsigned BIT_AVX2 = (1 << 5 );
18
+ constexpr unsigned BIT_AVX512F = (1 << 16 );
19
19
20
- constexpr unsigned BIT_XSAVE = (1 << 26 );
21
- constexpr unsigned BIT_OSXSAVE = (1 << 27 );
20
+ constexpr unsigned BIT_XSAVE = (1 << 26 );
21
+ constexpr unsigned BIT_OSXSAVE = (1 << 27 );
22
22
23
23
// A struct to hold the result of a call to cpuid.
24
24
typedef struct {
@@ -39,7 +39,7 @@ uint32_t GetXCR0() {
39
39
return xcr0;
40
40
}
41
41
42
- }
42
+ } // namespace
43
43
44
44
CpuFeatures GetCpuFeatures () {
45
45
CpuFeatures res;
@@ -68,6 +68,6 @@ CpuFeatures GetCpuFeatures() {
68
68
return res;
69
69
}
70
70
71
- # endif
71
+ } // namespace base
72
72
73
- } // namespace base
73
+ # endif
You can’t perform that action at this time.
0 commit comments