convert from simde__m128 to simde_float32x4_t
This commit is contained in:
parent
ad711ee42f
commit
1a38dcd00e
1 changed files with 13 additions and 3 deletions
|
|
@ -12,8 +12,18 @@
|
|||
#if SIMDE_NATURAL_VECTOR_SIZE_GE(128)
|
||||
#include <simde/x86/sse.h>
|
||||
#include <simde/arm/neon/addv.h>
|
||||
#include <simde/arm/neon/ld1.h>
|
||||
#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 <InterpolatorModel M, class R>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue