/Zephyr-Core-3.7.0/tests/subsys/dsp/basicmath/src/ |
D | q15.c | 25 DSP_DATA q15_t *output; in test_zdsp_add_q15() local 27 /* Allocate output buffer */ in test_zdsp_add_q15() 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() 34 /* Validate output */ 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() 43 /* Free output buffer */ in test_zdsp_add_q15() 44 free(output); in test_zdsp_add_q15() [all …]
|
D | q31.c | 23 DSP_DATA q31_t *output; in test_zdsp_add_q31() local 25 /* Allocate output buffer */ in test_zdsp_add_q31() 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() 32 /* Validate output */ 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() 41 /* Free output buffer */ in test_zdsp_add_q31() 42 free(output); in test_zdsp_add_q31() [all …]
|
D | q7.c | 23 DSP_DATA q7_t *output; in test_zdsp_add_q7() local 25 /* Allocate output buffer */ in test_zdsp_add_q7() 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() 32 /* Validate output */ 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() 41 /* Free output buffer */ in test_zdsp_add_q7() 42 free(output); in test_zdsp_add_q7() [all …]
|
D | f16.c | 24 float16_t *output; in test_zdsp_add_f16() local 26 /* Allocate output buffer */ in test_zdsp_add_f16() 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() 33 /* Validate output */ 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() 44 /* Free output buffer */ in test_zdsp_add_f16() 45 free(output); in test_zdsp_add_f16() [all …]
|
D | f32.c | 22 DSP_DATA float32_t *output; in test_zdsp_add_f32() local 24 /* Allocate output buffer */ in test_zdsp_add_f32() 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() 31 /* Validate output */ 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() 42 /* Free output buffer */ in test_zdsp_add_f32() 43 free(output); in test_zdsp_add_f32() [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/quaternionmath/src/ |
D | f32.c | 25 float32_t *output; in ZTEST() local 27 /* Allocate output buffer */ in ZTEST() 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() 34 /* Validate output */ 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() 44 /* Free output buffer */ in ZTEST() 45 free(output); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/support/src/ |
D | f32.c | 24 float32_t *output; in test_arm_copy_f32() local 26 /* Allocate output buffer */ in test_arm_copy_f32() 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() 33 /* Validate output */ in test_arm_copy_f32() 35 test_equal_f32(length, (float32_t *)input1, output), in test_arm_copy_f32() 38 /* Free output buffer */ in test_arm_copy_f32() 39 free(output); in test_arm_copy_f32() 49 float32_t *output; in test_arm_fill_f32() local [all …]
|
D | f16.c | 33 float16_t *output; in test_arm_copy_f16() local 35 /* Allocate output buffer */ in test_arm_copy_f16() 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() 42 /* Validate output */ in test_arm_copy_f16() 44 test_equal_f16(length, (float16_t *)input1, output), in test_arm_copy_f16() 47 /* Free output buffer */ in test_arm_copy_f16() 48 free(output); in test_arm_copy_f16() 58 float16_t *output; in test_arm_fill_f16() local [all …]
|
D | q15.c | 23 q15_t *output; in test_arm_copy_q15() local 25 /* Allocate output buffer */ in test_arm_copy_q15() 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() 32 /* Validate output */ in test_arm_copy_q15() 34 test_equal_q15(length, input1, output), in test_arm_copy_q15() 37 /* Free output buffer */ in test_arm_copy_q15() 38 free(output); in test_arm_copy_q15() 48 q15_t *output; in test_arm_fill_q15() local [all …]
|
D | q31.c | 23 q31_t *output; in test_arm_copy_q31() local 25 /* Allocate output buffer */ in test_arm_copy_q31() 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() 32 /* Validate output */ in test_arm_copy_q31() 34 test_equal_q31(length, input1, output), in test_arm_copy_q31() 37 /* Free output buffer */ in test_arm_copy_q31() 38 free(output); in test_arm_copy_q31() 48 q31_t *output; in test_arm_fill_q31() local [all …]
|
D | q7.c | 23 q7_t *output; in test_arm_copy_q7() local 25 /* Allocate output buffer */ in test_arm_copy_q7() 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() 32 /* Validate output */ in test_arm_copy_q7() 34 test_equal_q7(length, input1, output), in test_arm_copy_q7() 37 /* Free output buffer */ in test_arm_copy_q7() 38 free(output); in test_arm_copy_q7() 48 q7_t *output; in test_arm_fill_q7() local [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/complexmath/src/ |
D | f16.c | 25 float16_t *output; in test_arm_cmplx_conj_f16() local 30 /* Allocate output buffer */ in test_arm_cmplx_conj_f16() 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() 37 /* Validate output */ 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() 48 /* Free output buffer */ in test_arm_cmplx_conj_f16() 49 free(output); in test_arm_cmplx_conj_f16() [all …]
|
D | q31.c | 26 q31_t *output; in test_arm_cmplx_conj_q31() local 31 /* Allocate output buffer */ in test_arm_cmplx_conj_q31() 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() 38 /* Validate output */ 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() 48 /* Free output buffer */ in test_arm_cmplx_conj_q31() 49 free(output); in test_arm_cmplx_conj_q31() [all …]
|
D | f32.c | 25 float32_t *output; in test_arm_cmplx_conj_f32() local 30 /* Allocate output buffer */ in test_arm_cmplx_conj_f32() 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() 37 /* Validate output */ 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() 48 /* Free output buffer */ in test_arm_cmplx_conj_f32() 49 free(output); in test_arm_cmplx_conj_f32() [all …]
|
D | q15.c | 27 q15_t *output; in test_arm_cmplx_conj_q15() local 32 /* Allocate output buffer */ in test_arm_cmplx_conj_q15() 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() 39 /* Validate output */ 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() 49 /* Free output buffer */ in test_arm_cmplx_conj_q15() 50 free(output); in test_arm_cmplx_conj_q15() [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/fastmath/src/ |
D | f16.c | 41 float16_t *output; 43 /* Allocate output buffer */ 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]); 52 /* Validate output */ 54 test_snr_error_f16(length, output, (float16_t *)ref_cos, 59 test_close_error_f16(length, output, (float16_t *)ref_cos, 63 /* Free output buffer */ 64 free(output); [all …]
|
D | f32.c | 26 float32_t *output; in ZTEST() local 28 /* Allocate output buffer */ in ZTEST() 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() 37 /* Validate output */ 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() 48 /* Free output buffer */ in ZTEST() 49 free(output); in ZTEST() [all …]
|
D | q15.c | 25 q15_t *output; in ZTEST() local 27 /* Allocate output buffer */ in ZTEST() 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() 36 /* Validate output */ 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() 45 /* Free output buffer */ in ZTEST() 46 free(output); in ZTEST() [all …]
|
D | q31.c | 25 q31_t *output; in ZTEST() local 27 /* Allocate output buffer */ in ZTEST() 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() 36 /* Validate output */ 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() 45 /* Free output buffer */ in ZTEST() 46 free(output); in ZTEST() [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/statistics/src/ |
D | f32.c | 28 /* Validate output */ in test_arm_max_f32() 48 /* Validate output */ in test_arm_max_no_idx_f32() 66 /* Validate output */ in test_arm_min_f32() 87 /* Validate output */ in test_arm_absmax_f32() 108 /* Validate output */ in test_arm_absmin_f32() 124 float32_t *output; in test_arm_mean_f32() local 129 /* Allocate output buffer */ in test_arm_mean_f32() 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() [all …]
|
D | f16.c | 44 /* Validate output */ in test_arm_max_f16() 64 /* Validate output */ in test_arm_max_no_idx_f16() 82 /* Validate output */ in test_arm_min_f16() 103 /* Validate output */ in test_arm_absmax_f16() 124 /* Validate output */ in test_arm_absmin_f16() 140 float16_t *output; in test_arm_mean_f16() local 145 /* Allocate output buffer */ in test_arm_mean_f16() 146 output = malloc(1 * sizeof(float16_t)); in test_arm_mean_f16() 147 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_mean_f16() 150 arm_mean_f16((float16_t *)input1, length, &output[0]); in test_arm_mean_f16() [all …]
|
D | q15.c | 29 /* Validate output */ in test_arm_max_q15() 50 /* Validate output */ in test_arm_min_q15() 71 /* Validate output */ in test_arm_absmax_q15() 92 /* Validate output */ in test_arm_absmin_q15() 108 q15_t *output; in test_arm_mean_q15() local 113 /* Allocate output buffer */ in test_arm_mean_q15() 114 output = malloc(1 * sizeof(q15_t)); in test_arm_mean_q15() 115 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_mean_q15() 118 arm_mean_q15(input1, length, &output[0]); in test_arm_mean_q15() 120 /* Validate output */ in test_arm_mean_q15() [all …]
|
D | q31.c | 29 /* Validate output */ in test_arm_max_q31() 50 /* Validate output */ in test_arm_min_q31() 71 /* Validate output */ in test_arm_absmax_q31() 92 /* Validate output */ in test_arm_absmin_q31() 108 q31_t *output; in test_arm_mean_q31() local 113 /* Allocate output buffer */ in test_arm_mean_q31() 114 output = malloc(1 * sizeof(q31_t)); in test_arm_mean_q31() 115 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_mean_q31() 118 arm_mean_q31(input1, length, &output[0]); in test_arm_mean_q31() 120 /* Validate output */ in test_arm_mean_q31() [all …]
|
/Zephyr-Core-3.7.0/samples/modules/cmsis_dsp/moving_average/ |
D | sample.yaml | 17 - "Input\\[00\\]: 0 0 0 0 0 0 0 0 0 0 | Output\\[00\\]: 0.00" 18 - "Input\\[01\\]: 0 0 0 0 0 0 0 0 0 1 | Output\\[01\\]: 0.10" 19 - "Input\\[02\\]: 0 0 0 0 0 0 0 0 1 2 | Output\\[02\\]: 0.30" 20 - "Input\\[03\\]: 0 0 0 0 0 0 0 1 2 3 | Output\\[03\\]: 0.60" 21 - "Input\\[04\\]: 0 0 0 0 0 0 1 2 3 4 | Output\\[04\\]: 1.00" 22 - "Input\\[05\\]: 0 0 0 0 0 1 2 3 4 5 | Output\\[05\\]: 1.50" 23 - "Input\\[06\\]: 0 0 0 0 1 2 3 4 5 6 | Output\\[06\\]: 2.10" 24 - "Input\\[07\\]: 0 0 0 1 2 3 4 5 6 7 | Output\\[07\\]: 2.80" 25 - "Input\\[08\\]: 0 0 1 2 3 4 5 6 7 8 | Output\\[08\\]: 3.60" 26 - "Input\\[09\\]: 0 1 2 3 4 5 6 7 8 9 | Output\\[09\\]: 4.50" [all …]
|
/Zephyr-Core-3.7.0/tests/lib/cmsis_dsp/interpolation/src/ |
D | f32.c | 25 float32_t *output; in test_arm_linear_interp_f32() local 33 /* Allocate output buffer */ in test_arm_linear_interp_f32() 34 output = malloc(length * sizeof(float32_t)); in test_arm_linear_interp_f32() 35 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_arm_linear_interp_f32() 39 output[index] = arm_linear_interp_f32(&inst, in test_arm_linear_interp_f32() 43 /* Validate output */ in test_arm_linear_interp_f32() 45 test_snr_error_f32(length, output, (float32_t *)ref_linear, in test_arm_linear_interp_f32() 50 test_rel_error_f32(length, output, (float32_t *)ref_linear, in test_arm_linear_interp_f32() 54 /* Free output buffer */ in test_arm_linear_interp_f32() 55 free(output); in test_arm_linear_interp_f32() [all …]
|