/Zephyr-latest/tests/bluetooth/host/cs/bt_le_cs_parse_pct/src/ |
D | main.c | 30 struct bt_le_cs_iq_sample output; in ZTEST() member 33 {.input = {0x00, 0x00, 0x00}, .output = {.i = 0, .q = 0}}, in ZTEST() 34 {.input = {0xFF, 0xFF, 0xFF}, .output = {.i = -1, .q = -1}}, in ZTEST() 35 {.input = {0xFF, 0x00, 0xFF}, .output = {.i = 255, .q = -16}}, in ZTEST() 36 {.input = {0xFF, 0x00, 0x00}, .output = {.i = 255, .q = 0}}, in ZTEST() 37 {.input = {0x00, 0xFF, 0x00}, .output = {.i = -256, .q = 15}}, in ZTEST() 38 {.input = {0x00, 0x00, 0xFF}, .output = {.i = 0, .q = -16}}, in ZTEST() 39 {.input = {0x00, 0x08, 0x80}, .output = {.i = -2048, .q = -2048}}, in ZTEST() 40 {.input = {0xFF, 0xF7, 0x7F}, .output = {.i = 2047, .q = 2047}}, in ZTEST() 43 {.input = {0xEF, 0xCD, 0xAB}, .output = {.i = -529, .q = -1348}}, in ZTEST() [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/quaternionmath/src/ |
D | f32.c | 25 float32_t *output; in ZTEST() local 28 output = malloc(length * sizeof(float32_t)); in ZTEST() 29 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() 32 arm_quaternion_norm_f32(input, output, length); in ZTEST() 36 test_snr_error_f32(length, output, ref, SNR_ERROR_THRESH), in ZTEST() 40 test_close_error_f32(length, output, ref, in ZTEST() 45 free(output); in ZTEST() 53 float32_t *output; in ZTEST() local 56 output = malloc(length * sizeof(float32_t)); in ZTEST() 57 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() [all …]
|
/Zephyr-latest/tests/benchmarks/cmsis_dsp/basicmath/src/ |
D | q15.c | 89 q15_t *output; in ZTEST() local 92 output = malloc(PATTERN_LENGTH * sizeof(q15_t)); in ZTEST() 93 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 99 arm_add_q15(input1, input2, output, PATTERN_LENGTH); in ZTEST() 105 free(output); in ZTEST() 114 q15_t *output; in ZTEST() local 117 output = malloc(PATTERN_LENGTH * sizeof(q15_t)); in ZTEST() 118 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 124 arm_sub_q15(input1, input2, output, PATTERN_LENGTH); in ZTEST() 130 free(output); in ZTEST() [all …]
|
D | q31.c | 153 q31_t *output; in ZTEST() local 156 output = malloc(PATTERN_LENGTH * sizeof(q31_t)); in ZTEST() 157 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 163 arm_add_q31(input1, input2, output, PATTERN_LENGTH); in ZTEST() 169 free(output); in ZTEST() 178 q31_t *output; in ZTEST() local 181 output = malloc(PATTERN_LENGTH * sizeof(q31_t)); in ZTEST() 182 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 188 arm_sub_q31(input1, input2, output, PATTERN_LENGTH); in ZTEST() 194 free(output); in ZTEST() [all …]
|
D | q7.c | 89 q7_t *output; in ZTEST() local 92 output = malloc(PATTERN_LENGTH * sizeof(q7_t)); in ZTEST() 93 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 99 arm_add_q7(input1, input2, output, PATTERN_LENGTH); in ZTEST() 105 free(output); in ZTEST() 114 q7_t *output; in ZTEST() local 117 output = malloc(PATTERN_LENGTH * sizeof(q7_t)); in ZTEST() 118 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 124 arm_sub_q7(input1, input2, output, PATTERN_LENGTH); in ZTEST() 130 free(output); in ZTEST() [all …]
|
D | f32.c | 153 float32_t *output; in ZTEST() local 156 output = malloc(PATTERN_LENGTH * sizeof(float32_t)); in ZTEST() 157 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 164 (float32_t *)input1, (float32_t *)input2, output, in ZTEST() 171 free(output); in ZTEST() 180 float32_t *output; in ZTEST() local 183 output = malloc(PATTERN_LENGTH * sizeof(float32_t)); in ZTEST() 184 zassert_not_null(output, "output buffer allocation failed"); in ZTEST() 191 (float32_t *)input1, (float32_t *)input2, output, in ZTEST() 198 free(output); in ZTEST() [all …]
|
/Zephyr-latest/tests/subsys/dsp/basicmath/src/ |
D | q31.c | 23 DSP_DATA q31_t *output; in test_zdsp_add_q31() local 26 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_add_q31() 27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q31() 30 zdsp_add_q31(input1, input2, output, length); in test_zdsp_add_q31() 34 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q31() 38 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_add_q31() 42 free(output); in test_zdsp_add_q31() 56 DSP_DATA q31_t *output; in test_zdsp_add_q31_in_place() local 59 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_add_q31_in_place() 60 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q31_in_place() [all …]
|
D | q15.c | 25 DSP_DATA q15_t *output; in test_zdsp_add_q15() local 28 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_add_q15() 29 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q15() 32 zdsp_add_q15(input1, input2, output, length); in test_zdsp_add_q15() 36 test_snr_error_q15(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q15() 40 test_near_equal_q15(length, output, ref, ABS_ERROR_THRESH_Q15), in test_zdsp_add_q15() 44 free(output); in test_zdsp_add_q15() 60 DSP_DATA q15_t *output; in test_zdsp_add_q15_in_place() local 63 output = (DSP_DATA q15_t *)malloc(length * sizeof(q15_t)); in test_zdsp_add_q15_in_place() 64 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q15_in_place() [all …]
|
D | q7.c | 23 DSP_DATA q7_t *output; in test_zdsp_add_q7() local 26 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_add_q7() 27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q7() 30 zdsp_add_q7(input1, input2, output, length); in test_zdsp_add_q7() 34 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q7() 38 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_add_q7() 42 free(output); in test_zdsp_add_q7() 56 DSP_DATA q7_t *output; in test_zdsp_add_q7_in_place() local 59 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_add_q7_in_place() 60 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_q7_in_place() [all …]
|
D | f32.c | 22 DSP_DATA float32_t *output; in test_zdsp_add_f32() local 25 output = (DSP_DATA float32_t *)malloc(length * sizeof(float32_t)); in test_zdsp_add_f32() 26 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_f32() 29 zdsp_add_f32((DSP_DATA float32_t *)input1, (DSP_DATA float32_t *)input2, output, length); in test_zdsp_add_f32() 33 test_snr_error_f32(length, output, (float32_t *)ref, in test_zdsp_add_f32() 38 test_rel_error_f32(length, output, (float32_t *)ref, in test_zdsp_add_f32() 43 free(output); in test_zdsp_add_f32() 55 DSP_DATA float32_t *output; in test_zdsp_add_f32_in_place() local 58 output = (DSP_DATA float32_t *)malloc(length * sizeof(float32_t)); in test_zdsp_add_f32_in_place() 59 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_f32_in_place() [all …]
|
D | f16.c | 24 float16_t *output; in test_zdsp_add_f16() local 27 output = malloc(length * sizeof(float16_t)); in test_zdsp_add_f16() 28 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_f16() 31 zdsp_add_f16((float16_t *)input1, (float16_t *)input2, output, length); in test_zdsp_add_f16() 35 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_add_f16() 40 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_add_f16() 45 free(output); in test_zdsp_add_f16() 57 float16_t *output; in test_zdsp_add_f16_in_place() local 60 output = malloc(length * sizeof(float16_t)); in test_zdsp_add_f16_in_place() 61 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_add_f16_in_place() [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/support/src/ |
D | f16.c | 33 float16_t *output; in test_arm_copy_f16() local 36 output = malloc(length * sizeof(float16_t)); in test_arm_copy_f16() 37 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_copy_f16() 40 arm_copy_f16((float16_t *)input1, output, length); in test_arm_copy_f16() 44 test_equal_f16(length, (float16_t *)input1, output), in test_arm_copy_f16() 48 free(output); in test_arm_copy_f16() 58 float16_t *output; in test_arm_fill_f16() local 62 output = malloc(length * sizeof(float16_t)); in test_arm_fill_f16() 63 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_fill_f16() 66 arm_fill_f16(val, output, length); in test_arm_fill_f16() [all …]
|
D | q15.c | 23 q15_t *output; in test_arm_copy_q15() local 26 output = malloc(length * sizeof(q15_t)); in test_arm_copy_q15() 27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_copy_q15() 30 arm_copy_q15(input1, output, length); in test_arm_copy_q15() 34 test_equal_q15(length, input1, output), in test_arm_copy_q15() 38 free(output); in test_arm_copy_q15() 48 q15_t *output; in test_arm_fill_q15() local 52 output = malloc(length * sizeof(q15_t)); in test_arm_fill_q15() 53 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_fill_q15() 56 arm_fill_q15(val, output, length); in test_arm_fill_q15() [all …]
|
D | q31.c | 23 q31_t *output; in test_arm_copy_q31() local 26 output = malloc(length * sizeof(q31_t)); in test_arm_copy_q31() 27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_copy_q31() 30 arm_copy_q31(input1, output, length); in test_arm_copy_q31() 34 test_equal_q31(length, input1, output), in test_arm_copy_q31() 38 free(output); in test_arm_copy_q31() 48 q31_t *output; in test_arm_fill_q31() local 52 output = malloc(length * sizeof(q31_t)); in test_arm_fill_q31() 53 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_fill_q31() 56 arm_fill_q31(val, output, length); in test_arm_fill_q31() [all …]
|
D | q7.c | 23 q7_t *output; in test_arm_copy_q7() local 26 output = malloc(length * sizeof(q7_t)); in test_arm_copy_q7() 27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_copy_q7() 30 arm_copy_q7(input1, output, length); in test_arm_copy_q7() 34 test_equal_q7(length, input1, output), in test_arm_copy_q7() 38 free(output); in test_arm_copy_q7() 48 q7_t *output; in test_arm_fill_q7() local 52 output = malloc(length * sizeof(q7_t)); in test_arm_fill_q7() 53 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_fill_q7() 56 arm_fill_q7(val, output, length); in test_arm_fill_q7() [all …]
|
D | f32.c | 24 float32_t *output; in test_arm_copy_f32() local 27 output = malloc(length * sizeof(float32_t)); in test_arm_copy_f32() 28 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_copy_f32() 31 arm_copy_f32((float32_t *)input1, output, length); in test_arm_copy_f32() 35 test_equal_f32(length, (float32_t *)input1, output), in test_arm_copy_f32() 39 free(output); in test_arm_copy_f32() 49 float32_t *output; in test_arm_fill_f32() local 53 output = malloc(length * sizeof(float32_t)); in test_arm_fill_f32() 54 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_fill_f32() 57 arm_fill_f32(val, output, length); in test_arm_fill_f32() [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/fastmath/src/ |
D | f16.c | 41 float16_t *output; 44 output = malloc(length * sizeof(float16_t)); 45 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); 49 output[index] = arm_cos_f16(((float16_t *)in_angles)[index]); 54 test_snr_error_f16(length, output, (float16_t *)ref_cos, 59 test_close_error_f16(length, output, (float16_t *)ref_cos, 64 free(output); 71 float16_t *output; 74 output = malloc(length * sizeof(float16_t)); 75 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); [all …]
|
D | f32.c | 26 float32_t *output; in ZTEST() local 29 output = malloc(length * sizeof(float32_t)); in ZTEST() 30 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() 34 output[index] = arm_cos_f32(((float32_t *)in_angles)[index]); in ZTEST() 39 test_snr_error_f32(length, output, (float32_t *)ref_cos, in ZTEST() 44 test_close_error_f32(length, output, (float32_t *)ref_cos, in ZTEST() 49 free(output); in ZTEST() 56 float32_t *output; in ZTEST() local 59 output = malloc(length * sizeof(float32_t)); in ZTEST() 60 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() [all …]
|
D | q15.c | 25 q15_t *output; in ZTEST() local 28 output = malloc(length * sizeof(q15_t)); in ZTEST() 29 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() 33 output[index] = arm_cos_q15(in_angles[index]); in ZTEST() 38 test_snr_error_q15(length, output, ref_cos, SNR_ERROR_THRESH), in ZTEST() 42 test_near_equal_q15(length, output, ref_cos, ABS_ERROR_THRESH), in ZTEST() 46 free(output); in ZTEST() 53 q15_t *output; in ZTEST() local 56 output = malloc(length * sizeof(q15_t)); in ZTEST() 57 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() [all …]
|
D | q31.c | 25 q31_t *output; in ZTEST() local 28 output = malloc(length * sizeof(q31_t)); in ZTEST() 29 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() 33 output[index] = arm_cos_q31(in_angles[index]); in ZTEST() 38 test_snr_error_q31(length, output, ref_cos, SNR_ERROR_THRESH), in ZTEST() 42 test_near_equal_q31(length, output, ref_cos, ABS_ERROR_THRESH), in ZTEST() 46 free(output); in ZTEST() 53 q31_t *output; in ZTEST() local 56 output = malloc(length * sizeof(q31_t)); in ZTEST() 57 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in ZTEST() [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/complexmath/src/ |
D | f16.c | 25 float16_t *output; in test_arm_cmplx_conj_f16() local 31 output = malloc(buf_length * sizeof(float16_t)); in test_arm_cmplx_conj_f16() 32 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_conj_f16() 35 arm_cmplx_conj_f16((float16_t *)input1, output, length); in test_arm_cmplx_conj_f16() 39 test_snr_error_f16(buf_length, output, (float16_t *)ref, in test_arm_cmplx_conj_f16() 44 test_rel_error_f16(buf_length, output, (float16_t *)ref, in test_arm_cmplx_conj_f16() 49 free(output); in test_arm_cmplx_conj_f16() 60 float16_t *output; in test_arm_cmplx_dot_prod_f16() local 63 output = malloc(2 * sizeof(float16_t)); in test_arm_cmplx_dot_prod_f16() 64 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_dot_prod_f16() [all …]
|
D | f32.c | 25 float32_t *output; in test_arm_cmplx_conj_f32() local 31 output = malloc(buf_length * sizeof(float32_t)); in test_arm_cmplx_conj_f32() 32 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_conj_f32() 35 arm_cmplx_conj_f32((float32_t *)input1, output, length); in test_arm_cmplx_conj_f32() 39 test_snr_error_f32(buf_length, output, (float32_t *)ref, in test_arm_cmplx_conj_f32() 44 test_rel_error_f32(buf_length, output, (float32_t *)ref, in test_arm_cmplx_conj_f32() 49 free(output); in test_arm_cmplx_conj_f32() 60 float32_t *output; in test_arm_cmplx_dot_prod_f32() local 63 output = malloc(2 * sizeof(float32_t)); in test_arm_cmplx_dot_prod_f32() 64 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_dot_prod_f32() [all …]
|
D | q15.c | 27 q15_t *output; in test_arm_cmplx_conj_q15() local 33 output = malloc(buf_length * sizeof(q15_t)); in test_arm_cmplx_conj_q15() 34 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_conj_q15() 37 arm_cmplx_conj_q15(input1, output, length); in test_arm_cmplx_conj_q15() 41 test_snr_error_q15(buf_length, output, ref, SNR_ERROR_THRESH), in test_arm_cmplx_conj_q15() 45 test_near_equal_q15(buf_length, output, ref, in test_arm_cmplx_conj_q15() 50 free(output); in test_arm_cmplx_conj_q15() 61 q31_t *output; in test_arm_cmplx_dot_prod_q15() local 64 output = malloc(2 * sizeof(q31_t)); in test_arm_cmplx_dot_prod_q15() 65 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_dot_prod_q15() [all …]
|
D | q31.c | 26 q31_t *output; in test_arm_cmplx_conj_q31() local 32 output = malloc(buf_length * sizeof(q31_t)); in test_arm_cmplx_conj_q31() 33 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_conj_q31() 36 arm_cmplx_conj_q31(input1, output, length); in test_arm_cmplx_conj_q31() 40 test_snr_error_q31(buf_length, output, ref, SNR_ERROR_THRESH), in test_arm_cmplx_conj_q31() 44 test_near_equal_q31(buf_length, output, ref, in test_arm_cmplx_conj_q31() 49 free(output); in test_arm_cmplx_conj_q31() 60 q63_t *output; in test_arm_cmplx_dot_prod_q31() local 63 output = malloc(2 * sizeof(q63_t)); in test_arm_cmplx_dot_prod_q31() 64 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_cmplx_dot_prod_q31() [all …]
|
/Zephyr-latest/tests/lib/cmsis_dsp/statistics/src/ |
D | f32.c | 124 float32_t *output; in test_arm_mean_f32() local 130 output = malloc(1 * sizeof(float32_t)); in test_arm_mean_f32() 131 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_mean_f32() 134 arm_mean_f32((float32_t *)input1, length, &output[0]); in test_arm_mean_f32() 138 test_snr_error_f32(1, output, ref, SNR_ERROR_THRESH), in test_arm_mean_f32() 142 test_rel_error_f32(1, output, ref, REL_ERROR_THRESH), in test_arm_mean_f32() 146 free(output); in test_arm_mean_f32() 157 float32_t *output; in test_arm_power_f32() local 163 output = malloc(1 * sizeof(float32_t)); in test_arm_power_f32() 164 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_power_f32() [all …]
|