diff --git a/external/simde b/external/simde index 98075d05..2bf459d4 160000 --- a/external/simde +++ b/external/simde @@ -1 +1 @@ -Subproject commit 98075d0593f539762125dbb215d95e782a6ae344 +Subproject commit 2bf459d4ed6d7ed6b9f31bd9e07c91bace5009e0 diff --git a/src/sfizz/Interpolators.hpp b/src/sfizz/Interpolators.hpp index 2585704e..292fd587 100644 --- a/src/sfizz/Interpolators.hpp +++ b/src/sfizz/Interpolators.hpp @@ -12,8 +12,18 @@ #if SIMDE_NATURAL_VECTOR_SIZE_GE(128) #include #include +#include #endif +#if defined(SIMDE_X86_SSE_NATIVE) + #define simde__m128_to_simde_float32x4(a) simde_float32x4_from_m128(simde__m128_to_private((a)).n) +#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) + #define simde__m128_to_simde_float32x4(a) simde__m128_to_neon_f32((a)) +#else + #define simde__m128_to_simde_float32x4(a) simde_vld1q_f32(& (simde__m128_to_private((a)).f32)) +#endif + + namespace sfz { template @@ -64,7 +74,7 @@ public: simde__m128 x = simde_mm_sub_ps(simde_mm_setr_ps(-1, 0, 1, 2), simde_mm_set1_ps(coeff)); simde__m128 h = hermite3x4(x); simde__m128 y = simde_mm_mul_ps(h, simde_mm_loadu_ps(values - 1)); - return simde_vaddvq_f32(y); + return simde_vaddvq_f32(simde__m128_to_simde_float32x4(y)); } }; #endif @@ -100,7 +110,7 @@ public: simde__m128 x = simde_mm_sub_ps(simde_mm_setr_ps(-1, 0, 1, 2), simde_mm_set1_ps(coeff)); simde__m128 h = bspline3x4(x); simde__m128 y = simde_mm_mul_ps(h, simde_mm_loadu_ps(values - 1)); - return simde_vaddvq_f32(y); + return simde_vaddvq_f32(simde__m128_to_simde_float32x4(y)); } }; #endif @@ -203,7 +213,7 @@ public: i += 4; } while (i < Points); - return simde_vaddvq_f32(y); + return simde_vaddvq_f32(simde__m128_to_simde_float32x4(y)); } }; #endif