Lines Matching full:length
21 const q7_t *ref, size_t length) in test_zdsp_add_q7() argument
26 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); 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()
54 const q7_t *ref, size_t length) in test_zdsp_add_q7_in_place() argument
59 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_add_q7_in_place()
63 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_add_q7_in_place()
66 zdsp_add_q7(output, input2, output, length); in test_zdsp_add_q7_in_place()
69 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_add_q7_in_place()
72 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_add_q7_in_place()
90 const q7_t *ref, size_t length) in test_zdsp_sub_q7() argument
95 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_sub_q7()
99 zdsp_sub_q7(input1, input2, output, length); in test_zdsp_sub_q7()
103 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q7()
107 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_sub_q7()
123 const q7_t *ref, size_t length) in test_zdsp_sub_q7_in_place() argument
128 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_sub_q7_in_place()
132 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_sub_q7_in_place()
135 zdsp_sub_q7(output, input2, output, length); in test_zdsp_sub_q7_in_place()
138 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_sub_q7_in_place()
141 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_sub_q7_in_place()
159 const q7_t *ref, size_t length) in test_zdsp_mult_q7() argument
164 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_mult_q7()
168 zdsp_mult_q7(input1, input2, output, length); in test_zdsp_mult_q7()
172 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q7()
176 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_mult_q7()
192 const q7_t *ref, size_t length) in test_zdsp_mult_q7_in_place() argument
197 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_mult_q7_in_place()
201 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_mult_q7_in_place()
204 zdsp_mult_q7(output, input2, output, length); in test_zdsp_mult_q7_in_place()
207 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_mult_q7_in_place()
210 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_mult_q7_in_place()
225 static void test_zdsp_negate_q7(const DSP_DATA q7_t *input1, const q7_t *ref, size_t length) in test_zdsp_negate_q7() argument
230 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_negate_q7()
234 zdsp_negate_q7(input1, output, length); in test_zdsp_negate_q7()
238 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q7()
242 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_negate_q7()
256 size_t length) in test_zdsp_negate_q7_in_place() argument
261 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_negate_q7_in_place()
265 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_negate_q7_in_place()
268 zdsp_negate_q7(output, output, length); in test_zdsp_negate_q7_in_place()
271 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_negate_q7_in_place()
274 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_negate_q7_in_place()
290 size_t length) in test_zdsp_offset_q7() argument
295 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_offset_q7()
299 zdsp_offset_q7(input1, scalar, output, length); in test_zdsp_offset_q7()
303 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q7()
307 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_offset_q7()
323 size_t length) in test_zdsp_offset_q7_in_place() argument
328 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_offset_q7_in_place()
332 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_offset_q7_in_place()
335 zdsp_offset_q7(output, scalar, output, length); in test_zdsp_offset_q7_in_place()
338 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_offset_q7_in_place()
341 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_offset_q7_in_place()
359 size_t length) in test_zdsp_scale_q7() argument
364 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_scale_q7()
368 zdsp_scale_q7(input1, scalar, 0, output, length); in test_zdsp_scale_q7()
372 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q7()
376 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_scale_q7()
391 size_t length) in test_zdsp_scale_q7_in_place() argument
396 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_scale_q7_in_place()
400 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_scale_q7_in_place()
403 zdsp_scale_q7(output, scalar, 0, output, length); in test_zdsp_scale_q7_in_place()
406 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_scale_q7_in_place()
409 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_scale_q7_in_place()
425 const q31_t *ref, size_t length) in test_zdsp_dot_prod_q7() argument
434 zdsp_dot_prod_q7(input1, input2, length, &output[0]); in test_zdsp_dot_prod_q7()
455 static void test_zdsp_abs_q7(const DSP_DATA q7_t *input1, const q7_t *ref, size_t length) in test_zdsp_abs_q7() argument
460 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_abs_q7()
464 zdsp_abs_q7(input1, output, length); in test_zdsp_abs_q7()
468 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q7()
472 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_abs_q7()
484 static void test_zdsp_abs_q7_in_place(const DSP_DATA q7_t *input1, const q7_t *ref, size_t length) in test_zdsp_abs_q7_in_place() argument
489 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_abs_q7_in_place()
493 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_abs_q7_in_place()
496 zdsp_abs_q7(output, output, length); in test_zdsp_abs_q7_in_place()
499 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_abs_q7_in_place()
502 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_abs_q7_in_place()
515 static void test_zdsp_shift_q7(const DSP_DATA q7_t *input1, const q7_t *ref, size_t length) in test_zdsp_shift_q7() argument
520 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_shift_q7()
524 zdsp_shift_q7(input1, 1, output, length); in test_zdsp_shift_q7()
528 test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q7()
532 test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_shift_q7()
543 static void test_zdsp_shift_q7_in_place(const DSP_DATA q7_t *input1, const q7_t *ref, size_t length) in test_zdsp_shift_q7_in_place() argument
548 output = (DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_shift_q7_in_place()
552 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_shift_q7_in_place()
555 zdsp_shift_q7(output, 1, output, length); in test_zdsp_shift_q7_in_place()
558 zassert_true(test_snr_error_q7(length, output, ref, SNR_ERROR_THRESH), in test_zdsp_shift_q7_in_place()
561 zassert_true(test_near_equal_q7(length, output, ref, ABS_ERROR_THRESH_Q7), in test_zdsp_shift_q7_in_place()
575 const uint8_t *ref, size_t length) in test_zdsp_and_u8() argument
580 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_and_u8()
584 zdsp_and_u8(input1, input2, output, length); in test_zdsp_and_u8()
588 test_equal_q7(length, output, ref), in test_zdsp_and_u8()
600 const DSP_DATA uint8_t *input2, const uint8_t *ref, size_t length) in test_zdsp_and_u8_in_place() argument
605 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_and_u8_in_place()
609 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_and_u8_in_place()
612 zdsp_and_u8(output, input2, output, length); in test_zdsp_and_u8_in_place()
615 zassert_true(test_equal_q7(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_and_u8_in_place()
629 const uint8_t *ref, size_t length) in test_zdsp_or_u8() argument
634 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_or_u8()
638 zdsp_or_u8(input1, input2, output, length); in test_zdsp_or_u8()
642 test_equal_q7(length, output, ref), in test_zdsp_or_u8()
654 const uint8_t *ref, size_t length) in test_zdsp_or_u8_in_place() argument
659 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_or_u8_in_place()
663 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_or_u8_in_place()
666 zdsp_or_u8(output, input2, output, length); in test_zdsp_or_u8_in_place()
669 zassert_true(test_equal_q7(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_or_u8_in_place()
679 static void test_zdsp_not_u8(const DSP_DATA uint8_t *input1, const uint8_t *ref, size_t length) in test_zdsp_not_u8() argument
684 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_not_u8()
688 zdsp_not_u8(input1, output, length); in test_zdsp_not_u8()
692 test_equal_q7(length, output, ref), in test_zdsp_not_u8()
704 size_t length) in test_zdsp_not_u8_in_place() argument
709 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_not_u8_in_place()
713 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_not_u8_in_place()
716 zdsp_not_u8(output, output, length); in test_zdsp_not_u8_in_place()
719 zassert_true(test_equal_q7(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_not_u8_in_place()
730 const uint8_t *ref, size_t length) in test_zdsp_xor_u8() argument
735 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_xor_u8()
739 zdsp_xor_u8(input1, input2, output, length); in test_zdsp_xor_u8()
743 test_equal_q7(length, output, ref), in test_zdsp_xor_u8()
755 const DSP_DATA uint8_t *input2, const uint8_t *ref, size_t length) in test_zdsp_xor_u8_in_place() argument
760 output = (DSP_DATA q7_t *)malloc(length * sizeof(uint8_t)); in test_zdsp_xor_u8_in_place()
764 memcpy(output, input1, length * sizeof(q7_t)); in test_zdsp_xor_u8_in_place()
767 zdsp_xor_u8(output, input2, output, length); in test_zdsp_xor_u8_in_place()
770 zassert_true(test_equal_q7(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_xor_u8_in_place()
784 size_t length) in test_zdsp_clip_q7() argument
789 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_clip_q7()
793 zdsp_clip_q7(input, output, min, max, length); in test_zdsp_clip_q7()
797 test_equal_q7(length, output, ref), in test_zdsp_clip_q7()
812 q7_t max, size_t length) in test_zdsp_clip_q7_in_place() argument
817 output = (DSP_DATA q7_t *)(DSP_DATA q7_t *)malloc(length * sizeof(q7_t)); in test_zdsp_clip_q7_in_place()
821 memcpy(output, input, length * sizeof(q7_t)); in test_zdsp_clip_q7_in_place()
824 zdsp_clip_q7(output, output, min, max, length); in test_zdsp_clip_q7_in_place()
827 zassert_true(test_equal_q7(length, output, ref), ASSERT_MSG_INCORRECT_COMP_RESULT); in test_zdsp_clip_q7_in_place()