From f38dda97461c307742c3774b6ad3acf836e0834b Mon Sep 17 00:00:00 2001 From: RealTimeChris <40668522+RealTimeChris@users.noreply.github.com> Date: Wed, 21 Aug 2024 18:14:48 -0400 Subject: [PATCH] Adding fix to arm-neon bug. --- include/dpp/isa/neon.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/dpp/isa/neon.h b/include/dpp/isa/neon.h index 1c6a02b810..8ee33459f8 100644 --- a/include/dpp/isa/neon.h +++ b/include/dpp/isa/neon.h @@ -52,7 +52,9 @@ namespace dpp { inline void collect_single_register(int32_t* data_in, int16_t* data_out, float current_gain, float increment) { neon_float gathered_values = gather_values(data_in); neon_float gain_vector = vdupq_n_f32(current_gain); - neon_float increment_vector = vmulq_f32(vdupq_n_f32(increment), vsetq_f32(0.0f, 1.0f, 2.0f, 3.0f)); + static constexpr float data[4] = { 0.0f, 1.0f, 2.0f, 3.0f }; + neon_float floats = vld1q_f32(data); + neon_float increment_vector = vmulq_f32(vdupq_n_f32(increment), floats)); neon_float current_samples_new = vmulq_f32(gathered_values, vaddq_f32(gain_vector, increment_vector)); // Clamping the values between int16_t min and max