|
|
@ -452,6 +452,28 @@ TEST(srslte_vec_convert_fi,
|
|
|
|
free(z);
|
|
|
|
free(z);
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST(srslte_vec_convert_if,
|
|
|
|
|
|
|
|
MALLOC(int16_t, x);
|
|
|
|
|
|
|
|
MALLOC(float, z);
|
|
|
|
|
|
|
|
float scale = 1000.0f;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float gold;
|
|
|
|
|
|
|
|
float k = 1.0f/scale;
|
|
|
|
|
|
|
|
for (int i = 0; i < block_size; i++) {
|
|
|
|
|
|
|
|
x[i] = (int16_t) RANDOM_S();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CALL(srslte_vec_convert_if(x, scale, z, block_size))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < block_size; i++) {
|
|
|
|
|
|
|
|
gold = ((float)x[i]) * k;
|
|
|
|
|
|
|
|
mse += fabsf(gold - z[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
free(x);
|
|
|
|
|
|
|
|
free(z);
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
TEST(srslte_vec_prod_fff,
|
|
|
|
TEST(srslte_vec_prod_fff,
|
|
|
|
MALLOC(float, x);
|
|
|
|
MALLOC(float, x);
|
|
|
|
MALLOC(float, y);
|
|
|
|
MALLOC(float, y);
|
|
|
@ -753,6 +775,9 @@ int main(int argc, char **argv) {
|
|
|
|
passed[func_count][size_count] = test_srslte_vec_convert_fi(func_names[func_count], &timmings[func_count][size_count], block_size);
|
|
|
|
passed[func_count][size_count] = test_srslte_vec_convert_fi(func_names[func_count], &timmings[func_count][size_count], block_size);
|
|
|
|
func_count++;
|
|
|
|
func_count++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passed[func_count][size_count] = test_srslte_vec_convert_if(func_names[func_count], &timmings[func_count][size_count], block_size);
|
|
|
|
|
|
|
|
func_count++;
|
|
|
|
|
|
|
|
|
|
|
|
passed[func_count][size_count] = test_srslte_vec_prod_fff(func_names[func_count], &timmings[func_count][size_count], block_size);
|
|
|
|
passed[func_count][size_count] = test_srslte_vec_prod_fff(func_names[func_count], &timmings[func_count][size_count], block_size);
|
|
|
|
func_count++;
|
|
|
|
func_count++;
|
|
|
|
|
|
|
|
|
|
|
|