Vector: fix cf to cs conjugate conversion

This commit is contained in:
Xavier Arteaga 2020-10-21 17:10:54 +02:00 committed by Xavier Arteaga
parent e09b6aaacb
commit 791c979063
2 changed files with 4 additions and 2 deletions

View File

@ -414,7 +414,7 @@ TEST(
short gold_re;
short gold_im;
for (int i = 0; i < block_size; i++) { x[i] = (float)RANDOM_CF(); }
for (int i = 0; i < block_size; i++) { x[i] = RANDOM_CF(); }
TEST_CALL(srslte_vec_convert_conj_cs(x, scale, z, block_size))

View File

@ -513,7 +513,9 @@ void srslte_vec_convert_conj_cs_simd(const cf_t* x_, int16_t* z, const float sca
#endif /* SRSLTE_SIMD_F_SIZE && SRSLTE_SIMD_S_SIZE */
for (; i < len; i++) {
z[i] = (int16_t)(conjf(x[i]) * scale);
z[i] = (int16_t)(x[i] * scale);
i++;
z[i] = (int16_t)(x[i] * -scale);
}
}