Lines 14-24
Link Here
|
14 |
#include <array> |
14 |
#include <array> |
15 |
#include <vector> |
15 |
#include <vector> |
16 |
|
16 |
|
17 |
#if (defined(__arm__) && defined(HAS_NEON)) || defined(__aarch64__) |
17 |
#if defined(__i386__) || defined(__x86_64__) |
18 |
#include <asm/hwcap.h> |
|
|
19 |
#include <sys/auxv.h> |
20 |
#elif defined(__i386__) || defined(__x86_64__) |
21 |
#include <cpuid.h> |
18 |
#include <cpuid.h> |
|
|
19 |
#elif __has_include(<sys/auxv.h>) |
20 |
#include <sys/auxv.h> |
22 |
#endif |
21 |
#endif |
23 |
|
22 |
|
24 |
#include <sys/resource.h> |
23 |
#include <sys/resource.h> |
Lines 155-163
CCPUInfoFreebsd::CCPUInfoFreebsd()
Link Here
|
155 |
} |
154 |
} |
156 |
#endif |
155 |
#endif |
157 |
|
156 |
|
158 |
#if defined(HAS_NEON) && defined(__arm__) |
157 |
#if defined(HAS_NEON) |
159 |
if (getauxval(AT_HWCAP) & HWCAP_NEON) |
158 |
#if defined(__ARM_NEON) |
|
|
159 |
m_cpuFeatures |= CPU_FEATURE_NEON; |
160 |
#elif __has_include(<sys/auxv.h>) |
161 |
unsigned long hwcap = 0; |
162 |
elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); |
163 |
if (hwcap & HWCAP_NEON) |
160 |
m_cpuFeatures |= CPU_FEATURE_NEON; |
164 |
m_cpuFeatures |= CPU_FEATURE_NEON; |
|
|
165 |
#endif |
161 |
#endif |
166 |
#endif |
162 |
} |
167 |
} |
163 |
|
168 |
|