Closed jcelerier closed 1 year ago
i'm also not sure why it calls _mm_$$$$
intrinsincs which definitely does not look like NEON...
also seeing:
kfr/dsp/../base/../simd/impl/../impl/../impl/select.hpp:223:24: error: cannot convert 'const kfr::neon::vec<kfr::bit<float>, 4>::simd_type' {aka 'const float32x4_t'} to 'uint32x4_t'
223 | return vbslq_f32(m.v, x.v, y.v);
| ~~^
| |
| const kfr::neon::vec<kfr::bit<float>, 4>::simd_type {aka const float32x4_t}
this allows to get through, is it a correct fix ? I also need to pass -flax-vector-conversions
KFR_INTRINSIC f32neon select(const mf32neon& m, const f32neon& x, const f32neon& y)
{
return vbslq_f32(std::bit_cast<uint32x4_t>(m.v), x.v, y.v);
}
for the first error, the following patch makes my build pass:
diff --git a/include/kfr/simd/impl/backend_generic.hpp b/include/kfr/simd/impl/backend_generic.hpp
index b6a3270..590304d 100644
--- a/include/kfr/simd/impl/backend_generic.hpp
+++ b/include/kfr/simd/impl/backend_generic.hpp
@@ -1493,6 +1493,7 @@ KFR_INTRINSIC simd<T, N> simd_from_halves(simd_t<T, N>, const simd<T, N / 2>& x,
return { x, y };
}
+#if defined(CMT_ARCH_SSE2)
KFR_INTRINSIC simd<float, 4> simd_from_halves(simd_t<float, 4>, const simd<float, 2>& x,
const simd<float, 2>& y)
{
@@ -1507,6 +1508,7 @@ KFR_INTRINSIC simd<double, 2> simd_from_halves(simd_t<double, 2>, const simd<dou
SIMD_TYPE_INTRIN(f32, 4, _mm_cvtss_f32(x), _mm_set_ss(x), _mm_set1_ps(x), _mm_setzero_ps())
SIMD_TYPE_INTRIN(f64, 2, _mm_cvtsd_f64(x), _mm_set_sd(x), _mm_set1_pd(x), _mm_setzero_pd())
+#endif
Hi,
Clang is required for non-x86 builds, including ARM. backend_generic
that causes these errors is intended for GCC and MSVC on x86 architecture. KFR has been tested on Raspberry Pi with clang and passes all tests.
e.g. i'm getting a lot of these:
with GCC 12 on RPi (can be tried with the x-tools-armv8-rpi3-linux-gnueabihf.tar.xz cross toolchain here: https://github.com/tttapa/docker-arm-cross-toolchain/releases/tag/0.0.9)