mod: unit test code to compare CM and SIMD results on both antennas

This commit is contained in:
Mario Joa-Ng
2025-07-29 15:38:23 +00:00
committed by Matthias Mehlhose
parent 7d27592b4f
commit 905a8a495e
3 changed files with 66 additions and 8 deletions
+1 -7
View File
@@ -61,13 +61,7 @@
c16_t convert_precoder_weight(double complex c_in)
{
double cr = creal(c_in) * 32768 + 0.5;
if (cr < 0)
cr -= 1;
double ci = cimag(c_in) * 32768 + 0.5;
if (ci < 0)
ci -= 1;
return (c16_t) {.r = (short)cr, .i = (short)ci};
return (c16_t) {.r = round(32767*creal(c_in)), .i = round(32767*cimag(c_in))};
}
void get_K1_K2(int N1, int N2, int *K1, int *K2, int layers)