Another small cleanup

This commit is contained in:
Chris Robinson
2020-04-03 02:57:51 -07:00
parent 8adbde90f5
commit 236564b54a
2 changed files with 7 additions and 8 deletions
+5 -6
View File
@@ -236,12 +236,11 @@ void Mix_<NEONTag>(const al::span<const float> InSamples, const al::span<FloatBu
const float32x4_t four4{vdupq_n_f32(4.0f)};
const float32x4_t step4{vdupq_n_f32(step)};
const float32x4_t gain4{vdupq_n_f32(gain)};
float32x4_t step_count4{vsetq_lane_f32(0.0f,
vsetq_lane_f32(1.0f,
vsetq_lane_f32(2.0f,
vsetq_lane_f32(3.0f, vdupq_n_f32(0.0f), 3),
2), 1), 0
)};
float32x4_t step_count4{vdupq_n_f32(0.0f)};
step_count4 = vsetq_lane_f32(1.0f, step_count4, 1);
step_count4 = vsetq_lane_f32(2.0f, step_count4, 2);
step_count4 = vsetq_lane_f32(3.0f, step_count4, 3);
do {
const float32x4_t val4 = vld1q_f32(in_iter);
float32x4_t dry4 = vld1q_f32(dst);
+2 -2
View File
@@ -214,10 +214,10 @@ void Mix_<SSETag>(const al::span<const float> InSamples, const al::span<FloatBuf
do {
const __m128 val4{_mm_load_ps(in_iter)};
__m128 dry4{_mm_load_ps(dst)};
#define MLA4(x, y, z) _mm_add_ps(x, _mm_mul_ps(y, z))
/* dry += val * (gain + step*step_count) */
dry4 = MLA4(dry4, val4, MLA4(gain4, step4, step_count4));
#undef MLA4
_mm_store_ps(dst, dry4);
step_count4 = _mm_add_ps(step_count4, four4);
in_iter += 4; dst += 4;