Skip to content

Commit 1d81091

Browse files
committed
Fix inclusion of cpu_features headers based on target CPU
1 parent 4b6752c commit 1d81091

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

source/Statistics/Manager.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929

3030
#include <iostream>
3131

32+
#if defined(__x86_64__) || defined(__i386__)
3233
#include "cpuinfo_x86.h"
34+
#elif defined(__arm__)
35+
#include "cpuinfo_arm.h"
36+
#elif defined(__aarch64__)
37+
#include "cpuinfo_aarch64.h"
38+
#endif
3339

3440
#include "Statistics/Similarity.h"
3541
#include "Statistics/Consistency.h"
@@ -373,8 +379,13 @@ namespace statistics {
373379
shWindow = 0;
374380

375381
// Detect the best supported compute platform on the local machine.
382+
#if defined(CPU_FEATURES_ARCH_X86)
376383
static const X86Info info = GetX86Info();
377384
static const X86Features features = info.features;
385+
#elif defined(CPU_FEATURES_ARCH_ARM)
386+
static const ArmInfo info = GetArmInfo();
387+
static const ArmFeatures features = info.features;
388+
#endif
378389

379390
// On x86, test whether SSE2 or AVX2 are supported.
380391
#ifdef CPU_FEATURES_ARCH_X86_32

0 commit comments

Comments
 (0)