xtensor-stack / xsimd

C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, AVX512, NEON, SVE))
https://xsimd.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.19k stars 256 forks source link

Fix xsimd::available_architectures().has() for sve and rvv archs #1032

Closed dimula73 closed 4 months ago

dimula73 commented 4 months ago

Ideally the patch CPU detection code should also check if the length of SVE and RVV is actually supported by the current CPU implementation (i.e. ZCR_Elx.LEN register for SVE and something else for RVV), but I don't have such CPUs/emulators handy, so I cannot add such checks.

Given that xsimd::available_architectures().has() is a new feature of XSIMD13 and the length check has never been present in XSIMD, this bug is not a regression at least.

The patch also adds a unittest that reproduces the error the patch fixes

serge-sans-paille commented 4 months ago

thanks :bow: