Lines Matching full:output
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()
57 float16_t *output; in test_zdsp_add_f16_in_place() local
59 /* Allocate output buffer */ in test_zdsp_add_f16_in_place()
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()
63 /* Copy input data to output*/ in test_zdsp_add_f16_in_place()
64 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_add_f16_in_place()
67 zdsp_add_f16(output, (float16_t *)input2, output, length); in test_zdsp_add_f16_in_place()
69 /* Validate output */ in test_zdsp_add_f16_in_place()
70 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_add_f16_in_place()
73 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_add_f16_in_place()
76 /* Free output buffer */ in test_zdsp_add_f16_in_place()
77 free(output); in test_zdsp_add_f16_in_place()
90 float16_t *output; in test_zdsp_sub_f16() local
92 /* Allocate output buffer */ in test_zdsp_sub_f16()
93 output = malloc(length * sizeof(float16_t)); in test_zdsp_sub_f16()
94 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_f16()
97 zdsp_sub_f16((float16_t *)input1, (float16_t *)input2, output, length); in test_zdsp_sub_f16()
99 /* Validate output */ in test_zdsp_sub_f16()
101 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_sub_f16()
106 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_sub_f16()
110 /* Free output buffer */ in test_zdsp_sub_f16()
111 free(output); in test_zdsp_sub_f16()
123 float16_t *output; in test_zdsp_sub_f16_in_place() local
125 /* Allocate output buffer */ in test_zdsp_sub_f16_in_place()
126 output = malloc(length * sizeof(float16_t)); in test_zdsp_sub_f16_in_place()
127 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_sub_f16_in_place()
129 /* Copy input data to output*/ in test_zdsp_sub_f16_in_place()
130 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_sub_f16_in_place()
133 zdsp_sub_f16(output, (float16_t *)input2, output, length); in test_zdsp_sub_f16_in_place()
135 /* Validate output */ in test_zdsp_sub_f16_in_place()
136 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_sub_f16_in_place()
139 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_sub_f16_in_place()
142 /* Free output buffer */ in test_zdsp_sub_f16_in_place()
143 free(output); in test_zdsp_sub_f16_in_place()
156 float16_t *output; in test_zdsp_mult_f16() local
158 /* Allocate output buffer */ in test_zdsp_mult_f16()
159 output = malloc(length * sizeof(float16_t)); in test_zdsp_mult_f16()
160 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_f16()
163 zdsp_mult_f16((float16_t *)input1, (float16_t *)input2, output, length); in test_zdsp_mult_f16()
165 /* Validate output */ in test_zdsp_mult_f16()
167 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_mult_f16()
172 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_mult_f16()
176 /* Free output buffer */ in test_zdsp_mult_f16()
177 free(output); in test_zdsp_mult_f16()
189 float16_t *output; in test_zdsp_mult_f16_in_place() local
191 /* Allocate output buffer */ in test_zdsp_mult_f16_in_place()
192 output = malloc(length * sizeof(float16_t)); in test_zdsp_mult_f16_in_place()
193 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_mult_f16_in_place()
195 /* Copy input data to output*/ in test_zdsp_mult_f16_in_place()
196 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_mult_f16_in_place()
199 zdsp_mult_f16(output, (float16_t *)input2, output, length); in test_zdsp_mult_f16_in_place()
201 /* Validate output */ in test_zdsp_mult_f16_in_place()
202 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_mult_f16_in_place()
205 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_mult_f16_in_place()
208 /* Free output buffer */ in test_zdsp_mult_f16_in_place()
209 free(output); in test_zdsp_mult_f16_in_place()
221 float16_t *output; in test_zdsp_negate_f16() local
223 /* Allocate output buffer */ in test_zdsp_negate_f16()
224 output = malloc(length * sizeof(float16_t)); in test_zdsp_negate_f16()
225 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_f16()
228 zdsp_negate_f16((float16_t *)input1, output, length); in test_zdsp_negate_f16()
230 /* Validate output */ in test_zdsp_negate_f16()
232 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_negate_f16()
237 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_negate_f16()
241 /* Free output buffer */ in test_zdsp_negate_f16()
242 free(output); in test_zdsp_negate_f16()
254 float16_t *output; in test_zdsp_negate_f16_in_place() local
256 /* Allocate output buffer */ in test_zdsp_negate_f16_in_place()
257 output = malloc(length * sizeof(float16_t)); in test_zdsp_negate_f16_in_place()
258 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_negate_f16_in_place()
260 /* Copy input data to output*/ in test_zdsp_negate_f16_in_place()
261 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_negate_f16_in_place()
264 zdsp_negate_f16(output, output, length); in test_zdsp_negate_f16_in_place()
266 /* Validate output */ in test_zdsp_negate_f16_in_place()
267 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_negate_f16_in_place()
270 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_negate_f16_in_place()
273 /* Free output buffer */ in test_zdsp_negate_f16_in_place()
274 free(output); in test_zdsp_negate_f16_in_place()
287 float16_t *output; in test_zdsp_offset_f16() local
289 /* Allocate output buffer */ in test_zdsp_offset_f16()
290 output = malloc(length * sizeof(float16_t)); in test_zdsp_offset_f16()
291 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_f16()
294 zdsp_offset_f16((float16_t *)input1, scalar, output, length); in test_zdsp_offset_f16()
296 /* Validate output */ in test_zdsp_offset_f16()
298 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_offset_f16()
303 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_offset_f16()
307 /* Free output buffer */ in test_zdsp_offset_f16()
308 free(output); in test_zdsp_offset_f16()
320 float16_t *output; in test_zdsp_offset_f16_in_place() local
322 /* Allocate output buffer */ in test_zdsp_offset_f16_in_place()
323 output = malloc(length * sizeof(float16_t)); in test_zdsp_offset_f16_in_place()
324 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_offset_f16_in_place()
326 /* Copy input data to output*/ in test_zdsp_offset_f16_in_place()
327 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_offset_f16_in_place()
330 zdsp_offset_f16(output, scalar, output, length); in test_zdsp_offset_f16_in_place()
332 /* Validate output */ in test_zdsp_offset_f16_in_place()
333 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_offset_f16_in_place()
336 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_offset_f16_in_place()
339 /* Free output buffer */ in test_zdsp_offset_f16_in_place()
340 free(output); in test_zdsp_offset_f16_in_place()
355 float16_t *output; in test_zdsp_scale_f16() local
357 /* Allocate output buffer */ in test_zdsp_scale_f16()
358 output = malloc(length * sizeof(float16_t)); in test_zdsp_scale_f16()
359 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_f16()
362 zdsp_scale_f16((float16_t *)input1, scalar, output, length); in test_zdsp_scale_f16()
364 /* Validate output */ in test_zdsp_scale_f16()
366 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_scale_f16()
371 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_scale_f16()
375 /* Free output buffer */ in test_zdsp_scale_f16()
376 free(output); in test_zdsp_scale_f16()
388 float16_t *output; in test_zdsp_scale_f16_in_place() local
390 /* Allocate output buffer */ in test_zdsp_scale_f16_in_place()
391 output = malloc(length * sizeof(float16_t)); in test_zdsp_scale_f16_in_place()
392 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_scale_f16_in_place()
394 /* Copy input data to output*/ in test_zdsp_scale_f16_in_place()
395 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_scale_f16_in_place()
398 zdsp_scale_f16(output, scalar, output, length); in test_zdsp_scale_f16_in_place()
400 /* Validate output */ in test_zdsp_scale_f16_in_place()
401 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_scale_f16_in_place()
404 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_scale_f16_in_place()
407 /* Free output buffer */ in test_zdsp_scale_f16_in_place()
408 free(output); in test_zdsp_scale_f16_in_place()
421 float16_t *output; in test_zdsp_dot_prod_f16() local
423 /* Allocate output buffer */ in test_zdsp_dot_prod_f16()
424 output = malloc(1 * sizeof(float16_t)); in test_zdsp_dot_prod_f16()
425 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_dot_prod_f16()
429 (float16_t *)input1, (float16_t *)input2, length, &output[0]); in test_zdsp_dot_prod_f16()
431 /* Validate output */ in test_zdsp_dot_prod_f16()
433 test_snr_error_f16(1, output, (float16_t *)ref, in test_zdsp_dot_prod_f16()
438 test_rel_error_f16(1, output, (float16_t *)ref, in test_zdsp_dot_prod_f16()
442 /* Free output buffer */ in test_zdsp_dot_prod_f16()
443 free(output); in test_zdsp_dot_prod_f16()
455 float16_t *output; in test_zdsp_abs_f16() local
457 /* Allocate output buffer */ in test_zdsp_abs_f16()
458 output = malloc(length * sizeof(float16_t)); in test_zdsp_abs_f16()
459 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_f16()
462 zdsp_abs_f16((float16_t *)input1, output, length); in test_zdsp_abs_f16()
464 /* Validate output */ in test_zdsp_abs_f16()
466 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_abs_f16()
471 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_abs_f16()
475 /* Free output buffer */ in test_zdsp_abs_f16()
476 free(output); in test_zdsp_abs_f16()
486 float16_t *output; in test_zdsp_abs_f16_in_place() local
488 /* Allocate output buffer */ in test_zdsp_abs_f16_in_place()
489 output = malloc(length * sizeof(float16_t)); in test_zdsp_abs_f16_in_place()
490 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_abs_f16_in_place()
492 /* Copy input data to output*/ in test_zdsp_abs_f16_in_place()
493 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_abs_f16_in_place()
496 zdsp_abs_f16(output, output, length); in test_zdsp_abs_f16_in_place()
498 /* Validate output */ in test_zdsp_abs_f16_in_place()
499 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_abs_f16_in_place()
502 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_abs_f16_in_place()
505 /* Free output buffer */ in test_zdsp_abs_f16_in_place()
506 free(output); in test_zdsp_abs_f16_in_place()
518 float16_t *output; in test_zdsp_clip_f16() local
520 /* Allocate output buffer */ in test_zdsp_clip_f16()
521 output = malloc(length * sizeof(float16_t)); in test_zdsp_clip_f16()
522 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_f16()
525 zdsp_clip_f16((float16_t *)input, output, min, max, length); in test_zdsp_clip_f16()
527 /* Validate output */ in test_zdsp_clip_f16()
529 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_clip_f16()
534 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_clip_f16()
538 /* Free output buffer */ in test_zdsp_clip_f16()
539 free(output); in test_zdsp_clip_f16()
552 float16_t *output; in test_zdsp_clip_f16_in_place() local
554 /* Allocate output buffer */ in test_zdsp_clip_f16_in_place()
555 output = malloc(length * sizeof(float16_t)); in test_zdsp_clip_f16_in_place()
556 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED); in test_zdsp_clip_f16_in_place()
558 /* Copy input data to output*/ in test_zdsp_clip_f16_in_place()
559 memcpy(output, (float16_t *)input, length * sizeof(float16_t)); in test_zdsp_clip_f16_in_place()
562 zdsp_clip_f16(output, output, min, max, length); in test_zdsp_clip_f16_in_place()
564 /* Validate output */ in test_zdsp_clip_f16_in_place()
565 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_clip_f16_in_place()
568 zassert_true(test_rel_error_f16(length, output, (float16_t *)ref, REL_ERROR_THRESH), in test_zdsp_clip_f16_in_place()
571 /* Free output buffer */ in test_zdsp_clip_f16_in_place()
572 free(output); in test_zdsp_clip_f16_in_place()