Lines Matching full:length

21 				const q31_t *ref, size_t length)  in test_zdsp_add_q31()  argument
26 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); 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()
54 const q31_t *ref, size_t length) in test_zdsp_add_q31_in_place() argument
59 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_add_q31_in_place()
63 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_add_q31_in_place()
66 zdsp_add_q31(output, input2, output, length); in test_zdsp_add_q31_in_place()
69 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q31_in_place()
72 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_add_q31_in_place()
90 const q31_t *ref, size_t length) in test_zdsp_sub_q31() argument
95 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_sub_q31()
99 zdsp_sub_q31(input1, input2, output, length); in test_zdsp_sub_q31()
103 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q31()
107 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_sub_q31()
123 const q31_t *ref, size_t length) in test_zdsp_sub_q31_in_place() argument
128 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_sub_q31_in_place()
132 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_sub_q31_in_place()
135 zdsp_sub_q31(output, input2, output, length); in test_zdsp_sub_q31_in_place()
138 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q31_in_place()
141 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_sub_q31_in_place()
159 const q31_t *ref, size_t length) in test_zdsp_mult_q31() argument
164 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_mult_q31()
168 zdsp_mult_q31(input1, input2, output, length); in test_zdsp_mult_q31()
172 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q31()
176 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_mult_q31()
192 const q31_t *ref, size_t length) in test_zdsp_mult_q31_in_place() argument
197 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_mult_q31_in_place()
201 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_mult_q31_in_place()
204 zdsp_mult_q31(output, input2, output, length); in test_zdsp_mult_q31_in_place()
207 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q31_in_place()
210 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_mult_q31_in_place()
225 static void test_zdsp_negate_q31(const DSP_DATA q31_t *input1, const q31_t *ref, size_t length) in test_zdsp_negate_q31() argument
230 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_negate_q31()
234 zdsp_negate_q31(input1, output, length); in test_zdsp_negate_q31()
238 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q31()
242 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_negate_q31()
257 size_t length) in test_zdsp_negate_q31_in_place() argument
262 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_negate_q31_in_place()
266 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_negate_q31_in_place()
269 zdsp_negate_q31(output, output, length); in test_zdsp_negate_q31_in_place()
272 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q31_in_place()
275 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_negate_q31_in_place()
291 size_t length) in test_zdsp_offset_q31() argument
296 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_offset_q31()
300 zdsp_offset_q31(input1, scalar, output, length); in test_zdsp_offset_q31()
304 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q31()
308 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_offset_q31()
326 const q31_t *ref, size_t length) in test_zdsp_offset_q31_in_place() argument
331 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_offset_q31_in_place()
335 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_offset_q31_in_place()
338 zdsp_offset_q31(output, scalar, output, length); in test_zdsp_offset_q31_in_place()
341 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q31_in_place()
344 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_offset_q31_in_place()
365 size_t length) in test_zdsp_scale_q31() argument
370 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_scale_q31()
374 zdsp_scale_q31(input1, scalar, 0, output, length); in test_zdsp_scale_q31()
378 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q31()
382 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_scale_q31()
398 const q31_t *ref, size_t length) in test_zdsp_scale_q31_in_place() argument
403 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_scale_q31_in_place()
407 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_scale_q31_in_place()
410 zdsp_scale_q31(output, scalar, 0, output, length); in test_zdsp_scale_q31_in_place()
413 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q31_in_place()
416 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_scale_q31_in_place()
435 const q63_t *ref, size_t length) in test_zdsp_dot_prod_q31() argument
440 output = (DSP_DATA q63_t *)malloc(length * sizeof(q63_t)); in test_zdsp_dot_prod_q31()
444 zdsp_dot_prod_q31(input1, input2, length, &output[0]); in test_zdsp_dot_prod_q31()
465 static void test_zdsp_abs_q31(const DSP_DATA q31_t *input1, const q31_t *ref, size_t length) in test_zdsp_abs_q31() argument
470 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_abs_q31()
474 zdsp_abs_q31(input1, output, length); in test_zdsp_abs_q31()
478 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q31()
482 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_abs_q31()
495 size_t length) in test_zdsp_abs_q31_in_place() argument
500 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_abs_q31_in_place()
504 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_abs_q31_in_place()
507 zdsp_abs_q31(output, output, length); in test_zdsp_abs_q31_in_place()
510 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q31_in_place()
513 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_abs_q31_in_place()
526 static void test_zdsp_shift_q31(const DSP_DATA q31_t *input1, const q31_t *ref, size_t length) in test_zdsp_shift_q31() argument
531 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_shift_q31()
535 zdsp_shift_q31(input1, 1, output, length); in test_zdsp_shift_q31()
539 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q31()
543 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_shift_q31()
555 size_t length) in test_zdsp_shift_q31_in_place() argument
560 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_shift_q31_in_place()
564 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_shift_q31_in_place()
567 zdsp_shift_q31(output, 1, output, length); in test_zdsp_shift_q31_in_place()
570 zassert_true(test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q31_in_place()
573 zassert_true(test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31), in test_zdsp_shift_q31_in_place()
587 const uint32_t *ref, size_t length) in test_zdsp_and_u32() argument
592 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_and_u32()
596 zdsp_and_u32(input1, input2, output, length); in test_zdsp_and_u32()
600 test_equal_q31(length, output, ref), in test_zdsp_and_u32()
612 const DSP_DATA uint32_t *input2, const uint32_t *ref, size_t length) in test_zdsp_and_u32_in_place() argument
617 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_and_u32_in_place()
621 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_and_u32_in_place()
624 zdsp_and_u32(output, input2, output, length); in test_zdsp_and_u32_in_place()
627 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_and_u32_in_place()
641 const uint32_t *ref, size_t length) in test_zdsp_or_u32() argument
646 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_or_u32()
650 zdsp_or_u32(input1, input2, output, length); in test_zdsp_or_u32()
654 test_equal_q31(length, output, ref), in test_zdsp_or_u32()
666 const DSP_DATA uint32_t *input2, const uint32_t *ref, size_t length) in test_zdsp_or_u32_in_place() argument
671 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_or_u32_in_place()
675 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_or_u32_in_place()
678 zdsp_or_u32(output, input2, output, length); in test_zdsp_or_u32_in_place()
681 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_or_u32_in_place()
692 static void test_zdsp_not_u32(const DSP_DATA uint32_t *input1, const uint32_t *ref, size_t length) in test_zdsp_not_u32() argument
697 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_not_u32()
701 zdsp_not_u32(input1, output, length); in test_zdsp_not_u32()
705 test_equal_q31(length, output, ref), in test_zdsp_not_u32()
717 size_t length) in test_zdsp_not_u32_in_place() argument
722 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_not_u32_in_place()
726 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_not_u32_in_place()
729 zdsp_not_u32(output, output, length); in test_zdsp_not_u32_in_place()
732 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_not_u32_in_place()
743 const uint32_t *ref, size_t length) in test_zdsp_xor_u32() argument
748 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_xor_u32()
752 zdsp_xor_u32(input1, input2, output, length); in test_zdsp_xor_u32()
756 test_equal_q31(length, output, ref), in test_zdsp_xor_u32()
768 const DSP_DATA uint32_t *input2, const uint32_t *ref, size_t length) in test_zdsp_xor_u32_in_place() argument
773 output = (DSP_DATA uint32_t *)malloc(length * sizeof(uint32_t)); in test_zdsp_xor_u32_in_place()
777 memcpy(output, input1, length * sizeof(q31_t)); in test_zdsp_xor_u32_in_place()
780 zdsp_xor_u32(output, input2, output, length); in test_zdsp_xor_u32_in_place()
783 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_xor_u32_in_place()
797 size_t length) in test_zdsp_clip_q31() argument
802 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_clip_q31()
806 zdsp_clip_q31(input, output, min, max, length); in test_zdsp_clip_q31()
810 test_equal_q31(length, output, ref), in test_zdsp_clip_q31()
825 q31_t max, size_t length) in test_zdsp_clip_q31_in_place() argument
830 output = (DSP_DATA q31_t *)malloc(length * sizeof(q31_t)); in test_zdsp_clip_q31_in_place()
834 memcpy(output, input, length * sizeof(q31_t)); in test_zdsp_clip_q31_in_place()
837 zdsp_clip_q31(output, output, min, max, length); in test_zdsp_clip_q31_in_place()
840 zassert_true(test_equal_q31(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_clip_q31_in_place()