1 /******************************************************************************
2  * @file     basic_math_functions.h
3  * @brief    Public header file for CMSIS DSP Library
4  * @version  V1.10.0
5  * @date     08 July 2021
6  * Target Processor: Cortex-M and Cortex-A cores
7  ******************************************************************************/
8 /*
9  * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
10  *
11  * SPDX-License-Identifier: Apache-2.0
12  *
13  * Licensed under the Apache License, Version 2.0 (the License); you may
14  * not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
21  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  */
25 
26 
27 #ifndef BASIC_MATH_FUNCTIONS_H_
28 #define BASIC_MATH_FUNCTIONS_H_
29 
30 #include "arm_math_types.h"
31 #include "arm_math_memory.h"
32 
33 #include "dsp/none.h"
34 #include "dsp/utils.h"
35 
36 
37 #ifdef   __cplusplus
38 extern "C"
39 {
40 #endif
41 
42 /**
43  * @defgroup groupMath Basic Math Functions
44  */
45 
46  /**
47    * @brief Q7 vector multiplication.
48    * @param[in]  pSrcA      points to the first input vector
49    * @param[in]  pSrcB      points to the second input vector
50    * @param[out] pDst       points to the output vector
51    * @param[in]  blockSize  number of samples in each vector
52    */
53   void arm_mult_q7(
54   const q7_t * pSrcA,
55   const q7_t * pSrcB,
56         q7_t * pDst,
57         uint32_t blockSize);
58 
59 
60   /**
61    * @brief Q15 vector multiplication.
62    * @param[in]  pSrcA      points to the first input vector
63    * @param[in]  pSrcB      points to the second input vector
64    * @param[out] pDst       points to the output vector
65    * @param[in]  blockSize  number of samples in each vector
66    */
67   void arm_mult_q15(
68   const q15_t * pSrcA,
69   const q15_t * pSrcB,
70         q15_t * pDst,
71         uint32_t blockSize);
72 
73 
74   /**
75    * @brief Q31 vector multiplication.
76    * @param[in]  pSrcA      points to the first input vector
77    * @param[in]  pSrcB      points to the second input vector
78    * @param[out] pDst       points to the output vector
79    * @param[in]  blockSize  number of samples in each vector
80    */
81   void arm_mult_q31(
82   const q31_t * pSrcA,
83   const q31_t * pSrcB,
84         q31_t * pDst,
85         uint32_t blockSize);
86 
87 
88   /**
89    * @brief Floating-point vector multiplication.
90    * @param[in]  pSrcA      points to the first input vector
91    * @param[in]  pSrcB      points to the second input vector
92    * @param[out] pDst       points to the output vector
93    * @param[in]  blockSize  number of samples in each vector
94    */
95   void arm_mult_f32(
96   const float32_t * pSrcA,
97   const float32_t * pSrcB,
98         float32_t * pDst,
99         uint32_t blockSize);
100 
101 
102 
103 /**
104  * @brief Floating-point vector multiplication.
105  * @param[in]  pSrcA      points to the first input vector
106  * @param[in]  pSrcB      points to the second input vector
107  * @param[out] pDst       points to the output vector
108  * @param[in]  blockSize  number of samples in each vector
109  */
110 void arm_mult_f64(
111 const float64_t * pSrcA,
112 const float64_t * pSrcB,
113 	  float64_t * pDst,
114 	  uint32_t blockSize);
115 
116 
117 
118  /**
119    * @brief Floating-point vector addition.
120    * @param[in]  pSrcA      points to the first input vector
121    * @param[in]  pSrcB      points to the second input vector
122    * @param[out] pDst       points to the output vector
123    * @param[in]  blockSize  number of samples in each vector
124    */
125   void arm_add_f32(
126   const float32_t * pSrcA,
127   const float32_t * pSrcB,
128         float32_t * pDst,
129         uint32_t blockSize);
130 
131 
132 
133 /**
134   * @brief Floating-point vector addition.
135   * @param[in]  pSrcA      points to the first input vector
136   * @param[in]  pSrcB      points to the second input vector
137   * @param[out] pDst       points to the output vector
138   * @param[in]  blockSize  number of samples in each vector
139   */
140  void arm_add_f64(
141  const float64_t * pSrcA,
142  const float64_t * pSrcB,
143 	   float64_t * pDst,
144 	   uint32_t blockSize);
145 
146 
147 
148   /**
149    * @brief Q7 vector addition.
150    * @param[in]  pSrcA      points to the first input vector
151    * @param[in]  pSrcB      points to the second input vector
152    * @param[out] pDst       points to the output vector
153    * @param[in]  blockSize  number of samples in each vector
154    */
155   void arm_add_q7(
156   const q7_t * pSrcA,
157   const q7_t * pSrcB,
158         q7_t * pDst,
159         uint32_t blockSize);
160 
161 
162   /**
163    * @brief Q15 vector addition.
164    * @param[in]  pSrcA      points to the first input vector
165    * @param[in]  pSrcB      points to the second input vector
166    * @param[out] pDst       points to the output vector
167    * @param[in]  blockSize  number of samples in each vector
168    */
169   void arm_add_q15(
170   const q15_t * pSrcA,
171   const q15_t * pSrcB,
172         q15_t * pDst,
173         uint32_t blockSize);
174 
175 
176   /**
177    * @brief Q31 vector addition.
178    * @param[in]  pSrcA      points to the first input vector
179    * @param[in]  pSrcB      points to the second input vector
180    * @param[out] pDst       points to the output vector
181    * @param[in]  blockSize  number of samples in each vector
182    */
183   void arm_add_q31(
184   const q31_t * pSrcA,
185   const q31_t * pSrcB,
186         q31_t * pDst,
187         uint32_t blockSize);
188 
189 
190   /**
191    * @brief Floating-point vector subtraction.
192    * @param[in]  pSrcA      points to the first input vector
193    * @param[in]  pSrcB      points to the second input vector
194    * @param[out] pDst       points to the output vector
195    * @param[in]  blockSize  number of samples in each vector
196    */
197   void arm_sub_f32(
198   const float32_t * pSrcA,
199   const float32_t * pSrcB,
200         float32_t * pDst,
201         uint32_t blockSize);
202 
203 
204 
205   /**
206    * @brief Floating-point vector subtraction.
207    * @param[in]  pSrcA      points to the first input vector
208    * @param[in]  pSrcB      points to the second input vector
209    * @param[out] pDst       points to the output vector
210    * @param[in]  blockSize  number of samples in each vector
211    */
212   void arm_sub_f64(
213   const float64_t * pSrcA,
214   const float64_t * pSrcB,
215         float64_t * pDst,
216         uint32_t blockSize);
217 
218 
219 
220   /**
221    * @brief Q7 vector subtraction.
222    * @param[in]  pSrcA      points to the first input vector
223    * @param[in]  pSrcB      points to the second input vector
224    * @param[out] pDst       points to the output vector
225    * @param[in]  blockSize  number of samples in each vector
226    */
227   void arm_sub_q7(
228   const q7_t * pSrcA,
229   const q7_t * pSrcB,
230         q7_t * pDst,
231         uint32_t blockSize);
232 
233 
234   /**
235    * @brief Q15 vector subtraction.
236    * @param[in]  pSrcA      points to the first input vector
237    * @param[in]  pSrcB      points to the second input vector
238    * @param[out] pDst       points to the output vector
239    * @param[in]  blockSize  number of samples in each vector
240    */
241   void arm_sub_q15(
242   const q15_t * pSrcA,
243   const q15_t * pSrcB,
244         q15_t * pDst,
245         uint32_t blockSize);
246 
247 
248   /**
249    * @brief Q31 vector subtraction.
250    * @param[in]  pSrcA      points to the first input vector
251    * @param[in]  pSrcB      points to the second input vector
252    * @param[out] pDst       points to the output vector
253    * @param[in]  blockSize  number of samples in each vector
254    */
255   void arm_sub_q31(
256   const q31_t * pSrcA,
257   const q31_t * pSrcB,
258         q31_t * pDst,
259         uint32_t blockSize);
260 
261 
262   /**
263    * @brief Multiplies a floating-point vector by a scalar.
264    * @param[in]  pSrc       points to the input vector
265    * @param[in]  scale      scale factor to be applied
266    * @param[out] pDst       points to the output vector
267    * @param[in]  blockSize  number of samples in the vector
268    */
269   void arm_scale_f32(
270   const float32_t * pSrc,
271         float32_t scale,
272         float32_t * pDst,
273         uint32_t blockSize);
274 
275 
276 
277   /**
278    * @brief Multiplies a floating-point vector by a scalar.
279    * @param[in]  pSrc       points to the input vector
280    * @param[in]  scale      scale factor to be applied
281    * @param[out] pDst       points to the output vector
282    * @param[in]  blockSize  number of samples in the vector
283    */
284   void arm_scale_f64(
285   const float64_t * pSrc,
286         float64_t scale,
287         float64_t * pDst,
288         uint32_t blockSize);
289 
290 
291 
292   /**
293    * @brief Multiplies a Q7 vector by a scalar.
294    * @param[in]  pSrc        points to the input vector
295    * @param[in]  scaleFract  fractional portion of the scale value
296    * @param[in]  shift       number of bits to shift the result by
297    * @param[out] pDst        points to the output vector
298    * @param[in]  blockSize   number of samples in the vector
299    */
300   void arm_scale_q7(
301   const q7_t * pSrc,
302         q7_t scaleFract,
303         int8_t shift,
304         q7_t * pDst,
305         uint32_t blockSize);
306 
307 
308   /**
309    * @brief Multiplies a Q15 vector by a scalar.
310    * @param[in]  pSrc        points to the input vector
311    * @param[in]  scaleFract  fractional portion of the scale value
312    * @param[in]  shift       number of bits to shift the result by
313    * @param[out] pDst        points to the output vector
314    * @param[in]  blockSize   number of samples in the vector
315    */
316   void arm_scale_q15(
317   const q15_t * pSrc,
318         q15_t scaleFract,
319         int8_t shift,
320         q15_t * pDst,
321         uint32_t blockSize);
322 
323 
324   /**
325    * @brief Multiplies a Q31 vector by a scalar.
326    * @param[in]  pSrc        points to the input vector
327    * @param[in]  scaleFract  fractional portion of the scale value
328    * @param[in]  shift       number of bits to shift the result by
329    * @param[out] pDst        points to the output vector
330    * @param[in]  blockSize   number of samples in the vector
331    */
332   void arm_scale_q31(
333   const q31_t * pSrc,
334         q31_t scaleFract,
335         int8_t shift,
336         q31_t * pDst,
337         uint32_t blockSize);
338 
339 
340   /**
341    * @brief Q7 vector absolute value.
342    * @param[in]  pSrc       points to the input buffer
343    * @param[out] pDst       points to the output buffer
344    * @param[in]  blockSize  number of samples in each vector
345    */
346   void arm_abs_q7(
347   const q7_t * pSrc,
348         q7_t * pDst,
349         uint32_t blockSize);
350 
351 
352   /**
353    * @brief Floating-point vector absolute value.
354    * @param[in]  pSrc       points to the input buffer
355    * @param[out] pDst       points to the output buffer
356    * @param[in]  blockSize  number of samples in each vector
357    */
358   void arm_abs_f32(
359   const float32_t * pSrc,
360         float32_t * pDst,
361         uint32_t blockSize);
362 
363 
364 
365 /**
366  * @brief Floating-point vector absolute value.
367  * @param[in]  pSrc       points to the input buffer
368  * @param[out] pDst       points to the output buffer
369  * @param[in]  blockSize  number of samples in each vector
370  */
371 void arm_abs_f64(
372 const float64_t * pSrc,
373 	  float64_t * pDst,
374 	  uint32_t blockSize);
375 
376 
377 
378   /**
379    * @brief Q15 vector absolute value.
380    * @param[in]  pSrc       points to the input buffer
381    * @param[out] pDst       points to the output buffer
382    * @param[in]  blockSize  number of samples in each vector
383    */
384   void arm_abs_q15(
385   const q15_t * pSrc,
386         q15_t * pDst,
387         uint32_t blockSize);
388 
389 
390   /**
391    * @brief Q31 vector absolute value.
392    * @param[in]  pSrc       points to the input buffer
393    * @param[out] pDst       points to the output buffer
394    * @param[in]  blockSize  number of samples in each vector
395    */
396   void arm_abs_q31(
397   const q31_t * pSrc,
398         q31_t * pDst,
399         uint32_t blockSize);
400 
401 
402   /**
403    * @brief Dot product of floating-point vectors.
404    * @param[in]  pSrcA      points to the first input vector
405    * @param[in]  pSrcB      points to the second input vector
406    * @param[in]  blockSize  number of samples in each vector
407    * @param[out] result     output result returned here
408    */
409   void arm_dot_prod_f32(
410   const float32_t * pSrcA,
411   const float32_t * pSrcB,
412         uint32_t blockSize,
413         float32_t * result);
414 
415 
416 
417 /**
418  * @brief Dot product of floating-point vectors.
419  * @param[in]  pSrcA      points to the first input vector
420  * @param[in]  pSrcB      points to the second input vector
421  * @param[in]  blockSize  number of samples in each vector
422  * @param[out] result     output result returned here
423  */
424 void arm_dot_prod_f64(
425 const float64_t * pSrcA,
426 const float64_t * pSrcB,
427 	  uint32_t blockSize,
428 	  float64_t * result);
429 
430 
431 
432   /**
433    * @brief Dot product of Q7 vectors.
434    * @param[in]  pSrcA      points to the first input vector
435    * @param[in]  pSrcB      points to the second input vector
436    * @param[in]  blockSize  number of samples in each vector
437    * @param[out] result     output result returned here
438    */
439   void arm_dot_prod_q7(
440   const q7_t * pSrcA,
441   const q7_t * pSrcB,
442         uint32_t blockSize,
443         q31_t * result);
444 
445 
446   /**
447    * @brief Dot product of Q15 vectors.
448    * @param[in]  pSrcA      points to the first input vector
449    * @param[in]  pSrcB      points to the second input vector
450    * @param[in]  blockSize  number of samples in each vector
451    * @param[out] result     output result returned here
452    */
453   void arm_dot_prod_q15(
454   const q15_t * pSrcA,
455   const q15_t * pSrcB,
456         uint32_t blockSize,
457         q63_t * result);
458 
459 
460   /**
461    * @brief Dot product of Q31 vectors.
462    * @param[in]  pSrcA      points to the first input vector
463    * @param[in]  pSrcB      points to the second input vector
464    * @param[in]  blockSize  number of samples in each vector
465    * @param[out] result     output result returned here
466    */
467   void arm_dot_prod_q31(
468   const q31_t * pSrcA,
469   const q31_t * pSrcB,
470         uint32_t blockSize,
471         q63_t * result);
472 
473 
474   /**
475    * @brief  Shifts the elements of a Q7 vector a specified number of bits.
476    * @param[in]  pSrc       points to the input vector
477    * @param[in]  shiftBits  number of bits to shift.  A positive value shifts left; a negative value shifts right.
478    * @param[out] pDst       points to the output vector
479    * @param[in]  blockSize  number of samples in the vector
480    */
481   void arm_shift_q7(
482   const q7_t * pSrc,
483         int8_t shiftBits,
484         q7_t * pDst,
485         uint32_t blockSize);
486 
487 
488   /**
489    * @brief  Shifts the elements of a Q15 vector a specified number of bits.
490    * @param[in]  pSrc       points to the input vector
491    * @param[in]  shiftBits  number of bits to shift.  A positive value shifts left; a negative value shifts right.
492    * @param[out] pDst       points to the output vector
493    * @param[in]  blockSize  number of samples in the vector
494    */
495   void arm_shift_q15(
496   const q15_t * pSrc,
497         int8_t shiftBits,
498         q15_t * pDst,
499         uint32_t blockSize);
500 
501 
502   /**
503    * @brief  Shifts the elements of a Q31 vector a specified number of bits.
504    * @param[in]  pSrc       points to the input vector
505    * @param[in]  shiftBits  number of bits to shift.  A positive value shifts left; a negative value shifts right.
506    * @param[out] pDst       points to the output vector
507    * @param[in]  blockSize  number of samples in the vector
508    */
509   void arm_shift_q31(
510   const q31_t * pSrc,
511         int8_t shiftBits,
512         q31_t * pDst,
513         uint32_t blockSize);
514 
515 
516 /**
517  * @brief  Adds a constant offset to a floating-point vector.
518  * @param[in]  pSrc       points to the input vector
519  * @param[in]  offset     is the offset to be added
520  * @param[out] pDst       points to the output vector
521  * @param[in]  blockSize  number of samples in the vector
522  */
523 void arm_offset_f64(
524 const float64_t * pSrc,
525 	  float64_t offset,
526 	  float64_t * pDst,
527 	  uint32_t blockSize);
528 
529 
530 
531   /**
532    * @brief  Adds a constant offset to a floating-point vector.
533    * @param[in]  pSrc       points to the input vector
534    * @param[in]  offset     is the offset to be added
535    * @param[out] pDst       points to the output vector
536    * @param[in]  blockSize  number of samples in the vector
537    */
538   void arm_offset_f32(
539   const float32_t * pSrc,
540         float32_t offset,
541         float32_t * pDst,
542         uint32_t blockSize);
543 
544 
545 
546   /**
547    * @brief  Adds a constant offset to a Q7 vector.
548    * @param[in]  pSrc       points to the input vector
549    * @param[in]  offset     is the offset to be added
550    * @param[out] pDst       points to the output vector
551    * @param[in]  blockSize  number of samples in the vector
552    */
553   void arm_offset_q7(
554   const q7_t * pSrc,
555         q7_t offset,
556         q7_t * pDst,
557         uint32_t blockSize);
558 
559 
560   /**
561    * @brief  Adds a constant offset to a Q15 vector.
562    * @param[in]  pSrc       points to the input vector
563    * @param[in]  offset     is the offset to be added
564    * @param[out] pDst       points to the output vector
565    * @param[in]  blockSize  number of samples in the vector
566    */
567   void arm_offset_q15(
568   const q15_t * pSrc,
569         q15_t offset,
570         q15_t * pDst,
571         uint32_t blockSize);
572 
573 
574   /**
575    * @brief  Adds a constant offset to a Q31 vector.
576    * @param[in]  pSrc       points to the input vector
577    * @param[in]  offset     is the offset to be added
578    * @param[out] pDst       points to the output vector
579    * @param[in]  blockSize  number of samples in the vector
580    */
581   void arm_offset_q31(
582   const q31_t * pSrc,
583         q31_t offset,
584         q31_t * pDst,
585         uint32_t blockSize);
586 
587 
588   /**
589    * @brief  Negates the elements of a floating-point vector.
590    * @param[in]  pSrc       points to the input vector
591    * @param[out] pDst       points to the output vector
592    * @param[in]  blockSize  number of samples in the vector
593    */
594   void arm_negate_f32(
595   const float32_t * pSrc,
596         float32_t * pDst,
597         uint32_t blockSize);
598 
599 
600 
601 /**
602  * @brief  Negates the elements of a floating-point vector.
603  * @param[in]  pSrc       points to the input vector
604  * @param[out] pDst       points to the output vector
605  * @param[in]  blockSize  number of samples in the vector
606  */
607 void arm_negate_f64(
608 const float64_t * pSrc,
609 	  float64_t * pDst,
610 	  uint32_t blockSize);
611 
612 
613 
614   /**
615    * @brief  Negates the elements of a Q7 vector.
616    * @param[in]  pSrc       points to the input vector
617    * @param[out] pDst       points to the output vector
618    * @param[in]  blockSize  number of samples in the vector
619    */
620   void arm_negate_q7(
621   const q7_t * pSrc,
622         q7_t * pDst,
623         uint32_t blockSize);
624 
625 
626   /**
627    * @brief  Negates the elements of a Q15 vector.
628    * @param[in]  pSrc       points to the input vector
629    * @param[out] pDst       points to the output vector
630    * @param[in]  blockSize  number of samples in the vector
631    */
632   void arm_negate_q15(
633   const q15_t * pSrc,
634         q15_t * pDst,
635         uint32_t blockSize);
636 
637 
638   /**
639    * @brief  Negates the elements of a Q31 vector.
640    * @param[in]  pSrc       points to the input vector
641    * @param[out] pDst       points to the output vector
642    * @param[in]  blockSize  number of samples in the vector
643    */
644   void arm_negate_q31(
645   const q31_t * pSrc,
646         q31_t * pDst,
647         uint32_t blockSize);
648 
649 /**
650    * @brief         Compute the logical bitwise AND of two fixed-point vectors.
651    * @param[in]     pSrcA      points to input vector A
652    * @param[in]     pSrcB      points to input vector B
653    * @param[out]    pDst       points to output vector
654    * @param[in]     blockSize  number of samples in each vector
655    */
656   void arm_and_u16(
657     const uint16_t * pSrcA,
658     const uint16_t * pSrcB,
659           uint16_t * pDst,
660           uint32_t blockSize);
661 
662   /**
663    * @brief         Compute the logical bitwise AND of two fixed-point vectors.
664    * @param[in]     pSrcA      points to input vector A
665    * @param[in]     pSrcB      points to input vector B
666    * @param[out]    pDst       points to output vector
667    * @param[in]     blockSize  number of samples in each vector
668    */
669   void arm_and_u32(
670     const uint32_t * pSrcA,
671     const uint32_t * pSrcB,
672           uint32_t * pDst,
673           uint32_t blockSize);
674 
675   /**
676    * @brief         Compute the logical bitwise AND of two fixed-point vectors.
677    * @param[in]     pSrcA      points to input vector A
678    * @param[in]     pSrcB      points to input vector B
679    * @param[out]    pDst       points to output vector
680    * @param[in]     blockSize  number of samples in each vector
681    */
682   void arm_and_u8(
683     const uint8_t * pSrcA,
684     const uint8_t * pSrcB,
685           uint8_t * pDst,
686           uint32_t blockSize);
687 
688   /**
689    * @brief         Compute the logical bitwise OR of two fixed-point vectors.
690    * @param[in]     pSrcA      points to input vector A
691    * @param[in]     pSrcB      points to input vector B
692    * @param[out]    pDst       points to output vector
693    * @param[in]     blockSize  number of samples in each vector
694    */
695   void arm_or_u16(
696     const uint16_t * pSrcA,
697     const uint16_t * pSrcB,
698           uint16_t * pDst,
699           uint32_t blockSize);
700 
701   /**
702    * @brief         Compute the logical bitwise OR of two fixed-point vectors.
703    * @param[in]     pSrcA      points to input vector A
704    * @param[in]     pSrcB      points to input vector B
705    * @param[out]    pDst       points to output vector
706    * @param[in]     blockSize  number of samples in each vector
707    */
708   void arm_or_u32(
709     const uint32_t * pSrcA,
710     const uint32_t * pSrcB,
711           uint32_t * pDst,
712           uint32_t blockSize);
713 
714   /**
715    * @brief         Compute the logical bitwise OR of two fixed-point vectors.
716    * @param[in]     pSrcA      points to input vector A
717    * @param[in]     pSrcB      points to input vector B
718    * @param[out]    pDst       points to output vector
719    * @param[in]     blockSize  number of samples in each vector
720    */
721   void arm_or_u8(
722     const uint8_t * pSrcA,
723     const uint8_t * pSrcB,
724           uint8_t * pDst,
725           uint32_t blockSize);
726 
727   /**
728    * @brief         Compute the logical bitwise NOT of a fixed-point vector.
729    * @param[in]     pSrc       points to input vector
730    * @param[out]    pDst       points to output vector
731    * @param[in]     blockSize  number of samples in each vector
732    */
733   void arm_not_u16(
734     const uint16_t * pSrc,
735           uint16_t * pDst,
736           uint32_t blockSize);
737 
738   /**
739    * @brief         Compute the logical bitwise NOT of a fixed-point vector.
740    * @param[in]     pSrc       points to input vector
741    * @param[out]    pDst       points to output vector
742    * @param[in]     blockSize  number of samples in each vector
743    */
744   void arm_not_u32(
745     const uint32_t * pSrc,
746           uint32_t * pDst,
747           uint32_t blockSize);
748 
749   /**
750    * @brief         Compute the logical bitwise NOT of a fixed-point vector.
751    * @param[in]     pSrc       points to input vector
752    * @param[out]    pDst       points to output vector
753    * @param[in]     blockSize  number of samples in each vector
754    */
755   void arm_not_u8(
756     const uint8_t * pSrc,
757           uint8_t * pDst,
758           uint32_t blockSize);
759 
760 /**
761    * @brief         Compute the logical bitwise XOR of two fixed-point vectors.
762    * @param[in]     pSrcA      points to input vector A
763    * @param[in]     pSrcB      points to input vector B
764    * @param[out]    pDst       points to output vector
765    * @param[in]     blockSize  number of samples in each vector
766    */
767   void arm_xor_u16(
768     const uint16_t * pSrcA,
769     const uint16_t * pSrcB,
770           uint16_t * pDst,
771           uint32_t blockSize);
772 
773   /**
774    * @brief         Compute the logical bitwise XOR of two fixed-point vectors.
775    * @param[in]     pSrcA      points to input vector A
776    * @param[in]     pSrcB      points to input vector B
777    * @param[out]    pDst       points to output vector
778    * @param[in]     blockSize  number of samples in each vector
779    */
780   void arm_xor_u32(
781     const uint32_t * pSrcA,
782     const uint32_t * pSrcB,
783           uint32_t * pDst,
784           uint32_t blockSize);
785 
786   /**
787    * @brief         Compute the logical bitwise XOR of two fixed-point vectors.
788    * @param[in]     pSrcA      points to input vector A
789    * @param[in]     pSrcB      points to input vector B
790    * @param[out]    pDst       points to output vector
791    * @param[in]     blockSize  number of samples in each vector
792    */
793   void arm_xor_u8(
794     const uint8_t * pSrcA,
795     const uint8_t * pSrcB,
796           uint8_t * pDst,
797     uint32_t blockSize);
798 
799   /**
800   @brief         Elementwise floating-point clipping
801   @param[in]     pSrc          points to input values
802   @param[out]    pDst          points to output clipped values
803   @param[in]     low           lower bound
804   @param[in]     high          higher bound
805   @param[in]     numSamples    number of samples to clip
806  */
807 
808 void arm_clip_f32(const float32_t * pSrc,
809   float32_t * pDst,
810   float32_t low,
811   float32_t high,
812   uint32_t numSamples);
813 
814   /**
815   @brief         Elementwise fixed-point clipping
816   @param[in]     pSrc          points to input values
817   @param[out]    pDst          points to output clipped values
818   @param[in]     low           lower bound
819   @param[in]     high          higher bound
820   @param[in]     numSamples    number of samples to clip
821  */
822 
823 void arm_clip_q31(const q31_t * pSrc,
824   q31_t * pDst,
825   q31_t low,
826   q31_t high,
827   uint32_t numSamples);
828 
829   /**
830   @brief         Elementwise fixed-point clipping
831   @param[in]     pSrc          points to input values
832   @param[out]    pDst          points to output clipped values
833   @param[in]     low           lower bound
834   @param[in]     high          higher bound
835   @param[in]     numSamples    number of samples to clip
836  */
837 
838 void arm_clip_q15(const q15_t * pSrc,
839   q15_t * pDst,
840   q15_t low,
841   q15_t high,
842   uint32_t numSamples);
843 
844   /**
845   @brief         Elementwise fixed-point clipping
846   @param[in]     pSrc          points to input values
847   @param[out]    pDst          points to output clipped values
848   @param[in]     low           lower bound
849   @param[in]     high          higher bound
850   @param[in]     numSamples    number of samples to clip
851  */
852 
853 void arm_clip_q7(const q7_t * pSrc,
854   q7_t * pDst,
855   q7_t low,
856   q7_t high,
857   uint32_t numSamples);
858 
859 
860 #ifdef   __cplusplus
861 }
862 #endif
863 
864 #endif /* ifndef _BASIC_MATH_FUNCTIONS_H_ */
865