1 /*
2 * Copyright (c) 2021 Stephanos Ioannidis <root@stephanos.io>
3 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8 #include <ztest.h>
9 #include <zephyr.h>
10 #include <stdlib.h>
11 #include <arm_math.h>
12 #include "../../common/test_common.h"
13
14 #include "q31.pat"
15
16 #define SNR_ERROR_THRESH ((float32_t)100)
17 #define ABS_ERROR_THRESH_Q31 ((q31_t)4)
18 #define ABS_ERROR_THRESH_Q63 ((q63_t)(1 << 17))
19
test_arm_add_q31(const q31_t * input1,const q31_t * input2,const q31_t * ref,size_t length)20 static void test_arm_add_q31(
21 const q31_t *input1, const q31_t *input2, const q31_t *ref, size_t length)
22 {
23 q31_t *output;
24
25 /* Allocate output buffer */
26 output = malloc(length * sizeof(q31_t));
27 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
28
29 /* Run test function */
30 arm_add_q31(input1, input2, output, length);
31
32 /* Validate output */
33 zassert_true(
34 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
35 ASSERT_MSG_SNR_LIMIT_EXCEED);
36
37 zassert_true(
38 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
39 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
40
41 /* Free output buffer */
42 free(output);
43 }
44
45 DEFINE_TEST_VARIANT4(arm_add_q31, 3, in_com1, in_com2, ref_add, 3);
46 DEFINE_TEST_VARIANT4(arm_add_q31, 8, in_com1, in_com2, ref_add, 8);
47 DEFINE_TEST_VARIANT4(arm_add_q31, 11, in_com1, in_com2, ref_add, 11);
48 DEFINE_TEST_VARIANT4(arm_add_q31, possat, in_maxpos, in_maxpos, ref_add_possat, 9);
49 DEFINE_TEST_VARIANT4(arm_add_q31, negsat, in_maxneg, in_maxneg, ref_add_negsat, 9);
50 DEFINE_TEST_VARIANT4(arm_add_q31, long, in_com1, in_com2, ref_add, ARRAY_SIZE(in_com1));
51
test_arm_sub_q31(const q31_t * input1,const q31_t * input2,const q31_t * ref,size_t length)52 static void test_arm_sub_q31(
53 const q31_t *input1, const q31_t *input2, const q31_t *ref, size_t length)
54 {
55 q31_t *output;
56
57 /* Allocate output buffer */
58 output = malloc(length * sizeof(q31_t));
59 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
60
61 /* Run test function */
62 arm_sub_q31(input1, input2, output, length);
63
64 /* Validate output */
65 zassert_true(
66 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
67 ASSERT_MSG_SNR_LIMIT_EXCEED);
68
69 zassert_true(
70 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
71 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
72
73 /* Free output buffer */
74 free(output);
75 }
76
77 DEFINE_TEST_VARIANT4(arm_sub_q31, 3, in_com1, in_com2, ref_sub, 3);
78 DEFINE_TEST_VARIANT4(arm_sub_q31, 8, in_com1, in_com2, ref_sub, 8);
79 DEFINE_TEST_VARIANT4(arm_sub_q31, 11, in_com1, in_com2, ref_sub, 11);
80 DEFINE_TEST_VARIANT4(arm_sub_q31, possat, in_maxpos, in_maxneg, ref_sub_possat, 9);
81 DEFINE_TEST_VARIANT4(arm_sub_q31, negsat, in_maxneg, in_maxpos, ref_sub_negsat, 9);
82 DEFINE_TEST_VARIANT4(arm_sub_q31, long, in_com1, in_com2, ref_sub, ARRAY_SIZE(in_com1));
83
test_arm_mult_q31(const q31_t * input1,const q31_t * input2,const q31_t * ref,size_t length)84 static void test_arm_mult_q31(
85 const q31_t *input1, const q31_t *input2, const q31_t *ref, size_t length)
86 {
87 q31_t *output;
88
89 /* Allocate output buffer */
90 output = malloc(length * sizeof(q31_t));
91 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
92
93 /* Run test function */
94 arm_mult_q31(input1, input2, output, length);
95
96 /* Validate output */
97 zassert_true(
98 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
99 ASSERT_MSG_SNR_LIMIT_EXCEED);
100
101 zassert_true(
102 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
103 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
104
105 /* Free output buffer */
106 free(output);
107 }
108
109 DEFINE_TEST_VARIANT4(arm_mult_q31, 3, in_com1, in_com2, ref_mult, 3);
110 DEFINE_TEST_VARIANT4(arm_mult_q31, 8, in_com1, in_com2, ref_mult, 8);
111 DEFINE_TEST_VARIANT4(arm_mult_q31, 11, in_com1, in_com2, ref_mult, 11);
112 DEFINE_TEST_VARIANT4(arm_mult_q31, possat, in_maxneg2, in_maxneg2, ref_mult_possat, 9);
113 DEFINE_TEST_VARIANT4(arm_mult_q31, long, in_com1, in_com2, ref_mult, ARRAY_SIZE(in_com1));
114
test_arm_negate_q31(const q31_t * input1,const q31_t * ref,size_t length)115 static void test_arm_negate_q31(
116 const q31_t *input1, const q31_t *ref, size_t length)
117 {
118 q31_t *output;
119
120 /* Allocate output buffer */
121 output = malloc(length * sizeof(q31_t));
122 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
123
124 /* Run test function */
125 arm_negate_q31(input1, output, length);
126
127 /* Validate output */
128 zassert_true(
129 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
130 ASSERT_MSG_SNR_LIMIT_EXCEED);
131
132 zassert_true(
133 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
134 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
135
136 /* Free output buffer */
137 free(output);
138 }
139
140 DEFINE_TEST_VARIANT3(arm_negate_q31, 3, in_com1, ref_negate, 3);
141 DEFINE_TEST_VARIANT3(arm_negate_q31, 8, in_com1, ref_negate, 8);
142 DEFINE_TEST_VARIANT3(arm_negate_q31, 11, in_com1, ref_negate, 11);
143 DEFINE_TEST_VARIANT3(arm_negate_q31, possat, in_maxneg2, ref_negate_possat, 9);
144 DEFINE_TEST_VARIANT3(arm_negate_q31, long, in_com1, ref_negate, ARRAY_SIZE(in_com1));
145
test_arm_offset_q31(const q31_t * input1,q31_t scalar,const q31_t * ref,size_t length)146 static void test_arm_offset_q31(
147 const q31_t *input1, q31_t scalar, const q31_t *ref, size_t length)
148 {
149 q31_t *output;
150
151 /* Allocate output buffer */
152 output = malloc(length * sizeof(q31_t));
153 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
154
155 /* Run test function */
156 arm_offset_q31(input1, scalar, output, length);
157
158 /* Validate output */
159 zassert_true(
160 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
161 ASSERT_MSG_SNR_LIMIT_EXCEED);
162
163 zassert_true(
164 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
165 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
166
167 /* Free output buffer */
168 free(output);
169 }
170
171 DEFINE_TEST_VARIANT4(arm_offset_q31, 0p5_3, in_com1, 0x40000000, ref_offset, 3);
172 DEFINE_TEST_VARIANT4(arm_offset_q31, 0p5_8, in_com1, 0x40000000, ref_offset, 8);
173 DEFINE_TEST_VARIANT4(arm_offset_q31, 0p5_11, in_com1, 0x40000000, ref_offset, 11);
174 DEFINE_TEST_VARIANT4(arm_offset_q31, possat, in_maxpos, 0x73333333, ref_offset_possat, 9);
175 DEFINE_TEST_VARIANT4(arm_offset_q31, negsat, in_maxneg, 0x8ccccccd, ref_offset_negsat, 9);
176 DEFINE_TEST_VARIANT4(arm_offset_q31, long, in_com1, 0x40000000, ref_offset, ARRAY_SIZE(in_com1));
177
test_arm_scale_q31(const q31_t * input1,q31_t scalar,const q31_t * ref,size_t length)178 static void test_arm_scale_q31(
179 const q31_t *input1, q31_t scalar, const q31_t *ref, size_t length)
180 {
181 q31_t *output;
182
183 /* Allocate output buffer */
184 output = malloc(length * sizeof(q31_t));
185 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
186
187 /* Run test function */
188 arm_scale_q31(input1, scalar, 0, output, length);
189
190 /* Validate output */
191 zassert_true(
192 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
193 ASSERT_MSG_SNR_LIMIT_EXCEED);
194
195 zassert_true(
196 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
197 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
198
199 /* Free output buffer */
200 free(output);
201 }
202
203 DEFINE_TEST_VARIANT4(arm_scale_q31, 0p5_3, in_com1, 0x40000000, ref_scale, 3);
204 DEFINE_TEST_VARIANT4(arm_scale_q31, 0p5_8, in_com1, 0x40000000, ref_scale, 8);
205 DEFINE_TEST_VARIANT4(arm_scale_q31, 0p5_11, in_com1, 0x40000000, ref_scale, 11);
206 DEFINE_TEST_VARIANT4(arm_scale_q31, possat, in_maxneg2, 0x80000000, ref_scale_possat, 9);
207 DEFINE_TEST_VARIANT4(arm_scale_q31, long, in_com1, 0x40000000, ref_scale, ARRAY_SIZE(in_com1));
208
test_arm_dot_prod_q31(const q31_t * input1,const q31_t * input2,const q63_t * ref,size_t length)209 static void test_arm_dot_prod_q31(
210 const q31_t *input1, const q31_t *input2, const q63_t *ref, size_t length)
211 {
212 q63_t *output;
213
214 /* Allocate output buffer */
215 output = malloc(1 * sizeof(q63_t));
216 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
217
218 /* Run test function */
219 arm_dot_prod_q31(input1, input2, length, &output[0]);
220
221 /* Validate output */
222 zassert_true(
223 test_snr_error_q63(1, output, ref, SNR_ERROR_THRESH),
224 ASSERT_MSG_SNR_LIMIT_EXCEED);
225
226 zassert_true(
227 test_near_equal_q63(1, output, ref, ABS_ERROR_THRESH_Q63),
228 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
229
230 /* Free output buffer */
231 free(output);
232 }
233
234 DEFINE_TEST_VARIANT4(arm_dot_prod_q31, 3, in_com1, in_com2, ref_dot_prod_3, 3);
235 DEFINE_TEST_VARIANT4(arm_dot_prod_q31, 8, in_com1, in_com2, ref_dot_prod_4, 8);
236 DEFINE_TEST_VARIANT4(arm_dot_prod_q31, 11, in_com1, in_com2, ref_dot_prod_4n1, 11);
237 DEFINE_TEST_VARIANT4(arm_dot_prod_q31, long, in_com1, in_com2, ref_dot_prod_long,
238 ARRAY_SIZE(in_com1));
239
test_arm_abs_q31(const q31_t * input1,const q31_t * ref,size_t length)240 static void test_arm_abs_q31(
241 const q31_t *input1, const q31_t *ref, size_t length)
242 {
243 q31_t *output;
244
245 /* Allocate output buffer */
246 output = malloc(length * sizeof(q31_t));
247 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
248
249 /* Run test function */
250 arm_abs_q31(input1, output, length);
251
252 /* Validate output */
253 zassert_true(
254 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
255 ASSERT_MSG_SNR_LIMIT_EXCEED);
256
257 zassert_true(
258 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
259 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
260
261 /* Free output buffer */
262 free(output);
263 }
264
265 DEFINE_TEST_VARIANT3(arm_abs_q31, 3, in_com1, ref_abs, 3);
266 DEFINE_TEST_VARIANT3(arm_abs_q31, 8, in_com1, ref_abs, 8);
267 DEFINE_TEST_VARIANT3(arm_abs_q31, 11, in_com1, ref_abs, 11);
268 DEFINE_TEST_VARIANT3(arm_abs_q31, long, in_com1, ref_abs, ARRAY_SIZE(in_com1));
269
test_arm_shift_q31(const q31_t * input1,const q31_t * ref,size_t length)270 static void test_arm_shift_q31(
271 const q31_t *input1, const q31_t *ref, size_t length)
272 {
273 q31_t *output;
274
275 /* Allocate output buffer */
276 output = malloc(length * sizeof(q31_t));
277 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
278
279 /* Run test function */
280 arm_shift_q31(input1, 1, output, length);
281
282 /* Validate output */
283 zassert_true(
284 test_snr_error_q31(length, output, ref, SNR_ERROR_THRESH),
285 ASSERT_MSG_SNR_LIMIT_EXCEED);
286
287 zassert_true(
288 test_near_equal_q31(length, output, ref, ABS_ERROR_THRESH_Q31),
289 ASSERT_MSG_ABS_ERROR_LIMIT_EXCEED);
290
291 /* Free output buffer */
292 free(output);
293 }
294
295 DEFINE_TEST_VARIANT3(arm_shift_q31, rand, in_rand, ref_shift, 9);
296 DEFINE_TEST_VARIANT3(arm_shift_q31, possat, in_maxpos, ref_shift_possat, 9);
297 DEFINE_TEST_VARIANT3(arm_shift_q31, negsat, in_maxneg, ref_shift_negsat, 9);
298
test_arm_and_u32(const uint32_t * input1,const uint32_t * input2,const uint32_t * ref,size_t length)299 static void test_arm_and_u32(
300 const uint32_t *input1, const uint32_t *input2, const uint32_t *ref, size_t length)
301 {
302 uint32_t *output;
303
304 /* Allocate output buffer */
305 output = malloc(length * sizeof(uint32_t));
306 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
307
308 /* Run test function */
309 arm_and_u32(input1, input2, output, length);
310
311 /* Validate output */
312 zassert_true(
313 test_equal_q31(length, output, ref),
314 ASSERT_MSG_INCORRECT_COMP_RESULT);
315
316 /* Free output buffer */
317 free(output);
318 }
319
320 DEFINE_TEST_VARIANT4(arm_and_u32, 3, in_bitwise1, in_bitwise2, ref_and, 3);
321 DEFINE_TEST_VARIANT4(arm_and_u32, 8, in_bitwise1, in_bitwise2, ref_and, 8);
322 DEFINE_TEST_VARIANT4(arm_and_u32, 11, in_bitwise1, in_bitwise2, ref_and, 11);
323
test_arm_or_u32(const uint32_t * input1,const uint32_t * input2,const uint32_t * ref,size_t length)324 static void test_arm_or_u32(
325 const uint32_t *input1, const uint32_t *input2, const uint32_t *ref, size_t length)
326 {
327 uint32_t *output;
328
329 /* Allocate output buffer */
330 output = malloc(length * sizeof(uint32_t));
331 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
332
333 /* Run test function */
334 arm_or_u32(input1, input2, output, length);
335
336 /* Validate output */
337 zassert_true(
338 test_equal_q31(length, output, ref),
339 ASSERT_MSG_INCORRECT_COMP_RESULT);
340
341 /* Free output buffer */
342 free(output);
343 }
344
345 DEFINE_TEST_VARIANT4(arm_or_u32, 3, in_bitwise1, in_bitwise2, ref_or, 3);
346 DEFINE_TEST_VARIANT4(arm_or_u32, 8, in_bitwise1, in_bitwise2, ref_or, 8);
347 DEFINE_TEST_VARIANT4(arm_or_u32, 11, in_bitwise1, in_bitwise2, ref_or, 11);
348
test_arm_not_u32(const uint32_t * input1,const uint32_t * ref,size_t length)349 static void test_arm_not_u32(
350 const uint32_t *input1, const uint32_t *ref, size_t length)
351 {
352 uint32_t *output;
353
354 /* Allocate output buffer */
355 output = malloc(length * sizeof(uint32_t));
356 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
357
358 /* Run test function */
359 arm_not_u32(input1, output, length);
360
361 /* Validate output */
362 zassert_true(
363 test_equal_q31(length, output, ref),
364 ASSERT_MSG_INCORRECT_COMP_RESULT);
365
366 /* Free output buffer */
367 free(output);
368 }
369
370 DEFINE_TEST_VARIANT3(arm_not_u32, 3, in_bitwise1, ref_not, 3);
371 DEFINE_TEST_VARIANT3(arm_not_u32, 8, in_bitwise1, ref_not, 8);
372 DEFINE_TEST_VARIANT3(arm_not_u32, 11, in_bitwise1, ref_not, 11);
373
test_arm_xor_u32(const uint32_t * input1,const uint32_t * input2,const uint32_t * ref,size_t length)374 static void test_arm_xor_u32(
375 const uint32_t *input1, const uint32_t *input2, const uint32_t *ref, size_t length)
376 {
377 uint32_t *output;
378
379 /* Allocate output buffer */
380 output = malloc(length * sizeof(uint32_t));
381 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
382
383 /* Run test function */
384 arm_xor_u32(input1, input2, output, length);
385
386 /* Validate output */
387 zassert_true(
388 test_equal_q31(length, output, ref),
389 ASSERT_MSG_INCORRECT_COMP_RESULT);
390
391 /* Free output buffer */
392 free(output);
393 }
394
395 DEFINE_TEST_VARIANT4(arm_xor_u32, 3, in_bitwise1, in_bitwise2, ref_xor, 3);
396 DEFINE_TEST_VARIANT4(arm_xor_u32, 8, in_bitwise1, in_bitwise2, ref_xor, 8);
397 DEFINE_TEST_VARIANT4(arm_xor_u32, 11, in_bitwise1, in_bitwise2, ref_xor, 11);
398
test_arm_clip_q31(const q31_t * input,const q31_t * ref,q31_t min,q31_t max,size_t length)399 static void test_arm_clip_q31(
400 const q31_t *input, const q31_t *ref, q31_t min, q31_t max, size_t length)
401 {
402 q31_t *output;
403
404 /* Allocate output buffer */
405 output = malloc(length * sizeof(q31_t));
406 zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
407
408 /* Run test function */
409 arm_clip_q31(input, output, min, max, length);
410
411 /* Validate output */
412 zassert_true(
413 test_equal_q31(length, output, ref),
414 ASSERT_MSG_INCORRECT_COMP_RESULT);
415
416 /* Free output buffer */
417 free(output);
418 }
419
420 DEFINE_TEST_VARIANT5(arm_clip_q31, c0000000_f3333333, in_clip, ref_clip1,
421 0xc0000000, 0xf3333333, ARRAY_SIZE(ref_clip1));
422 DEFINE_TEST_VARIANT5(arm_clip_q31, c0000000_40000000, in_clip, ref_clip2,
423 0xc0000000, 0x40000000, ARRAY_SIZE(ref_clip2));
424 DEFINE_TEST_VARIANT5(arm_clip_q31, 0ccccccd_40000000, in_clip, ref_clip3,
425 0x0ccccccd, 0x40000000, ARRAY_SIZE(ref_clip3));
426
test_basicmath_q31(void)427 void test_basicmath_q31(void)
428 {
429 ztest_test_suite(basicmath_q31,
430 ztest_unit_test(test_arm_add_q31_3),
431 ztest_unit_test(test_arm_add_q31_8),
432 ztest_unit_test(test_arm_add_q31_11),
433 ztest_unit_test(test_arm_sub_q31_3),
434 ztest_unit_test(test_arm_sub_q31_8),
435 ztest_unit_test(test_arm_sub_q31_11),
436 ztest_unit_test(test_arm_mult_q31_3),
437 ztest_unit_test(test_arm_mult_q31_8),
438 ztest_unit_test(test_arm_mult_q31_11),
439 ztest_unit_test(test_arm_negate_q31_3),
440 ztest_unit_test(test_arm_negate_q31_8),
441 ztest_unit_test(test_arm_negate_q31_11),
442 ztest_unit_test(test_arm_offset_q31_0p5_3),
443 ztest_unit_test(test_arm_offset_q31_0p5_8),
444 ztest_unit_test(test_arm_offset_q31_0p5_11),
445 ztest_unit_test(test_arm_scale_q31_0p5_3),
446 ztest_unit_test(test_arm_scale_q31_0p5_8),
447 ztest_unit_test(test_arm_scale_q31_0p5_11),
448 ztest_unit_test(test_arm_dot_prod_q31_3),
449 ztest_unit_test(test_arm_dot_prod_q31_8),
450 ztest_unit_test(test_arm_dot_prod_q31_11),
451 ztest_unit_test(test_arm_abs_q31_3),
452 ztest_unit_test(test_arm_abs_q31_8),
453 ztest_unit_test(test_arm_abs_q31_11),
454 ztest_unit_test(test_arm_shift_q31_rand),
455 ztest_unit_test(test_arm_add_q31_possat),
456 ztest_unit_test(test_arm_add_q31_negsat),
457 ztest_unit_test(test_arm_sub_q31_possat),
458 ztest_unit_test(test_arm_sub_q31_negsat),
459 ztest_unit_test(test_arm_mult_q31_possat),
460 ztest_unit_test(test_arm_negate_q31_possat),
461 ztest_unit_test(test_arm_offset_q31_possat),
462 ztest_unit_test(test_arm_offset_q31_negsat),
463 ztest_unit_test(test_arm_scale_q31_possat),
464 ztest_unit_test(test_arm_shift_q31_possat),
465 ztest_unit_test(test_arm_shift_q31_negsat),
466 ztest_unit_test(test_arm_and_u32_3),
467 ztest_unit_test(test_arm_and_u32_8),
468 ztest_unit_test(test_arm_and_u32_11),
469 ztest_unit_test(test_arm_or_u32_3),
470 ztest_unit_test(test_arm_or_u32_8),
471 ztest_unit_test(test_arm_or_u32_11),
472 ztest_unit_test(test_arm_not_u32_3),
473 ztest_unit_test(test_arm_not_u32_8),
474 ztest_unit_test(test_arm_not_u32_11),
475 ztest_unit_test(test_arm_xor_u32_3),
476 ztest_unit_test(test_arm_xor_u32_8),
477 ztest_unit_test(test_arm_xor_u32_11),
478 ztest_unit_test(test_arm_add_q31_long),
479 ztest_unit_test(test_arm_sub_q31_long),
480 ztest_unit_test(test_arm_mult_q31_long),
481 ztest_unit_test(test_arm_negate_q31_long),
482 ztest_unit_test(test_arm_offset_q31_long),
483 ztest_unit_test(test_arm_scale_q31_long),
484 ztest_unit_test(test_arm_dot_prod_q31_long),
485 ztest_unit_test(test_arm_abs_q31_long),
486 ztest_unit_test(test_arm_clip_q31_c0000000_f3333333),
487 ztest_unit_test(test_arm_clip_q31_c0000000_40000000),
488 ztest_unit_test(test_arm_clip_q31_0ccccccd_40000000)
489 );
490
491 ztest_run_test_suite(basicmath_q31);
492 }
493