arm_math.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------
2 * Copyright (C) 2010-2014 ARM Limited. All rights reserved.
3 *
4 * $Date: 12. March 2014
5 * $Revision: V1.4.4
6 *
7 * Project: CMSIS DSP Library
8 * Title: arm_math.h
9 *
10 * Description: Public header file for CMSIS DSP Library
11 *
12 * Target Processor: Cortex-M7/Cortex-M4/Cortex-M3/Cortex-M0
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * - Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * - Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in
21 * the documentation and/or other materials provided with the
22 * distribution.
23 * - Neither the name of ARM LIMITED nor the names of its contributors
24 * may be used to endorse or promote products derived from this
25 * software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39  * -------------------------------------------------------------------- */
40 
281 #ifndef _ARM_MATH_H
282 #define _ARM_MATH_H
283 
284 #define __CMSIS_GENERIC /* disable NVIC and Systick functions */
285 
286 #if defined(ARM_MATH_CM7)
287  #include "core_cm7.h"
288 #elif defined (ARM_MATH_CM4)
289  #include "core_cm4.h"
290 #elif defined (ARM_MATH_CM3)
291  #include "core_cm3.h"
292 #elif defined (ARM_MATH_CM0)
293  #include "core_cm0.h"
294 #define ARM_MATH_CM0_FAMILY
295  #elif defined (ARM_MATH_CM0PLUS)
296 #include "core_cm0plus.h"
297  #define ARM_MATH_CM0_FAMILY
298 #else
299  #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"
300 #endif
301 
302 #undef __CMSIS_GENERIC /* enable NVIC and Systick functions */
303 #include "string.h"
304 #include "math.h"
305 #ifdef __cplusplus
306 extern "C"
307 {
308 #endif
309 
310 
315 #define DELTA_Q31 (0x100)
316 #define DELTA_Q15 0x5
317 #define INDEX_MASK 0x0000003F
318 #ifndef PI
319 #define PI 3.14159265358979f
320 #endif
321 
326 #define FAST_MATH_TABLE_SIZE 512
327 #define FAST_MATH_Q31_SHIFT (32 - 10)
328 #define FAST_MATH_Q15_SHIFT (16 - 10)
329 #define CONTROLLER_Q31_SHIFT (32 - 9)
330 #define TABLE_SIZE 256
331 #define TABLE_SPACING_Q31 0x400000
332 #define TABLE_SPACING_Q15 0x80
333 
337  /* 1.31(q31) Fixed value of 2/360 */
338  /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
339 #define INPUT_SPACING 0xB60B61
340 
344 #ifndef UNALIGNED_SUPPORT_DISABLE
345  #define ALIGN4
346 #else
347  #if defined (__GNUC__)
348  #define ALIGN4 __attribute__((aligned(4)))
349  #else
350  #define ALIGN4 __align(4)
351  #endif
352 #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */
353 
358  typedef enum
359  {
367  } arm_status;
368 
372  typedef int8_t q7_t;
373 
377  typedef int16_t q15_t;
378 
382  typedef int32_t q31_t;
383 
387  typedef int64_t q63_t;
388 
392  typedef float float32_t;
393 
397  typedef double float64_t;
398 
402 #if defined __CC_ARM
403 #define __SIMD32_TYPE int32_t __packed
404 #define CMSIS_UNUSED __attribute__((unused))
405 #elif defined __ICCARM__
406 #define CMSIS_UNUSED
407 #define __SIMD32_TYPE int32_t __packed
408 #elif defined __GNUC__
409 #define __SIMD32_TYPE int32_t
410 #define CMSIS_UNUSED __attribute__((unused))
411 #elif defined __CSMC__ /* Cosmic */
412 #define CMSIS_UNUSED
413 #define __SIMD32_TYPE int32_t
414 #else
415 #error Unknown compiler
416 #endif
417 
418 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
419 #define __SIMD32_CONST(addr) ((__SIMD32_TYPE *)(addr))
420 
421 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE *) (addr))
422 
423 #define __SIMD64(addr) (*(int64_t **) & (addr))
424 
425 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
426 
429 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
430  (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
431 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
432  (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
433 
434 #endif
435 
436 
440 #ifndef ARM_MATH_BIG_ENDIAN
441 
442 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
443  (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
444  (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
445  (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
446 #else
447 
448 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
449  (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
450  (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
451  (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
452 
453 #endif
454 
455 
459  static __INLINE q31_t clip_q63_to_q31(
460  q63_t x)
461  {
462  return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
463  ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
464  }
465 
469  static __INLINE q15_t clip_q63_to_q15(
470  q63_t x)
471  {
472  return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
473  ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
474  }
475 
479  static __INLINE q7_t clip_q31_to_q7(
480  q31_t x)
481  {
482  return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
483  ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
484  }
485 
489  static __INLINE q15_t clip_q31_to_q15(
490  q31_t x)
491  {
492  return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
493  ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
494  }
495 
500  static __INLINE q63_t mult32x64(
501  q63_t x,
502  q31_t y)
503  {
504  return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
505  (((q63_t) (x >> 32) * y)));
506  }
507 
508 
509 #if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
510 #define __CLZ __clz
511 #endif
512 
513 #if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) ||(defined (__GNUC__)) || defined (__TASKING__) )
514 
515  static __INLINE uint32_t __CLZ(
516  q31_t data);
517 
518 
519  static __INLINE uint32_t __CLZ(
520  q31_t data)
521  {
522  uint32_t count = 0;
523  uint32_t mask = 0x80000000;
524 
525  while((data & mask) == 0)
526  {
527  count += 1u;
528  mask = mask >> 1u;
529  }
530 
531  return (count);
532 
533  }
534 
535 #endif
536 
541  static __INLINE uint32_t arm_recip_q31(
542  q31_t in,
543  q31_t * dst,
544  q31_t * pRecipTable)
545  {
546 
547  uint32_t out, tempVal;
548  uint32_t index, i;
549  uint32_t signBits;
550 
551  if(in > 0)
552  {
553  signBits = __CLZ(in) - 1;
554  }
555  else
556  {
557  signBits = __CLZ(-in) - 1;
558  }
559 
560  /* Convert input sample to 1.31 format */
561  in = in << signBits;
562 
563  /* calculation of index for initial approximated Val */
564  index = (uint32_t) (in >> 24u);
565  index = (index & INDEX_MASK);
566 
567  /* 1.31 with exp 1 */
568  out = pRecipTable[index];
569 
570  /* calculation of reciprocal value */
571  /* running approximation for two iterations */
572  for (i = 0u; i < 2u; i++)
573  {
574  tempVal = (q31_t) (((q63_t) in * out) >> 31u);
575  tempVal = 0x7FFFFFFF - tempVal;
576  /* 1.31 with exp 1 */
577  //out = (q31_t) (((q63_t) out * tempVal) >> 30u);
578  out = (q31_t) clip_q63_to_q31(((q63_t) out * tempVal) >> 30u);
579  }
580 
581  /* write output */
582  *dst = out;
583 
584  /* return num of signbits of out = 1/in value */
585  return (signBits + 1u);
586 
587  }
588 
592  static __INLINE uint32_t arm_recip_q15(
593  q15_t in,
594  q15_t * dst,
595  q15_t * pRecipTable)
596  {
597 
598  uint32_t out = 0, tempVal = 0;
599  uint32_t index = 0, i = 0;
600  uint32_t signBits = 0;
601 
602  if(in > 0)
603  {
604  signBits = __CLZ(in) - 17;
605  }
606  else
607  {
608  signBits = __CLZ(-in) - 17;
609  }
610 
611  /* Convert input sample to 1.15 format */
612  in = in << signBits;
613 
614  /* calculation of index for initial approximated Val */
615  index = in >> 8;
616  index = (index & INDEX_MASK);
617 
618  /* 1.15 with exp 1 */
619  out = pRecipTable[index];
620 
621  /* calculation of reciprocal value */
622  /* running approximation for two iterations */
623  for (i = 0; i < 2; i++)
624  {
625  tempVal = (q15_t) (((q31_t) in * out) >> 15);
626  tempVal = 0x7FFF - tempVal;
627  /* 1.15 with exp 1 */
628  out = (q15_t) (((q31_t) out * tempVal) >> 14);
629  }
630 
631  /* write output */
632  *dst = out;
633 
634  /* return num of signbits of out = 1/in value */
635  return (signBits + 1);
636 
637  }
638 
639 
640  /*
641  * @brief C custom defined intrinisic function for only M0 processors
642  */
643 #if defined(ARM_MATH_CM0_FAMILY)
644 
645  static __INLINE q31_t __SSAT(
646  q31_t x,
647  uint32_t y)
648  {
649  int32_t posMax, negMin;
650  uint32_t i;
651 
652  posMax = 1;
653  for (i = 0; i < (y - 1); i++)
654  {
655  posMax = posMax * 2;
656  }
657 
658  if(x > 0)
659  {
660  posMax = (posMax - 1);
661 
662  if(x > posMax)
663  {
664  x = posMax;
665  }
666  }
667  else
668  {
669  negMin = -posMax;
670 
671  if(x < negMin)
672  {
673  x = negMin;
674  }
675  }
676  return (x);
677 
678 
679  }
680 
681 #endif /* end of ARM_MATH_CM0_FAMILY */
682 
683 
684 
685  /*
686  * @brief C custom defined intrinsic function for M3 and M0 processors
687  */
688 #if defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY)
689 
690  /*
691  * @brief C custom defined QADD8 for M3 and M0 processors
692  */
693  static __INLINE q31_t __QADD8(
694  q31_t x,
695  q31_t y)
696  {
697 
698  q31_t sum;
699  q7_t r, s, t, u;
700 
701  r = (q7_t) x;
702  s = (q7_t) y;
703 
704  r = __SSAT((q31_t) (r + s), 8);
705  s = __SSAT(((q31_t) (((x << 16) >> 24) + ((y << 16) >> 24))), 8);
706  t = __SSAT(((q31_t) (((x << 8) >> 24) + ((y << 8) >> 24))), 8);
707  u = __SSAT(((q31_t) ((x >> 24) + (y >> 24))), 8);
708 
709  sum =
710  (((q31_t) u << 24) & 0xFF000000) | (((q31_t) t << 16) & 0x00FF0000) |
711  (((q31_t) s << 8) & 0x0000FF00) | (r & 0x000000FF);
712 
713  return sum;
714 
715  }
716 
717  /*
718  * @brief C custom defined QSUB8 for M3 and M0 processors
719  */
720  static __INLINE q31_t __QSUB8(
721  q31_t x,
722  q31_t y)
723  {
724 
725  q31_t sum;
726  q31_t r, s, t, u;
727 
728  r = (q7_t) x;
729  s = (q7_t) y;
730 
731  r = __SSAT((r - s), 8);
732  s = __SSAT(((q31_t) (((x << 16) >> 24) - ((y << 16) >> 24))), 8) << 8;
733  t = __SSAT(((q31_t) (((x << 8) >> 24) - ((y << 8) >> 24))), 8) << 16;
734  u = __SSAT(((q31_t) ((x >> 24) - (y >> 24))), 8) << 24;
735 
736  sum =
737  (u & 0xFF000000) | (t & 0x00FF0000) | (s & 0x0000FF00) | (r &
738  0x000000FF);
739 
740  return sum;
741  }
742 
743  /*
744  * @brief C custom defined QADD16 for M3 and M0 processors
745  */
746 
747  /*
748  * @brief C custom defined QADD16 for M3 and M0 processors
749  */
750  static __INLINE q31_t __QADD16(
751  q31_t x,
752  q31_t y)
753  {
754 
755  q31_t sum;
756  q31_t r, s;
757 
758  r = (q15_t) x;
759  s = (q15_t) y;
760 
761  r = __SSAT(r + s, 16);
762  s = __SSAT(((q31_t) ((x >> 16) + (y >> 16))), 16) << 16;
763 
764  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
765 
766  return sum;
767 
768  }
769 
770  /*
771  * @brief C custom defined SHADD16 for M3 and M0 processors
772  */
773  static __INLINE q31_t __SHADD16(
774  q31_t x,
775  q31_t y)
776  {
777 
778  q31_t sum;
779  q31_t r, s;
780 
781  r = (q15_t) x;
782  s = (q15_t) y;
783 
784  r = ((r >> 1) + (s >> 1));
785  s = ((q31_t) ((x >> 17) + (y >> 17))) << 16;
786 
787  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
788 
789  return sum;
790 
791  }
792 
793  /*
794  * @brief C custom defined QSUB16 for M3 and M0 processors
795  */
796  static __INLINE q31_t __QSUB16(
797  q31_t x,
798  q31_t y)
799  {
800 
801  q31_t sum;
802  q31_t r, s;
803 
804  r = (q15_t) x;
805  s = (q15_t) y;
806 
807  r = __SSAT(r - s, 16);
808  s = __SSAT(((q31_t) ((x >> 16) - (y >> 16))), 16) << 16;
809 
810  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
811 
812  return sum;
813  }
814 
815  /*
816  * @brief C custom defined SHSUB16 for M3 and M0 processors
817  */
818  static __INLINE q31_t __SHSUB16(
819  q31_t x,
820  q31_t y)
821  {
822 
823  q31_t diff;
824  q31_t r, s;
825 
826  r = (q15_t) x;
827  s = (q15_t) y;
828 
829  r = ((r >> 1) - (s >> 1));
830  s = (((x >> 17) - (y >> 17)) << 16);
831 
832  diff = (s & 0xFFFF0000) | (r & 0x0000FFFF);
833 
834  return diff;
835  }
836 
837  /*
838  * @brief C custom defined QASX for M3 and M0 processors
839  */
840  static __INLINE q31_t __QASX(
841  q31_t x,
842  q31_t y)
843  {
844 
845  q31_t sum = 0;
846 
847  sum =
848  ((sum +
849  clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) + (q15_t) y))) << 16) +
850  clip_q31_to_q15((q31_t) ((q15_t) x - (q15_t) (y >> 16)));
851 
852  return sum;
853  }
854 
855  /*
856  * @brief C custom defined SHASX for M3 and M0 processors
857  */
858  static __INLINE q31_t __SHASX(
859  q31_t x,
860  q31_t y)
861  {
862 
863  q31_t sum;
864  q31_t r, s;
865 
866  r = (q15_t) x;
867  s = (q15_t) y;
868 
869  r = ((r >> 1) - (y >> 17));
870  s = (((x >> 17) + (s >> 1)) << 16);
871 
872  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
873 
874  return sum;
875  }
876 
877 
878  /*
879  * @brief C custom defined QSAX for M3 and M0 processors
880  */
881  static __INLINE q31_t __QSAX(
882  q31_t x,
883  q31_t y)
884  {
885 
886  q31_t sum = 0;
887 
888  sum =
889  ((sum +
890  clip_q31_to_q15((q31_t) ((q15_t) (x >> 16) - (q15_t) y))) << 16) +
891  clip_q31_to_q15((q31_t) ((q15_t) x + (q15_t) (y >> 16)));
892 
893  return sum;
894  }
895 
896  /*
897  * @brief C custom defined SHSAX for M3 and M0 processors
898  */
899  static __INLINE q31_t __SHSAX(
900  q31_t x,
901  q31_t y)
902  {
903 
904  q31_t sum;
905  q31_t r, s;
906 
907  r = (q15_t) x;
908  s = (q15_t) y;
909 
910  r = ((r >> 1) + (y >> 17));
911  s = (((x >> 17) - (s >> 1)) << 16);
912 
913  sum = (s & 0xFFFF0000) | (r & 0x0000FFFF);
914 
915  return sum;
916  }
917 
918  /*
919  * @brief C custom defined SMUSDX for M3 and M0 processors
920  */
921  static __INLINE q31_t __SMUSDX(
922  q31_t x,
923  q31_t y)
924  {
925 
926  return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) -
927  ((q15_t) (x >> 16) * (q15_t) y)));
928  }
929 
930  /*
931  * @brief C custom defined SMUADX for M3 and M0 processors
932  */
933  static __INLINE q31_t __SMUADX(
934  q31_t x,
935  q31_t y)
936  {
937 
938  return ((q31_t) (((q15_t) x * (q15_t) (y >> 16)) +
939  ((q15_t) (x >> 16) * (q15_t) y)));
940  }
941 
942  /*
943  * @brief C custom defined QADD for M3 and M0 processors
944  */
945  static __INLINE q31_t __QADD(
946  q31_t x,
947  q31_t y)
948  {
949  return clip_q63_to_q31((q63_t) x + y);
950  }
951 
952  /*
953  * @brief C custom defined QSUB for M3 and M0 processors
954  */
955  static __INLINE q31_t __QSUB(
956  q31_t x,
957  q31_t y)
958  {
959  return clip_q63_to_q31((q63_t) x - y);
960  }
961 
962  /*
963  * @brief C custom defined SMLAD for M3 and M0 processors
964  */
965  static __INLINE q31_t __SMLAD(
966  q31_t x,
967  q31_t y,
968  q31_t sum)
969  {
970 
971  return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
972  ((q15_t) x * (q15_t) y));
973  }
974 
975  /*
976  * @brief C custom defined SMLADX for M3 and M0 processors
977  */
978  static __INLINE q31_t __SMLADX(
979  q31_t x,
980  q31_t y,
981  q31_t sum)
982  {
983 
984  return (sum + ((q15_t) (x >> 16) * (q15_t) (y)) +
985  ((q15_t) x * (q15_t) (y >> 16)));
986  }
987 
988  /*
989  * @brief C custom defined SMLSDX for M3 and M0 processors
990  */
991  static __INLINE q31_t __SMLSDX(
992  q31_t x,
993  q31_t y,
994  q31_t sum)
995  {
996 
997  return (sum - ((q15_t) (x >> 16) * (q15_t) (y)) +
998  ((q15_t) x * (q15_t) (y >> 16)));
999  }
1000 
1001  /*
1002  * @brief C custom defined SMLALD for M3 and M0 processors
1003  */
1004  static __INLINE q63_t __SMLALD(
1005  q31_t x,
1006  q31_t y,
1007  q63_t sum)
1008  {
1009 
1010  return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) +
1011  ((q15_t) x * (q15_t) y));
1012  }
1013 
1014  /*
1015  * @brief C custom defined SMLALDX for M3 and M0 processors
1016  */
1017  static __INLINE q63_t __SMLALDX(
1018  q31_t x,
1019  q31_t y,
1020  q63_t sum)
1021  {
1022 
1023  return (sum + ((q15_t) (x >> 16) * (q15_t) y)) +
1024  ((q15_t) x * (q15_t) (y >> 16));
1025  }
1026 
1027  /*
1028  * @brief C custom defined SMUAD for M3 and M0 processors
1029  */
1030  static __INLINE q31_t __SMUAD(
1031  q31_t x,
1032  q31_t y)
1033  {
1034 
1035  return (((x >> 16) * (y >> 16)) +
1036  (((x << 16) >> 16) * ((y << 16) >> 16)));
1037  }
1038 
1039  /*
1040  * @brief C custom defined SMUSD for M3 and M0 processors
1041  */
1042  static __INLINE q31_t __SMUSD(
1043  q31_t x,
1044  q31_t y)
1045  {
1046 
1047  return (-((x >> 16) * (y >> 16)) +
1048  (((x << 16) >> 16) * ((y << 16) >> 16)));
1049  }
1050 
1051 
1052  /*
1053  * @brief C custom defined SXTB16 for M3 and M0 processors
1054  */
1055  static __INLINE q31_t __SXTB16(
1056  q31_t x)
1057  {
1058 
1059  return ((((x << 24) >> 24) & 0x0000FFFF) |
1060  (((x << 8) >> 8) & 0xFFFF0000));
1061  }
1062 
1063 
1064 #endif /* defined (ARM_MATH_CM3) || defined (ARM_MATH_CM0_FAMILY) */
1065 
1066 
1070  typedef struct
1071  {
1072  uint16_t numTaps;
1073  q7_t *pState;
1074  q7_t *pCoeffs;
1076 
1080  typedef struct
1081  {
1082  uint16_t numTaps;
1083  q15_t *pState;
1084  q15_t *pCoeffs;
1086 
1090  typedef struct
1091  {
1092  uint16_t numTaps;
1093  q31_t *pState;
1094  q31_t *pCoeffs;
1096 
1100  typedef struct
1101  {
1102  uint16_t numTaps;
1103  float32_t *pState;
1104  float32_t *pCoeffs;
1106 
1107 
1116  void arm_fir_q7(
1117  const arm_fir_instance_q7 * S,
1118  q7_t * pSrc,
1119  q7_t * pDst,
1120  uint32_t blockSize);
1121 
1122 
1132  void arm_fir_init_q7(
1133  arm_fir_instance_q7 * S,
1134  uint16_t numTaps,
1135  q7_t * pCoeffs,
1136  q7_t * pState,
1137  uint32_t blockSize);
1138 
1139 
1148  void arm_fir_q15(
1149  const arm_fir_instance_q15 * S,
1150  q15_t * pSrc,
1151  q15_t * pDst,
1152  uint32_t blockSize);
1153 
1162  void arm_fir_fast_q15(
1163  const arm_fir_instance_q15 * S,
1164  q15_t * pSrc,
1165  q15_t * pDst,
1166  uint32_t blockSize);
1167 
1181  uint16_t numTaps,
1182  q15_t * pCoeffs,
1183  q15_t * pState,
1184  uint32_t blockSize);
1185 
1194  void arm_fir_q31(
1195  const arm_fir_instance_q31 * S,
1196  q31_t * pSrc,
1197  q31_t * pDst,
1198  uint32_t blockSize);
1199 
1208  void arm_fir_fast_q31(
1209  const arm_fir_instance_q31 * S,
1210  q31_t * pSrc,
1211  q31_t * pDst,
1212  uint32_t blockSize);
1213 
1223  void arm_fir_init_q31(
1225  uint16_t numTaps,
1226  q31_t * pCoeffs,
1227  q31_t * pState,
1228  uint32_t blockSize);
1229 
1238  void arm_fir_f32(
1239  const arm_fir_instance_f32 * S,
1240  float32_t * pSrc,
1241  float32_t * pDst,
1242  uint32_t blockSize);
1243 
1253  void arm_fir_init_f32(
1255  uint16_t numTaps,
1256  float32_t * pCoeffs,
1257  float32_t * pState,
1258  uint32_t blockSize);
1259 
1260 
1264  typedef struct
1265  {
1266  int8_t numStages;
1267  q15_t *pState;
1268  q15_t *pCoeffs;
1269  int8_t postShift;
1272 
1273 
1277  typedef struct
1278  {
1279  uint32_t numStages;
1280  q31_t *pState;
1281  q31_t *pCoeffs;
1282  uint8_t postShift;
1285 
1289  typedef struct
1290  {
1291  uint32_t numStages;
1292  float32_t *pState;
1293  float32_t *pCoeffs;
1297 
1298 
1299 
1310  const arm_biquad_casd_df1_inst_q15 * S,
1311  q15_t * pSrc,
1312  q15_t * pDst,
1313  uint32_t blockSize);
1314 
1327  uint8_t numStages,
1328  q15_t * pCoeffs,
1329  q15_t * pState,
1330  int8_t postShift);
1331 
1332 
1343  const arm_biquad_casd_df1_inst_q15 * S,
1344  q15_t * pSrc,
1345  q15_t * pDst,
1346  uint32_t blockSize);
1347 
1348 
1359  const arm_biquad_casd_df1_inst_q31 * S,
1360  q31_t * pSrc,
1361  q31_t * pDst,
1362  uint32_t blockSize);
1363 
1374  const arm_biquad_casd_df1_inst_q31 * S,
1375  q31_t * pSrc,
1376  q31_t * pDst,
1377  uint32_t blockSize);
1378 
1391  uint8_t numStages,
1392  q31_t * pCoeffs,
1393  q31_t * pState,
1394  int8_t postShift);
1395 
1406  const arm_biquad_casd_df1_inst_f32 * S,
1407  float32_t * pSrc,
1408  float32_t * pDst,
1409  uint32_t blockSize);
1410 
1422  uint8_t numStages,
1423  float32_t * pCoeffs,
1424  float32_t * pState);
1425 
1426 
1431  typedef struct
1432  {
1433  uint16_t numRows;
1434  uint16_t numCols;
1435  float32_t *pData;
1437 
1438 
1443  typedef struct
1444  {
1445  uint16_t numRows;
1446  uint16_t numCols;
1447  float64_t *pData;
1449 
1454  typedef struct
1455  {
1456  uint16_t numRows;
1457  uint16_t numCols;
1458  q15_t *pData;
1461 
1466  typedef struct
1467  {
1468  uint16_t numRows;
1469  uint16_t numCols;
1470  q31_t *pData;
1473 
1474 
1475 
1486  const arm_matrix_instance_f32 * pSrcA,
1487  const arm_matrix_instance_f32 * pSrcB,
1488  arm_matrix_instance_f32 * pDst);
1489 
1500  const arm_matrix_instance_q15 * pSrcA,
1501  const arm_matrix_instance_q15 * pSrcB,
1502  arm_matrix_instance_q15 * pDst);
1503 
1514  const arm_matrix_instance_q31 * pSrcA,
1515  const arm_matrix_instance_q31 * pSrcB,
1516  arm_matrix_instance_q31 * pDst);
1517 
1528  const arm_matrix_instance_f32 * pSrcA,
1529  const arm_matrix_instance_f32 * pSrcB,
1530  arm_matrix_instance_f32 * pDst);
1531 
1542  const arm_matrix_instance_q15 * pSrcA,
1543  const arm_matrix_instance_q15 * pSrcB,
1544  arm_matrix_instance_q15 * pDst,
1545  q15_t * pScratch);
1546 
1557  const arm_matrix_instance_q31 * pSrcA,
1558  const arm_matrix_instance_q31 * pSrcB,
1559  arm_matrix_instance_q31 * pDst);
1560 
1561 
1571  const arm_matrix_instance_f32 * pSrc,
1572  arm_matrix_instance_f32 * pDst);
1573 
1574 
1584  const arm_matrix_instance_q15 * pSrc,
1585  arm_matrix_instance_q15 * pDst);
1586 
1596  const arm_matrix_instance_q31 * pSrc,
1597  arm_matrix_instance_q31 * pDst);
1598 
1599 
1610  const arm_matrix_instance_f32 * pSrcA,
1611  const arm_matrix_instance_f32 * pSrcB,
1612  arm_matrix_instance_f32 * pDst);
1613 
1625  const arm_matrix_instance_q15 * pSrcA,
1626  const arm_matrix_instance_q15 * pSrcB,
1627  arm_matrix_instance_q15 * pDst,
1628  q15_t * pState);
1629 
1641  const arm_matrix_instance_q15 * pSrcA,
1642  const arm_matrix_instance_q15 * pSrcB,
1643  arm_matrix_instance_q15 * pDst,
1644  q15_t * pState);
1645 
1656  const arm_matrix_instance_q31 * pSrcA,
1657  const arm_matrix_instance_q31 * pSrcB,
1658  arm_matrix_instance_q31 * pDst);
1659 
1670  const arm_matrix_instance_q31 * pSrcA,
1671  const arm_matrix_instance_q31 * pSrcB,
1672  arm_matrix_instance_q31 * pDst);
1673 
1674 
1685  const arm_matrix_instance_f32 * pSrcA,
1686  const arm_matrix_instance_f32 * pSrcB,
1687  arm_matrix_instance_f32 * pDst);
1688 
1699  const arm_matrix_instance_q15 * pSrcA,
1700  const arm_matrix_instance_q15 * pSrcB,
1701  arm_matrix_instance_q15 * pDst);
1702 
1713  const arm_matrix_instance_q31 * pSrcA,
1714  const arm_matrix_instance_q31 * pSrcB,
1715  arm_matrix_instance_q31 * pDst);
1716 
1727  const arm_matrix_instance_f32 * pSrc,
1728  float32_t scale,
1729  arm_matrix_instance_f32 * pDst);
1730 
1742  const arm_matrix_instance_q15 * pSrc,
1743  q15_t scaleFract,
1744  int32_t shift,
1745  arm_matrix_instance_q15 * pDst);
1746 
1758  const arm_matrix_instance_q31 * pSrc,
1759  q31_t scaleFract,
1760  int32_t shift,
1761  arm_matrix_instance_q31 * pDst);
1762 
1763 
1773  void arm_mat_init_q31(
1775  uint16_t nRows,
1776  uint16_t nColumns,
1777  q31_t * pData);
1778 
1788  void arm_mat_init_q15(
1790  uint16_t nRows,
1791  uint16_t nColumns,
1792  q15_t * pData);
1793 
1803  void arm_mat_init_f32(
1805  uint16_t nRows,
1806  uint16_t nColumns,
1807  float32_t * pData);
1808 
1809 
1810 
1814  typedef struct
1815  {
1816  q15_t A0;
1817 #ifdef ARM_MATH_CM0_FAMILY
1818  q15_t A1;
1819  q15_t A2;
1820 #else
1821  q31_t A1;
1822 #endif
1823  q15_t state[3];
1824  q15_t Kp;
1825  q15_t Ki;
1826  q15_t Kd;
1828 
1832  typedef struct
1833  {
1834  q31_t A0;
1835  q31_t A1;
1836  q31_t A2;
1837  q31_t state[3];
1838  q31_t Kp;
1839  q31_t Ki;
1840  q31_t Kd;
1843 
1847  typedef struct
1848  {
1849  float32_t A0;
1850  float32_t A1;
1851  float32_t A2;
1852  float32_t state[3];
1853  float32_t Kp;
1854  float32_t Ki;
1855  float32_t Kd;
1857 
1858 
1859 
1866  void arm_pid_init_f32(
1868  int32_t resetStateFlag);
1869 
1875  void arm_pid_reset_f32(
1876  arm_pid_instance_f32 * S);
1877 
1878 
1885  void arm_pid_init_q31(
1887  int32_t resetStateFlag);
1888 
1889 
1896  void arm_pid_reset_q31(
1897  arm_pid_instance_q31 * S);
1898 
1905  void arm_pid_init_q15(
1907  int32_t resetStateFlag);
1908 
1914  void arm_pid_reset_q15(
1915  arm_pid_instance_q15 * S);
1916 
1917 
1921  typedef struct
1922  {
1923  uint32_t nValues;
1924  float32_t x1;
1925  float32_t xSpacing;
1926  float32_t *pYData;
1928 
1933  typedef struct
1934  {
1935  uint16_t numRows;
1936  uint16_t numCols;
1937  float32_t *pData;
1939 
1944  typedef struct
1945  {
1946  uint16_t numRows;
1947  uint16_t numCols;
1948  q31_t *pData;
1950 
1955  typedef struct
1956  {
1957  uint16_t numRows;
1958  uint16_t numCols;
1959  q15_t *pData;
1961 
1966  typedef struct
1967  {
1968  uint16_t numRows;
1969  uint16_t numCols;
1970  q7_t *pData;
1972 
1973 
1983  void arm_mult_q7(
1984  q7_t * pSrcA,
1985  q7_t * pSrcB,
1986  q7_t * pDst,
1987  uint32_t blockSize);
1988 
1998  void arm_mult_q15(
1999  q15_t * pSrcA,
2000  q15_t * pSrcB,
2001  q15_t * pDst,
2002  uint32_t blockSize);
2003 
2013  void arm_mult_q31(
2014  q31_t * pSrcA,
2015  q31_t * pSrcB,
2016  q31_t * pDst,
2017  uint32_t blockSize);
2018 
2028  void arm_mult_f32(
2029  float32_t * pSrcA,
2030  float32_t * pSrcB,
2031  float32_t * pDst,
2032  uint32_t blockSize);
2033 
2034 
2035 
2036 
2037 
2038 
2043  typedef struct
2044  {
2045  uint16_t fftLen;
2046  uint8_t ifftFlag;
2047  uint8_t bitReverseFlag;
2048  q15_t *pTwiddle;
2049  uint16_t *pBitRevTable;
2050  uint16_t twidCoefModifier;
2051  uint16_t bitRevFactor;
2053 
2054 /* Deprecated */
2057  uint16_t fftLen,
2058  uint8_t ifftFlag,
2059  uint8_t bitReverseFlag);
2060 
2061 /* Deprecated */
2062  void arm_cfft_radix2_q15(
2063  const arm_cfft_radix2_instance_q15 * S,
2064  q15_t * pSrc);
2065 
2066 
2067 
2072  typedef struct
2073  {
2074  uint16_t fftLen;
2075  uint8_t ifftFlag;
2076  uint8_t bitReverseFlag;
2077  q15_t *pTwiddle;
2078  uint16_t *pBitRevTable;
2079  uint16_t twidCoefModifier;
2080  uint16_t bitRevFactor;
2082 
2083 /* Deprecated */
2086  uint16_t fftLen,
2087  uint8_t ifftFlag,
2088  uint8_t bitReverseFlag);
2089 
2090 /* Deprecated */
2091  void arm_cfft_radix4_q15(
2092  const arm_cfft_radix4_instance_q15 * S,
2093  q15_t * pSrc);
2094 
2099  typedef struct
2100  {
2101  uint16_t fftLen;
2102  uint8_t ifftFlag;
2103  uint8_t bitReverseFlag;
2104  q31_t *pTwiddle;
2105  uint16_t *pBitRevTable;
2106  uint16_t twidCoefModifier;
2107  uint16_t bitRevFactor;
2109 
2110 /* Deprecated */
2113  uint16_t fftLen,
2114  uint8_t ifftFlag,
2115  uint8_t bitReverseFlag);
2116 
2117 /* Deprecated */
2118  void arm_cfft_radix2_q31(
2119  const arm_cfft_radix2_instance_q31 * S,
2120  q31_t * pSrc);
2121 
2126  typedef struct
2127  {
2128  uint16_t fftLen;
2129  uint8_t ifftFlag;
2130  uint8_t bitReverseFlag;
2131  q31_t *pTwiddle;
2132  uint16_t *pBitRevTable;
2133  uint16_t twidCoefModifier;
2134  uint16_t bitRevFactor;
2136 
2137 /* Deprecated */
2138  void arm_cfft_radix4_q31(
2139  const arm_cfft_radix4_instance_q31 * S,
2140  q31_t * pSrc);
2141 
2142 /* Deprecated */
2145  uint16_t fftLen,
2146  uint8_t ifftFlag,
2147  uint8_t bitReverseFlag);
2148 
2153  typedef struct
2154  {
2155  uint16_t fftLen;
2156  uint8_t ifftFlag;
2157  uint8_t bitReverseFlag;
2158  float32_t *pTwiddle;
2159  uint16_t *pBitRevTable;
2160  uint16_t twidCoefModifier;
2161  uint16_t bitRevFactor;
2162  float32_t onebyfftLen;
2164 
2165 /* Deprecated */
2168  uint16_t fftLen,
2169  uint8_t ifftFlag,
2170  uint8_t bitReverseFlag);
2171 
2172 /* Deprecated */
2173  void arm_cfft_radix2_f32(
2174  const arm_cfft_radix2_instance_f32 * S,
2175  float32_t * pSrc);
2176 
2181  typedef struct
2182  {
2183  uint16_t fftLen;
2184  uint8_t ifftFlag;
2185  uint8_t bitReverseFlag;
2186  float32_t *pTwiddle;
2187  uint16_t *pBitRevTable;
2188  uint16_t twidCoefModifier;
2189  uint16_t bitRevFactor;
2190  float32_t onebyfftLen;
2192 
2193 /* Deprecated */
2196  uint16_t fftLen,
2197  uint8_t ifftFlag,
2198  uint8_t bitReverseFlag);
2199 
2200 /* Deprecated */
2201  void arm_cfft_radix4_f32(
2202  const arm_cfft_radix4_instance_f32 * S,
2203  float32_t * pSrc);
2204 
2209  typedef struct
2210  {
2211  uint16_t fftLen;
2212  const q15_t *pTwiddle;
2213  const uint16_t *pBitRevTable;
2214  uint16_t bitRevLength;
2216 
2217 void arm_cfft_q15(
2218  const arm_cfft_instance_q15 * S,
2219  q15_t * p1,
2220  uint8_t ifftFlag,
2221  uint8_t bitReverseFlag);
2222 
2227  typedef struct
2228  {
2229  uint16_t fftLen;
2230  const q31_t *pTwiddle;
2231  const uint16_t *pBitRevTable;
2232  uint16_t bitRevLength;
2234 
2235 void arm_cfft_q31(
2236  const arm_cfft_instance_q31 * S,
2237  q31_t * p1,
2238  uint8_t ifftFlag,
2239  uint8_t bitReverseFlag);
2240 
2245  typedef struct
2246  {
2247  uint16_t fftLen;
2248  const float32_t *pTwiddle;
2249  const uint16_t *pBitRevTable;
2250  uint16_t bitRevLength;
2252 
2253  void arm_cfft_f32(
2254  const arm_cfft_instance_f32 * S,
2255  float32_t * p1,
2256  uint8_t ifftFlag,
2257  uint8_t bitReverseFlag);
2258 
2263  typedef struct
2264  {
2265  uint32_t fftLenReal;
2266  uint8_t ifftFlagR;
2269  q15_t *pTwiddleAReal;
2270  q15_t *pTwiddleBReal;
2273 
2276  uint32_t fftLenReal,
2277  uint32_t ifftFlagR,
2278  uint32_t bitReverseFlag);
2279 
2280  void arm_rfft_q15(
2281  const arm_rfft_instance_q15 * S,
2282  q15_t * pSrc,
2283  q15_t * pDst);
2284 
2289  typedef struct
2290  {
2291  uint32_t fftLenReal;
2292  uint8_t ifftFlagR;
2295  q31_t *pTwiddleAReal;
2296  q31_t *pTwiddleBReal;
2299 
2302  uint32_t fftLenReal,
2303  uint32_t ifftFlagR,
2304  uint32_t bitReverseFlag);
2305 
2306  void arm_rfft_q31(
2307  const arm_rfft_instance_q31 * S,
2308  q31_t * pSrc,
2309  q31_t * pDst);
2310 
2315  typedef struct
2316  {
2317  uint32_t fftLenReal;
2318  uint16_t fftLenBy2;
2319  uint8_t ifftFlagR;
2322  float32_t *pTwiddleAReal;
2323  float32_t *pTwiddleBReal;
2326 
2330  uint32_t fftLenReal,
2331  uint32_t ifftFlagR,
2332  uint32_t bitReverseFlag);
2333 
2334  void arm_rfft_f32(
2335  const arm_rfft_instance_f32 * S,
2336  float32_t * pSrc,
2337  float32_t * pDst);
2338 
2343 typedef struct
2344  {
2346  uint16_t fftLenRFFT;
2347  float32_t * pTwiddleRFFT;
2349 
2352  uint16_t fftLen);
2353 
2354 void arm_rfft_fast_f32(
2356  float32_t * p, float32_t * pOut,
2357  uint8_t ifftFlag);
2358 
2363  typedef struct
2364  {
2365  uint16_t N;
2366  uint16_t Nby2;
2367  float32_t normalize;
2368  float32_t *pTwiddle;
2369  float32_t *pCosFactor;
2373 
2387  arm_rfft_instance_f32 * S_RFFT,
2389  uint16_t N,
2390  uint16_t Nby2,
2391  float32_t normalize);
2392 
2401  void arm_dct4_f32(
2402  const arm_dct4_instance_f32 * S,
2403  float32_t * pState,
2404  float32_t * pInlineBuffer);
2405 
2410  typedef struct
2411  {
2412  uint16_t N;
2413  uint16_t Nby2;
2414  q31_t normalize;
2415  q31_t *pTwiddle;
2416  q31_t *pCosFactor;
2420 
2434  arm_rfft_instance_q31 * S_RFFT,
2436  uint16_t N,
2437  uint16_t Nby2,
2438  q31_t normalize);
2439 
2448  void arm_dct4_q31(
2449  const arm_dct4_instance_q31 * S,
2450  q31_t * pState,
2451  q31_t * pInlineBuffer);
2452 
2457  typedef struct
2458  {
2459  uint16_t N;
2460  uint16_t Nby2;
2461  q15_t normalize;
2462  q15_t *pTwiddle;
2463  q15_t *pCosFactor;
2467 
2481  arm_rfft_instance_q15 * S_RFFT,
2483  uint16_t N,
2484  uint16_t Nby2,
2485  q15_t normalize);
2486 
2495  void arm_dct4_q15(
2496  const arm_dct4_instance_q15 * S,
2497  q15_t * pState,
2498  q15_t * pInlineBuffer);
2499 
2509  void arm_add_f32(
2510  float32_t * pSrcA,
2511  float32_t * pSrcB,
2512  float32_t * pDst,
2513  uint32_t blockSize);
2514 
2524  void arm_add_q7(
2525  q7_t * pSrcA,
2526  q7_t * pSrcB,
2527  q7_t * pDst,
2528  uint32_t blockSize);
2529 
2539  void arm_add_q15(
2540  q15_t * pSrcA,
2541  q15_t * pSrcB,
2542  q15_t * pDst,
2543  uint32_t blockSize);
2544 
2554  void arm_add_q31(
2555  q31_t * pSrcA,
2556  q31_t * pSrcB,
2557  q31_t * pDst,
2558  uint32_t blockSize);
2559 
2569  void arm_sub_f32(
2570  float32_t * pSrcA,
2571  float32_t * pSrcB,
2572  float32_t * pDst,
2573  uint32_t blockSize);
2574 
2584  void arm_sub_q7(
2585  q7_t * pSrcA,
2586  q7_t * pSrcB,
2587  q7_t * pDst,
2588  uint32_t blockSize);
2589 
2599  void arm_sub_q15(
2600  q15_t * pSrcA,
2601  q15_t * pSrcB,
2602  q15_t * pDst,
2603  uint32_t blockSize);
2604 
2614  void arm_sub_q31(
2615  q31_t * pSrcA,
2616  q31_t * pSrcB,
2617  q31_t * pDst,
2618  uint32_t blockSize);
2619 
2629  void arm_scale_f32(
2630  float32_t * pSrc,
2631  float32_t scale,
2632  float32_t * pDst,
2633  uint32_t blockSize);
2634 
2645  void arm_scale_q7(
2646  q7_t * pSrc,
2647  q7_t scaleFract,
2648  int8_t shift,
2649  q7_t * pDst,
2650  uint32_t blockSize);
2651 
2662  void arm_scale_q15(
2663  q15_t * pSrc,
2664  q15_t scaleFract,
2665  int8_t shift,
2666  q15_t * pDst,
2667  uint32_t blockSize);
2668 
2679  void arm_scale_q31(
2680  q31_t * pSrc,
2681  q31_t scaleFract,
2682  int8_t shift,
2683  q31_t * pDst,
2684  uint32_t blockSize);
2685 
2694  void arm_abs_q7(
2695  q7_t * pSrc,
2696  q7_t * pDst,
2697  uint32_t blockSize);
2698 
2707  void arm_abs_f32(
2708  float32_t * pSrc,
2709  float32_t * pDst,
2710  uint32_t blockSize);
2711 
2720  void arm_abs_q15(
2721  q15_t * pSrc,
2722  q15_t * pDst,
2723  uint32_t blockSize);
2724 
2733  void arm_abs_q31(
2734  q31_t * pSrc,
2735  q31_t * pDst,
2736  uint32_t blockSize);
2737 
2747  void arm_dot_prod_f32(
2748  float32_t * pSrcA,
2749  float32_t * pSrcB,
2750  uint32_t blockSize,
2751  float32_t * result);
2752 
2762  void arm_dot_prod_q7(
2763  q7_t * pSrcA,
2764  q7_t * pSrcB,
2765  uint32_t blockSize,
2766  q31_t * result);
2767 
2777  void arm_dot_prod_q15(
2778  q15_t * pSrcA,
2779  q15_t * pSrcB,
2780  uint32_t blockSize,
2781  q63_t * result);
2782 
2792  void arm_dot_prod_q31(
2793  q31_t * pSrcA,
2794  q31_t * pSrcB,
2795  uint32_t blockSize,
2796  q63_t * result);
2797 
2807  void arm_shift_q7(
2808  q7_t * pSrc,
2809  int8_t shiftBits,
2810  q7_t * pDst,
2811  uint32_t blockSize);
2812 
2822  void arm_shift_q15(
2823  q15_t * pSrc,
2824  int8_t shiftBits,
2825  q15_t * pDst,
2826  uint32_t blockSize);
2827 
2837  void arm_shift_q31(
2838  q31_t * pSrc,
2839  int8_t shiftBits,
2840  q31_t * pDst,
2841  uint32_t blockSize);
2842 
2852  void arm_offset_f32(
2853  float32_t * pSrc,
2854  float32_t offset,
2855  float32_t * pDst,
2856  uint32_t blockSize);
2857 
2867  void arm_offset_q7(
2868  q7_t * pSrc,
2869  q7_t offset,
2870  q7_t * pDst,
2871  uint32_t blockSize);
2872 
2882  void arm_offset_q15(
2883  q15_t * pSrc,
2884  q15_t offset,
2885  q15_t * pDst,
2886  uint32_t blockSize);
2887 
2897  void arm_offset_q31(
2898  q31_t * pSrc,
2899  q31_t offset,
2900  q31_t * pDst,
2901  uint32_t blockSize);
2902 
2911  void arm_negate_f32(
2912  float32_t * pSrc,
2913  float32_t * pDst,
2914  uint32_t blockSize);
2915 
2924  void arm_negate_q7(
2925  q7_t * pSrc,
2926  q7_t * pDst,
2927  uint32_t blockSize);
2928 
2937  void arm_negate_q15(
2938  q15_t * pSrc,
2939  q15_t * pDst,
2940  uint32_t blockSize);
2941 
2950  void arm_negate_q31(
2951  q31_t * pSrc,
2952  q31_t * pDst,
2953  uint32_t blockSize);
2961  void arm_copy_f32(
2962  float32_t * pSrc,
2963  float32_t * pDst,
2964  uint32_t blockSize);
2965 
2973  void arm_copy_q7(
2974  q7_t * pSrc,
2975  q7_t * pDst,
2976  uint32_t blockSize);
2977 
2985  void arm_copy_q15(
2986  q15_t * pSrc,
2987  q15_t * pDst,
2988  uint32_t blockSize);
2989 
2997  void arm_copy_q31(
2998  q31_t * pSrc,
2999  q31_t * pDst,
3000  uint32_t blockSize);
3008  void arm_fill_f32(
3009  float32_t value,
3010  float32_t * pDst,
3011  uint32_t blockSize);
3012 
3020  void arm_fill_q7(
3021  q7_t value,
3022  q7_t * pDst,
3023  uint32_t blockSize);
3024 
3032  void arm_fill_q15(
3033  q15_t value,
3034  q15_t * pDst,
3035  uint32_t blockSize);
3036 
3044  void arm_fill_q31(
3045  q31_t value,
3046  q31_t * pDst,
3047  uint32_t blockSize);
3048 
3059  void arm_conv_f32(
3060  float32_t * pSrcA,
3061  uint32_t srcALen,
3062  float32_t * pSrcB,
3063  uint32_t srcBLen,
3064  float32_t * pDst);
3065 
3066 
3080  void arm_conv_opt_q15(
3081  q15_t * pSrcA,
3082  uint32_t srcALen,
3083  q15_t * pSrcB,
3084  uint32_t srcBLen,
3085  q15_t * pDst,
3086  q15_t * pScratch1,
3087  q15_t * pScratch2);
3088 
3089 
3100  void arm_conv_q15(
3101  q15_t * pSrcA,
3102  uint32_t srcALen,
3103  q15_t * pSrcB,
3104  uint32_t srcBLen,
3105  q15_t * pDst);
3106 
3117  void arm_conv_fast_q15(
3118  q15_t * pSrcA,
3119  uint32_t srcALen,
3120  q15_t * pSrcB,
3121  uint32_t srcBLen,
3122  q15_t * pDst);
3123 
3136  void arm_conv_fast_opt_q15(
3137  q15_t * pSrcA,
3138  uint32_t srcALen,
3139  q15_t * pSrcB,
3140  uint32_t srcBLen,
3141  q15_t * pDst,
3142  q15_t * pScratch1,
3143  q15_t * pScratch2);
3144 
3145 
3146 
3157  void arm_conv_q31(
3158  q31_t * pSrcA,
3159  uint32_t srcALen,
3160  q31_t * pSrcB,
3161  uint32_t srcBLen,
3162  q31_t * pDst);
3163 
3174  void arm_conv_fast_q31(
3175  q31_t * pSrcA,
3176  uint32_t srcALen,
3177  q31_t * pSrcB,
3178  uint32_t srcBLen,
3179  q31_t * pDst);
3180 
3181 
3194  void arm_conv_opt_q7(
3195  q7_t * pSrcA,
3196  uint32_t srcALen,
3197  q7_t * pSrcB,
3198  uint32_t srcBLen,
3199  q7_t * pDst,
3200  q15_t * pScratch1,
3201  q15_t * pScratch2);
3202 
3203 
3204 
3215  void arm_conv_q7(
3216  q7_t * pSrcA,
3217  uint32_t srcALen,
3218  q7_t * pSrcB,
3219  uint32_t srcBLen,
3220  q7_t * pDst);
3221 
3222 
3236  float32_t * pSrcA,
3237  uint32_t srcALen,
3238  float32_t * pSrcB,
3239  uint32_t srcBLen,
3240  float32_t * pDst,
3241  uint32_t firstIndex,
3242  uint32_t numPoints);
3243 
3259  q15_t * pSrcA,
3260  uint32_t srcALen,
3261  q15_t * pSrcB,
3262  uint32_t srcBLen,
3263  q15_t * pDst,
3264  uint32_t firstIndex,
3265  uint32_t numPoints,
3266  q15_t * pScratch1,
3267  q15_t * pScratch2);
3268 
3269 
3283  q15_t * pSrcA,
3284  uint32_t srcALen,
3285  q15_t * pSrcB,
3286  uint32_t srcBLen,
3287  q15_t * pDst,
3288  uint32_t firstIndex,
3289  uint32_t numPoints);
3290 
3304  q15_t * pSrcA,
3305  uint32_t srcALen,
3306  q15_t * pSrcB,
3307  uint32_t srcBLen,
3308  q15_t * pDst,
3309  uint32_t firstIndex,
3310  uint32_t numPoints);
3311 
3312 
3328  q15_t * pSrcA,
3329  uint32_t srcALen,
3330  q15_t * pSrcB,
3331  uint32_t srcBLen,
3332  q15_t * pDst,
3333  uint32_t firstIndex,
3334  uint32_t numPoints,
3335  q15_t * pScratch1,
3336  q15_t * pScratch2);
3337 
3338 
3352  q31_t * pSrcA,
3353  uint32_t srcALen,
3354  q31_t * pSrcB,
3355  uint32_t srcBLen,
3356  q31_t * pDst,
3357  uint32_t firstIndex,
3358  uint32_t numPoints);
3359 
3360 
3374  q31_t * pSrcA,
3375  uint32_t srcALen,
3376  q31_t * pSrcB,
3377  uint32_t srcBLen,
3378  q31_t * pDst,
3379  uint32_t firstIndex,
3380  uint32_t numPoints);
3381 
3382 
3398  q7_t * pSrcA,
3399  uint32_t srcALen,
3400  q7_t * pSrcB,
3401  uint32_t srcBLen,
3402  q7_t * pDst,
3403  uint32_t firstIndex,
3404  uint32_t numPoints,
3405  q15_t * pScratch1,
3406  q15_t * pScratch2);
3407 
3408 
3422  q7_t * pSrcA,
3423  uint32_t srcALen,
3424  q7_t * pSrcB,
3425  uint32_t srcBLen,
3426  q7_t * pDst,
3427  uint32_t firstIndex,
3428  uint32_t numPoints);
3429 
3430 
3431 
3436  typedef struct
3437  {
3438  uint8_t M;
3439  uint16_t numTaps;
3440  q15_t *pCoeffs;
3441  q15_t *pState;
3443 
3448  typedef struct
3449  {
3450  uint8_t M;
3451  uint16_t numTaps;
3452  q31_t *pCoeffs;
3453  q31_t *pState;
3456 
3461  typedef struct
3462  {
3463  uint8_t M;
3464  uint16_t numTaps;
3465  float32_t *pCoeffs;
3466  float32_t *pState;
3469 
3470 
3471 
3481  void arm_fir_decimate_f32(
3483  float32_t * pSrc,
3484  float32_t * pDst,
3485  uint32_t blockSize);
3486 
3487 
3502  uint16_t numTaps,
3503  uint8_t M,
3504  float32_t * pCoeffs,
3505  float32_t * pState,
3506  uint32_t blockSize);
3507 
3517  void arm_fir_decimate_q15(
3519  q15_t * pSrc,
3520  q15_t * pDst,
3521  uint32_t blockSize);
3522 
3534  q15_t * pSrc,
3535  q15_t * pDst,
3536  uint32_t blockSize);
3537 
3538 
3539 
3554  uint16_t numTaps,
3555  uint8_t M,
3556  q15_t * pCoeffs,
3557  q15_t * pState,
3558  uint32_t blockSize);
3559 
3569  void arm_fir_decimate_q31(
3571  q31_t * pSrc,
3572  q31_t * pDst,
3573  uint32_t blockSize);
3574 
3586  q31_t * pSrc,
3587  q31_t * pDst,
3588  uint32_t blockSize);
3589 
3590 
3605  uint16_t numTaps,
3606  uint8_t M,
3607  q31_t * pCoeffs,
3608  q31_t * pState,
3609  uint32_t blockSize);
3610 
3611 
3612 
3617  typedef struct
3618  {
3619  uint8_t L;
3620  uint16_t phaseLength;
3621  q15_t *pCoeffs;
3622  q15_t *pState;
3624 
3629  typedef struct
3630  {
3631  uint8_t L;
3632  uint16_t phaseLength;
3633  q31_t *pCoeffs;
3634  q31_t *pState;
3636 
3641  typedef struct
3642  {
3643  uint8_t L;
3644  uint16_t phaseLength;
3645  float32_t *pCoeffs;
3646  float32_t *pState;
3648 
3649 
3661  q15_t * pSrc,
3662  q15_t * pDst,
3663  uint32_t blockSize);
3664 
3665 
3680  uint8_t L,
3681  uint16_t numTaps,
3682  q15_t * pCoeffs,
3683  q15_t * pState,
3684  uint32_t blockSize);
3685 
3697  q31_t * pSrc,
3698  q31_t * pDst,
3699  uint32_t blockSize);
3700 
3715  uint8_t L,
3716  uint16_t numTaps,
3717  q31_t * pCoeffs,
3718  q31_t * pState,
3719  uint32_t blockSize);
3720 
3721 
3733  float32_t * pSrc,
3734  float32_t * pDst,
3735  uint32_t blockSize);
3736 
3751  uint8_t L,
3752  uint16_t numTaps,
3753  float32_t * pCoeffs,
3754  float32_t * pState,
3755  uint32_t blockSize);
3756 
3761  typedef struct
3762  {
3763  uint8_t numStages;
3764  q63_t *pState;
3765  q31_t *pCoeffs;
3766  uint8_t postShift;
3769 
3770 
3781  q31_t * pSrc,
3782  q31_t * pDst,
3783  uint32_t blockSize);
3784 
3785 
3797  uint8_t numStages,
3798  q31_t * pCoeffs,
3799  q63_t * pState,
3800  uint8_t postShift);
3801 
3802 
3803 
3808  typedef struct
3809  {
3810  uint8_t numStages;
3811  float32_t *pState;
3812  float32_t *pCoeffs;
3814 
3815 
3816 
3821  typedef struct
3822  {
3823  uint8_t numStages;
3824  float32_t *pState;
3825  float32_t *pCoeffs;
3827 
3828 
3829 
3834  typedef struct
3835  {
3836  uint8_t numStages;
3837  float64_t *pState;
3838  float64_t *pCoeffs;
3840 
3841 
3853  float32_t * pSrc,
3854  float32_t * pDst,
3855  uint32_t blockSize);
3856 
3857 
3869  float32_t * pSrc,
3870  float32_t * pDst,
3871  uint32_t blockSize);
3872 
3884  float64_t * pSrc,
3885  float64_t * pDst,
3886  uint32_t blockSize);
3887 
3888 
3900  uint8_t numStages,
3901  float32_t * pCoeffs,
3902  float32_t * pState);
3903 
3904 
3916  uint8_t numStages,
3917  float32_t * pCoeffs,
3918  float32_t * pState);
3919 
3920 
3932  uint8_t numStages,
3933  float64_t * pCoeffs,
3934  float64_t * pState);
3935 
3936 
3937 
3942  typedef struct
3943  {
3944  uint16_t numStages;
3945  q15_t *pState;
3946  q15_t *pCoeffs;
3948 
3953  typedef struct
3954  {
3955  uint16_t numStages;
3956  q31_t *pState;
3957  q31_t *pCoeffs;
3959 
3964  typedef struct
3965  {
3966  uint16_t numStages;
3967  float32_t *pState;
3968  float32_t *pCoeffs;
3970 
3982  uint16_t numStages,
3983  q15_t * pCoeffs,
3984  q15_t * pState);
3985 
3986 
3995  void arm_fir_lattice_q15(
3996  const arm_fir_lattice_instance_q15 * S,
3997  q15_t * pSrc,
3998  q15_t * pDst,
3999  uint32_t blockSize);
4000 
4012  uint16_t numStages,
4013  q31_t * pCoeffs,
4014  q31_t * pState);
4015 
4016 
4026  void arm_fir_lattice_q31(
4027  const arm_fir_lattice_instance_q31 * S,
4028  q31_t * pSrc,
4029  q31_t * pDst,
4030  uint32_t blockSize);
4031 
4043  uint16_t numStages,
4044  float32_t * pCoeffs,
4045  float32_t * pState);
4046 
4056  void arm_fir_lattice_f32(
4057  const arm_fir_lattice_instance_f32 * S,
4058  float32_t * pSrc,
4059  float32_t * pDst,
4060  uint32_t blockSize);
4061 
4065  typedef struct
4066  {
4067  uint16_t numStages;
4068  q15_t *pState;
4069  q15_t *pkCoeffs;
4070  q15_t *pvCoeffs;
4072 
4076  typedef struct
4077  {
4078  uint16_t numStages;
4079  q31_t *pState;
4080  q31_t *pkCoeffs;
4081  q31_t *pvCoeffs;
4083 
4087  typedef struct
4088  {
4089  uint16_t numStages;
4090  float32_t *pState;
4091  float32_t *pkCoeffs;
4092  float32_t *pvCoeffs;
4094 
4104  void arm_iir_lattice_f32(
4105  const arm_iir_lattice_instance_f32 * S,
4106  float32_t * pSrc,
4107  float32_t * pDst,
4108  uint32_t blockSize);
4109 
4123  uint16_t numStages,
4124  float32_t * pkCoeffs,
4125  float32_t * pvCoeffs,
4126  float32_t * pState,
4127  uint32_t blockSize);
4128 
4129 
4139  void arm_iir_lattice_q31(
4140  const arm_iir_lattice_instance_q31 * S,
4141  q31_t * pSrc,
4142  q31_t * pDst,
4143  uint32_t blockSize);
4144 
4145 
4159  uint16_t numStages,
4160  q31_t * pkCoeffs,
4161  q31_t * pvCoeffs,
4162  q31_t * pState,
4163  uint32_t blockSize);
4164 
4165 
4175  void arm_iir_lattice_q15(
4176  const arm_iir_lattice_instance_q15 * S,
4177  q15_t * pSrc,
4178  q15_t * pDst,
4179  uint32_t blockSize);
4180 
4181 
4195  uint16_t numStages,
4196  q15_t * pkCoeffs,
4197  q15_t * pvCoeffs,
4198  q15_t * pState,
4199  uint32_t blockSize);
4200 
4205  typedef struct
4206  {
4207  uint16_t numTaps;
4208  float32_t *pState;
4209  float32_t *pCoeffs;
4210  float32_t mu;
4212 
4224  void arm_lms_f32(
4225  const arm_lms_instance_f32 * S,
4226  float32_t * pSrc,
4227  float32_t * pRef,
4228  float32_t * pOut,
4229  float32_t * pErr,
4230  uint32_t blockSize);
4231 
4243  void arm_lms_init_f32(
4245  uint16_t numTaps,
4246  float32_t * pCoeffs,
4247  float32_t * pState,
4248  float32_t mu,
4249  uint32_t blockSize);
4250 
4255  typedef struct
4256  {
4257  uint16_t numTaps;
4258  q15_t *pState;
4259  q15_t *pCoeffs;
4260  q15_t mu;
4261  uint32_t postShift;
4263 
4264 
4277  void arm_lms_init_q15(
4279  uint16_t numTaps,
4280  q15_t * pCoeffs,
4281  q15_t * pState,
4282  q15_t mu,
4283  uint32_t blockSize,
4284  uint32_t postShift);
4285 
4297  void arm_lms_q15(
4298  const arm_lms_instance_q15 * S,
4299  q15_t * pSrc,
4300  q15_t * pRef,
4301  q15_t * pOut,
4302  q15_t * pErr,
4303  uint32_t blockSize);
4304 
4305 
4310  typedef struct
4311  {
4312  uint16_t numTaps;
4313  q31_t *pState;
4314  q31_t *pCoeffs;
4315  q31_t mu;
4316  uint32_t postShift;
4319 
4331  void arm_lms_q31(
4332  const arm_lms_instance_q31 * S,
4333  q31_t * pSrc,
4334  q31_t * pRef,
4335  q31_t * pOut,
4336  q31_t * pErr,
4337  uint32_t blockSize);
4338 
4351  void arm_lms_init_q31(
4353  uint16_t numTaps,
4354  q31_t * pCoeffs,
4355  q31_t * pState,
4356  q31_t mu,
4357  uint32_t blockSize,
4358  uint32_t postShift);
4359 
4364  typedef struct
4365  {
4366  uint16_t numTaps;
4367  float32_t *pState;
4368  float32_t *pCoeffs;
4369  float32_t mu;
4370  float32_t energy;
4371  float32_t x0;
4373 
4385  void arm_lms_norm_f32(
4387  float32_t * pSrc,
4388  float32_t * pRef,
4389  float32_t * pOut,
4390  float32_t * pErr,
4391  uint32_t blockSize);
4392 
4404  void arm_lms_norm_init_f32(
4406  uint16_t numTaps,
4407  float32_t * pCoeffs,
4408  float32_t * pState,
4409  float32_t mu,
4410  uint32_t blockSize);
4411 
4412 
4416  typedef struct
4417  {
4418  uint16_t numTaps;
4419  q31_t *pState;
4420  q31_t *pCoeffs;
4421  q31_t mu;
4422  uint8_t postShift;
4423  q31_t *recipTable;
4424  q31_t energy;
4425  q31_t x0;
4427 
4439  void arm_lms_norm_q31(
4441  q31_t * pSrc,
4442  q31_t * pRef,
4443  q31_t * pOut,
4444  q31_t * pErr,
4445  uint32_t blockSize);
4446 
4459  void arm_lms_norm_init_q31(
4461  uint16_t numTaps,
4462  q31_t * pCoeffs,
4463  q31_t * pState,
4464  q31_t mu,
4465  uint32_t blockSize,
4466  uint8_t postShift);
4467 
4472  typedef struct
4473  {
4474  uint16_t numTaps;
4475  q15_t *pState;
4476  q15_t *pCoeffs;
4477  q15_t mu;
4478  uint8_t postShift;
4479  q15_t *recipTable;
4480  q15_t energy;
4481  q15_t x0;
4483 
4495  void arm_lms_norm_q15(
4497  q15_t * pSrc,
4498  q15_t * pRef,
4499  q15_t * pOut,
4500  q15_t * pErr,
4501  uint32_t blockSize);
4502 
4503 
4516  void arm_lms_norm_init_q15(
4518  uint16_t numTaps,
4519  q15_t * pCoeffs,
4520  q15_t * pState,
4521  q15_t mu,
4522  uint32_t blockSize,
4523  uint8_t postShift);
4524 
4535  void arm_correlate_f32(
4536  float32_t * pSrcA,
4537  uint32_t srcALen,
4538  float32_t * pSrcB,
4539  uint32_t srcBLen,
4540  float32_t * pDst);
4541 
4542 
4553  void arm_correlate_opt_q15(
4554  q15_t * pSrcA,
4555  uint32_t srcALen,
4556  q15_t * pSrcB,
4557  uint32_t srcBLen,
4558  q15_t * pDst,
4559  q15_t * pScratch);
4560 
4561 
4572  void arm_correlate_q15(
4573  q15_t * pSrcA,
4574  uint32_t srcALen,
4575  q15_t * pSrcB,
4576  uint32_t srcBLen,
4577  q15_t * pDst);
4578 
4590  q15_t * pSrcA,
4591  uint32_t srcALen,
4592  q15_t * pSrcB,
4593  uint32_t srcBLen,
4594  q15_t * pDst);
4595 
4596 
4597 
4610  q15_t * pSrcA,
4611  uint32_t srcALen,
4612  q15_t * pSrcB,
4613  uint32_t srcBLen,
4614  q15_t * pDst,
4615  q15_t * pScratch);
4616 
4627  void arm_correlate_q31(
4628  q31_t * pSrcA,
4629  uint32_t srcALen,
4630  q31_t * pSrcB,
4631  uint32_t srcBLen,
4632  q31_t * pDst);
4633 
4645  q31_t * pSrcA,
4646  uint32_t srcALen,
4647  q31_t * pSrcB,
4648  uint32_t srcBLen,
4649  q31_t * pDst);
4650 
4651 
4652 
4665  void arm_correlate_opt_q7(
4666  q7_t * pSrcA,
4667  uint32_t srcALen,
4668  q7_t * pSrcB,
4669  uint32_t srcBLen,
4670  q7_t * pDst,
4671  q15_t * pScratch1,
4672  q15_t * pScratch2);
4673 
4674 
4685  void arm_correlate_q7(
4686  q7_t * pSrcA,
4687  uint32_t srcALen,
4688  q7_t * pSrcB,
4689  uint32_t srcBLen,
4690  q7_t * pDst);
4691 
4692 
4696  typedef struct
4697  {
4698  uint16_t numTaps;
4699  uint16_t stateIndex;
4700  float32_t *pState;
4701  float32_t *pCoeffs;
4702  uint16_t maxDelay;
4703  int32_t *pTapDelay;
4705 
4710  typedef struct
4711  {
4712  uint16_t numTaps;
4713  uint16_t stateIndex;
4714  q31_t *pState;
4715  q31_t *pCoeffs;
4716  uint16_t maxDelay;
4717  int32_t *pTapDelay;
4719 
4724  typedef struct
4725  {
4726  uint16_t numTaps;
4727  uint16_t stateIndex;
4728  q15_t *pState;
4729  q15_t *pCoeffs;
4730  uint16_t maxDelay;
4731  int32_t *pTapDelay;
4733 
4738  typedef struct
4739  {
4740  uint16_t numTaps;
4741  uint16_t stateIndex;
4742  q7_t *pState;
4743  q7_t *pCoeffs;
4744  uint16_t maxDelay;
4745  int32_t *pTapDelay;
4747 
4758  void arm_fir_sparse_f32(
4760  float32_t * pSrc,
4761  float32_t * pDst,
4762  float32_t * pScratchIn,
4763  uint32_t blockSize);
4764 
4779  uint16_t numTaps,
4780  float32_t * pCoeffs,
4781  float32_t * pState,
4782  int32_t * pTapDelay,
4783  uint16_t maxDelay,
4784  uint32_t blockSize);
4785 
4796  void arm_fir_sparse_q31(
4798  q31_t * pSrc,
4799  q31_t * pDst,
4800  q31_t * pScratchIn,
4801  uint32_t blockSize);
4802 
4817  uint16_t numTaps,
4818  q31_t * pCoeffs,
4819  q31_t * pState,
4820  int32_t * pTapDelay,
4821  uint16_t maxDelay,
4822  uint32_t blockSize);
4823 
4835  void arm_fir_sparse_q15(
4837  q15_t * pSrc,
4838  q15_t * pDst,
4839  q15_t * pScratchIn,
4840  q31_t * pScratchOut,
4841  uint32_t blockSize);
4842 
4843 
4858  uint16_t numTaps,
4859  q15_t * pCoeffs,
4860  q15_t * pState,
4861  int32_t * pTapDelay,
4862  uint16_t maxDelay,
4863  uint32_t blockSize);
4864 
4876  void arm_fir_sparse_q7(
4878  q7_t * pSrc,
4879  q7_t * pDst,
4880  q7_t * pScratchIn,
4881  q31_t * pScratchOut,
4882  uint32_t blockSize);
4883 
4898  uint16_t numTaps,
4899  q7_t * pCoeffs,
4900  q7_t * pState,
4901  int32_t * pTapDelay,
4902  uint16_t maxDelay,
4903  uint32_t blockSize);
4904 
4905 
4906  /*
4907  * @brief Floating-point sin_cos function.
4908  * @param[in] theta input value in degrees
4909  * @param[out] *pSinVal points to the processed sine output.
4910  * @param[out] *pCosVal points to the processed cos output.
4911  * @return none.
4912  */
4913 
4914  void arm_sin_cos_f32(
4915  float32_t theta,
4916  float32_t * pSinVal,
4917  float32_t * pCcosVal);
4918 
4919  /*
4920  * @brief Q31 sin_cos function.
4921  * @param[in] theta scaled input value in degrees
4922  * @param[out] *pSinVal points to the processed sine output.
4923  * @param[out] *pCosVal points to the processed cosine output.
4924  * @return none.
4925  */
4926 
4927  void arm_sin_cos_q31(
4928  q31_t theta,
4929  q31_t * pSinVal,
4930  q31_t * pCosVal);
4931 
4932 
4941  void arm_cmplx_conj_f32(
4942  float32_t * pSrc,
4943  float32_t * pDst,
4944  uint32_t numSamples);
4945 
4954  void arm_cmplx_conj_q31(
4955  q31_t * pSrc,
4956  q31_t * pDst,
4957  uint32_t numSamples);
4958 
4967  void arm_cmplx_conj_q15(
4968  q15_t * pSrc,
4969  q15_t * pDst,
4970  uint32_t numSamples);
4971 
4972 
4973 
4983  float32_t * pSrc,
4984  float32_t * pDst,
4985  uint32_t numSamples);
4986 
4996  q31_t * pSrc,
4997  q31_t * pDst,
4998  uint32_t numSamples);
4999 
5009  q15_t * pSrc,
5010  q15_t * pDst,
5011  uint32_t numSamples);
5012 
5013 
5088  static __INLINE float32_t arm_pid_f32(
5090  float32_t in)
5091  {
5092  float32_t out;
5093 
5094  /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
5095  out = (S->A0 * in) +
5096  (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
5097 
5098  /* Update state */
5099  S->state[1] = S->state[0];
5100  S->state[0] = in;
5101  S->state[2] = out;
5102 
5103  /* return to application */
5104  return (out);
5105 
5106  }
5107 
5123  static __INLINE q31_t arm_pid_q31(
5125  q31_t in)
5126  {
5127  q63_t acc;
5128  q31_t out;
5129 
5130  /* acc = A0 * x[n] */
5131  acc = (q63_t) S->A0 * in;
5132 
5133  /* acc += A1 * x[n-1] */
5134  acc += (q63_t) S->A1 * S->state[0];
5135 
5136  /* acc += A2 * x[n-2] */
5137  acc += (q63_t) S->A2 * S->state[1];
5138 
5139  /* convert output to 1.31 format to add y[n-1] */
5140  out = (q31_t) (acc >> 31u);
5141 
5142  /* out += y[n-1] */
5143  out += S->state[2];
5144 
5145  /* Update state */
5146  S->state[1] = S->state[0];
5147  S->state[0] = in;
5148  S->state[2] = out;
5149 
5150  /* return to application */
5151  return (out);
5152 
5153  }
5154 
5171  static __INLINE q15_t arm_pid_q15(
5173  q15_t in)
5174  {
5175  q63_t acc;
5176  q15_t out;
5177 
5178 #ifndef ARM_MATH_CM0_FAMILY
5179  __SIMD32_TYPE *vstate;
5180 
5181  /* Implementation of PID controller */
5182 
5183  /* acc = A0 * x[n] */
5184  acc = (q31_t) __SMUAD(S->A0, in);
5185 
5186  /* acc += A1 * x[n-1] + A2 * x[n-2] */
5187  vstate = __SIMD32_CONST(S->state);
5188  acc = __SMLALD(S->A1, (q31_t) *vstate, acc);
5189 
5190 #else
5191  /* acc = A0 * x[n] */
5192  acc = ((q31_t) S->A0) * in;
5193 
5194  /* acc += A1 * x[n-1] + A2 * x[n-2] */
5195  acc += (q31_t) S->A1 * S->state[0];
5196  acc += (q31_t) S->A2 * S->state[1];
5197 
5198 #endif
5199 
5200  /* acc += y[n-1] */
5201  acc += (q31_t) S->state[2] << 15;
5202 
5203  /* saturate the output */
5204  out = (q15_t) (__SSAT((acc >> 15), 16));
5205 
5206  /* Update state */
5207  S->state[1] = S->state[0];
5208  S->state[0] = in;
5209  S->state[2] = out;
5210 
5211  /* return to application */
5212  return (out);
5213 
5214  }
5215 
5230  const arm_matrix_instance_f32 * src,
5231  arm_matrix_instance_f32 * dst);
5232 
5233 
5243  const arm_matrix_instance_f64 * src,
5244  arm_matrix_instance_f64 * dst);
5245 
5246 
5247 
5290  static __INLINE void arm_clarke_f32(
5291  float32_t Ia,
5292  float32_t Ib,
5293  float32_t * pIalpha,
5294  float32_t * pIbeta)
5295  {
5296  /* Calculate pIalpha using the equation, pIalpha = Ia */
5297  *pIalpha = Ia;
5298 
5299  /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
5300  *pIbeta =
5301  ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
5302 
5303  }
5304 
5320  static __INLINE void arm_clarke_q31(
5321  q31_t Ia,
5322  q31_t Ib,
5323  q31_t * pIalpha,
5324  q31_t * pIbeta)
5325  {
5326  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5327 
5328  /* Calculating pIalpha from Ia by equation pIalpha = Ia */
5329  *pIalpha = Ia;
5330 
5331  /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
5332  product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
5333 
5334  /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
5335  product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
5336 
5337  /* pIbeta is calculated by adding the intermediate products */
5338  *pIbeta = __QADD(product1, product2);
5339  }
5340 
5352  void arm_q7_to_q31(
5353  q7_t * pSrc,
5354  q31_t * pDst,
5355  uint32_t blockSize);
5356 
5357 
5358 
5359 
5395  static __INLINE void arm_inv_clarke_f32(
5396  float32_t Ialpha,
5397  float32_t Ibeta,
5398  float32_t * pIa,
5399  float32_t * pIb)
5400  {
5401  /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5402  *pIa = Ialpha;
5403 
5404  /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
5405  *pIb = -0.5 * Ialpha + (float32_t) 0.8660254039 *Ibeta;
5406 
5407  }
5408 
5424  static __INLINE void arm_inv_clarke_q31(
5425  q31_t Ialpha,
5426  q31_t Ibeta,
5427  q31_t * pIa,
5428  q31_t * pIb)
5429  {
5430  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5431 
5432  /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5433  *pIa = Ialpha;
5434 
5435  /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
5436  product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
5437 
5438  /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
5439  product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
5440 
5441  /* pIb is calculated by subtracting the products */
5442  *pIb = __QSUB(product2, product1);
5443 
5444  }
5445 
5457  void arm_q7_to_q15(
5458  q7_t * pSrc,
5459  q15_t * pDst,
5460  uint32_t blockSize);
5461 
5462 
5463 
5511  static __INLINE void arm_park_f32(
5512  float32_t Ialpha,
5513  float32_t Ibeta,
5514  float32_t * pId,
5515  float32_t * pIq,
5516  float32_t sinVal,
5517  float32_t cosVal)
5518  {
5519  /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
5520  *pId = Ialpha * cosVal + Ibeta * sinVal;
5521 
5522  /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
5523  *pIq = -Ialpha * sinVal + Ibeta * cosVal;
5524 
5525  }
5526 
5545  static __INLINE void arm_park_q31(
5546  q31_t Ialpha,
5547  q31_t Ibeta,
5548  q31_t * pId,
5549  q31_t * pIq,
5550  q31_t sinVal,
5551  q31_t cosVal)
5552  {
5553  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5554  q31_t product3, product4; /* Temporary variables used to store intermediate results */
5555 
5556  /* Intermediate product is calculated by (Ialpha * cosVal) */
5557  product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
5558 
5559  /* Intermediate product is calculated by (Ibeta * sinVal) */
5560  product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
5561 
5562 
5563  /* Intermediate product is calculated by (Ialpha * sinVal) */
5564  product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
5565 
5566  /* Intermediate product is calculated by (Ibeta * cosVal) */
5567  product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
5568 
5569  /* Calculate pId by adding the two intermediate products 1 and 2 */
5570  *pId = __QADD(product1, product2);
5571 
5572  /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
5573  *pIq = __QSUB(product4, product3);
5574  }
5575 
5587  void arm_q7_to_float(
5588  q7_t * pSrc,
5589  float32_t * pDst,
5590  uint32_t blockSize);
5591 
5592 
5630  static __INLINE void arm_inv_park_f32(
5631  float32_t Id,
5632  float32_t Iq,
5633  float32_t * pIalpha,
5634  float32_t * pIbeta,
5635  float32_t sinVal,
5636  float32_t cosVal)
5637  {
5638  /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
5639  *pIalpha = Id * cosVal - Iq * sinVal;
5640 
5641  /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
5642  *pIbeta = Id * sinVal + Iq * cosVal;
5643 
5644  }
5645 
5646 
5665  static __INLINE void arm_inv_park_q31(
5666  q31_t Id,
5667  q31_t Iq,
5668  q31_t * pIalpha,
5669  q31_t * pIbeta,
5670  q31_t sinVal,
5671  q31_t cosVal)
5672  {
5673  q31_t product1, product2; /* Temporary variables used to store intermediate results */
5674  q31_t product3, product4; /* Temporary variables used to store intermediate results */
5675 
5676  /* Intermediate product is calculated by (Id * cosVal) */
5677  product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
5678 
5679  /* Intermediate product is calculated by (Iq * sinVal) */
5680  product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
5681 
5682 
5683  /* Intermediate product is calculated by (Id * sinVal) */
5684  product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
5685 
5686  /* Intermediate product is calculated by (Iq * cosVal) */
5687  product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
5688 
5689  /* Calculate pIalpha by using the two intermediate products 1 and 2 */
5690  *pIalpha = __QSUB(product1, product2);
5691 
5692  /* Calculate pIbeta by using the two intermediate products 3 and 4 */
5693  *pIbeta = __QADD(product4, product3);
5694 
5695  }
5696 
5709  void arm_q31_to_float(
5710  q31_t * pSrc,
5711  float32_t * pDst,
5712  uint32_t blockSize);
5713 
5763  static __INLINE float32_t arm_linear_interp_f32(
5765  float32_t x)
5766  {
5767 
5768  float32_t y;
5769  float32_t x0, x1; /* Nearest input values */
5770  float32_t y0, y1; /* Nearest output values */
5771  float32_t xSpacing = S->xSpacing; /* spacing between input values */
5772  int32_t i; /* Index variable */
5773  float32_t *pYData = S->pYData; /* pointer to output table */
5774 
5775  /* Calculation of index */
5776  i = (int32_t) ((x - S->x1) / xSpacing);
5777 
5778  if(i < 0)
5779  {
5780  /* Iniatilize output for below specified range as least output value of table */
5781  y = pYData[0];
5782  }
5783  else if((uint32_t)i >= S->nValues)
5784  {
5785  /* Iniatilize output for above specified range as last output value of table */
5786  y = pYData[S->nValues - 1];
5787  }
5788  else
5789  {
5790  /* Calculation of nearest input values */
5791  x0 = S->x1 + i * xSpacing;
5792  x1 = S->x1 + (i + 1) * xSpacing;
5793 
5794  /* Read of nearest output values */
5795  y0 = pYData[i];
5796  y1 = pYData[i + 1];
5797 
5798  /* Calculation of output */
5799  y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
5800 
5801  }
5802 
5803  /* returns output value */
5804  return (y);
5805  }
5806 
5822  static __INLINE q31_t arm_linear_interp_q31(
5823  q31_t * pYData,
5824  q31_t x,
5825  uint32_t nValues)
5826  {
5827  q31_t y; /* output */
5828  q31_t y0, y1; /* Nearest output values */
5829  q31_t fract; /* fractional part */
5830  int32_t index; /* Index to read nearest output values */
5831 
5832  /* Input is in 12.20 format */
5833  /* 12 bits for the table index */
5834  /* Index value calculation */
5835  index = ((x & 0xFFF00000) >> 20);
5836 
5837  if(index >= (int32_t)(nValues - 1))
5838  {
5839  return (pYData[nValues - 1]);
5840  }
5841  else if(index < 0)
5842  {
5843  return (pYData[0]);
5844  }
5845  else
5846  {
5847 
5848  /* 20 bits for the fractional part */
5849  /* shift left by 11 to keep fract in 1.31 format */
5850  fract = (x & 0x000FFFFF) << 11;
5851 
5852  /* Read two nearest output values from the index in 1.31(q31) format */
5853  y0 = pYData[index];
5854  y1 = pYData[index + 1u];
5855 
5856  /* Calculation of y0 * (1-fract) and y is in 2.30 format */
5857  y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
5858 
5859  /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
5860  y += ((q31_t) (((q63_t) y1 * fract) >> 32));
5861 
5862  /* Convert y to 1.31 format */
5863  return (y << 1u);
5864 
5865  }
5866 
5867  }
5868 
5884  static __INLINE q15_t arm_linear_interp_q15(
5885  q15_t * pYData,
5886  q31_t x,
5887  uint32_t nValues)
5888  {
5889  q63_t y; /* output */
5890  q15_t y0, y1; /* Nearest output values */
5891  q31_t fract; /* fractional part */
5892  int32_t index; /* Index to read nearest output values */
5893 
5894  /* Input is in 12.20 format */
5895  /* 12 bits for the table index */
5896  /* Index value calculation */
5897  index = ((x & 0xFFF00000) >> 20u);
5898 
5899  if(index >= (int32_t)(nValues - 1))
5900  {
5901  return (pYData[nValues - 1]);
5902  }
5903  else if(index < 0)
5904  {
5905  return (pYData[0]);
5906  }
5907  else
5908  {
5909  /* 20 bits for the fractional part */
5910  /* fract is in 12.20 format */
5911  fract = (x & 0x000FFFFF);
5912 
5913  /* Read two nearest output values from the index */
5914  y0 = pYData[index];
5915  y1 = pYData[index + 1u];
5916 
5917  /* Calculation of y0 * (1-fract) and y is in 13.35 format */
5918  y = ((q63_t) y0 * (0xFFFFF - fract));
5919 
5920  /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
5921  y += ((q63_t) y1 * (fract));
5922 
5923  /* convert y to 1.15 format */
5924  return (y >> 20);
5925  }
5926 
5927 
5928  }
5929 
5944  static __INLINE q7_t arm_linear_interp_q7(
5945  q7_t * pYData,
5946  q31_t x,
5947  uint32_t nValues)
5948  {
5949  q31_t y; /* output */
5950  q7_t y0, y1; /* Nearest output values */
5951  q31_t fract; /* fractional part */
5952  uint32_t index; /* Index to read nearest output values */
5953 
5954  /* Input is in 12.20 format */
5955  /* 12 bits for the table index */
5956  /* Index value calculation */
5957  if (x < 0)
5958  {
5959  return (pYData[0]);
5960  }
5961  index = (x >> 20) & 0xfff;
5962 
5963 
5964  if(index >= (nValues - 1))
5965  {
5966  return (pYData[nValues - 1]);
5967  }
5968  else
5969  {
5970 
5971  /* 20 bits for the fractional part */
5972  /* fract is in 12.20 format */
5973  fract = (x & 0x000FFFFF);
5974 
5975  /* Read two nearest output values from the index and are in 1.7(q7) format */
5976  y0 = pYData[index];
5977  y1 = pYData[index + 1u];
5978 
5979  /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
5980  y = ((y0 * (0xFFFFF - fract)));
5981 
5982  /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
5983  y += (y1 * fract);
5984 
5985  /* convert y to 1.7(q7) format */
5986  return (y >> 20u);
5987 
5988  }
5989 
5990  }
6001  float32_t arm_sin_f32(
6002  float32_t x);
6003 
6010  q31_t arm_sin_q31(
6011  q31_t x);
6012 
6019  q15_t arm_sin_q15(
6020  q15_t x);
6021 
6028  float32_t arm_cos_f32(
6029  float32_t x);
6030 
6037  q31_t arm_cos_q31(
6038  q31_t x);
6039 
6046  q15_t arm_cos_q15(
6047  q15_t x);
6048 
6049 
6089  static __INLINE arm_status arm_sqrt_f32(
6090  float32_t in,
6091  float32_t * pOut)
6092  {
6093  if(in > 0)
6094  {
6095 
6096 // #if __FPU_USED
6097 #if (__FPU_USED == 1) && defined ( __CC_ARM )
6098  *pOut = __sqrtf(in);
6099 #else
6100  *pOut = sqrtf(in);
6101 #endif
6102 
6103  return (ARM_MATH_SUCCESS);
6104  }
6105  else
6106  {
6107  *pOut = 0.0f;
6108  return (ARM_MATH_ARGUMENT_ERROR);
6109  }
6110 
6111  }
6112 
6113 
6122  q31_t in,
6123  q31_t * pOut);
6124 
6133  q15_t in,
6134  q15_t * pOut);
6135 
6149  static __INLINE void arm_circularWrite_f32(
6150  int32_t * circBuffer,
6151  int32_t L,
6152  uint16_t * writeOffset,
6153  int32_t bufferInc,
6154  const int32_t * src,
6155  int32_t srcInc,
6156  uint32_t blockSize)
6157  {
6158  uint32_t i = 0u;
6159  int32_t wOffset;
6160 
6161  /* Copy the value of Index pointer that points
6162  * to the current location where the input samples to be copied */
6163  wOffset = *writeOffset;
6164 
6165  /* Loop over the blockSize */
6166  i = blockSize;
6167 
6168  while(i > 0u)
6169  {
6170  /* copy the input sample to the circular buffer */
6171  circBuffer[wOffset] = *src;
6172 
6173  /* Update the input pointer */
6174  src += srcInc;
6175 
6176  /* Circularly update wOffset. Watch out for positive and negative value */
6177  wOffset += bufferInc;
6178  if(wOffset >= L)
6179  wOffset -= L;
6180 
6181  /* Decrement the loop counter */
6182  i--;
6183  }
6184 
6185  /* Update the index pointer */
6186  *writeOffset = wOffset;
6187  }
6188 
6189 
6190 
6194  static __INLINE void arm_circularRead_f32(
6195  int32_t * circBuffer,
6196  int32_t L,
6197  int32_t * readOffset,
6198  int32_t bufferInc,
6199  int32_t * dst,
6200  int32_t * dst_base,
6201  int32_t dst_length,
6202  int32_t dstInc,
6203  uint32_t blockSize)
6204  {
6205  uint32_t i = 0u;
6206  int32_t rOffset, dst_end;
6207 
6208  /* Copy the value of Index pointer that points
6209  * to the current location from where the input samples to be read */
6210  rOffset = *readOffset;
6211  dst_end = (int32_t) (dst_base + dst_length);
6212 
6213  /* Loop over the blockSize */
6214  i = blockSize;
6215 
6216  while(i > 0u)
6217  {
6218  /* copy the sample from the circular buffer to the destination buffer */
6219  *dst = circBuffer[rOffset];
6220 
6221  /* Update the input pointer */
6222  dst += dstInc;
6223 
6224  if(dst == (int32_t *) dst_end)
6225  {
6226  dst = dst_base;
6227  }
6228 
6229  /* Circularly update rOffset. Watch out for positive and negative value */
6230  rOffset += bufferInc;
6231 
6232  if(rOffset >= L)
6233  {
6234  rOffset -= L;
6235  }
6236 
6237  /* Decrement the loop counter */
6238  i--;
6239  }
6240 
6241  /* Update the index pointer */
6242  *readOffset = rOffset;
6243  }
6244 
6249  static __INLINE void arm_circularWrite_q15(
6250  q15_t * circBuffer,
6251  int32_t L,
6252  uint16_t * writeOffset,
6253  int32_t bufferInc,
6254  const q15_t * src,
6255  int32_t srcInc,
6256  uint32_t blockSize)
6257  {
6258  uint32_t i = 0u;
6259  int32_t wOffset;
6260 
6261  /* Copy the value of Index pointer that points
6262  * to the current location where the input samples to be copied */
6263  wOffset = *writeOffset;
6264 
6265  /* Loop over the blockSize */
6266  i = blockSize;
6267 
6268  while(i > 0u)
6269  {
6270  /* copy the input sample to the circular buffer */
6271  circBuffer[wOffset] = *src;
6272 
6273  /* Update the input pointer */
6274  src += srcInc;
6275 
6276  /* Circularly update wOffset. Watch out for positive and negative value */
6277  wOffset += bufferInc;
6278  if(wOffset >= L)
6279  wOffset -= L;
6280 
6281  /* Decrement the loop counter */
6282  i--;
6283  }
6284 
6285  /* Update the index pointer */
6286  *writeOffset = wOffset;
6287  }
6288 
6289 
6290 
6294  static __INLINE void arm_circularRead_q15(
6295  q15_t * circBuffer,
6296  int32_t L,
6297  int32_t * readOffset,
6298  int32_t bufferInc,
6299  q15_t * dst,
6300  q15_t * dst_base,
6301  int32_t dst_length,
6302  int32_t dstInc,
6303  uint32_t blockSize)
6304  {
6305  uint32_t i = 0;
6306  int32_t rOffset, dst_end;
6307 
6308  /* Copy the value of Index pointer that points
6309  * to the current location from where the input samples to be read */
6310  rOffset = *readOffset;
6311 
6312  dst_end = (int32_t) (dst_base + dst_length);
6313 
6314  /* Loop over the blockSize */
6315  i = blockSize;
6316 
6317  while(i > 0u)
6318  {
6319  /* copy the sample from the circular buffer to the destination buffer */
6320  *dst = circBuffer[rOffset];
6321 
6322  /* Update the input pointer */
6323  dst += dstInc;
6324 
6325  if(dst == (q15_t *) dst_end)
6326  {
6327  dst = dst_base;
6328  }
6329 
6330  /* Circularly update wOffset. Watch out for positive and negative value */
6331  rOffset += bufferInc;
6332 
6333  if(rOffset >= L)
6334  {
6335  rOffset -= L;
6336  }
6337 
6338  /* Decrement the loop counter */
6339  i--;
6340  }
6341 
6342  /* Update the index pointer */
6343  *readOffset = rOffset;
6344  }
6345 
6346 
6351  static __INLINE void arm_circularWrite_q7(
6352  q7_t * circBuffer,
6353  int32_t L,
6354  uint16_t * writeOffset,
6355  int32_t bufferInc,
6356  const q7_t * src,
6357  int32_t srcInc,
6358  uint32_t blockSize)
6359  {
6360  uint32_t i = 0u;
6361  int32_t wOffset;
6362 
6363  /* Copy the value of Index pointer that points
6364  * to the current location where the input samples to be copied */
6365  wOffset = *writeOffset;
6366 
6367  /* Loop over the blockSize */
6368  i = blockSize;
6369 
6370  while(i > 0u)
6371  {
6372  /* copy the input sample to the circular buffer */
6373  circBuffer[wOffset] = *src;
6374 
6375  /* Update the input pointer */
6376  src += srcInc;
6377 
6378  /* Circularly update wOffset. Watch out for positive and negative value */
6379  wOffset += bufferInc;
6380  if(wOffset >= L)
6381  wOffset -= L;
6382 
6383  /* Decrement the loop counter */
6384  i--;
6385  }
6386 
6387  /* Update the index pointer */
6388  *writeOffset = wOffset;
6389  }
6390 
6391 
6392 
6396  static __INLINE void arm_circularRead_q7(
6397  q7_t * circBuffer,
6398  int32_t L,
6399  int32_t * readOffset,
6400  int32_t bufferInc,
6401  q7_t * dst,
6402  q7_t * dst_base,
6403  int32_t dst_length,
6404  int32_t dstInc,
6405  uint32_t blockSize)
6406  {
6407  uint32_t i = 0;
6408  int32_t rOffset, dst_end;
6409 
6410  /* Copy the value of Index pointer that points
6411  * to the current location from where the input samples to be read */
6412  rOffset = *readOffset;
6413 
6414  dst_end = (int32_t) (dst_base + dst_length);
6415 
6416  /* Loop over the blockSize */
6417  i = blockSize;
6418 
6419  while(i > 0u)
6420  {
6421  /* copy the sample from the circular buffer to the destination buffer */
6422  *dst = circBuffer[rOffset];
6423 
6424  /* Update the input pointer */
6425  dst += dstInc;
6426 
6427  if(dst == (q7_t *) dst_end)
6428  {
6429  dst = dst_base;
6430  }
6431 
6432  /* Circularly update rOffset. Watch out for positive and negative value */
6433  rOffset += bufferInc;
6434 
6435  if(rOffset >= L)
6436  {
6437  rOffset -= L;
6438  }
6439 
6440  /* Decrement the loop counter */
6441  i--;
6442  }
6443 
6444  /* Update the index pointer */
6445  *readOffset = rOffset;
6446  }
6447 
6448 
6457  void arm_power_q31(
6458  q31_t * pSrc,
6459  uint32_t blockSize,
6460  q63_t * pResult);
6461 
6470  void arm_power_f32(
6471  float32_t * pSrc,
6472  uint32_t blockSize,
6473  float32_t * pResult);
6474 
6483  void arm_power_q15(
6484  q15_t * pSrc,
6485  uint32_t blockSize,
6486  q63_t * pResult);
6487 
6496  void arm_power_q7(
6497  q7_t * pSrc,
6498  uint32_t blockSize,
6499  q31_t * pResult);
6500 
6509  void arm_mean_q7(
6510  q7_t * pSrc,
6511  uint32_t blockSize,
6512  q7_t * pResult);
6513 
6521  void arm_mean_q15(
6522  q15_t * pSrc,
6523  uint32_t blockSize,
6524  q15_t * pResult);
6525 
6533  void arm_mean_q31(
6534  q31_t * pSrc,
6535  uint32_t blockSize,
6536  q31_t * pResult);
6537 
6545  void arm_mean_f32(
6546  float32_t * pSrc,
6547  uint32_t blockSize,
6548  float32_t * pResult);
6549 
6558  void arm_var_f32(
6559  float32_t * pSrc,
6560  uint32_t blockSize,
6561  float32_t * pResult);
6562 
6571  void arm_var_q31(
6572  q31_t * pSrc,
6573  uint32_t blockSize,
6574  q31_t * pResult);
6575 
6584  void arm_var_q15(
6585  q15_t * pSrc,
6586  uint32_t blockSize,
6587  q15_t * pResult);
6588 
6597  void arm_rms_f32(
6598  float32_t * pSrc,
6599  uint32_t blockSize,
6600  float32_t * pResult);
6601 
6610  void arm_rms_q31(
6611  q31_t * pSrc,
6612  uint32_t blockSize,
6613  q31_t * pResult);
6614 
6623  void arm_rms_q15(
6624  q15_t * pSrc,
6625  uint32_t blockSize,
6626  q15_t * pResult);
6627 
6636  void arm_std_f32(
6637  float32_t * pSrc,
6638  uint32_t blockSize,
6639  float32_t * pResult);
6640 
6649  void arm_std_q31(
6650  q31_t * pSrc,
6651  uint32_t blockSize,
6652  q31_t * pResult);
6653 
6662  void arm_std_q15(
6663  q15_t * pSrc,
6664  uint32_t blockSize,
6665  q15_t * pResult);
6666 
6675  void arm_cmplx_mag_f32(
6676  float32_t * pSrc,
6677  float32_t * pDst,
6678  uint32_t numSamples);
6679 
6688  void arm_cmplx_mag_q31(
6689  q31_t * pSrc,
6690  q31_t * pDst,
6691  uint32_t numSamples);
6692 
6701  void arm_cmplx_mag_q15(
6702  q15_t * pSrc,
6703  q15_t * pDst,
6704  uint32_t numSamples);
6705 
6717  q15_t * pSrcA,
6718  q15_t * pSrcB,
6719  uint32_t numSamples,
6720  q31_t * realResult,
6721  q31_t * imagResult);
6722 
6734  q31_t * pSrcA,
6735  q31_t * pSrcB,
6736  uint32_t numSamples,
6737  q63_t * realResult,
6738  q63_t * imagResult);
6739 
6751  float32_t * pSrcA,
6752  float32_t * pSrcB,
6753  uint32_t numSamples,
6754  float32_t * realResult,
6755  float32_t * imagResult);
6756 
6767  q15_t * pSrcCmplx,
6768  q15_t * pSrcReal,
6769  q15_t * pCmplxDst,
6770  uint32_t numSamples);
6771 
6782  q31_t * pSrcCmplx,
6783  q31_t * pSrcReal,
6784  q31_t * pCmplxDst,
6785  uint32_t numSamples);
6786 
6797  float32_t * pSrcCmplx,
6798  float32_t * pSrcReal,
6799  float32_t * pCmplxDst,
6800  uint32_t numSamples);
6801 
6811  void arm_min_q7(
6812  q7_t * pSrc,
6813  uint32_t blockSize,
6814  q7_t * result,
6815  uint32_t * index);
6816 
6826  void arm_min_q15(
6827  q15_t * pSrc,
6828  uint32_t blockSize,
6829  q15_t * pResult,
6830  uint32_t * pIndex);
6831 
6840  void arm_min_q31(
6841  q31_t * pSrc,
6842  uint32_t blockSize,
6843  q31_t * pResult,
6844  uint32_t * pIndex);
6845 
6855  void arm_min_f32(
6856  float32_t * pSrc,
6857  uint32_t blockSize,
6858  float32_t * pResult,
6859  uint32_t * pIndex);
6860 
6870  void arm_max_q7(
6871  q7_t * pSrc,
6872  uint32_t blockSize,
6873  q7_t * pResult,
6874  uint32_t * pIndex);
6875 
6885  void arm_max_q15(
6886  q15_t * pSrc,
6887  uint32_t blockSize,
6888  q15_t * pResult,
6889  uint32_t * pIndex);
6890 
6900  void arm_max_q31(
6901  q31_t * pSrc,
6902  uint32_t blockSize,
6903  q31_t * pResult,
6904  uint32_t * pIndex);
6905 
6915  void arm_max_f32(
6916  float32_t * pSrc,
6917  uint32_t blockSize,
6918  float32_t * pResult,
6919  uint32_t * pIndex);
6920 
6931  q15_t * pSrcA,
6932  q15_t * pSrcB,
6933  q15_t * pDst,
6934  uint32_t numSamples);
6935 
6946  q31_t * pSrcA,
6947  q31_t * pSrcB,
6948  q31_t * pDst,
6949  uint32_t numSamples);
6950 
6961  float32_t * pSrcA,
6962  float32_t * pSrcB,
6963  float32_t * pDst,
6964  uint32_t numSamples);
6965 
6973  void arm_float_to_q31(
6974  float32_t * pSrc,
6975  q31_t * pDst,
6976  uint32_t blockSize);
6977 
6985  void arm_float_to_q15(
6986  float32_t * pSrc,
6987  q15_t * pDst,
6988  uint32_t blockSize);
6989 
6997  void arm_float_to_q7(
6998  float32_t * pSrc,
6999  q7_t * pDst,
7000  uint32_t blockSize);
7001 
7002 
7010  void arm_q31_to_q15(
7011  q31_t * pSrc,
7012  q15_t * pDst,
7013  uint32_t blockSize);
7014 
7022  void arm_q31_to_q7(
7023  q31_t * pSrc,
7024  q7_t * pDst,
7025  uint32_t blockSize);
7026 
7034  void arm_q15_to_float(
7035  q15_t * pSrc,
7036  float32_t * pDst,
7037  uint32_t blockSize);
7038 
7039 
7047  void arm_q15_to_q31(
7048  q15_t * pSrc,
7049  q31_t * pDst,
7050  uint32_t blockSize);
7051 
7052 
7060  void arm_q15_to_q7(
7061  q15_t * pSrc,
7062  q7_t * pDst,
7063  uint32_t blockSize);
7064 
7065 
7137  static __INLINE float32_t arm_bilinear_interp_f32(
7139  float32_t X,
7140  float32_t Y)
7141  {
7142  float32_t out;
7143  float32_t f00, f01, f10, f11;
7144  float32_t *pData = S->pData;
7145  int32_t xIndex, yIndex, index;
7146  float32_t xdiff, ydiff;
7147  float32_t b1, b2, b3, b4;
7148 
7149  xIndex = (int32_t) X;
7150  yIndex = (int32_t) Y;
7151 
7152  /* Care taken for table outside boundary */
7153  /* Returns zero output when values are outside table boundary */
7154  if(xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0
7155  || yIndex > (S->numCols - 1))
7156  {
7157  return (0);
7158  }
7159 
7160  /* Calculation of index for two nearest points in X-direction */
7161  index = (xIndex - 1) + (yIndex - 1) * S->numCols;
7162 
7163 
7164  /* Read two nearest points in X-direction */
7165  f00 = pData[index];
7166  f01 = pData[index + 1];
7167 
7168  /* Calculation of index for two nearest points in Y-direction */
7169  index = (xIndex - 1) + (yIndex) * S->numCols;
7170 
7171 
7172  /* Read two nearest points in Y-direction */
7173  f10 = pData[index];
7174  f11 = pData[index + 1];
7175 
7176  /* Calculation of intermediate values */
7177  b1 = f00;
7178  b2 = f01 - f00;
7179  b3 = f10 - f00;
7180  b4 = f00 - f01 - f10 + f11;
7181 
7182  /* Calculation of fractional part in X */
7183  xdiff = X - xIndex;
7184 
7185  /* Calculation of fractional part in Y */
7186  ydiff = Y - yIndex;
7187 
7188  /* Calculation of bi-linear interpolated output */
7189  out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
7190 
7191  /* return to application */
7192  return (out);
7193 
7194  }
7195 
7205  static __INLINE q31_t arm_bilinear_interp_q31(
7207  q31_t X,
7208  q31_t Y)
7209  {
7210  q31_t out; /* Temporary output */
7211  q31_t acc = 0; /* output */
7212  q31_t xfract, yfract; /* X, Y fractional parts */
7213  q31_t x1, x2, y1, y2; /* Nearest output values */
7214  int32_t rI, cI; /* Row and column indices */
7215  q31_t *pYData = S->pData; /* pointer to output table values */
7216  uint32_t nCols = S->numCols; /* num of rows */
7217 
7218 
7219  /* Input is in 12.20 format */
7220  /* 12 bits for the table index */
7221  /* Index value calculation */
7222  rI = ((X & 0xFFF00000) >> 20u);
7223 
7224  /* Input is in 12.20 format */
7225  /* 12 bits for the table index */
7226  /* Index value calculation */
7227  cI = ((Y & 0xFFF00000) >> 20u);
7228 
7229  /* Care taken for table outside boundary */
7230  /* Returns zero output when values are outside table boundary */
7231  if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
7232  {
7233  return (0);
7234  }
7235 
7236  /* 20 bits for the fractional part */
7237  /* shift left xfract by 11 to keep 1.31 format */
7238  xfract = (X & 0x000FFFFF) << 11u;
7239 
7240  /* Read two nearest output values from the index */
7241  x1 = pYData[(rI) + nCols * (cI)];
7242  x2 = pYData[(rI) + nCols * (cI) + 1u];
7243 
7244  /* 20 bits for the fractional part */
7245  /* shift left yfract by 11 to keep 1.31 format */
7246  yfract = (Y & 0x000FFFFF) << 11u;
7247 
7248  /* Read two nearest output values from the index */
7249  y1 = pYData[(rI) + nCols * (cI + 1)];
7250  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
7251 
7252  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
7253  out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
7254  acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
7255 
7256  /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
7257  out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
7258  acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
7259 
7260  /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
7261  out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
7262  acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
7263 
7264  /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
7265  out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
7266  acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
7267 
7268  /* Convert acc to 1.31(q31) format */
7269  return (acc << 2u);
7270 
7271  }
7272 
7281  static __INLINE q15_t arm_bilinear_interp_q15(
7283  q31_t X,
7284  q31_t Y)
7285  {
7286  q63_t acc = 0; /* output */
7287  q31_t out; /* Temporary output */
7288  q15_t x1, x2, y1, y2; /* Nearest output values */
7289  q31_t xfract, yfract; /* X, Y fractional parts */
7290  int32_t rI, cI; /* Row and column indices */
7291  q15_t *pYData = S->pData; /* pointer to output table values */
7292  uint32_t nCols = S->numCols; /* num of rows */
7293 
7294  /* Input is in 12.20 format */
7295  /* 12 bits for the table index */
7296  /* Index value calculation */
7297  rI = ((X & 0xFFF00000) >> 20);
7298 
7299  /* Input is in 12.20 format */
7300  /* 12 bits for the table index */
7301  /* Index value calculation */
7302  cI = ((Y & 0xFFF00000) >> 20);
7303 
7304  /* Care taken for table outside boundary */
7305  /* Returns zero output when values are outside table boundary */
7306  if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
7307  {
7308  return (0);
7309  }
7310 
7311  /* 20 bits for the fractional part */
7312  /* xfract should be in 12.20 format */
7313  xfract = (X & 0x000FFFFF);
7314 
7315  /* Read two nearest output values from the index */
7316  x1 = pYData[(rI) + nCols * (cI)];
7317  x2 = pYData[(rI) + nCols * (cI) + 1u];
7318 
7319 
7320  /* 20 bits for the fractional part */
7321  /* yfract should be in 12.20 format */
7322  yfract = (Y & 0x000FFFFF);
7323 
7324  /* Read two nearest output values from the index */
7325  y1 = pYData[(rI) + nCols * (cI + 1)];
7326  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
7327 
7328  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
7329 
7330  /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
7331  /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
7332  out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u);
7333  acc = ((q63_t) out * (0xFFFFF - yfract));
7334 
7335  /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
7336  out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u);
7337  acc += ((q63_t) out * (xfract));
7338 
7339  /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
7340  out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u);
7341  acc += ((q63_t) out * (yfract));
7342 
7343  /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
7344  out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u);
7345  acc += ((q63_t) out * (yfract));
7346 
7347  /* acc is in 13.51 format and down shift acc by 36 times */
7348  /* Convert out to 1.15 format */
7349  return (acc >> 36);
7350 
7351  }
7352 
7361  static __INLINE q7_t arm_bilinear_interp_q7(
7363  q31_t X,
7364  q31_t Y)
7365  {
7366  q63_t acc = 0; /* output */
7367  q31_t out; /* Temporary output */
7368  q31_t xfract, yfract; /* X, Y fractional parts */
7369  q7_t x1, x2, y1, y2; /* Nearest output values */
7370  int32_t rI, cI; /* Row and column indices */
7371  q7_t *pYData = S->pData; /* pointer to output table values */
7372  uint32_t nCols = S->numCols; /* num of rows */
7373 
7374  /* Input is in 12.20 format */
7375  /* 12 bits for the table index */
7376  /* Index value calculation */
7377  rI = ((X & 0xFFF00000) >> 20);
7378 
7379  /* Input is in 12.20 format */
7380  /* 12 bits for the table index */
7381  /* Index value calculation */
7382  cI = ((Y & 0xFFF00000) >> 20);
7383 
7384  /* Care taken for table outside boundary */
7385  /* Returns zero output when values are outside table boundary */
7386  if(rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
7387  {
7388  return (0);
7389  }
7390 
7391  /* 20 bits for the fractional part */
7392  /* xfract should be in 12.20 format */
7393  xfract = (X & 0x000FFFFF);
7394 
7395  /* Read two nearest output values from the index */
7396  x1 = pYData[(rI) + nCols * (cI)];
7397  x2 = pYData[(rI) + nCols * (cI) + 1u];
7398 
7399 
7400  /* 20 bits for the fractional part */
7401  /* yfract should be in 12.20 format */
7402  yfract = (Y & 0x000FFFFF);
7403 
7404  /* Read two nearest output values from the index */
7405  y1 = pYData[(rI) + nCols * (cI + 1)];
7406  y2 = pYData[(rI) + nCols * (cI + 1) + 1u];
7407 
7408  /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
7409  out = ((x1 * (0xFFFFF - xfract)));
7410  acc = (((q63_t) out * (0xFFFFF - yfract)));
7411 
7412  /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
7413  out = ((x2 * (0xFFFFF - yfract)));
7414  acc += (((q63_t) out * (xfract)));
7415 
7416  /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
7417  out = ((y1 * (0xFFFFF - xfract)));
7418  acc += (((q63_t) out * (yfract)));
7419 
7420  /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
7421  out = ((y2 * (yfract)));
7422  acc += (((q63_t) out * (xfract)));
7423 
7424  /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
7425  return (acc >> 40);
7426 
7427  }
7428 
7434 //SMMLAR
7435 #define multAcc_32x32_keep32_R(a, x, y) \
7436  a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
7437 
7438 //SMMLSR
7439 #define multSub_32x32_keep32_R(a, x, y) \
7440  a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
7441 
7442 //SMMULR
7443 #define mult_32x32_keep32_R(a, x, y) \
7444  a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
7445 
7446 //SMMLA
7447 #define multAcc_32x32_keep32(a, x, y) \
7448  a += (q31_t) (((q63_t) x * y) >> 32)
7449 
7450 //SMMLS
7451 #define multSub_32x32_keep32(a, x, y) \
7452  a -= (q31_t) (((q63_t) x * y) >> 32)
7453 
7454 //SMMUL
7455 #define mult_32x32_keep32(a, x, y) \
7456  a = (q31_t) (((q63_t) x * y ) >> 32)
7457 
7458 
7459 #if defined ( __CC_ARM ) //Keil
7460 
7461 //Enter low optimization region - place directly above function definition
7462  #ifdef ARM_MATH_CM4
7463  #define LOW_OPTIMIZATION_ENTER \
7464  _Pragma ("push") \
7465  _Pragma ("O1")
7466  #else
7467  #define LOW_OPTIMIZATION_ENTER
7468  #endif
7469 
7470 //Exit low optimization region - place directly after end of function definition
7471  #ifdef ARM_MATH_CM4
7472  #define LOW_OPTIMIZATION_EXIT \
7473  _Pragma ("pop")
7474  #else
7475  #define LOW_OPTIMIZATION_EXIT
7476  #endif
7477 
7478 //Enter low optimization region - place directly above function definition
7479  #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7480 
7481 //Exit low optimization region - place directly after end of function definition
7482  #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7483 
7484 #elif defined(__ICCARM__) //IAR
7485 
7486 //Enter low optimization region - place directly above function definition
7487  #ifdef ARM_MATH_CM4
7488  #define LOW_OPTIMIZATION_ENTER \
7489  _Pragma ("optimize=low")
7490  #else
7491  #define LOW_OPTIMIZATION_ENTER
7492  #endif
7493 
7494 //Exit low optimization region - place directly after end of function definition
7495  #define LOW_OPTIMIZATION_EXIT
7496 
7497 //Enter low optimization region - place directly above function definition
7498  #ifdef ARM_MATH_CM4
7499  #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
7500  _Pragma ("optimize=low")
7501  #else
7502  #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7503  #endif
7504 
7505 //Exit low optimization region - place directly after end of function definition
7506  #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7507 
7508 #elif defined(__GNUC__)
7509 
7510  #define LOW_OPTIMIZATION_ENTER __attribute__(( optimize("-O1") ))
7511 
7512  #define LOW_OPTIMIZATION_EXIT
7513 
7514  #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7515 
7516  #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7517 
7518 #elif defined(__CSMC__) // Cosmic
7519 
7520 #define LOW_OPTIMIZATION_ENTER
7521 #define LOW_OPTIMIZATION_EXIT
7522 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7523 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7524 
7525 #endif
7526 
7527 
7528 #ifdef __cplusplus
7529 }
7530 #endif
7531 
7532 
7533 #endif /* _ARM_MATH_H */
7534 
void arm_rms_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Root Mean Square of the elements of a Q31 vector.
arm_status arm_mat_mult_fast_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pState)
Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
void arm_sub_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector subtraction.
void arm_offset_q15(q15_t *pSrc, q15_t offset, q15_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q15 vector.
void arm_std_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Standard deviation of the elements of a floating-point vector.
Instance structure for the floating-point FIR interpolator.
Definition: arm_math.h:3641
void arm_pid_reset_q15(arm_pid_instance_q15 *S)
Reset function for the Q15 PID Control.
arm_status arm_dct4_init_q15(arm_dct4_instance_q15 *S, arm_rfft_instance_q15 *S_RFFT, arm_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize)
Initialization function for the Q15 DCT4/IDCT4.
void arm_iir_lattice_f32(const arm_iir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point IIR lattice filter.
void arm_mat_init_f32(arm_matrix_instance_f32 *S, uint16_t nRows, uint16_t nColumns, float32_t *pData)
Floating-point matrix initialization.
float32_t * pTwiddle
Definition: arm_math.h:2368
void arm_power_q7(q7_t *pSrc, uint32_t blockSize, q31_t *pResult)
Sum of the squares of the elements of a Q7 vector.
static __INLINE void arm_circularRead_q15(q15_t *circBuffer, int32_t L, int32_t *readOffset, int32_t bufferInc, q15_t *dst, q15_t *dst_base, int32_t dst_length, int32_t dstInc, uint32_t blockSize)
Q15 Circular Read function.
Definition: arm_math.h:6294
arm_status arm_rfft_fast_init_f32(arm_rfft_fast_instance_f32 *S, uint16_t fftLen)
void arm_scale_q7(q7_t *pSrc, q7_t scaleFract, int8_t shift, q7_t *pDst, uint32_t blockSize)
Multiplies a Q7 vector by a scalar.
static __INLINE void arm_circularRead_q7(q7_t *circBuffer, int32_t L, int32_t *readOffset, int32_t bufferInc, q7_t *dst, q7_t *dst_base, int32_t dst_length, int32_t dstInc, uint32_t blockSize)
Q7 Circular Read function.
Definition: arm_math.h:6396
int8_t q7_t
8-bit fractional data type in 1.7 format.
Definition: arm_math.h:372
arm_status arm_mat_mult_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix multiplication.
void arm_cmplx_conj_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex conjugate.
Instance structure for the Q15 FIR filter.
Definition: arm_math.h:1080
static __INLINE q31_t arm_pid_q31(arm_pid_instance_q31 *S, q31_t in)
Process function for the Q31 PID Control.
Definition: arm_math.h:5123
void arm_pid_init_q15(arm_pid_instance_q15 *S, int32_t resetStateFlag)
Initialization function for the Q15 PID Control.
void arm_abs_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Q15 vector absolute value.
Instance structure for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_math.h:3821
void arm_q31_to_float(q31_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to floating-point vector.
void arm_dct4_f32(const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer)
Processing function for the floating-point DCT4/IDCT4.
void arm_cfft_q15(const arm_cfft_instance_q15 *S, q15_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_status arm_mat_add_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst)
Q15 matrix addition.
void arm_mean_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Mean value of a Q31 vector.
void arm_copy_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Copies the elements of a Q7 vector.
void arm_correlate_fast_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch)
Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
void arm_biquad_cascade_stereo_df2T_f32(const arm_biquad_cascade_stereo_df2T_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter...
Instance structure for the Q31 FIR lattice filter.
Definition: arm_math.h:3953
arm_status arm_mat_mult_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pState)
Q15 matrix multiplication.
void arm_cfft_f32(const arm_cfft_instance_f32 *S, float32_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
static __INLINE q15_t clip_q31_to_q15(q31_t x)
Clips Q31 to Q15 values.
Definition: arm_math.h:489
void arm_biquad_cascade_df1_fast_q15(const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-...
void arm_add_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector addition.
Instance structure for the Q31 IIR lattice filter.
Definition: arm_math.h:4076
static __INLINE arm_status arm_sqrt_f32(float32_t in, float32_t *pOut)
Floating-point square root function.
Definition: arm_math.h:6089
arm_status arm_fir_init_q15(arm_fir_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR filter.
arm_cfft_radix4_instance_f32 * pCfft
Definition: arm_math.h:2324
void arm_scale_f32(float32_t *pSrc, float32_t scale, float32_t *pDst, uint32_t blockSize)
Multiplies a floating-point vector by a scalar.
arm_cfft_radix4_instance_q31 * pCfft
Definition: arm_math.h:2418
float32_t * pTwiddleBReal
Definition: arm_math.h:2323
void arm_biquad_cascade_df1_q15(const arm_biquad_casd_df1_inst_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 Biquad cascade filter.
static __INLINE q7_t arm_bilinear_interp_q7(arm_bilinear_interp_instance_q7 *S, q31_t X, q31_t Y)
Q7 bilinear interpolation.
Definition: arm_math.h:7361
void arm_fill_q31(q31_t value, q31_t *pDst, uint32_t blockSize)
Fills a constant value into a Q31 vector.
void arm_cmplx_mag_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude.
static __INLINE void arm_circularWrite_q15(q15_t *circBuffer, int32_t L, uint16_t *writeOffset, int32_t bufferInc, const q15_t *src, int32_t srcInc, uint32_t blockSize)
Q15 Circular write function.
Definition: arm_math.h:6249
void arm_fir_sparse_q31(arm_fir_sparse_instance_q31 *S, q31_t *pSrc, q31_t *pDst, q31_t *pScratchIn, uint32_t blockSize)
Processing function for the Q31 sparse FIR filter.
float float32_t
32-bit floating-point type definition.
Definition: arm_math.h:392
void arm_fir_init_q7(arm_fir_instance_q7 *S, uint16_t numTaps, q7_t *pCoeffs, q7_t *pState, uint32_t blockSize)
Initialization function for the Q7 FIR filter.
void arm_fir_decimate_fast_q15(const arm_fir_decimate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
void arm_sub_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector subtraction.
void arm_conv_fast_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
arm_status arm_fir_decimate_init_q31(arm_fir_decimate_instance_q31 *S, uint16_t numTaps, uint8_t M, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR decimator.
void arm_scale_q31(q31_t *pSrc, q31_t scaleFract, int8_t shift, q31_t *pDst, uint32_t blockSize)
Multiplies a Q31 vector by a scalar.
void arm_pid_init_q31(arm_pid_instance_q31 *S, int32_t resetStateFlag)
Initialization function for the Q31 PID Control.
void arm_fill_q7(q7_t value, q7_t *pDst, uint32_t blockSize)
Fills a constant value into a Q7 vector.
void arm_lms_q31(const arm_lms_instance_q31 *S, q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 LMS filter.
CMSIS Cortex-M0 Core Peripheral Access Layer Header File.
void arm_q15_to_float(q15_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to floating-point vector.
void arm_copy_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Copies the elements of a Q15 vector.
const arm_cfft_instance_q15 * pCfft
Definition: arm_math.h:2271
void arm_q31_to_q7(q31_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q7 vector.
static __INLINE void arm_inv_clarke_f32(float32_t Ialpha, float32_t Ibeta, float32_t *pIa, float32_t *pIb)
Floating-point Inverse Clarke transform.
Definition: arm_math.h:5395
void arm_cmplx_mult_real_f32(float32_t *pSrcCmplx, float32_t *pSrcReal, float32_t *pCmplxDst, uint32_t numSamples)
Floating-point complex-by-real multiplication.
Instance structure for the Q31 bilinear interpolation function.
Definition: arm_math.h:1944
void arm_cmplx_mag_squared_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude squared.
arm_status arm_fir_interpolate_init_q31(arm_fir_interpolate_instance_q31 *S, uint8_t L, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR interpolator.
void arm_cfft_radix4_q15(const arm_cfft_radix4_instance_q15 *S, q15_t *pSrc)
void arm_power_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Sum of the squares of the elements of a floating-point vector.
void arm_rfft_q31(const arm_rfft_instance_q31 *S, q31_t *pSrc, q31_t *pDst)
XmlRpcServer s
void arm_max_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Maximum value of a floating-point vector.
arm_status arm_conv_partial_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of floating-point sequences.
Instance structure for the floating-point IIR lattice filter.
Definition: arm_math.h:4087
void arm_q15_to_q7(q15_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q7 vector.
void arm_abs_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Q7 vector absolute value.
void arm_cfft_radix4_f32(const arm_cfft_radix4_instance_f32 *S, float32_t *pSrc)
void arm_conv_opt_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Convolution of Q7 sequences.
Instance structure for the Q7 FIR filter.
Definition: arm_math.h:1070
int64_t q63_t
64-bit fractional data type in 1.63 format.
Definition: arm_math.h:387
void arm_lms_norm_init_f32(arm_lms_norm_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize)
Initialization function for floating-point normalized LMS filter.
float32_t * pCoeffs
Definition: arm_math.h:1104
void arm_var_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Variance of the elements of a floating-point vector.
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1955
Instance structure for the floating-point FIR lattice filter.
Definition: arm_math.h:3964
void arm_fir_f32(const arm_fir_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR filter.
void arm_cmplx_mult_cmplx_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t numSamples)
Floating-point complex-by-complex multiplication.
static __INLINE void arm_circularWrite_f32(int32_t *circBuffer, int32_t L, uint16_t *writeOffset, int32_t bufferInc, const int32_t *src, int32_t srcInc, uint32_t blockSize)
floating-point Circular write function.
Definition: arm_math.h:6149
arm_status arm_dct4_init_q31(arm_dct4_instance_q31 *S, arm_rfft_instance_q31 *S_RFFT, arm_cfft_radix4_instance_q31 *S_CFFT, uint16_t N, uint16_t Nby2, q31_t normalize)
Initialization function for the Q31 DCT4/IDCT4.
Instance structure for the floating-point DCT4/IDCT4 function.
Definition: arm_math.h:2363
void arm_iir_lattice_init_f32(arm_iir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pkCoeffs, float32_t *pvCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point IIR lattice filter.
arm_status arm_mat_scale_q15(const arm_matrix_instance_q15 *pSrc, q15_t scaleFract, int32_t shift, arm_matrix_instance_q15 *pDst)
Q15 matrix scaling.
void arm_var_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Variance of the elements of a Q31 vector.
void arm_fir_sparse_f32(arm_fir_sparse_instance_f32 *S, float32_t *pSrc, float32_t *pDst, float32_t *pScratchIn, uint32_t blockSize)
Processing function for the floating-point sparse FIR filter.
void arm_abs_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Floating-point vector absolute value.
arm_status arm_mat_trans_f32(const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst)
Floating-point matrix transpose.
void arm_scale_q15(q15_t *pSrc, q15_t scaleFract, int8_t shift, q15_t *pDst, uint32_t blockSize)
Multiplies a Q15 vector by a scalar.
void arm_q31_to_q15(q31_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q15 vector.
void arm_lms_q15(const arm_lms_instance_q15 *S, q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 LMS filter.
void arm_biquad_cascade_df2T_init_f64(arm_biquad_cascade_df2T_instance_f64 *S, uint8_t numStages, float64_t *pCoeffs, float64_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter...
void arm_cmplx_mag_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude.
Instance structure for the Q15 sparse FIR filter.
Definition: arm_math.h:4724
CMSIS Cortex-M4 Core Peripheral Access Layer Header File.
const float32_t * pTwiddle
Definition: arm_math.h:2248
arm_status arm_cfft_radix2_init_q15(arm_cfft_radix2_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_status arm_cfft_radix4_init_q15(arm_cfft_radix4_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
Instance structure for the floating-point PID Control.
Definition: arm_math.h:1847
arm_status arm_sqrt_q31(q31_t in, q31_t *pOut)
Q31 square root function.
void arm_cmplx_mag_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude.
void arm_lms_norm_init_q31(arm_lms_norm_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint8_t postShift)
Initialization function for Q31 normalized LMS filter.
arm_status arm_mat_cmplx_mult_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pScratch)
Q15, complex, matrix multiplication.
void arm_rms_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Root Mean Square of the elements of a Q15 vector.
void arm_max_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Maximum value of a Q31 vector.
const arm_cfft_instance_q31 * pCfft
Definition: arm_math.h:2297
arm_status arm_mat_sub_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix subtraction.
void arm_sin_cos_q31(q31_t theta, q31_t *pSinVal, q31_t *pCosVal)
float32_t arm_sin_f32(float32_t x)
Fast approximation to the trigonometric sine function for floating-point data.
Instance structure for the floating-point FIR filter.
Definition: arm_math.h:1100
void arm_min_q7(q7_t *pSrc, uint32_t blockSize, q7_t *result, uint32_t *index)
Minimum value of a Q7 vector.
arm_status arm_dct4_init_f32(arm_dct4_instance_f32 *S, arm_rfft_instance_f32 *S_RFFT, arm_cfft_radix4_instance_f32 *S_CFFT, uint16_t N, uint16_t Nby2, float32_t normalize)
Initialization function for the floating-point DCT4/IDCT4.
arm_status arm_mat_inverse_f32(const arm_matrix_instance_f32 *src, arm_matrix_instance_f32 *dst)
Floating-point matrix inverse.
void arm_negate_q7(q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Negates the elements of a Q7 vector.
static __INLINE q7_t clip_q31_to_q7(q31_t x)
Clips Q31 to Q7 values.
Definition: arm_math.h:479
Instance structure for the fixed-point CFFT/CIFFT function.
Definition: arm_math.h:2227
void arm_add_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector addition.
const uint16_t * pBitRevTable
Definition: arm_math.h:2231
void arm_cfft_radix2_f32(const arm_cfft_radix2_instance_f32 *S, float32_t *pSrc)
static __INLINE void arm_circularRead_f32(int32_t *circBuffer, int32_t L, int32_t *readOffset, int32_t bufferInc, int32_t *dst, int32_t *dst_base, int32_t dst_length, int32_t dstInc, uint32_t blockSize)
floating-point Circular Read function.
Definition: arm_math.h:6194
void arm_fir_init_f32(arm_fir_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR filter.
void arm_pid_reset_q31(arm_pid_instance_q31 *S)
Reset function for the Q31 PID Control.
void arm_dot_prod_f32(float32_t *pSrcA, float32_t *pSrcB, uint32_t blockSize, float32_t *result)
Dot product of floating-point vectors.
void arm_lms_init_f32(arm_lms_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize)
Initialization function for floating-point LMS filter.
#define __SIMD32_CONST(addr)
Definition: arm_math.h:419
Instance structure for the Q31 LMS filter.
Definition: arm_math.h:4310
Instance structure for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_math.h:3834
arm_status arm_mat_mult_fast_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
void arm_copy_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Copies the elements of a floating-point vector.
void arm_correlate_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences.
arm_status arm_rfft_init_f32(arm_rfft_instance_f32 *S, arm_cfft_radix4_instance_f32 *S_CFFT, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
Instance structure for the floating-point RFFT/RIFFT function.
Definition: arm_math.h:2343
static __INLINE void arm_inv_clarke_q31(q31_t Ialpha, q31_t Ibeta, q31_t *pIa, q31_t *pIb)
Inverse Clarke transform for Q31 version.
Definition: arm_math.h:5424
arm_status arm_conv_partial_opt_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2)
Partial convolution of Q7 sequences.
void arm_cmplx_mult_real_q15(q15_t *pSrcCmplx, q15_t *pSrcReal, q15_t *pCmplxDst, uint32_t numSamples)
Q15 complex-by-real multiplication.
void arm_add_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector addition.
void arm_fir_interpolate_q31(const arm_fir_interpolate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR interpolator.
void arm_lms_init_q15(arm_lms_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint32_t postShift)
Initialization function for the Q15 LMS filter.
void arm_cfft_q31(const arm_cfft_instance_q31 *S, q31_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_status arm_conv_partial_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
static __INLINE void arm_inv_park_f32(float32_t Id, float32_t Iq, float32_t *pIalpha, float32_t *pIbeta, float32_t sinVal, float32_t cosVal)
Floating-point Inverse Park transform.
Definition: arm_math.h:5630
void arm_cfft_radix2_q31(const arm_cfft_radix2_instance_q31 *S, q31_t *pSrc)
void arm_cmplx_dot_prod_q15(q15_t *pSrcA, q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult)
Q15 complex dot product.
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1966
arm_status arm_mat_sub_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix subtraction.
Instance structure for the Q31 CFFT/CIFFT function.
Definition: arm_math.h:2126
void arm_fir_fast_q31(const arm_fir_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the fast Q31 FIR filter for Cortex-M3 and Cortex-M4.
void arm_mat_init_q31(arm_matrix_instance_q31 *S, uint16_t nRows, uint16_t nColumns, q31_t *pData)
Q31 matrix initialization.
void arm_iir_lattice_init_q31(arm_iir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pkCoeffs, q31_t *pvCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 IIR lattice filter.
CMSIS Cortex-M7 Core Peripheral Access Layer Header File.
void arm_lms_f32(const arm_lms_instance_f32 *S, float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point LMS filter.
static __INLINE uint32_t arm_recip_q15(q15_t in, q15_t *dst, q15_t *pRecipTable)
Function to Calculates 1/in (reciprocal) value of Q15 Data type.
Definition: arm_math.h:592
q31_t arm_cos_q31(q31_t x)
Fast approximation to the trigonometric cosine function for Q31 data.
q15_t arm_sin_q15(q15_t x)
Fast approximation to the trigonometric sine function for Q15 data.
arm_status arm_mat_trans_q15(const arm_matrix_instance_q15 *pSrc, arm_matrix_instance_q15 *pDst)
Q15 matrix transpose.
Instance structure for the Q7 sparse FIR filter.
Definition: arm_math.h:4738
Instance structure for the floating-point transposed direct form II Biquad cascade filter...
Definition: arm_math.h:3808
arm_status arm_cfft_radix2_init_f32(arm_cfft_radix2_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
void arm_fir_q31(const arm_fir_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR filter.
void arm_q7_to_q15(q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q15 vector.
Instance structure for the floating-point RFFT/RIFFT function.
Definition: arm_math.h:2315
arm_status arm_mat_add_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix addition.
void arm_rfft_fast_f32(arm_rfft_fast_instance_f32 *S, float32_t *p, float32_t *pOut, uint8_t ifftFlag)
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2245
void arm_cmplx_dot_prod_q31(q31_t *pSrcA, q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult)
Q31 complex dot product.
arm_status arm_rfft_init_q15(arm_rfft_instance_q15 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
void arm_fir_decimate_fast_q31(arm_fir_decimate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
void arm_shift_q7(q7_t *pSrc, int8_t shiftBits, q7_t *pDst, uint32_t blockSize)
Shifts the elements of a Q7 vector a specified number of bits.
Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
Definition: arm_math.h:2099
static __INLINE void arm_inv_park_q31(q31_t Id, q31_t Iq, q31_t *pIalpha, q31_t *pIbeta, q31_t sinVal, q31_t cosVal)
Inverse Park transform for Q31 version.
Definition: arm_math.h:5665
void arm_negate_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Negates the elements of a Q31 vector.
Instance structure for the Q31 sparse FIR filter.
Definition: arm_math.h:4710
arm_status arm_mat_scale_q31(const arm_matrix_instance_q31 *pSrc, q31_t scaleFract, int32_t shift, arm_matrix_instance_q31 *pDst)
Q31 matrix scaling.
void arm_mean_q7(q7_t *pSrc, uint32_t blockSize, q7_t *pResult)
Mean value of a Q7 vector.
static __INLINE q15_t arm_linear_interp_q15(q15_t *pYData, q31_t x, uint32_t nValues)
Process function for the Q15 Linear Interpolation Function.
Definition: arm_math.h:5884
arm_status arm_sqrt_q15(q15_t in, q15_t *pOut)
Q15 square root function.
void arm_conv_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
void arm_fir_lattice_q31(const arm_fir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR lattice filter.
void arm_dot_prod_q15(q15_t *pSrcA, q15_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q15 vectors.
void arm_fir_sparse_q15(arm_fir_sparse_instance_q15 *S, q15_t *pSrc, q15_t *pDst, q15_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q15 sparse FIR filter.
void arm_abs_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Q31 vector absolute value.
Instance structure for the floating-point LMS filter.
Definition: arm_math.h:4205
void arm_conv_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
void arm_mean_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Mean value of a floating-point vector.
void arm_cmplx_dot_prod_f32(float32_t *pSrcA, float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult)
Floating-point complex dot product.
Instance structure for the floating-point FIR decimator.
Definition: arm_math.h:3461
float32_t state[3]
Definition: arm_math.h:1852
static __INLINE q31_t clip_q63_to_q31(q63_t x)
Clips Q63 to Q31 values.
Definition: arm_math.h:459
double float64_t
64-bit floating-point type definition.
Definition: arm_math.h:397
static __INLINE float32_t arm_bilinear_interp_f32(const arm_bilinear_interp_instance_f32 *S, float32_t X, float32_t Y)
Floating-point bilinear interpolation.
Definition: arm_math.h:7137
arm_status arm_mat_cmplx_mult_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point, complex, matrix multiplication.
Instance structure for the Q31 DCT4/IDCT4 function.
Definition: arm_math.h:2410
void arm_cmplx_mult_cmplx_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t numSamples)
Q31 complex-by-complex multiplication.
void arm_conv_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences.
void arm_correlate_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences.
float32_t * pTwiddleAReal
Definition: arm_math.h:2322
void arm_biquad_cascade_df1_q31(const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 Biquad cascade filter.
CMSIS Cortex-M0+ Core Peripheral Access Layer Header File.
Instance structure for the Q31 FIR filter.
Definition: arm_math.h:1090
void arm_fir_sparse_init_q31(arm_fir_sparse_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q31 sparse FIR filter.
void arm_negate_f32(float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Negates the elements of a floating-point vector.
void arm_copy_q31(q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Copies the elements of a Q31 vector.
arm_cfft_radix4_instance_q15 * pCfft
Definition: arm_math.h:2465
Instance structure for the Q15 FIR lattice filter.
Definition: arm_math.h:3942
int16_t q15_t
16-bit fractional data type in 1.15 format.
Definition: arm_math.h:377
void arm_lms_init_q31(arm_lms_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint32_t postShift)
Initialization function for Q31 LMS filter.
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2181
#define INDEX_MASK
Definition: arm_math.h:317
arm_status arm_conv_partial_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
Instance structure for the Q15 IIR lattice filter.
Definition: arm_math.h:4065
void arm_std_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Standard deviation of the elements of a Q31 vector.
Instance structure for the Q31 normalized LMS filter.
Definition: arm_math.h:4416
void arm_negate_q15(q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Negates the elements of a Q15 vector.
void arm_fir_interpolate_q15(const arm_fir_interpolate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR interpolator.
Instance structure for the Q15 FIR decimator.
Definition: arm_math.h:3436
void arm_conv_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences.
arm_status arm_mat_add_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31 matrix addition.
void arm_float_to_q31(float32_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q31 vector.
void arm_pid_init_f32(arm_pid_instance_f32 *S, int32_t resetStateFlag)
Initialization function for the floating-point PID Control.
q31_t arm_sin_q31(q31_t x)
Fast approximation to the trigonometric sine function for Q31 data.
void arm_biquad_cas_df1_32x64_q31(const arm_biquad_cas_df1_32x64_ins_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
void arm_pid_reset_f32(arm_pid_instance_f32 *S)
Reset function for the floating-point PID Control.
void arm_cmplx_mag_squared_q15(q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude squared.
arm_status arm_conv_partial_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q7 sequences.
void arm_fill_q15(q15_t value, q15_t *pDst, uint32_t blockSize)
Fills a constant value into a Q15 vector.
void arm_fir_lattice_init_q15(arm_fir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pCoeffs, q15_t *pState)
Initialization function for the Q15 FIR lattice filter.
static __INLINE q63_t mult32x64(q63_t x, q31_t y)
Multiplies 32 X 64 and returns 32 bit result in 2.30 format.
Definition: arm_math.h:500
void arm_min_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Minimum value of a Q15 vector.
arm_rfft_instance_f32 * pRfft
Definition: arm_math.h:2370
arm_status arm_conv_partial_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q15 sequences.
arm_status arm_fir_decimate_init_f32(arm_fir_decimate_instance_f32 *S, uint16_t numTaps, uint8_t M, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR decimator.
Instance structure for the Q15 normalized LMS filter.
Definition: arm_math.h:4472
void arm_dot_prod_q31(q31_t *pSrcA, q31_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q31 vectors.
void arm_min_q31(q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Minimum value of a Q31 vector.
void arm_fir_lattice_init_f32(arm_fir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point FIR lattice filter.
void arm_biquad_cascade_df2T_f64(const arm_biquad_cascade_df2T_instance_f64 *S, float64_t *pSrc, float64_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter...
Instance structure for the Q15 matrix structure.
Definition: arm_math.h:1454
void arm_fir_q15(const arm_fir_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR filter.
arm_status arm_fir_interpolate_init_q15(arm_fir_interpolate_instance_q15 *S, uint8_t L, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR interpolator.
void arm_offset_q31(q31_t *pSrc, q31_t offset, q31_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q31 vector.
Instance structure for the floating-point sparse FIR filter.
Definition: arm_math.h:4696
void arm_fir_decimate_f32(const arm_fir_decimate_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR decimator.
Instance structure for the Q15 Biquad cascade filter.
Definition: arm_math.h:1264
arm_rfft_instance_q15 * pRfft
Definition: arm_math.h:2464
void arm_fir_lattice_init_q31(arm_fir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pCoeffs, q31_t *pState)
Initialization function for the Q31 FIR lattice filter.
static __INLINE float32_t arm_linear_interp_f32(arm_linear_interp_instance_f32 *S, float32_t x)
Process function for the floating-point Linear Interpolation Function.
Definition: arm_math.h:5763
void arm_biquad_cascade_df1_f32(const arm_biquad_casd_df1_inst_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point Biquad cascade filter.
arm_cfft_radix4_instance_f32 * pCfft
Definition: arm_math.h:2371
void arm_mult_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector multiplication.
void arm_mat_init_q15(arm_matrix_instance_q15 *S, uint16_t nRows, uint16_t nColumns, q15_t *pData)
Q15 matrix initialization.
void arm_fir_lattice_f32(const arm_fir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR lattice filter.
void arm_std_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Standard deviation of the elements of a Q15 vector.
void arm_dot_prod_q7(q7_t *pSrcA, q7_t *pSrcB, uint32_t blockSize, q31_t *result)
Dot product of Q7 vectors.
void arm_fir_decimate_q31(const arm_fir_decimate_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator.
void arm_offset_f32(float32_t *pSrc, float32_t offset, float32_t *pDst, uint32_t blockSize)
Adds a constant offset to a floating-point vector.
void arm_rfft_f32(const arm_rfft_instance_f32 *S, float32_t *pSrc, float32_t *pDst)
const q31_t * pTwiddle
Definition: arm_math.h:2230
static __INLINE void arm_park_f32(float32_t Ialpha, float32_t Ibeta, float32_t *pId, float32_t *pIq, float32_t sinVal, float32_t cosVal)
Floating-point Park transform.
Definition: arm_math.h:5511
Instance structure for the Q15 LMS filter.
Definition: arm_math.h:4255
void arm_max_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Maximum value of a Q15 vector.
Instance structure for the Q31 FIR interpolator.
Definition: arm_math.h:3629
void arm_var_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Variance of the elements of a Q15 vector.
void arm_biquad_cascade_df2T_f32(const arm_biquad_cascade_df2T_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter...
void arm_q7_to_q31(q7_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q31 vector.
Instance structure for the Q31 Biquad cascade filter.
Definition: arm_math.h:1277
void arm_shift_q31(q31_t *pSrc, int8_t shiftBits, q31_t *pDst, uint32_t blockSize)
Shifts the elements of a Q31 vector a specified number of bits.
arm_status arm_cfft_radix2_init_q31(arm_cfft_radix2_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_status arm_mat_cmplx_mult_q31(const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst)
Q31, complex, matrix multiplication.
arm_status arm_rfft_init_q31(arm_rfft_instance_q31 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
const q15_t * pTwiddle
Definition: arm_math.h:2212
void arm_biquad_cascade_stereo_df2T_init_f32(arm_biquad_cascade_stereo_df2T_instance_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter...
const uint16_t * pBitRevTable
Definition: arm_math.h:2249
static __INLINE void arm_park_q31(q31_t Ialpha, q31_t Ibeta, q31_t *pId, q31_t *pIq, q31_t sinVal, q31_t cosVal)
Park transform for Q31 version.
Definition: arm_math.h:5545
arm_status arm_fir_decimate_init_q15(arm_fir_decimate_instance_q15 *S, uint16_t numTaps, uint8_t M, q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR decimator.
arm_rfft_instance_q31 * pRfft
Definition: arm_math.h:2417
void arm_mult_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector multiplication.
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2153
void arm_rfft_q15(const arm_rfft_instance_q15 *S, q15_t *pSrc, q15_t *pDst)
void arm_correlate_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch)
Correlation of Q15 sequences.
static __INLINE void arm_clarke_f32(float32_t Ia, float32_t Ib, float32_t *pIalpha, float32_t *pIbeta)
Floating-point Clarke transform.
Definition: arm_math.h:5290
void arm_fir_sparse_init_f32(arm_fir_sparse_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the floating-point sparse FIR filter.
Instance structure for the Q15 FIR interpolator.
Definition: arm_math.h:3617
void arm_lms_norm_q31(arm_lms_norm_instance_q31 *S, q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 normalized LMS filter.
int32_t q31_t
32-bit fractional data type in 1.31 format.
Definition: arm_math.h:382
void arm_conv_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Convolution of Q15 sequences.
float32_t * pState
Definition: arm_math.h:4208
void arm_fir_lattice_q15(const arm_fir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR lattice filter.
Instance structure for the Q15 CFFT/CIFFT function.
Definition: arm_math.h:2072
Instance structure for the Q15 PID Control.
Definition: arm_math.h:1814
Instance structure for the Q15 DCT4/IDCT4 function.
Definition: arm_math.h:2457
Instance structure for the floating-point normalized LMS filter.
Definition: arm_math.h:4364
static __INLINE q31_t arm_bilinear_interp_q31(arm_bilinear_interp_instance_q31 *S, q31_t X, q31_t Y)
Q31 bilinear interpolation.
Definition: arm_math.h:7205
Instance structure for the Q31 RFFT/RIFFT function.
Definition: arm_math.h:2289
void arm_add_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector addition.
float32_t arm_cos_f32(float32_t x)
Fast approximation to the trigonometric cosine function for floating-point data.
static __INLINE void arm_circularWrite_q7(q7_t *circBuffer, int32_t L, uint16_t *writeOffset, int32_t bufferInc, const q7_t *src, int32_t srcInc, uint32_t blockSize)
Q7 Circular write function.
Definition: arm_math.h:6351
uint32_t twidCoefRModifier
Definition: arm_math.h:2268
void arm_rms_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Root Mean Square of the elements of a floating-point vector.
void arm_lms_norm_f32(arm_lms_norm_instance_f32 *S, float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point normalized LMS filter.
void arm_cmplx_mag_squared_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude squared.
void arm_cmplx_mult_cmplx_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t numSamples)
Q15 complex-by-complex multiplication.
void arm_biquad_cascade_df1_init_q15(arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, q15_t *pCoeffs, q15_t *pState, int8_t postShift)
Initialization function for the Q15 Biquad cascade filter.
static __INLINE q15_t clip_q63_to_q15(q63_t x)
Clips Q63 to Q15 values.
Definition: arm_math.h:469
arm_status arm_mat_inverse_f64(const arm_matrix_instance_f64 *src, arm_matrix_instance_f64 *dst)
Floating-point matrix inverse.
float32_t * pCosFactor
Definition: arm_math.h:2369
arm_status arm_mat_trans_q31(const arm_matrix_instance_q31 *pSrc, arm_matrix_instance_q31 *pDst)
Q31 matrix transpose.
void arm_fir_sparse_init_q7(arm_fir_sparse_instance_q7 *S, uint16_t numTaps, q7_t *pCoeffs, q7_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q7 sparse FIR filter.
void arm_lms_norm_q15(arm_lms_norm_instance_q15 *S, q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 normalized LMS filter.
arm_status arm_cfft_radix4_init_f32(arm_cfft_radix4_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
Instance structure for the high precision Q31 Biquad cascade filter.
Definition: arm_math.h:3761
void arm_biquad_cascade_df2T_init_f32(arm_biquad_cascade_df2T_instance_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter...
void arm_correlate_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Correlation of floating-point sequences.
void arm_fir_sparse_init_q15(arm_fir_sparse_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q15 sparse FIR filter.
Instance structure for the Q15 RFFT/RIFFT function.
Definition: arm_math.h:2263
static __INLINE q15_t arm_pid_q15(arm_pid_instance_q15 *S, q15_t in)
Process function for the Q15 PID Control.
Definition: arm_math.h:5171
Instance structure for the floating-point matrix structure.
Definition: arm_math.h:1443
arm_status arm_conv_partial_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences.
Instance structure for the Q15 CFFT/CIFFT function.
Definition: arm_math.h:2043
Instance structure for the floating-point matrix structure.
Definition: arm_math.h:1431
void arm_float_to_q7(float32_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q7 vector.
void arm_q15_to_q31(q15_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q31 vector.
void arm_fir_fast_q15(const arm_fir_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the fast Q15 FIR filter for Cortex-M3 and Cortex-M4.
const uint16_t * pBitRevTable
Definition: arm_math.h:2213
static __INLINE void arm_clarke_q31(q31_t Ia, q31_t Ib, q31_t *pIalpha, q31_t *pIbeta)
Clarke transform for Q31 version.
Definition: arm_math.h:5320
arm_status arm_mat_mult_f32(const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst)
Floating-point matrix multiplication.
void arm_biquad_cas_df1_32x64_init_q31(arm_biquad_cas_df1_32x64_ins_q31 *S, uint8_t numStages, q31_t *pCoeffs, q63_t *pState, uint8_t postShift)
Instance structure for the Q31 FIR decimator.
Definition: arm_math.h:3448
void arm_cfft_radix4_q31(const arm_cfft_radix4_instance_q31 *S, q31_t *pSrc)
uint32_t twidCoefRModifier
Definition: arm_math.h:2321
void arm_correlate_opt_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Correlation of Q7 sequences.
void arm_float_to_q15(float32_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q15 vector.
Instance structure for the fixed-point CFFT/CIFFT function.
Definition: arm_math.h:2209
float32_t * pState
Definition: arm_math.h:1103
void arm_max_q7(q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex)
Maximum value of a Q7 vector.
void arm_conv_f32(float32_t *pSrcA, uint32_t srcALen, float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Convolution of floating-point sequences.
static __INLINE uint32_t arm_recip_q31(q31_t in, q31_t *dst, q31_t *pRecipTable)
Function to Calculates 1/in (reciprocal) value of Q31 Data type.
Definition: arm_math.h:541
void arm_biquad_cascade_df1_init_f32(arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point Biquad cascade filter.
static __INLINE float32_t arm_pid_f32(arm_pid_instance_f32 *S, float32_t in)
Process function for the floating-point PID Control.
Definition: arm_math.h:5088
void arm_q7_to_float(q7_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to floating-point vector.
arm_status arm_conv_partial_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2)
Partial convolution of Q15 sequences.
arm_status arm_mat_scale_f32(const arm_matrix_instance_f32 *pSrc, float32_t scale, arm_matrix_instance_f32 *pDst)
Floating-point matrix scaling.
void arm_cmplx_conj_f32(float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex conjugate.
void arm_correlate_fast_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
static __INLINE q15_t arm_bilinear_interp_q15(arm_bilinear_interp_instance_q15 *S, q31_t X, q31_t Y)
Q15 bilinear interpolation.
Definition: arm_math.h:7281
void arm_lms_norm_init_q15(arm_lms_norm_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint8_t postShift)
Initialization function for Q15 normalized LMS filter.
void arm_fir_sparse_q7(arm_fir_sparse_instance_q7 *S, q7_t *pSrc, q7_t *pDst, q7_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q7 sparse FIR filter.
void arm_correlate_fast_q31(q31_t *pSrcA, uint32_t srcALen, q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
void arm_offset_q7(q7_t *pSrc, q7_t offset, q7_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q7 vector.
uint32_t twidCoefRModifier
Definition: arm_math.h:2294
arm_status arm_mat_sub_q15(const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst)
Q15 matrix subtraction.
void arm_dct4_q31(const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer)
Processing function for the Q31 DCT4/IDCT4.
void arm_dct4_q15(const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)
Processing function for the Q15 DCT4/IDCT4.
void arm_cfft_radix2_q15(const arm_cfft_radix2_instance_q15 *S, q15_t *pSrc)
static __INLINE q7_t arm_linear_interp_q7(q7_t *pYData, q31_t x, uint32_t nValues)
Process function for the Q7 Linear Interpolation Function.
Definition: arm_math.h:5944
static __INLINE q31_t arm_linear_interp_q31(q31_t *pYData, q31_t x, uint32_t nValues)
Process function for the Q31 Linear Interpolation Function.
Definition: arm_math.h:5822
void arm_correlate_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Correlation of Q7 sequences.
void arm_sub_q15(q15_t *pSrcA, q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector subtraction.
void arm_fill_f32(float32_t value, float32_t *pDst, uint32_t blockSize)
Fills a constant value into a floating-point vector.
void arm_mult_f32(float32_t *pSrcA, float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector multiplication.
void arm_power_q15(q15_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q15 vector.
void arm_biquad_cascade_df1_fast_q31(const arm_biquad_casd_df1_inst_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-...
Instance structure for the floating-point Linear Interpolate function.
Definition: arm_math.h:1921
void arm_iir_lattice_q31(const arm_iir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 IIR lattice filter.
void arm_fir_q7(const arm_fir_instance_q7 *S, q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Processing function for the Q7 FIR filter.
arm_status arm_conv_partial_fast_opt_q15(q15_t *pSrcA, uint32_t srcALen, q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2)
Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
void arm_mult_q7(q7_t *pSrcA, q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector multiplication.
void arm_sub_q31(q31_t *pSrcA, q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector subtraction.
Instance structure for the floating-point Biquad cascade filter.
Definition: arm_math.h:1289
void arm_mean_q15(q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Mean value of a Q15 vector.
float32_t * pCoeffs
Definition: arm_math.h:4209
arm_status
Error status returned by some functions in the library.
Definition: arm_math.h:358
void arm_biquad_cascade_df1_init_q31(arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, q31_t *pCoeffs, q31_t *pState, int8_t postShift)
Initialization function for the Q31 Biquad cascade filter.
void arm_cmplx_mult_real_q31(q31_t *pSrcCmplx, q31_t *pSrcReal, q31_t *pCmplxDst, uint32_t numSamples)
Q31 complex-by-real multiplication.
void arm_conv_q7(q7_t *pSrcA, uint32_t srcALen, q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Convolution of Q7 sequences.
Instance structure for the floating-point bilinear interpolation function.
Definition: arm_math.h:1933
void arm_iir_lattice_q15(const arm_iir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 IIR lattice filter.
arm_cfft_instance_f32 Sint
Definition: arm_math.h:2345
Instance structure for the Q31 matrix structure.
Definition: arm_math.h:1466
void arm_shift_q15(q15_t *pSrc, int8_t shiftBits, q15_t *pDst, uint32_t blockSize)
Shifts the elements of a Q15 vector a specified number of bits.
arm_status arm_cfft_radix4_init_q31(arm_cfft_radix4_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
void arm_min_f32(float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Minimum value of a floating-point vector.
void arm_iir_lattice_init_q15(arm_iir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pkCoeffs, q15_t *pvCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 IIR lattice filter.
q15_t arm_cos_q15(q15_t x)
Fast approximation to the trigonometric cosine function for Q15 data.
void arm_fir_decimate_q15(const arm_fir_decimate_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator.
void arm_fir_interpolate_f32(const arm_fir_interpolate_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR interpolator.
void arm_cmplx_conj_q31(q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex conjugate.
arm_status arm_fir_interpolate_init_f32(arm_fir_interpolate_instance_f32 *S, uint8_t L, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR interpolator.
void arm_fir_init_q31(arm_fir_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR filter.
void arm_sin_cos_f32(float32_t theta, float32_t *pSinVal, float32_t *pCcosVal)
void arm_power_q31(q31_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q31 vector.
Instance structure for the Q31 PID Control.
Definition: arm_math.h:1832


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:18