/ Drivers / CMSIS / DSP / Include / dsp / statistics_functions.h
statistics_functions.h
  1  /******************************************************************************
  2   * @file     statistics_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 _STATISTICS_FUNCTIONS_H_
 28  #define _STATISTICS_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  #include "dsp/basic_math_functions.h"
 37  #include "dsp/fast_math_functions.h"
 38  
 39  #ifdef   __cplusplus
 40  extern "C"
 41  {
 42  #endif
 43  
 44  
 45  /**
 46   * @defgroup groupStats Statistics Functions
 47   */
 48  
 49  /**
 50   * @brief Computation of the LogSumExp
 51   *
 52   * In probabilistic computations, the dynamic of the probability values can be very
 53   * wide because they come from gaussian functions.
 54   * To avoid underflow and overflow issues, the values are represented by their log.
 55   * In this representation, multiplying the original exp values is easy : their logs are added.
 56   * But adding the original exp values is requiring some special handling and it is the
 57   * goal of the LogSumExp function.
 58   *
 59   * If the values are x1...xn, the function is computing:
 60   *
 61   * ln(exp(x1) + ... + exp(xn)) and the computation is done in such a way that
 62   * rounding issues are minimised.
 63   *
 64   * The max xm of the values is extracted and the function is computing:
 65   * xm + ln(exp(x1 - xm) + ... + exp(xn - xm))
 66   *
 67   * @param[in]  *in         Pointer to an array of input values.
 68   * @param[in]  blockSize   Number of samples in the input array.
 69   * @return LogSumExp
 70   *
 71   */
 72  
 73  
 74  float32_t arm_logsumexp_f32(const float32_t *in, uint32_t blockSize);
 75  
 76  /**
 77   * @brief Dot product with log arithmetic
 78   *
 79   * Vectors are containing the log of the samples
 80   *
 81   * @param[in]       pSrcA points to the first input vector
 82   * @param[in]       pSrcB points to the second input vector
 83   * @param[in]       blockSize number of samples in each vector
 84   * @param[in]       pTmpBuffer temporary buffer of length blockSize
 85   * @return The log of the dot product .
 86   *
 87   */
 88  
 89  
 90  float32_t arm_logsumexp_dot_prod_f32(const float32_t * pSrcA,
 91    const float32_t * pSrcB,
 92    uint32_t blockSize,
 93    float32_t *pTmpBuffer);
 94  
 95  /**
 96   * @brief Entropy
 97   *
 98   * @param[in]  pSrcA        Array of input values.
 99   * @param[in]  blockSize    Number of samples in the input array.
100   * @return     Entropy      -Sum(p ln p)
101   *
102   */
103  
104  
105  float32_t arm_entropy_f32(const float32_t * pSrcA,uint32_t blockSize);
106  
107  
108  /**
109   * @brief Entropy
110   *
111   * @param[in]  pSrcA        Array of input values.
112   * @param[in]  blockSize    Number of samples in the input array.
113   * @return     Entropy      -Sum(p ln p)
114   *
115   */
116  
117  
118  float64_t arm_entropy_f64(const float64_t * pSrcA, uint32_t blockSize);
119  
120  
121  /**
122   * @brief Kullback-Leibler
123   *
124   * @param[in]  pSrcA         Pointer to an array of input values for probability distribution A.
125   * @param[in]  pSrcB         Pointer to an array of input values for probability distribution B.
126   * @param[in]  blockSize     Number of samples in the input array.
127   * @return Kullback-Leibler  Divergence D(A || B)
128   *
129   */
130  float32_t arm_kullback_leibler_f32(const float32_t * pSrcA
131    ,const float32_t * pSrcB
132    ,uint32_t blockSize);
133  
134  
135  /**
136   * @brief Kullback-Leibler
137   *
138   * @param[in]  pSrcA         Pointer to an array of input values for probability distribution A.
139   * @param[in]  pSrcB         Pointer to an array of input values for probability distribution B.
140   * @param[in]  blockSize     Number of samples in the input array.
141   * @return Kullback-Leibler  Divergence D(A || B)
142   *
143   */
144  float64_t arm_kullback_leibler_f64(const float64_t * pSrcA, 
145                  const float64_t * pSrcB, 
146                  uint32_t blockSize);
147  
148  
149   /**
150     * @brief  Sum of the squares of the elements of a Q31 vector.
151     * @param[in]  pSrc       is input pointer
152     * @param[in]  blockSize  is the number of samples to process
153     * @param[out] pResult    is output value.
154     */
155    void arm_power_q31(
156    const q31_t * pSrc,
157          uint32_t blockSize,
158          q63_t * pResult);
159  
160  
161    /**
162     * @brief  Sum of the squares of the elements of a floating-point vector.
163     * @param[in]  pSrc       is input pointer
164     * @param[in]  blockSize  is the number of samples to process
165     * @param[out] pResult    is output value.
166     */
167    void arm_power_f32(
168    const float32_t * pSrc,
169          uint32_t blockSize,
170          float32_t * pResult);
171  
172  
173    /**
174     * @brief  Sum of the squares of the elements of a floating-point vector.
175     * @param[in]  pSrc       is input pointer
176     * @param[in]  blockSize  is the number of samples to process
177     * @param[out] pResult    is output value.
178     */
179    void arm_power_f64(
180    const float64_t * pSrc,
181          uint32_t blockSize,
182          float64_t * pResult);
183  
184  
185    /**
186     * @brief  Sum of the squares of the elements of a Q15 vector.
187     * @param[in]  pSrc       is input pointer
188     * @param[in]  blockSize  is the number of samples to process
189     * @param[out] pResult    is output value.
190     */
191    void arm_power_q15(
192    const q15_t * pSrc,
193          uint32_t blockSize,
194          q63_t * pResult);
195  
196  
197    /**
198     * @brief  Sum of the squares of the elements of a Q7 vector.
199     * @param[in]  pSrc       is input pointer
200     * @param[in]  blockSize  is the number of samples to process
201     * @param[out] pResult    is output value.
202     */
203    void arm_power_q7(
204    const q7_t * pSrc,
205          uint32_t blockSize,
206          q31_t * pResult);
207  
208  
209    /**
210     * @brief  Mean value of a Q7 vector.
211     * @param[in]  pSrc       is input pointer
212     * @param[in]  blockSize  is the number of samples to process
213     * @param[out] pResult    is output value.
214     */
215    void arm_mean_q7(
216    const q7_t * pSrc,
217          uint32_t blockSize,
218          q7_t * pResult);
219  
220  
221    /**
222     * @brief  Mean value of a Q15 vector.
223     * @param[in]  pSrc       is input pointer
224     * @param[in]  blockSize  is the number of samples to process
225     * @param[out] pResult    is output value.
226     */
227    void arm_mean_q15(
228    const q15_t * pSrc,
229          uint32_t blockSize,
230          q15_t * pResult);
231  
232  
233    /**
234     * @brief  Mean value of a Q31 vector.
235     * @param[in]  pSrc       is input pointer
236     * @param[in]  blockSize  is the number of samples to process
237     * @param[out] pResult    is output value.
238     */
239    void arm_mean_q31(
240    const q31_t * pSrc,
241          uint32_t blockSize,
242          q31_t * pResult);
243  
244  
245    /**
246     * @brief  Mean value of a floating-point vector.
247     * @param[in]  pSrc       is input pointer
248     * @param[in]  blockSize  is the number of samples to process
249     * @param[out] pResult    is output value.
250     */
251    void arm_mean_f32(
252    const float32_t * pSrc,
253          uint32_t blockSize,
254          float32_t * pResult);
255  
256  
257    /**
258     * @brief  Mean value of a floating-point vector.
259     * @param[in]  pSrc       is input pointer
260     * @param[in]  blockSize  is the number of samples to process
261     * @param[out] pResult    is output value.
262     */
263    void arm_mean_f64(
264    const float64_t * pSrc,
265          uint32_t blockSize,
266          float64_t * pResult);
267  
268  
269    /**
270     * @brief  Variance of the elements of a floating-point vector.
271     * @param[in]  pSrc       is input pointer
272     * @param[in]  blockSize  is the number of samples to process
273     * @param[out] pResult    is output value.
274     */
275    void arm_var_f32(
276    const float32_t * pSrc,
277          uint32_t blockSize,
278          float32_t * pResult);
279  
280  
281    /**
282     * @brief  Variance of the elements of a floating-point vector.
283     * @param[in]  pSrc       is input pointer
284     * @param[in]  blockSize  is the number of samples to process
285     * @param[out] pResult    is output value.
286     */
287    void arm_var_f64(
288    const float64_t * pSrc,
289          uint32_t blockSize,
290          float64_t * pResult);
291  
292  
293    /**
294     * @brief  Variance of the elements of a Q31 vector.
295     * @param[in]  pSrc       is input pointer
296     * @param[in]  blockSize  is the number of samples to process
297     * @param[out] pResult    is output value.
298     */
299    void arm_var_q31(
300    const q31_t * pSrc,
301          uint32_t blockSize,
302          q31_t * pResult);
303  
304  
305    /**
306     * @brief  Variance of the elements of a Q15 vector.
307     * @param[in]  pSrc       is input pointer
308     * @param[in]  blockSize  is the number of samples to process
309     * @param[out] pResult    is output value.
310     */
311    void arm_var_q15(
312    const q15_t * pSrc,
313          uint32_t blockSize,
314          q15_t * pResult);
315  
316  
317    /**
318     * @brief  Root Mean Square of the elements of a floating-point vector.
319     * @param[in]  pSrc       is input pointer
320     * @param[in]  blockSize  is the number of samples to process
321     * @param[out] pResult    is output value.
322     */
323    void arm_rms_f32(
324    const float32_t * pSrc,
325          uint32_t blockSize,
326          float32_t * pResult);
327  
328  
329    /**
330     * @brief  Root Mean Square of the elements of a Q31 vector.
331     * @param[in]  pSrc       is input pointer
332     * @param[in]  blockSize  is the number of samples to process
333     * @param[out] pResult    is output value.
334     */
335    void arm_rms_q31(
336    const q31_t * pSrc,
337          uint32_t blockSize,
338          q31_t * pResult);
339  
340  
341    /**
342     * @brief  Root Mean Square of the elements of a Q15 vector.
343     * @param[in]  pSrc       is input pointer
344     * @param[in]  blockSize  is the number of samples to process
345     * @param[out] pResult    is output value.
346     */
347    void arm_rms_q15(
348    const q15_t * pSrc,
349          uint32_t blockSize,
350          q15_t * pResult);
351  
352  
353    /**
354     * @brief  Standard deviation of the elements of a floating-point vector.
355     * @param[in]  pSrc       is input pointer
356     * @param[in]  blockSize  is the number of samples to process
357     * @param[out] pResult    is output value.
358     */
359    void arm_std_f32(
360    const float32_t * pSrc,
361          uint32_t blockSize,
362          float32_t * pResult);
363  
364  
365    /**
366     * @brief  Standard deviation of the elements of a floating-point vector.
367     * @param[in]  pSrc       is input pointer
368     * @param[in]  blockSize  is the number of samples to process
369     * @param[out] pResult    is output value.
370     */
371    void arm_std_f64(
372    const float64_t * pSrc,
373          uint32_t blockSize,
374          float64_t * pResult);
375  
376  
377    /**
378     * @brief  Standard deviation of the elements of a Q31 vector.
379     * @param[in]  pSrc       is input pointer
380     * @param[in]  blockSize  is the number of samples to process
381     * @param[out] pResult    is output value.
382     */
383    void arm_std_q31(
384    const q31_t * pSrc,
385          uint32_t blockSize,
386          q31_t * pResult);
387  
388  
389    /**
390     * @brief  Standard deviation of the elements of a Q15 vector.
391     * @param[in]  pSrc       is input pointer
392     * @param[in]  blockSize  is the number of samples to process
393     * @param[out] pResult    is output value.
394     */
395    void arm_std_q15(
396    const q15_t * pSrc,
397          uint32_t blockSize,
398          q15_t * pResult);
399  
400  
401    
402    /**
403     * @brief  Minimum value of a Q7 vector.
404     * @param[in]  pSrc       is input pointer
405     * @param[in]  blockSize  is the number of samples to process
406     * @param[out] result     is output pointer
407     * @param[in]  index      is the array index of the minimum value in the input buffer.
408     */
409    void arm_min_q7(
410    const q7_t * pSrc,
411          uint32_t blockSize,
412          q7_t * result,
413          uint32_t * index);
414  
415    /**
416     * @brief  Minimum value of absolute values of a Q7 vector.
417     * @param[in]  pSrc       is input pointer
418     * @param[in]  blockSize  is the number of samples to process
419     * @param[out] result     is output pointer
420     * @param[in]  index      is the array index of the minimum value in the input buffer.
421     */
422    void arm_absmin_q7(
423    const q7_t * pSrc,
424          uint32_t blockSize,
425          q7_t * result,
426          uint32_t * index);
427  
428      /**
429     * @brief  Minimum value of absolute values of a Q7 vector.
430     * @param[in]  pSrc       is input pointer
431     * @param[in]  blockSize  is the number of samples to process
432     * @param[out] result     is output pointer
433     */
434    void arm_absmin_no_idx_q7(
435    const q7_t * pSrc,
436          uint32_t blockSize,
437          q7_t * result);
438  
439  
440    /**
441     * @brief  Minimum value of a Q15 vector.
442     * @param[in]  pSrc       is input pointer
443     * @param[in]  blockSize  is the number of samples to process
444     * @param[out] pResult    is output pointer
445     * @param[in]  pIndex     is the array index of the minimum value in the input buffer.
446     */
447    void arm_min_q15(
448    const q15_t * pSrc,
449          uint32_t blockSize,
450          q15_t * pResult,
451          uint32_t * pIndex);
452  
453  /**
454     * @brief  Minimum value of absolute values of a Q15 vector.
455     * @param[in]  pSrc       is input pointer
456     * @param[in]  blockSize  is the number of samples to process
457     * @param[out] pResult    is output pointer
458     * @param[in]  pIndex     is the array index of the minimum value in the input buffer.
459     */
460    void arm_absmin_q15(
461    const q15_t * pSrc,
462          uint32_t blockSize,
463          q15_t * pResult,
464          uint32_t * pIndex);
465  
466    /**
467     * @brief  Minimum value of absolute values of a Q15 vector.
468     * @param[in]  pSrc       is input pointer
469     * @param[in]  blockSize  is the number of samples to process
470     * @param[out] pResult    is output pointer
471     */
472    void arm_absmin_no_idx_q15(
473    const q15_t * pSrc,
474          uint32_t blockSize,
475          q15_t * pResult);
476  
477  
478    /**
479     * @brief  Minimum value of a Q31 vector.
480     * @param[in]  pSrc       is input pointer
481     * @param[in]  blockSize  is the number of samples to process
482     * @param[out] pResult    is output pointer
483     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
484     */
485    void arm_min_q31(
486    const q31_t * pSrc,
487          uint32_t blockSize,
488          q31_t * pResult,
489          uint32_t * pIndex);
490  
491    /**
492     * @brief  Minimum value of absolute values of a Q31 vector.
493     * @param[in]  pSrc       is input pointer
494     * @param[in]  blockSize  is the number of samples to process
495     * @param[out] pResult    is output pointer
496     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
497     */
498    void arm_absmin_q31(
499    const q31_t * pSrc,
500          uint32_t blockSize,
501          q31_t * pResult,
502          uint32_t * pIndex);
503  
504   /**
505     * @brief  Minimum value of absolute values of a Q31 vector.
506     * @param[in]  pSrc       is input pointer
507     * @param[in]  blockSize  is the number of samples to process
508     * @param[out] pResult    is output pointer
509     */
510    void arm_absmin_no_idx_q31(
511    const q31_t * pSrc,
512          uint32_t blockSize,
513          q31_t * pResult);
514  
515  
516    /**
517     * @brief  Minimum value of a floating-point vector.
518     * @param[in]  pSrc       is input pointer
519     * @param[in]  blockSize  is the number of samples to process
520     * @param[out] pResult    is output pointer
521     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
522     */
523    void arm_min_f32(
524    const float32_t * pSrc,
525          uint32_t blockSize,
526          float32_t * pResult,
527          uint32_t * pIndex);
528  
529    /**
530     * @brief  Minimum value of absolute values of a floating-point vector.
531     * @param[in]  pSrc       is input pointer
532     * @param[in]  blockSize  is the number of samples to process
533     * @param[out] pResult    is output pointer
534     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
535     */
536    void arm_absmin_f32(
537    const float32_t * pSrc,
538          uint32_t blockSize,
539          float32_t * pResult,
540          uint32_t * pIndex);
541  
542    /**
543     * @brief  Minimum value of absolute values of a floating-point vector.
544     * @param[in]  pSrc       is input pointer
545     * @param[in]  blockSize  is the number of samples to process
546     * @param[out] pResult    is output pointer
547     */
548    void arm_absmin_no_idx_f32(
549    const float32_t * pSrc,
550          uint32_t blockSize,
551          float32_t * pResult);
552  
553  
554    /**
555     * @brief  Minimum value of a floating-point vector.
556     * @param[in]  pSrc       is input pointer
557     * @param[in]  blockSize  is the number of samples to process
558     * @param[out] pResult    is output pointer
559     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
560     */
561    void arm_min_f64(
562    const float64_t * pSrc,
563          uint32_t blockSize,
564          float64_t * pResult,
565          uint32_t * pIndex);
566  
567    /**
568     * @brief  Minimum value of absolute values of a floating-point vector.
569     * @param[in]  pSrc       is input pointer
570     * @param[in]  blockSize  is the number of samples to process
571     * @param[out] pResult    is output pointer
572     * @param[out] pIndex     is the array index of the minimum value in the input buffer.
573     */
574    void arm_absmin_f64(
575    const float64_t * pSrc,
576          uint32_t blockSize,
577          float64_t * pResult,
578          uint32_t * pIndex);
579  
580    /**
581     * @brief  Minimum value of absolute values of a floating-point vector.
582     * @param[in]  pSrc       is input pointer
583     * @param[in]  blockSize  is the number of samples to process
584     * @param[out] pResult    is output pointer
585     */
586    void arm_absmin_no_idx_f64(
587    const float64_t * pSrc,
588          uint32_t blockSize,
589          float64_t * pResult);
590  
591  
592  /**
593   * @brief Maximum value of a Q7 vector.
594   * @param[in]  pSrc       points to the input buffer
595   * @param[in]  blockSize  length of the input vector
596   * @param[out] pResult    maximum value returned here
597   * @param[out] pIndex     index of maximum value returned here
598   */
599    void arm_max_q7(
600    const q7_t * pSrc,
601          uint32_t blockSize,
602          q7_t * pResult,
603          uint32_t * pIndex);
604  
605  /**
606   * @brief Maximum value of absolute values of a Q7 vector.
607   * @param[in]  pSrc       points to the input buffer
608   * @param[in]  blockSize  length of the input vector
609   * @param[out] pResult    maximum value returned here
610   * @param[out] pIndex     index of maximum value returned here
611   */
612    void arm_absmax_q7(
613    const q7_t * pSrc,
614          uint32_t blockSize,
615          q7_t * pResult,
616          uint32_t * pIndex);
617  
618  /**
619   * @brief Maximum value of absolute values of a Q7 vector.
620   * @param[in]  pSrc       points to the input buffer
621   * @param[in]  blockSize  length of the input vector
622   * @param[out] pResult    maximum value returned here
623   */
624    void arm_absmax_no_idx_q7(
625    const q7_t * pSrc,
626          uint32_t blockSize,
627          q7_t * pResult);
628  
629  
630  /**
631   * @brief Maximum value of a Q15 vector.
632   * @param[in]  pSrc       points to the input buffer
633   * @param[in]  blockSize  length of the input vector
634   * @param[out] pResult    maximum value returned here
635   * @param[out] pIndex     index of maximum value returned here
636   */
637    void arm_max_q15(
638    const q15_t * pSrc,
639          uint32_t blockSize,
640          q15_t * pResult,
641          uint32_t * pIndex);
642  
643  /**
644   * @brief Maximum value of absolute values of a Q15 vector.
645   * @param[in]  pSrc       points to the input buffer
646   * @param[in]  blockSize  length of the input vector
647   * @param[out] pResult    maximum value returned here
648   * @param[out] pIndex     index of maximum value returned here
649   */
650    void arm_absmax_q15(
651    const q15_t * pSrc,
652          uint32_t blockSize,
653          q15_t * pResult,
654          uint32_t * pIndex);
655  
656    /**
657   * @brief Maximum value of absolute values of a Q15 vector.
658   * @param[in]  pSrc       points to the input buffer
659   * @param[in]  blockSize  length of the input vector
660   * @param[out] pResult    maximum value returned here
661   */
662    void arm_absmax_no_idx_q15(
663    const q15_t * pSrc,
664          uint32_t blockSize,
665          q15_t * pResult);
666  
667  /**
668   * @brief Maximum value of a Q31 vector.
669   * @param[in]  pSrc       points to the input buffer
670   * @param[in]  blockSize  length of the input vector
671   * @param[out] pResult    maximum value returned here
672   * @param[out] pIndex     index of maximum value returned here
673   */
674    void arm_max_q31(
675    const q31_t * pSrc,
676          uint32_t blockSize,
677          q31_t * pResult,
678          uint32_t * pIndex);
679  
680  /**
681   * @brief Maximum value of absolute values of a Q31 vector.
682   * @param[in]  pSrc       points to the input buffer
683   * @param[in]  blockSize  length of the input vector
684   * @param[out] pResult    maximum value returned here
685   * @param[out] pIndex     index of maximum value returned here
686   */
687    void arm_absmax_q31(
688    const q31_t * pSrc,
689          uint32_t blockSize,
690          q31_t * pResult,
691          uint32_t * pIndex);
692  
693   /**
694   * @brief Maximum value of absolute values of a Q31 vector.
695   * @param[in]  pSrc       points to the input buffer
696   * @param[in]  blockSize  length of the input vector
697   * @param[out] pResult    maximum value returned here
698   */
699    void arm_absmax_no_idx_q31(
700    const q31_t * pSrc,
701          uint32_t blockSize,
702          q31_t * pResult);
703  
704  /**
705   * @brief Maximum value of a floating-point vector.
706   * @param[in]  pSrc       points to the input buffer
707   * @param[in]  blockSize  length of the input vector
708   * @param[out] pResult    maximum value returned here
709   * @param[out] pIndex     index of maximum value returned here
710   */
711    void arm_max_f32(
712    const float32_t * pSrc,
713          uint32_t blockSize,
714          float32_t * pResult,
715          uint32_t * pIndex);
716  
717  /**
718   * @brief Maximum value of absolute values of a floating-point vector.
719   * @param[in]  pSrc       points to the input buffer
720   * @param[in]  blockSize  length of the input vector
721   * @param[out] pResult    maximum value returned here
722   * @param[out] pIndex     index of maximum value returned here
723   */
724    void arm_absmax_f32(
725    const float32_t * pSrc,
726          uint32_t blockSize,
727          float32_t * pResult,
728          uint32_t * pIndex);
729  
730   /**
731   * @brief Maximum value of absolute values of a floating-point vector.
732   * @param[in]  pSrc       points to the input buffer
733   * @param[in]  blockSize  length of the input vector
734   * @param[out] pResult    maximum value returned here
735   */
736    void arm_absmax_no_idx_f32(
737    const float32_t * pSrc,
738          uint32_t blockSize,
739          float32_t * pResult);
740  
741  /**
742   * @brief Maximum value of a floating-point vector.
743   * @param[in]  pSrc       points to the input buffer
744   * @param[in]  blockSize  length of the input vector
745   * @param[out] pResult    maximum value returned here
746   * @param[out] pIndex     index of maximum value returned here
747   */
748    void arm_max_f64(
749    const float64_t * pSrc,
750          uint32_t blockSize,
751          float64_t * pResult,
752          uint32_t * pIndex);
753  
754  /**
755   * @brief Maximum value of absolute values of a floating-point vector.
756   * @param[in]  pSrc       points to the input buffer
757   * @param[in]  blockSize  length of the input vector
758   * @param[out] pResult    maximum value returned here
759   * @param[out] pIndex     index of maximum value returned here
760   */
761    void arm_absmax_f64(
762    const float64_t * pSrc,
763          uint32_t blockSize,
764          float64_t * pResult,
765          uint32_t * pIndex);
766  
767  /**
768   * @brief Maximum value of absolute values of a floating-point vector.
769   * @param[in]  pSrc       points to the input buffer
770   * @param[in]  blockSize  length of the input vector
771   * @param[out] pResult    maximum value returned here
772   */
773    void arm_absmax_no_idx_f64(
774    const float64_t * pSrc,
775          uint32_t blockSize,
776          float64_t * pResult);
777  
778    /**
779      @brief         Maximum value of a floating-point vector.
780      @param[in]     pSrc       points to the input vector
781      @param[in]     blockSize  number of samples in input vector
782      @param[out]    pResult    maximum value returned here
783      @return        none
784     */
785    void arm_max_no_idx_f32(
786        const float32_t *pSrc,
787        uint32_t   blockSize,
788        float32_t *pResult);
789  
790    /**
791      @brief         Minimum value of a floating-point vector.
792      @param[in]     pSrc       points to the input vector
793      @param[in]     blockSize  number of samples in input vector
794      @param[out]    pResult    minimum value returned here
795      @return        none
796     */
797    void arm_min_no_idx_f32(
798        const float32_t *pSrc,
799        uint32_t   blockSize,
800        float32_t *pResult);
801  
802    /**
803      @brief         Maximum value of a floating-point vector.
804      @param[in]     pSrc       points to the input vector
805      @param[in]     blockSize  number of samples in input vector
806      @param[out]    pResult    maximum value returned here
807      @return        none
808     */
809    void arm_max_no_idx_f64(
810        const float64_t *pSrc,
811        uint32_t   blockSize,
812        float64_t *pResult);
813  
814    /**
815      @brief         Maximum value of a q31 vector.
816      @param[in]     pSrc       points to the input vector
817      @param[in]     blockSize  number of samples in input vector
818      @param[out]    pResult    maximum value returned here
819      @return        none
820     */
821    void arm_max_no_idx_q31(
822        const q31_t *pSrc,
823        uint32_t   blockSize,
824        q31_t *pResult);
825  
826    /**
827      @brief         Maximum value of a q15 vector.
828      @param[in]     pSrc       points to the input vector
829      @param[in]     blockSize  number of samples in input vector
830      @param[out]    pResult    maximum value returned here
831      @return        none
832     */
833    void arm_max_no_idx_q15(
834        const q15_t *pSrc,
835        uint32_t   blockSize,
836        q15_t *pResult);
837  
838    /**
839      @brief         Maximum value of a q7 vector.
840      @param[in]     pSrc       points to the input vector
841      @param[in]     blockSize  number of samples in input vector
842      @param[out]    pResult    maximum value returned here
843      @return        none
844     */
845    void arm_max_no_idx_q7(
846        const q7_t *pSrc,
847        uint32_t   blockSize,
848        q7_t *pResult);
849  
850    /**
851      @brief         Minimum value of a floating-point vector.
852      @param[in]     pSrc       points to the input vector
853      @param[in]     blockSize  number of samples in input vector
854      @param[out]    pResult    minimum value returned here
855      @return        none
856     */
857    void arm_min_no_idx_f64(
858        const float64_t *pSrc,
859        uint32_t   blockSize,
860        float64_t *pResult);
861  
862  /**
863      @brief         Minimum value of a q31 vector.
864      @param[in]     pSrc       points to the input vector
865      @param[in]     blockSize  number of samples in input vector
866      @param[out]    pResult    minimum value returned here
867      @return        none
868     */
869    void arm_min_no_idx_q31(
870        const q31_t *pSrc,
871        uint32_t   blockSize,
872        q31_t *pResult);
873  
874    /**
875      @brief         Minimum value of a q15 vector.
876      @param[in]     pSrc       points to the input vector
877      @param[in]     blockSize  number of samples in input vector
878      @param[out]    pResult    minimum value returned here
879      @return        none
880     */
881    void arm_min_no_idx_q15(
882        const q15_t *pSrc,
883        uint32_t   blockSize,
884        q15_t *pResult);
885  
886    /**
887      @brief         Minimum value of a q7 vector.
888      @param[in]     pSrc       points to the input vector
889      @param[in]     blockSize  number of samples in input vector
890      @param[out]    pResult    minimum value returned here
891      @return        none
892     */
893    void arm_min_no_idx_q7(
894        const q7_t *pSrc,
895        uint32_t   blockSize,
896        q7_t *pResult);
897  
898  /**
899    @brief         Mean square error between two Q7 vectors.
900    @param[in]     pSrcA       points to the first input vector
901    @param[in]     pSrcB       points to the second input vector
902    @param[in]     blockSize  number of samples in input vector
903    @param[out]    pResult    mean square error
904    @return        none 
905  */
906    
907  void arm_mse_q7(
908    const q7_t * pSrcA,
909    const q7_t * pSrcB,
910          uint32_t blockSize,
911          q7_t * pResult);
912  
913  /**
914    @brief         Mean square error between two Q15 vectors.
915    @param[in]     pSrcA       points to the first input vector
916    @param[in]     pSrcB       points to the second input vector
917    @param[in]     blockSize  number of samples in input vector
918    @param[out]    pResult    mean square error
919    @return        none 
920  */
921    
922  void arm_mse_q15(
923    const q15_t * pSrcA,
924    const q15_t * pSrcB,
925          uint32_t blockSize,
926          q15_t * pResult);
927  
928  /**
929    @brief         Mean square error between two Q31 vectors.
930    @param[in]     pSrcA       points to the first input vector
931    @param[in]     pSrcB       points to the second input vector
932    @param[in]     blockSize  number of samples in input vector
933    @param[out]    pResult    mean square error
934    @return        none 
935  */
936    
937  void arm_mse_q31(
938    const q31_t * pSrcA,
939    const q31_t * pSrcB,
940          uint32_t blockSize,
941          q31_t * pResult);
942  
943  /**
944    @brief         Mean square error between two single precision float vectors.
945    @param[in]     pSrcA       points to the first input vector
946    @param[in]     pSrcB       points to the second input vector
947    @param[in]     blockSize  number of samples in input vector
948    @param[out]    pResult    mean square error
949    @return        none 
950  */
951    
952  void arm_mse_f32(
953    const float32_t * pSrcA,
954    const float32_t * pSrcB,
955          uint32_t blockSize,
956          float32_t * pResult);
957  
958  /**
959    @brief         Mean square error between two double precision float vectors.
960    @param[in]     pSrcA       points to the first input vector
961    @param[in]     pSrcB       points to the second input vector
962    @param[in]     blockSize  number of samples in input vector
963    @param[out]    pResult    mean square error
964    @return        none 
965  */
966    
967  void arm_mse_f64(
968    const float64_t * pSrcA,
969    const float64_t * pSrcB,
970          uint32_t blockSize,
971          float64_t * pResult);
972  
973  #ifdef   __cplusplus
974  }
975  #endif
976  
977  #endif /* ifndef _STATISTICS_FUNCTIONS_H_ */