Initial unit test to refactor and fix nr_layer_precoder_simd function (See #955)

This commit is contained in:
Matthias Mehlhose
2025-07-29 15:35:24 +00:00
parent 61c769f8b5
commit 7d27592b4f
5 changed files with 164 additions and 3 deletions
+2 -3
View File
@@ -765,9 +765,8 @@ void nr_layer_precoder_simd(const int n_layers,
// Multiplication and shift
const simde__m256i reals =
simde_mm256_srai_epi32(simde_mm256_madd_epi16(x, w_c), 15); // (int32_t) .r = (x.r * w.r - x.i * w.i) >> 15
const simde__m256i imags = simde_mm256_slli_epi32(
simde_mm256_madd_epi16(x, w_s),
1); // (int32_t) .i = (x.r * w.i + x.i * w.r) << 1, since higher 16 bit of each 32 bit is taken by blend_epi16
const simde__m256i imags =
simde_mm256_slli_epi32(simde_mm256_madd_epi16(x, w_s), 1); // (int32_t) .i = (x.r * w.i + x.i * w.r) << 1, since higher 16 bit of each 32 bit is taken by blend_epi16
// Re-arrange to match c16_t format
const simde__m256i produ = simde_mm256_blend_epi16(reals, imags, 0xAA);