diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2020-06-07 15:03:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 15:03:28 -0600 |
commit | 6f822d20fe5d0596e2b284d3e246e38cb7cea7fc (patch) | |
tree | 9242b3cb893752ced1b6a3c269825134ffe9a5d6 | |
parent | 581eab37b5d558ba9b8035f3fa82cfa617e70e26 (diff) | |
parent | 56cc3b7c5c45af18d819b0a1884d02b0a4241238 (diff) | |
download | numpy-6f822d20fe5d0596e2b284d3e246e38cb7cea7fc.tar.gz |
Merge pull request #16522 from seiko2plus/issue_16516
MAINT:ARMHF Fix detecting feature groups NEON_HALF and NEON_VFPV4
-rw-r--r-- | numpy/core/src/common/npy_cpu_features.c.src | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/core/src/common/npy_cpu_features.c.src b/numpy/core/src/common/npy_cpu_features.c.src index bd4743905..e7faea51d 100644 --- a/numpy/core/src/common/npy_cpu_features.c.src +++ b/numpy/core/src/common/npy_cpu_features.c.src @@ -367,9 +367,10 @@ npy__cpu_init_features_linux(void) npy__cpu_init_features_arm8(); } else { npy__cpu_have[NPY_CPU_FEATURE_NEON] = (hwcap & NPY__HWCAP_NEON) != 0; - npy__cpu_have[NPY_CPU_FEATURE_NEON_FP16] = (hwcap & (NPY__HWCAP_NEON | NPY__HWCAP_VFPv3 | - NPY__HWCAP_HALF)) != 0; - npy__cpu_have[NPY_CPU_FEATURE_NEON_VFPV4] = (hwcap & (NPY__HWCAP_NEON | NPY__HWCAP_VFPv4)) != 0; + if (npy__cpu_have[NPY_CPU_FEATURE_NEON]) { + npy__cpu_have[NPY_CPU_FEATURE_NEON_FP16] = (hwcap & NPY__HWCAP_HALF) != 0; + npy__cpu_have[NPY_CPU_FEATURE_NEON_VFPV4] = (hwcap & NPY__HWCAP_VFPv4) != 0; + } } return 1; } |