Callisto4Bootloader: CMSIS/arm_math.h Source File

Callisto4Bootloader

arm_math.h
Go to the documentation of this file.
1 /******************************************************************************
2 * @file arm_math.h
3 * @brief Public header file for CMSIS DSP Library
4 * @version V1.6.0
5 * @date 18. March 2019
6 ******************************************************************************/
7 /*
8 * Copyright (c) 2010-2019 Arm Limited or its affiliates. All rights reserved.
9 *
10 * SPDX-License-Identifier: Apache-2.0
11 *
12 * Licensed under the Apache License, Version 2.0 (the License); you may
13 * not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 */
24
267 #ifndef _ARM_MATH_H
268 #define _ARM_MATH_H
269
270 /* Compiler specific diagnostic adjustment */
271 #if defined ( __CC_ARM )
272
273 #elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
274
275 #elif defined ( __GNUC__ )
276 #pragma GCC diagnostic push
277 #pragma GCC diagnostic ignored "-Wsign-conversion"
278 #pragma GCC diagnostic ignored "-Wconversion"
279 #pragma GCC diagnostic ignored "-Wunused-parameter"
280
281 #elif defined ( __ICCARM__ )
282
283 #elif defined ( __TI_ARM__ )
284
285 #elif defined ( __CSMC__ )
286
287 #elif defined ( __TASKING__ )
288
289 #else
290 #error Unknown compiler
291 #endif
292
293
294 #include "cmsis_compiler.h"
295 #include "string.h"
296 #include "math.h"
297
298 /* evaluate ARM architecture */
299 #if defined (__ARM_ARCH_6M__)
300 #define ARM_MATH_CM0_FAMILY 1
301 #elif defined (__ARM_ARCH_7M__)
302 //#define ARM_MATH_CM0_FAMILY 0
303 #elif defined (__ARM_ARCH_7EM__)
304 //#define ARM_MATH_CM0_FAMILY 0
305 #elif defined (__ARM_ARCH_8M_BASE__)
306 #define ARM_MATH_CM0_FAMILY 1
307 #elif defined (__ARM_ARCH_8M_MAIN__)
308 //#define ARM_MATH_CM0_FAMILY 0
309 #else
310 #error "Unknown Arm Architecture!"
311 #endif
312
313 /* evaluate ARM DSP feature */
314 #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
315 #define ARM_MATH_DSP 1
316 #endif
317
318
319
320
321 #ifdef __cplusplus
322 extern "C"
323 {
324 #endif
325
326
331 #define DELTA_Q31 (0x100)
332 #define DELTA_Q15 0x5
333 #define INDEX_MASK 0x0000003F
334 #ifndef PI
335 #define PI 3.14159265358979f
336 #endif
337
342 #define FAST_MATH_TABLE_SIZE 512
343 #define FAST_MATH_Q31_SHIFT (32 - 10)
344 #define FAST_MATH_Q15_SHIFT (16 - 10)
345 #define CONTROLLER_Q31_SHIFT (32 - 9)
346 #define TABLE_SPACING_Q31 0x400000
347 #define TABLE_SPACING_Q15 0x80
348
352 /* 1.31(q31) Fixed value of 2/360 */
353 /* -1 to +1 is divided into 360 values so total spacing is (2/360) */
354 #define INPUT_SPACING 0xB60B61
355
356
361 typedef enum
362 {
363 ARM_MATH_SUCCESS = 0,
364 ARM_MATH_ARGUMENT_ERROR = -1,
365 ARM_MATH_LENGTH_ERROR = -2,
366 ARM_MATH_SIZE_MISMATCH = -3,
367 ARM_MATH_NANINF = -4,
368 ARM_MATH_SINGULAR = -5,
369 ARM_MATH_TEST_FAILURE = -6
370 } arm_status;
371
375 typedef int8_t q7_t;
376
380 typedef int16_t q15_t;
381
385 typedef int32_t q31_t;
386
390 typedef int64_t q63_t;
391
395 typedef float float32_t;
396
400 typedef double float64_t;
401
402
407 #if defined ( __CC_ARM )
408 #define __SIMD32_TYPE int32_t __packed
409 #elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
410 #define __SIMD32_TYPE int32_t
411 #elif defined ( __GNUC__ )
412 #define __SIMD32_TYPE int32_t
413 #elif defined ( __ICCARM__ )
414 #define __SIMD32_TYPE int32_t __packed
415 #elif defined ( __TI_ARM__ )
416 #define __SIMD32_TYPE int32_t
417 #elif defined ( __CSMC__ )
418 #define __SIMD32_TYPE int32_t
419 #elif defined ( __TASKING__ )
420 #define __SIMD32_TYPE __unaligned int32_t
421 #else
422 #error Unknown compiler
423 #endif
424
425 #define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
426 #define __SIMD32_CONST(addr) ( (__SIMD32_TYPE * ) (addr))
427 #define _SIMD32_OFFSET(addr) (*(__SIMD32_TYPE * ) (addr))
428 #define __SIMD64(addr) (*( int64_t **) & (addr))
429
430 /* SIMD replacement */
431
437 __STATIC_FORCEINLINE q31_t read_q15x2 (
438 q15_t * pQ15)
439 {
440 q31_t val;
441
442 memcpy (&val, pQ15, 4);
443
444 return (val);
445 }
446
452 __STATIC_FORCEINLINE q31_t read_q15x2_ia (
453 q15_t ** pQ15)
454 {
455 q31_t val;
456
457 memcpy (&val, *pQ15, 4);
458 *pQ15 += 2;
459
460 return (val);
461 }
462
468 __STATIC_FORCEINLINE q31_t read_q15x2_da (
469 q15_t ** pQ15)
470 {
471 q31_t val;
472
473 memcpy (&val, *pQ15, 4);
474 *pQ15 -= 2;
475
476 return (val);
477 }
478
485 __STATIC_FORCEINLINE void write_q15x2_ia (
486 q15_t ** pQ15,
487 q31_t value)
488 {
489 q31_t val = value;
490
491 memcpy (*pQ15, &val, 4);
492 *pQ15 += 2;
493 }
494
501 __STATIC_FORCEINLINE void write_q15x2 (
502 q15_t * pQ15,
503 q31_t value)
504 {
505 q31_t val = value;
506
507 memcpy (pQ15, &val, 4);
508 }
509
510
516 __STATIC_FORCEINLINE q31_t read_q7x4_ia (
517 q7_t ** pQ7)
518 {
519 q31_t val;
520
521 memcpy (&val, *pQ7, 4);
522 *pQ7 += 4;
523
524 return (val);
525 }
526
532 __STATIC_FORCEINLINE q31_t read_q7x4_da (
533 q7_t ** pQ7)
534 {
535 q31_t val;
536
537 memcpy (&val, *pQ7, 4);
538 *pQ7 -= 4;
539
540 return (val);
541 }
542
549 __STATIC_FORCEINLINE void write_q7x4_ia (
550 q7_t ** pQ7,
551 q31_t value)
552 {
553 q31_t val = value;
554
555 memcpy (*pQ7, &val, 4);
556 *pQ7 += 4;
557 }
558
559
560 #ifndef ARM_MATH_DSP
561
564 #define __PKHBT(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0x0000FFFF) | \
565 (((int32_t)(ARG2) << ARG3) & (int32_t)0xFFFF0000) )
566 #define __PKHTB(ARG1, ARG2, ARG3) ( (((int32_t)(ARG1) << 0) & (int32_t)0xFFFF0000) | \
567 (((int32_t)(ARG2) >> ARG3) & (int32_t)0x0000FFFF) )
568 #endif
569
573 #ifndef ARM_MATH_BIG_ENDIAN
574 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v0) << 0) & (int32_t)0x000000FF) | \
575 (((int32_t)(v1) << 8) & (int32_t)0x0000FF00) | \
576 (((int32_t)(v2) << 16) & (int32_t)0x00FF0000) | \
577 (((int32_t)(v3) << 24) & (int32_t)0xFF000000) )
578 #else
579 #define __PACKq7(v0,v1,v2,v3) ( (((int32_t)(v3) << 0) & (int32_t)0x000000FF) | \
580 (((int32_t)(v2) << 8) & (int32_t)0x0000FF00) | \
581 (((int32_t)(v1) << 16) & (int32_t)0x00FF0000) | \
582 (((int32_t)(v0) << 24) & (int32_t)0xFF000000) )
583 #endif
584
585
589 __STATIC_FORCEINLINE q31_t clip_q63_to_q31(
590 q63_t x)
591 {
592 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
593 ((0x7FFFFFFF ^ ((q31_t) (x >> 63)))) : (q31_t) x;
594 }
595
599 __STATIC_FORCEINLINE q15_t clip_q63_to_q15(
600 q63_t x)
601 {
602 return ((q31_t) (x >> 32) != ((q31_t) x >> 31)) ?
603 ((0x7FFF ^ ((q15_t) (x >> 63)))) : (q15_t) (x >> 15);
604 }
605
609 __STATIC_FORCEINLINE q7_t clip_q31_to_q7(
610 q31_t x)
611 {
612 return ((q31_t) (x >> 24) != ((q31_t) x >> 23)) ?
613 ((0x7F ^ ((q7_t) (x >> 31)))) : (q7_t) x;
614 }
615
619 __STATIC_FORCEINLINE q15_t clip_q31_to_q15(
620 q31_t x)
621 {
622 return ((q31_t) (x >> 16) != ((q31_t) x >> 15)) ?
623 ((0x7FFF ^ ((q15_t) (x >> 31)))) : (q15_t) x;
624 }
625
629 __STATIC_FORCEINLINE q63_t mult32x64(
630 q63_t x,
631 q31_t y)
632 {
633 return ((((q63_t) (x & 0x00000000FFFFFFFF) * y) >> 32) +
634 (((q63_t) (x >> 32) * y) ) );
635 }
636
640 __STATIC_FORCEINLINE uint32_t arm_recip_q31(
641 q31_t in,
642 q31_t * dst,
643 const q31_t * pRecipTable)
644 {
645 q31_t out;
646 uint32_t tempVal;
647 uint32_t index, i;
648 uint32_t signBits;
649
650 if (in > 0)
651 {
652 signBits = ((uint32_t) (__CLZ( in) - 1));
653 }
654 else
655 {
656 signBits = ((uint32_t) (__CLZ(-in) - 1));
657 }
658
659 /* Convert input sample to 1.31 format */
660 in = (in << signBits);
661
662 /* calculation of index for initial approximated Val */
663 index = (uint32_t)(in >> 24);
664 index = (index & INDEX_MASK);
665
666 /* 1.31 with exp 1 */
667 out = pRecipTable[index];
668
669 /* calculation of reciprocal value */
670 /* running approximation for two iterations */
671 for (i = 0U; i < 2U; i++)
672 {
673 tempVal = (uint32_t) (((q63_t) in * out) >> 31);
674 tempVal = 0x7FFFFFFFu - tempVal;
675 /* 1.31 with exp 1 */
676 /* out = (q31_t) (((q63_t) out * tempVal) >> 30); */
677 out = clip_q63_to_q31(((q63_t) out * tempVal) >> 30);
678 }
679
680 /* write output */
681 *dst = out;
682
683 /* return num of signbits of out = 1/in value */
684 return (signBits + 1U);
685 }
686
687
691 __STATIC_FORCEINLINE uint32_t arm_recip_q15(
692 q15_t in,
693 q15_t * dst,
694 const q15_t * pRecipTable)
695 {
696 q15_t out = 0;
697 uint32_t tempVal = 0;
698 uint32_t index = 0, i = 0;
699 uint32_t signBits = 0;
700
701 if (in > 0)
702 {
703 signBits = ((uint32_t)(__CLZ( in) - 17));
704 }
705 else
706 {
707 signBits = ((uint32_t)(__CLZ(-in) - 17));
708 }
709
710 /* Convert input sample to 1.15 format */
711 in = (in << signBits);
712
713 /* calculation of index for initial approximated Val */
714 index = (uint32_t)(in >> 8);
715 index = (index & INDEX_MASK);
716
717 /* 1.15 with exp 1 */
718 out = pRecipTable[index];
719
720 /* calculation of reciprocal value */
721 /* running approximation for two iterations */
722 for (i = 0U; i < 2U; i++)
723 {
724 tempVal = (uint32_t) (((q31_t) in * out) >> 15);
725 tempVal = 0x7FFFu - tempVal;
726 /* 1.15 with exp 1 */
727 out = (q15_t) (((q31_t) out * tempVal) >> 14);
728 /* out = clip_q31_to_q15(((q31_t) out * tempVal) >> 14); */
729 }
730
731 /* write output */
732 *dst = out;
733
734 /* return num of signbits of out = 1/in value */
735 return (signBits + 1);
736 }
737
738
739 /*
740 * @brief C custom defined intrinsic functions
741 */
742 #if !defined (ARM_MATH_DSP)
743
744 /*
745 * @brief C custom defined QADD8
746 */
747 __STATIC_FORCEINLINE uint32_t __QADD8(
748 uint32_t x,
749 uint32_t y)
750 {
751 q31_t r, s, t, u;
752
753 r = __SSAT(((((q31_t)x << 24) >> 24) + (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
754 s = __SSAT(((((q31_t)x << 16) >> 24) + (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
755 t = __SSAT(((((q31_t)x << 8) >> 24) + (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
756 u = __SSAT(((((q31_t)x ) >> 24) + (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF;
757
758 return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r )));
759 }
760
761
762 /*
763 * @brief C custom defined QSUB8
764 */
765 __STATIC_FORCEINLINE uint32_t __QSUB8(
766 uint32_t x,
767 uint32_t y)
768 {
769 q31_t r, s, t, u;
770
771 r = __SSAT(((((q31_t)x << 24) >> 24) - (((q31_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF;
772 s = __SSAT(((((q31_t)x << 16) >> 24) - (((q31_t)y << 16) >> 24)), 8) & (int32_t)0x000000FF;
773 t = __SSAT(((((q31_t)x << 8) >> 24) - (((q31_t)y << 8) >> 24)), 8) & (int32_t)0x000000FF;
774 u = __SSAT(((((q31_t)x ) >> 24) - (((q31_t)y ) >> 24)), 8) & (int32_t)0x000000FF;
775
776 return ((uint32_t)((u << 24) | (t << 16) | (s << 8) | (r )));
777 }
778
779
780 /*
781 * @brief C custom defined QADD16
782 */
783 __STATIC_FORCEINLINE uint32_t __QADD16(
784 uint32_t x,
785 uint32_t y)
786 {
787 /* q31_t r, s; without initialisation 'arm_offset_q15 test' fails but 'intrinsic' tests pass! for armCC */
788 q31_t r = 0, s = 0;
789
790 r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
791 s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
792
793 return ((uint32_t)((s << 16) | (r )));
794 }
795
796
797 /*
798 * @brief C custom defined SHADD16
799 */
800 __STATIC_FORCEINLINE uint32_t __SHADD16(
801 uint32_t x,
802 uint32_t y)
803 {
804 q31_t r, s;
805
806 r = (((((q31_t)x << 16) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
807 s = (((((q31_t)x ) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
808
809 return ((uint32_t)((s << 16) | (r )));
810 }
811
812
813 /*
814 * @brief C custom defined QSUB16
815 */
816 __STATIC_FORCEINLINE uint32_t __QSUB16(
817 uint32_t x,
818 uint32_t y)
819 {
820 q31_t r, s;
821
822 r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
823 s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
824
825 return ((uint32_t)((s << 16) | (r )));
826 }
827
828
829 /*
830 * @brief C custom defined SHSUB16
831 */
832 __STATIC_FORCEINLINE uint32_t __SHSUB16(
833 uint32_t x,
834 uint32_t y)
835 {
836 q31_t r, s;
837
838 r = (((((q31_t)x << 16) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
839 s = (((((q31_t)x ) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
840
841 return ((uint32_t)((s << 16) | (r )));
842 }
843
844
845 /*
846 * @brief C custom defined QASX
847 */
848 __STATIC_FORCEINLINE uint32_t __QASX(
849 uint32_t x,
850 uint32_t y)
851 {
852 q31_t r, s;
853
854 r = __SSAT(((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
855 s = __SSAT(((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
856
857 return ((uint32_t)((s << 16) | (r )));
858 }
859
860
861 /*
862 * @brief C custom defined SHASX
863 */
864 __STATIC_FORCEINLINE uint32_t __SHASX(
865 uint32_t x,
866 uint32_t y)
867 {
868 q31_t r, s;
869
870 r = (((((q31_t)x << 16) >> 16) - (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
871 s = (((((q31_t)x ) >> 16) + (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
872
873 return ((uint32_t)((s << 16) | (r )));
874 }
875
876
877 /*
878 * @brief C custom defined QSAX
879 */
880 __STATIC_FORCEINLINE uint32_t __QSAX(
881 uint32_t x,
882 uint32_t y)
883 {
884 q31_t r, s;
885
886 r = __SSAT(((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)), 16) & (int32_t)0x0000FFFF;
887 s = __SSAT(((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)), 16) & (int32_t)0x0000FFFF;
888
889 return ((uint32_t)((s << 16) | (r )));
890 }
891
892
893 /*
894 * @brief C custom defined SHSAX
895 */
896 __STATIC_FORCEINLINE uint32_t __SHSAX(
897 uint32_t x,
898 uint32_t y)
899 {
900 q31_t r, s;
901
902 r = (((((q31_t)x << 16) >> 16) + (((q31_t)y ) >> 16)) >> 1) & (int32_t)0x0000FFFF;
903 s = (((((q31_t)x ) >> 16) - (((q31_t)y << 16) >> 16)) >> 1) & (int32_t)0x0000FFFF;
904
905 return ((uint32_t)((s << 16) | (r )));
906 }
907
908
909 /*
910 * @brief C custom defined SMUSDX
911 */
912 __STATIC_FORCEINLINE uint32_t __SMUSDX(
913 uint32_t x,
914 uint32_t y)
915 {
916 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) -
917 ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) ));
918 }
919
920 /*
921 * @brief C custom defined SMUADX
922 */
923 __STATIC_FORCEINLINE uint32_t __SMUADX(
924 uint32_t x,
925 uint32_t y)
926 {
927 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
928 ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) ));
929 }
930
931
932 /*
933 * @brief C custom defined QADD
934 */
935 __STATIC_FORCEINLINE int32_t __QADD(
936 int32_t x,
937 int32_t y)
938 {
939 return ((int32_t)(clip_q63_to_q31((q63_t)x + (q31_t)y)));
940 }
941
942
943 /*
944 * @brief C custom defined QSUB
945 */
946 __STATIC_FORCEINLINE int32_t __QSUB(
947 int32_t x,
948 int32_t y)
949 {
950 return ((int32_t)(clip_q63_to_q31((q63_t)x - (q31_t)y)));
951 }
952
953
954 /*
955 * @brief C custom defined SMLAD
956 */
957 __STATIC_FORCEINLINE uint32_t __SMLAD(
958 uint32_t x,
959 uint32_t y,
960 uint32_t sum)
961 {
962 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
963 ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) +
964 ( ((q31_t)sum ) ) ));
965 }
966
967
968 /*
969 * @brief C custom defined SMLADX
970 */
971 __STATIC_FORCEINLINE uint32_t __SMLADX(
972 uint32_t x,
973 uint32_t y,
974 uint32_t sum)
975 {
976 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
977 ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
978 ( ((q31_t)sum ) ) ));
979 }
980
981
982 /*
983 * @brief C custom defined SMLSDX
984 */
985 __STATIC_FORCEINLINE uint32_t __SMLSDX(
986 uint32_t x,
987 uint32_t y,
988 uint32_t sum)
989 {
990 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) -
991 ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
992 ( ((q31_t)sum ) ) ));
993 }
994
995
996 /*
997 * @brief C custom defined SMLALD
998 */
999 __STATIC_FORCEINLINE uint64_t __SMLALD(
1000 uint32_t x,
1001 uint32_t y,
1002 uint64_t sum)
1003 {
1004 /* return (sum + ((q15_t) (x >> 16) * (q15_t) (y >> 16)) + ((q15_t) x * (q15_t) y)); */
1005 return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
1006 ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) +
1007 ( ((q63_t)sum ) ) ));
1008 }
1009
1010
1011 /*
1012 * @brief C custom defined SMLALDX
1013 */
1014 __STATIC_FORCEINLINE uint64_t __SMLALDX(
1015 uint32_t x,
1016 uint32_t y,
1017 uint64_t sum)
1018 {
1019 /* return (sum + ((q15_t) (x >> 16) * (q15_t) y)) + ((q15_t) x * (q15_t) (y >> 16)); */
1020 return ((uint64_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y ) >> 16)) +
1021 ((((q31_t)x ) >> 16) * (((q31_t)y << 16) >> 16)) +
1022 ( ((q63_t)sum ) ) ));
1023 }
1024
1025
1026 /*
1027 * @brief C custom defined SMUAD
1028 */
1029 __STATIC_FORCEINLINE uint32_t __SMUAD(
1030 uint32_t x,
1031 uint32_t y)
1032 {
1033 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) +
1034 ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) ));
1035 }
1036
1037
1038 /*
1039 * @brief C custom defined SMUSD
1040 */
1041 __STATIC_FORCEINLINE uint32_t __SMUSD(
1042 uint32_t x,
1043 uint32_t y)
1044 {
1045 return ((uint32_t)(((((q31_t)x << 16) >> 16) * (((q31_t)y << 16) >> 16)) -
1046 ((((q31_t)x ) >> 16) * (((q31_t)y ) >> 16)) ));
1047 }
1048
1049
1050 /*
1051 * @brief C custom defined SXTB16
1052 */
1053 __STATIC_FORCEINLINE uint32_t __SXTB16(
1054 uint32_t x)
1055 {
1056 return ((uint32_t)(((((q31_t)x << 24) >> 24) & (q31_t)0x0000FFFF) |
1057 ((((q31_t)x << 8) >> 8) & (q31_t)0xFFFF0000) ));
1058 }
1059
1060 /*
1061 * @brief C custom defined SMMLA
1062 */
1063 __STATIC_FORCEINLINE int32_t __SMMLA(
1064 int32_t x,
1065 int32_t y,
1066 int32_t sum)
1067 {
1068 return (sum + (int32_t) (((int64_t) x * y) >> 32));
1069 }
1070
1071 #endif /* !defined (ARM_MATH_DSP) */
1072
1073
1077 typedef struct
1078 {
1079 uint16_t numTaps;
1080 q7_t *pState;
1081 const q7_t *pCoeffs;
1082 } arm_fir_instance_q7;
1083
1087 typedef struct
1088 {
1089 uint16_t numTaps;
1090 q15_t *pState;
1091 const q15_t *pCoeffs;
1092 } arm_fir_instance_q15;
1093
1097 typedef struct
1098 {
1099 uint16_t numTaps;
1100 q31_t *pState;
1101 const q31_t *pCoeffs;
1102 } arm_fir_instance_q31;
1103
1107 typedef struct
1108 {
1109 uint16_t numTaps;
1110 float32_t *pState;
1111 const float32_t *pCoeffs;
1112 } arm_fir_instance_f32;
1113
1121 void arm_fir_q7(
1122 const arm_fir_instance_q7 * S,
1123 const q7_t * pSrc,
1124 q7_t * pDst,
1125 uint32_t blockSize);
1126
1135 void arm_fir_init_q7(
1136 arm_fir_instance_q7 * S,
1137 uint16_t numTaps,
1138 const q7_t * pCoeffs,
1139 q7_t * pState,
1140 uint32_t blockSize);
1141
1149 void arm_fir_q15(
1150 const arm_fir_instance_q15 * S,
1151 const q15_t * pSrc,
1152 q15_t * pDst,
1153 uint32_t blockSize);
1154
1162 void arm_fir_fast_q15(
1163 const arm_fir_instance_q15 * S,
1164 const q15_t * pSrc,
1165 q15_t * pDst,
1166 uint32_t blockSize);
1167
1179 arm_status arm_fir_init_q15(
1180 arm_fir_instance_q15 * S,
1181 uint16_t numTaps,
1182 const q15_t * pCoeffs,
1183 q15_t * pState,
1184 uint32_t blockSize);
1185
1193 void arm_fir_q31(
1194 const arm_fir_instance_q31 * S,
1195 const q31_t * pSrc,
1196 q31_t * pDst,
1197 uint32_t blockSize);
1198
1206 void arm_fir_fast_q31(
1207 const arm_fir_instance_q31 * S,
1208 const q31_t * pSrc,
1209 q31_t * pDst,
1210 uint32_t blockSize);
1211
1220 void arm_fir_init_q31(
1221 arm_fir_instance_q31 * S,
1222 uint16_t numTaps,
1223 const q31_t * pCoeffs,
1224 q31_t * pState,
1225 uint32_t blockSize);
1226
1234 void arm_fir_f32(
1235 const arm_fir_instance_f32 * S,
1236 const float32_t * pSrc,
1237 float32_t * pDst,
1238 uint32_t blockSize);
1239
1248 void arm_fir_init_f32(
1249 arm_fir_instance_f32 * S,
1250 uint16_t numTaps,
1251 const float32_t * pCoeffs,
1252 float32_t * pState,
1253 uint32_t blockSize);
1254
1258 typedef struct
1259 {
1260 int8_t numStages;
1261 q15_t *pState;
1262 const q15_t *pCoeffs;
1263 int8_t postShift;
1264 } arm_biquad_casd_df1_inst_q15;
1265
1269 typedef struct
1270 {
1271 uint32_t numStages;
1272 q31_t *pState;
1273 const q31_t *pCoeffs;
1274 uint8_t postShift;
1275 } arm_biquad_casd_df1_inst_q31;
1276
1280 typedef struct
1281 {
1282 uint32_t numStages;
1283 float32_t *pState;
1284 const float32_t *pCoeffs;
1285 } arm_biquad_casd_df1_inst_f32;
1286
1294 void arm_biquad_cascade_df1_q15(
1295 const arm_biquad_casd_df1_inst_q15 * S,
1296 const q15_t * pSrc,
1297 q15_t * pDst,
1298 uint32_t blockSize);
1299
1308 void arm_biquad_cascade_df1_init_q15(
1309 arm_biquad_casd_df1_inst_q15 * S,
1310 uint8_t numStages,
1311 const q15_t * pCoeffs,
1312 q15_t * pState,
1313 int8_t postShift);
1314
1322 void arm_biquad_cascade_df1_fast_q15(
1323 const arm_biquad_casd_df1_inst_q15 * S,
1324 const q15_t * pSrc,
1325 q15_t * pDst,
1326 uint32_t blockSize);
1327
1335 void arm_biquad_cascade_df1_q31(
1336 const arm_biquad_casd_df1_inst_q31 * S,
1337 const q31_t * pSrc,
1338 q31_t * pDst,
1339 uint32_t blockSize);
1340
1348 void arm_biquad_cascade_df1_fast_q31(
1349 const arm_biquad_casd_df1_inst_q31 * S,
1350 const q31_t * pSrc,
1351 q31_t * pDst,
1352 uint32_t blockSize);
1353
1362 void arm_biquad_cascade_df1_init_q31(
1363 arm_biquad_casd_df1_inst_q31 * S,
1364 uint8_t numStages,
1365 const q31_t * pCoeffs,
1366 q31_t * pState,
1367 int8_t postShift);
1368
1376 void arm_biquad_cascade_df1_f32(
1377 const arm_biquad_casd_df1_inst_f32 * S,
1378 const float32_t * pSrc,
1379 float32_t * pDst,
1380 uint32_t blockSize);
1381
1389 void arm_biquad_cascade_df1_init_f32(
1390 arm_biquad_casd_df1_inst_f32 * S,
1391 uint8_t numStages,
1392 const float32_t * pCoeffs,
1393 float32_t * pState);
1394
1398 typedef struct
1399 {
1400 uint16_t numRows;
1401 uint16_t numCols;
1402 float32_t *pData;
1403 } arm_matrix_instance_f32;
1404
1405
1409 typedef struct
1410 {
1411 uint16_t numRows;
1412 uint16_t numCols;
1413 float64_t *pData;
1414 } arm_matrix_instance_f64;
1415
1419 typedef struct
1420 {
1421 uint16_t numRows;
1422 uint16_t numCols;
1423 q15_t *pData;
1424 } arm_matrix_instance_q15;
1425
1429 typedef struct
1430 {
1431 uint16_t numRows;
1432 uint16_t numCols;
1433 q31_t *pData;
1434 } arm_matrix_instance_q31;
1435
1444 arm_status arm_mat_add_f32(
1445 const arm_matrix_instance_f32 * pSrcA,
1446 const arm_matrix_instance_f32 * pSrcB,
1447 arm_matrix_instance_f32 * pDst);
1448
1457 arm_status arm_mat_add_q15(
1458 const arm_matrix_instance_q15 * pSrcA,
1459 const arm_matrix_instance_q15 * pSrcB,
1460 arm_matrix_instance_q15 * pDst);
1461
1470 arm_status arm_mat_add_q31(
1471 const arm_matrix_instance_q31 * pSrcA,
1472 const arm_matrix_instance_q31 * pSrcB,
1473 arm_matrix_instance_q31 * pDst);
1474
1483 arm_status arm_mat_cmplx_mult_f32(
1484 const arm_matrix_instance_f32 * pSrcA,
1485 const arm_matrix_instance_f32 * pSrcB,
1486 arm_matrix_instance_f32 * pDst);
1487
1496 arm_status arm_mat_cmplx_mult_q15(
1497 const arm_matrix_instance_q15 * pSrcA,
1498 const arm_matrix_instance_q15 * pSrcB,
1499 arm_matrix_instance_q15 * pDst,
1500 q15_t * pScratch);
1501
1510 arm_status arm_mat_cmplx_mult_q31(
1511 const arm_matrix_instance_q31 * pSrcA,
1512 const arm_matrix_instance_q31 * pSrcB,
1513 arm_matrix_instance_q31 * pDst);
1514
1522 arm_status arm_mat_trans_f32(
1523 const arm_matrix_instance_f32 * pSrc,
1524 arm_matrix_instance_f32 * pDst);
1525
1533 arm_status arm_mat_trans_q15(
1534 const arm_matrix_instance_q15 * pSrc,
1535 arm_matrix_instance_q15 * pDst);
1536
1544 arm_status arm_mat_trans_q31(
1545 const arm_matrix_instance_q31 * pSrc,
1546 arm_matrix_instance_q31 * pDst);
1547
1556 arm_status arm_mat_mult_f32(
1557 const arm_matrix_instance_f32 * pSrcA,
1558 const arm_matrix_instance_f32 * pSrcB,
1559 arm_matrix_instance_f32 * pDst);
1560
1570 arm_status arm_mat_mult_q15(
1571 const arm_matrix_instance_q15 * pSrcA,
1572 const arm_matrix_instance_q15 * pSrcB,
1573 arm_matrix_instance_q15 * pDst,
1574 q15_t * pState);
1575
1585 arm_status arm_mat_mult_fast_q15(
1586 const arm_matrix_instance_q15 * pSrcA,
1587 const arm_matrix_instance_q15 * pSrcB,
1588 arm_matrix_instance_q15 * pDst,
1589 q15_t * pState);
1590
1599 arm_status arm_mat_mult_q31(
1600 const arm_matrix_instance_q31 * pSrcA,
1601 const arm_matrix_instance_q31 * pSrcB,
1602 arm_matrix_instance_q31 * pDst);
1603
1612 arm_status arm_mat_mult_fast_q31(
1613 const arm_matrix_instance_q31 * pSrcA,
1614 const arm_matrix_instance_q31 * pSrcB,
1615 arm_matrix_instance_q31 * pDst);
1616
1625 arm_status arm_mat_sub_f32(
1626 const arm_matrix_instance_f32 * pSrcA,
1627 const arm_matrix_instance_f32 * pSrcB,
1628 arm_matrix_instance_f32 * pDst);
1629
1638 arm_status arm_mat_sub_q15(
1639 const arm_matrix_instance_q15 * pSrcA,
1640 const arm_matrix_instance_q15 * pSrcB,
1641 arm_matrix_instance_q15 * pDst);
1642
1651 arm_status arm_mat_sub_q31(
1652 const arm_matrix_instance_q31 * pSrcA,
1653 const arm_matrix_instance_q31 * pSrcB,
1654 arm_matrix_instance_q31 * pDst);
1655
1664 arm_status arm_mat_scale_f32(
1665 const arm_matrix_instance_f32 * pSrc,
1666 float32_t scale,
1667 arm_matrix_instance_f32 * pDst);
1668
1678 arm_status arm_mat_scale_q15(
1679 const arm_matrix_instance_q15 * pSrc,
1680 q15_t scaleFract,
1681 int32_t shift,
1682 arm_matrix_instance_q15 * pDst);
1683
1693 arm_status arm_mat_scale_q31(
1694 const arm_matrix_instance_q31 * pSrc,
1695 q31_t scaleFract,
1696 int32_t shift,
1697 arm_matrix_instance_q31 * pDst);
1698
1706 void arm_mat_init_q31(
1707 arm_matrix_instance_q31 * S,
1708 uint16_t nRows,
1709 uint16_t nColumns,
1710 q31_t * pData);
1711
1719 void arm_mat_init_q15(
1720 arm_matrix_instance_q15 * S,
1721 uint16_t nRows,
1722 uint16_t nColumns,
1723 q15_t * pData);
1724
1732 void arm_mat_init_f32(
1733 arm_matrix_instance_f32 * S,
1734 uint16_t nRows,
1735 uint16_t nColumns,
1736 float32_t * pData);
1737
1738
1742 typedef struct
1743 {
1744 q15_t A0;
1745 #if !defined (ARM_MATH_DSP)
1746 q15_t A1;
1747 q15_t A2;
1748 #else
1749 q31_t A1;
1750 #endif
1751 q15_t state[3];
1752 q15_t Kp;
1753 q15_t Ki;
1754 q15_t Kd;
1755 } arm_pid_instance_q15;
1756
1760 typedef struct
1761 {
1762 q31_t A0;
1763 q31_t A1;
1764 q31_t A2;
1765 q31_t state[3];
1766 q31_t Kp;
1767 q31_t Ki;
1768 q31_t Kd;
1769 } arm_pid_instance_q31;
1770
1774 typedef struct
1775 {
1776 float32_t A0;
1777 float32_t A1;
1778 float32_t A2;
1779 float32_t state[3];
1780 float32_t Kp;
1781 float32_t Ki;
1782 float32_t Kd;
1783 } arm_pid_instance_f32;
1784
1785
1786
1792 void arm_pid_init_f32(
1793 arm_pid_instance_f32 * S,
1794 int32_t resetStateFlag);
1795
1796
1801 void arm_pid_reset_f32(
1802 arm_pid_instance_f32 * S);
1803
1804
1810 void arm_pid_init_q31(
1811 arm_pid_instance_q31 * S,
1812 int32_t resetStateFlag);
1813
1814
1820 void arm_pid_reset_q31(
1821 arm_pid_instance_q31 * S);
1822
1823
1829 void arm_pid_init_q15(
1830 arm_pid_instance_q15 * S,
1831 int32_t resetStateFlag);
1832
1833
1838 void arm_pid_reset_q15(
1839 arm_pid_instance_q15 * S);
1840
1841
1845 typedef struct
1846 {
1847 uint32_t nValues;
1848 float32_t x1;
1849 float32_t xSpacing;
1850 float32_t *pYData;
1851 } arm_linear_interp_instance_f32;
1852
1856 typedef struct
1857 {
1858 uint16_t numRows;
1859 uint16_t numCols;
1860 float32_t *pData;
1861 } arm_bilinear_interp_instance_f32;
1862
1866 typedef struct
1867 {
1868 uint16_t numRows;
1869 uint16_t numCols;
1870 q31_t *pData;
1871 } arm_bilinear_interp_instance_q31;
1872
1876 typedef struct
1877 {
1878 uint16_t numRows;
1879 uint16_t numCols;
1880 q15_t *pData;
1881 } arm_bilinear_interp_instance_q15;
1882
1886 typedef struct
1887 {
1888 uint16_t numRows;
1889 uint16_t numCols;
1890 q7_t *pData;
1891 } arm_bilinear_interp_instance_q7;
1892
1893
1901 void arm_mult_q7(
1902 const q7_t * pSrcA,
1903 const q7_t * pSrcB,
1904 q7_t * pDst,
1905 uint32_t blockSize);
1906
1907
1915 void arm_mult_q15(
1916 const q15_t * pSrcA,
1917 const q15_t * pSrcB,
1918 q15_t * pDst,
1919 uint32_t blockSize);
1920
1921
1929 void arm_mult_q31(
1930 const q31_t * pSrcA,
1931 const q31_t * pSrcB,
1932 q31_t * pDst,
1933 uint32_t blockSize);
1934
1935
1943 void arm_mult_f32(
1944 const float32_t * pSrcA,
1945 const float32_t * pSrcB,
1946 float32_t * pDst,
1947 uint32_t blockSize);
1948
1949
1953 typedef struct
1954 {
1955 uint16_t fftLen;
1956 uint8_t ifftFlag;
1957 uint8_t bitReverseFlag;
1958 const q15_t *pTwiddle;
1959 const uint16_t *pBitRevTable;
1960 uint16_t twidCoefModifier;
1961 uint16_t bitRevFactor;
1962 } arm_cfft_radix2_instance_q15;
1963
1964 /* Deprecated */
1965 arm_status arm_cfft_radix2_init_q15(
1966 arm_cfft_radix2_instance_q15 * S,
1967 uint16_t fftLen,
1968 uint8_t ifftFlag,
1969 uint8_t bitReverseFlag);
1970
1971 /* Deprecated */
1972 void arm_cfft_radix2_q15(
1973 const arm_cfft_radix2_instance_q15 * S,
1974 q15_t * pSrc);
1975
1976
1980 typedef struct
1981 {
1982 uint16_t fftLen;
1983 uint8_t ifftFlag;
1984 uint8_t bitReverseFlag;
1985 const q15_t *pTwiddle;
1986 const uint16_t *pBitRevTable;
1987 uint16_t twidCoefModifier;
1988 uint16_t bitRevFactor;
1989 } arm_cfft_radix4_instance_q15;
1990
1991 /* Deprecated */
1992 arm_status arm_cfft_radix4_init_q15(
1993 arm_cfft_radix4_instance_q15 * S,
1994 uint16_t fftLen,
1995 uint8_t ifftFlag,
1996 uint8_t bitReverseFlag);
1997
1998 /* Deprecated */
1999 void arm_cfft_radix4_q15(
2000 const arm_cfft_radix4_instance_q15 * S,
2001 q15_t * pSrc);
2002
2006 typedef struct
2007 {
2008 uint16_t fftLen;
2009 uint8_t ifftFlag;
2010 uint8_t bitReverseFlag;
2011 const q31_t *pTwiddle;
2012 const uint16_t *pBitRevTable;
2013 uint16_t twidCoefModifier;
2014 uint16_t bitRevFactor;
2015 } arm_cfft_radix2_instance_q31;
2016
2017 /* Deprecated */
2018 arm_status arm_cfft_radix2_init_q31(
2019 arm_cfft_radix2_instance_q31 * S,
2020 uint16_t fftLen,
2021 uint8_t ifftFlag,
2022 uint8_t bitReverseFlag);
2023
2024 /* Deprecated */
2025 void arm_cfft_radix2_q31(
2026 const arm_cfft_radix2_instance_q31 * S,
2027 q31_t * pSrc);
2028
2032 typedef struct
2033 {
2034 uint16_t fftLen;
2035 uint8_t ifftFlag;
2036 uint8_t bitReverseFlag;
2037 const q31_t *pTwiddle;
2038 const uint16_t *pBitRevTable;
2039 uint16_t twidCoefModifier;
2040 uint16_t bitRevFactor;
2041 } arm_cfft_radix4_instance_q31;
2042
2043 /* Deprecated */
2044 void arm_cfft_radix4_q31(
2045 const arm_cfft_radix4_instance_q31 * S,
2046 q31_t * pSrc);
2047
2048 /* Deprecated */
2049 arm_status arm_cfft_radix4_init_q31(
2050 arm_cfft_radix4_instance_q31 * S,
2051 uint16_t fftLen,
2052 uint8_t ifftFlag,
2053 uint8_t bitReverseFlag);
2054
2058 typedef struct
2059 {
2060 uint16_t fftLen;
2061 uint8_t ifftFlag;
2062 uint8_t bitReverseFlag;
2063 const float32_t *pTwiddle;
2064 const uint16_t *pBitRevTable;
2065 uint16_t twidCoefModifier;
2066 uint16_t bitRevFactor;
2067 float32_t onebyfftLen;
2068 } arm_cfft_radix2_instance_f32;
2069
2070 /* Deprecated */
2071 arm_status arm_cfft_radix2_init_f32(
2072 arm_cfft_radix2_instance_f32 * S,
2073 uint16_t fftLen,
2074 uint8_t ifftFlag,
2075 uint8_t bitReverseFlag);
2076
2077 /* Deprecated */
2078 void arm_cfft_radix2_f32(
2079 const arm_cfft_radix2_instance_f32 * S,
2080 float32_t * pSrc);
2081
2085 typedef struct
2086 {
2087 uint16_t fftLen;
2088 uint8_t ifftFlag;
2089 uint8_t bitReverseFlag;
2090 const float32_t *pTwiddle;
2091 const uint16_t *pBitRevTable;
2092 uint16_t twidCoefModifier;
2093 uint16_t bitRevFactor;
2094 float32_t onebyfftLen;
2095 } arm_cfft_radix4_instance_f32;
2096
2097 /* Deprecated */
2098 arm_status arm_cfft_radix4_init_f32(
2099 arm_cfft_radix4_instance_f32 * S,
2100 uint16_t fftLen,
2101 uint8_t ifftFlag,
2102 uint8_t bitReverseFlag);
2103
2104 /* Deprecated */
2105 void arm_cfft_radix4_f32(
2106 const arm_cfft_radix4_instance_f32 * S,
2107 float32_t * pSrc);
2108
2112 typedef struct
2113 {
2114 uint16_t fftLen;
2115 const q15_t *pTwiddle;
2116 const uint16_t *pBitRevTable;
2117 uint16_t bitRevLength;
2118 } arm_cfft_instance_q15;
2119
2120 void arm_cfft_q15(
2121 const arm_cfft_instance_q15 * S,
2122 q15_t * p1,
2123 uint8_t ifftFlag,
2124 uint8_t bitReverseFlag);
2125
2129 typedef struct
2130 {
2131 uint16_t fftLen;
2132 const q31_t *pTwiddle;
2133 const uint16_t *pBitRevTable;
2134 uint16_t bitRevLength;
2135 } arm_cfft_instance_q31;
2136
2137 void arm_cfft_q31(
2138 const arm_cfft_instance_q31 * S,
2139 q31_t * p1,
2140 uint8_t ifftFlag,
2141 uint8_t bitReverseFlag);
2142
2146 typedef struct
2147 {
2148 uint16_t fftLen;
2149 const float32_t *pTwiddle;
2150 const uint16_t *pBitRevTable;
2151 uint16_t bitRevLength;
2152 } arm_cfft_instance_f32;
2153
2154 void arm_cfft_f32(
2155 const arm_cfft_instance_f32 * S,
2156 float32_t * p1,
2157 uint8_t ifftFlag,
2158 uint8_t bitReverseFlag);
2159
2163 typedef struct
2164 {
2165 uint32_t fftLenReal;
2166 uint8_t ifftFlagR;
2167 uint8_t bitReverseFlagR;
2168 uint32_t twidCoefRModifier;
2169 const q15_t *pTwiddleAReal;
2170 const q15_t *pTwiddleBReal;
2171 const arm_cfft_instance_q15 *pCfft;
2172 } arm_rfft_instance_q15;
2173
2174 arm_status arm_rfft_init_q15(
2175 arm_rfft_instance_q15 * S,
2176 uint32_t fftLenReal,
2177 uint32_t ifftFlagR,
2178 uint32_t bitReverseFlag);
2179
2180 void arm_rfft_q15(
2181 const arm_rfft_instance_q15 * S,
2182 q15_t * pSrc,
2183 q15_t * pDst);
2184
2188 typedef struct
2189 {
2190 uint32_t fftLenReal;
2191 uint8_t ifftFlagR;
2192 uint8_t bitReverseFlagR;
2193 uint32_t twidCoefRModifier;
2194 const q31_t *pTwiddleAReal;
2195 const q31_t *pTwiddleBReal;
2196 const arm_cfft_instance_q31 *pCfft;
2197 } arm_rfft_instance_q31;
2198
2199 arm_status arm_rfft_init_q31(
2200 arm_rfft_instance_q31 * S,
2201 uint32_t fftLenReal,
2202 uint32_t ifftFlagR,
2203 uint32_t bitReverseFlag);
2204
2205 void arm_rfft_q31(
2206 const arm_rfft_instance_q31 * S,
2207 q31_t * pSrc,
2208 q31_t * pDst);
2209
2213 typedef struct
2214 {
2215 uint32_t fftLenReal;
2216 uint16_t fftLenBy2;
2217 uint8_t ifftFlagR;
2218 uint8_t bitReverseFlagR;
2219 uint32_t twidCoefRModifier;
2220 const float32_t *pTwiddleAReal;
2221 const float32_t *pTwiddleBReal;
2222 arm_cfft_radix4_instance_f32 *pCfft;
2223 } arm_rfft_instance_f32;
2224
2225 arm_status arm_rfft_init_f32(
2226 arm_rfft_instance_f32 * S,
2227 arm_cfft_radix4_instance_f32 * S_CFFT,
2228 uint32_t fftLenReal,
2229 uint32_t ifftFlagR,
2230 uint32_t bitReverseFlag);
2231
2232 void arm_rfft_f32(
2233 const arm_rfft_instance_f32 * S,
2234 float32_t * pSrc,
2235 float32_t * pDst);
2236
2240 typedef struct
2241 {
2242 arm_cfft_instance_f32 Sint;
2243 uint16_t fftLenRFFT;
2244 const float32_t * pTwiddleRFFT;
2245 } arm_rfft_fast_instance_f32 ;
2246
2247 arm_status arm_rfft_fast_init_f32 (
2248 arm_rfft_fast_instance_f32 * S,
2249 uint16_t fftLen);
2250
2251 arm_status arm_rfft_32_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2252
2253 arm_status arm_rfft_64_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2254
2255 arm_status arm_rfft_128_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2256
2257 arm_status arm_rfft_256_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2258
2259 arm_status arm_rfft_512_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2260
2261 arm_status arm_rfft_1024_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2262
2263 arm_status arm_rfft_2048_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2264
2265 arm_status arm_rfft_4096_fast_init_f32 ( arm_rfft_fast_instance_f32 * S );
2266
2267
2268 void arm_rfft_fast_f32(
2269 arm_rfft_fast_instance_f32 * S,
2270 float32_t * p, float32_t * pOut,
2271 uint8_t ifftFlag);
2272
2276 typedef struct
2277 {
2278 uint16_t N;
2279 uint16_t Nby2;
2280 float32_t normalize;
2281 const float32_t *pTwiddle;
2282 const float32_t *pCosFactor;
2283 arm_rfft_instance_f32 *pRfft;
2284 arm_cfft_radix4_instance_f32 *pCfft;
2285 } arm_dct4_instance_f32;
2286
2287
2298 arm_status arm_dct4_init_f32(
2299 arm_dct4_instance_f32 * S,
2300 arm_rfft_instance_f32 * S_RFFT,
2301 arm_cfft_radix4_instance_f32 * S_CFFT,
2302 uint16_t N,
2303 uint16_t Nby2,
2304 float32_t normalize);
2305
2306
2313 void arm_dct4_f32(
2314 const arm_dct4_instance_f32 * S,
2315 float32_t * pState,
2316 float32_t * pInlineBuffer);
2317
2318
2322 typedef struct
2323 {
2324 uint16_t N;
2325 uint16_t Nby2;
2326 q31_t normalize;
2327 const q31_t *pTwiddle;
2328 const q31_t *pCosFactor;
2329 arm_rfft_instance_q31 *pRfft;
2330 arm_cfft_radix4_instance_q31 *pCfft;
2331 } arm_dct4_instance_q31;
2332
2333
2344 arm_status arm_dct4_init_q31(
2345 arm_dct4_instance_q31 * S,
2346 arm_rfft_instance_q31 * S_RFFT,
2347 arm_cfft_radix4_instance_q31 * S_CFFT,
2348 uint16_t N,
2349 uint16_t Nby2,
2350 q31_t normalize);
2351
2352
2359 void arm_dct4_q31(
2360 const arm_dct4_instance_q31 * S,
2361 q31_t * pState,
2362 q31_t * pInlineBuffer);
2363
2364
2368 typedef struct
2369 {
2370 uint16_t N;
2371 uint16_t Nby2;
2372 q15_t normalize;
2373 const q15_t *pTwiddle;
2374 const q15_t *pCosFactor;
2375 arm_rfft_instance_q15 *pRfft;
2376 arm_cfft_radix4_instance_q15 *pCfft;
2377 } arm_dct4_instance_q15;
2378
2379
2390 arm_status arm_dct4_init_q15(
2391 arm_dct4_instance_q15 * S,
2392 arm_rfft_instance_q15 * S_RFFT,
2393 arm_cfft_radix4_instance_q15 * S_CFFT,
2394 uint16_t N,
2395 uint16_t Nby2,
2396 q15_t normalize);
2397
2398
2405 void arm_dct4_q15(
2406 const arm_dct4_instance_q15 * S,
2407 q15_t * pState,
2408 q15_t * pInlineBuffer);
2409
2410
2418 void arm_add_f32(
2419 const float32_t * pSrcA,
2420 const float32_t * pSrcB,
2421 float32_t * pDst,
2422 uint32_t blockSize);
2423
2424
2432 void arm_add_q7(
2433 const q7_t * pSrcA,
2434 const q7_t * pSrcB,
2435 q7_t * pDst,
2436 uint32_t blockSize);
2437
2438
2446 void arm_add_q15(
2447 const q15_t * pSrcA,
2448 const q15_t * pSrcB,
2449 q15_t * pDst,
2450 uint32_t blockSize);
2451
2452
2460 void arm_add_q31(
2461 const q31_t * pSrcA,
2462 const q31_t * pSrcB,
2463 q31_t * pDst,
2464 uint32_t blockSize);
2465
2466
2474 void arm_sub_f32(
2475 const float32_t * pSrcA,
2476 const float32_t * pSrcB,
2477 float32_t * pDst,
2478 uint32_t blockSize);
2479
2480
2488 void arm_sub_q7(
2489 const q7_t * pSrcA,
2490 const q7_t * pSrcB,
2491 q7_t * pDst,
2492 uint32_t blockSize);
2493
2494
2502 void arm_sub_q15(
2503 const q15_t * pSrcA,
2504 const q15_t * pSrcB,
2505 q15_t * pDst,
2506 uint32_t blockSize);
2507
2508
2516 void arm_sub_q31(
2517 const q31_t * pSrcA,
2518 const q31_t * pSrcB,
2519 q31_t * pDst,
2520 uint32_t blockSize);
2521
2522
2530 void arm_scale_f32(
2531 const float32_t * pSrc,
2532 float32_t scale,
2533 float32_t * pDst,
2534 uint32_t blockSize);
2535
2536
2545 void arm_scale_q7(
2546 const q7_t * pSrc,
2547 q7_t scaleFract,
2548 int8_t shift,
2549 q7_t * pDst,
2550 uint32_t blockSize);
2551
2552
2561 void arm_scale_q15(
2562 const q15_t * pSrc,
2563 q15_t scaleFract,
2564 int8_t shift,
2565 q15_t * pDst,
2566 uint32_t blockSize);
2567
2568
2577 void arm_scale_q31(
2578 const q31_t * pSrc,
2579 q31_t scaleFract,
2580 int8_t shift,
2581 q31_t * pDst,
2582 uint32_t blockSize);
2583
2584
2591 void arm_abs_q7(
2592 const q7_t * pSrc,
2593 q7_t * pDst,
2594 uint32_t blockSize);
2595
2596
2603 void arm_abs_f32(
2604 const float32_t * pSrc,
2605 float32_t * pDst,
2606 uint32_t blockSize);
2607
2608
2615 void arm_abs_q15(
2616 const q15_t * pSrc,
2617 q15_t * pDst,
2618 uint32_t blockSize);
2619
2620
2627 void arm_abs_q31(
2628 const q31_t * pSrc,
2629 q31_t * pDst,
2630 uint32_t blockSize);
2631
2632
2640 void arm_dot_prod_f32(
2641 const float32_t * pSrcA,
2642 const float32_t * pSrcB,
2643 uint32_t blockSize,
2644 float32_t * result);
2645
2646
2654 void arm_dot_prod_q7(
2655 const q7_t * pSrcA,
2656 const q7_t * pSrcB,
2657 uint32_t blockSize,
2658 q31_t * result);
2659
2660
2668 void arm_dot_prod_q15(
2669 const q15_t * pSrcA,
2670 const q15_t * pSrcB,
2671 uint32_t blockSize,
2672 q63_t * result);
2673
2674
2682 void arm_dot_prod_q31(
2683 const q31_t * pSrcA,
2684 const q31_t * pSrcB,
2685 uint32_t blockSize,
2686 q63_t * result);
2687
2688
2696 void arm_shift_q7(
2697 const q7_t * pSrc,
2698 int8_t shiftBits,
2699 q7_t * pDst,
2700 uint32_t blockSize);
2701
2702
2710 void arm_shift_q15(
2711 const q15_t * pSrc,
2712 int8_t shiftBits,
2713 q15_t * pDst,
2714 uint32_t blockSize);
2715
2716
2724 void arm_shift_q31(
2725 const q31_t * pSrc,
2726 int8_t shiftBits,
2727 q31_t * pDst,
2728 uint32_t blockSize);
2729
2730
2738 void arm_offset_f32(
2739 const float32_t * pSrc,
2740 float32_t offset,
2741 float32_t * pDst,
2742 uint32_t blockSize);
2743
2744
2752 void arm_offset_q7(
2753 const q7_t * pSrc,
2754 q7_t offset,
2755 q7_t * pDst,
2756 uint32_t blockSize);
2757
2758
2766 void arm_offset_q15(
2767 const q15_t * pSrc,
2768 q15_t offset,
2769 q15_t * pDst,
2770 uint32_t blockSize);
2771
2772
2780 void arm_offset_q31(
2781 const q31_t * pSrc,
2782 q31_t offset,
2783 q31_t * pDst,
2784 uint32_t blockSize);
2785
2786
2793 void arm_negate_f32(
2794 const float32_t * pSrc,
2795 float32_t * pDst,
2796 uint32_t blockSize);
2797
2798
2805 void arm_negate_q7(
2806 const q7_t * pSrc,
2807 q7_t * pDst,
2808 uint32_t blockSize);
2809
2810
2817 void arm_negate_q15(
2818 const q15_t * pSrc,
2819 q15_t * pDst,
2820 uint32_t blockSize);
2821
2822
2829 void arm_negate_q31(
2830 const q31_t * pSrc,
2831 q31_t * pDst,
2832 uint32_t blockSize);
2833
2834
2841 void arm_copy_f32(
2842 const float32_t * pSrc,
2843 float32_t * pDst,
2844 uint32_t blockSize);
2845
2846
2853 void arm_copy_q7(
2854 const q7_t * pSrc,
2855 q7_t * pDst,
2856 uint32_t blockSize);
2857
2858
2865 void arm_copy_q15(
2866 const q15_t * pSrc,
2867 q15_t * pDst,
2868 uint32_t blockSize);
2869
2870
2877 void arm_copy_q31(
2878 const q31_t * pSrc,
2879 q31_t * pDst,
2880 uint32_t blockSize);
2881
2882
2889 void arm_fill_f32(
2890 float32_t value,
2891 float32_t * pDst,
2892 uint32_t blockSize);
2893
2894
2901 void arm_fill_q7(
2902 q7_t value,
2903 q7_t * pDst,
2904 uint32_t blockSize);
2905
2906
2913 void arm_fill_q15(
2914 q15_t value,
2915 q15_t * pDst,
2916 uint32_t blockSize);
2917
2918
2925 void arm_fill_q31(
2926 q31_t value,
2927 q31_t * pDst,
2928 uint32_t blockSize);
2929
2930
2939 void arm_conv_f32(
2940 const float32_t * pSrcA,
2941 uint32_t srcALen,
2942 const float32_t * pSrcB,
2943 uint32_t srcBLen,
2944 float32_t * pDst);
2945
2946
2957 void arm_conv_opt_q15(
2958 const q15_t * pSrcA,
2959 uint32_t srcALen,
2960 const q15_t * pSrcB,
2961 uint32_t srcBLen,
2962 q15_t * pDst,
2963 q15_t * pScratch1,
2964 q15_t * pScratch2);
2965
2966
2975 void arm_conv_q15(
2976 const q15_t * pSrcA,
2977 uint32_t srcALen,
2978 const q15_t * pSrcB,
2979 uint32_t srcBLen,
2980 q15_t * pDst);
2981
2982
2991 void arm_conv_fast_q15(
2992 const q15_t * pSrcA,
2993 uint32_t srcALen,
2994 const q15_t * pSrcB,
2995 uint32_t srcBLen,
2996 q15_t * pDst);
2997
2998
3009 void arm_conv_fast_opt_q15(
3010 const q15_t * pSrcA,
3011 uint32_t srcALen,
3012 const q15_t * pSrcB,
3013 uint32_t srcBLen,
3014 q15_t * pDst,
3015 q15_t * pScratch1,
3016 q15_t * pScratch2);
3017
3018
3027 void arm_conv_q31(
3028 const q31_t * pSrcA,
3029 uint32_t srcALen,
3030 const q31_t * pSrcB,
3031 uint32_t srcBLen,
3032 q31_t * pDst);
3033
3034
3043 void arm_conv_fast_q31(
3044 const q31_t * pSrcA,
3045 uint32_t srcALen,
3046 const q31_t * pSrcB,
3047 uint32_t srcBLen,
3048 q31_t * pDst);
3049
3050
3061 void arm_conv_opt_q7(
3062 const q7_t * pSrcA,
3063 uint32_t srcALen,
3064 const q7_t * pSrcB,
3065 uint32_t srcBLen,
3066 q7_t * pDst,
3067 q15_t * pScratch1,
3068 q15_t * pScratch2);
3069
3070
3079 void arm_conv_q7(
3080 const q7_t * pSrcA,
3081 uint32_t srcALen,
3082 const q7_t * pSrcB,
3083 uint32_t srcBLen,
3084 q7_t * pDst);
3085
3086
3098 arm_status arm_conv_partial_f32(
3099 const float32_t * pSrcA,
3100 uint32_t srcALen,
3101 const float32_t * pSrcB,
3102 uint32_t srcBLen,
3103 float32_t * pDst,
3104 uint32_t firstIndex,
3105 uint32_t numPoints);
3106
3107
3121 arm_status arm_conv_partial_opt_q15(
3122 const q15_t * pSrcA,
3123 uint32_t srcALen,
3124 const q15_t * pSrcB,
3125 uint32_t srcBLen,
3126 q15_t * pDst,
3127 uint32_t firstIndex,
3128 uint32_t numPoints,
3129 q15_t * pScratch1,
3130 q15_t * pScratch2);
3131
3132
3144 arm_status arm_conv_partial_q15(
3145 const q15_t * pSrcA,
3146 uint32_t srcALen,
3147 const q15_t * pSrcB,
3148 uint32_t srcBLen,
3149 q15_t * pDst,
3150 uint32_t firstIndex,
3151 uint32_t numPoints);
3152
3153
3165 arm_status arm_conv_partial_fast_q15(
3166 const q15_t * pSrcA,
3167 uint32_t srcALen,
3168 const q15_t * pSrcB,
3169 uint32_t srcBLen,
3170 q15_t * pDst,
3171 uint32_t firstIndex,
3172 uint32_t numPoints);
3173
3174
3188 arm_status arm_conv_partial_fast_opt_q15(
3189 const q15_t * pSrcA,
3190 uint32_t srcALen,
3191 const q15_t * pSrcB,
3192 uint32_t srcBLen,
3193 q15_t * pDst,
3194 uint32_t firstIndex,
3195 uint32_t numPoints,
3196 q15_t * pScratch1,
3197 q15_t * pScratch2);
3198
3199
3211 arm_status arm_conv_partial_q31(
3212 const q31_t * pSrcA,
3213 uint32_t srcALen,
3214 const q31_t * pSrcB,
3215 uint32_t srcBLen,
3216 q31_t * pDst,
3217 uint32_t firstIndex,
3218 uint32_t numPoints);
3219
3220
3232 arm_status arm_conv_partial_fast_q31(
3233 const q31_t * pSrcA,
3234 uint32_t srcALen,
3235 const q31_t * pSrcB,
3236 uint32_t srcBLen,
3237 q31_t * pDst,
3238 uint32_t firstIndex,
3239 uint32_t numPoints);
3240
3241
3255 arm_status arm_conv_partial_opt_q7(
3256 const q7_t * pSrcA,
3257 uint32_t srcALen,
3258 const q7_t * pSrcB,
3259 uint32_t srcBLen,
3260 q7_t * pDst,
3261 uint32_t firstIndex,
3262 uint32_t numPoints,
3263 q15_t * pScratch1,
3264 q15_t * pScratch2);
3265
3266
3278 arm_status arm_conv_partial_q7(
3279 const q7_t * pSrcA,
3280 uint32_t srcALen,
3281 const q7_t * pSrcB,
3282 uint32_t srcBLen,
3283 q7_t * pDst,
3284 uint32_t firstIndex,
3285 uint32_t numPoints);
3286
3287
3291 typedef struct
3292 {
3293 uint8_t M;
3294 uint16_t numTaps;
3295 const q15_t *pCoeffs;
3296 q15_t *pState;
3297 } arm_fir_decimate_instance_q15;
3298
3302 typedef struct
3303 {
3304 uint8_t M;
3305 uint16_t numTaps;
3306 const q31_t *pCoeffs;
3307 q31_t *pState;
3308 } arm_fir_decimate_instance_q31;
3309
3313 typedef struct
3314 {
3315 uint8_t M;
3316 uint16_t numTaps;
3317 const float32_t *pCoeffs;
3318 float32_t *pState;
3319 } arm_fir_decimate_instance_f32;
3320
3321
3329 void arm_fir_decimate_f32(
3330 const arm_fir_decimate_instance_f32 * S,
3331 const float32_t * pSrc,
3332 float32_t * pDst,
3333 uint32_t blockSize);
3334
3335
3348 arm_status arm_fir_decimate_init_f32(
3349 arm_fir_decimate_instance_f32 * S,
3350 uint16_t numTaps,
3351 uint8_t M,
3352 const float32_t * pCoeffs,
3353 float32_t * pState,
3354 uint32_t blockSize);
3355
3356
3364 void arm_fir_decimate_q15(
3365 const arm_fir_decimate_instance_q15 * S,
3366 const q15_t * pSrc,
3367 q15_t * pDst,
3368 uint32_t blockSize);
3369
3370
3378 void arm_fir_decimate_fast_q15(
3379 const arm_fir_decimate_instance_q15 * S,
3380 const q15_t * pSrc,
3381 q15_t * pDst,
3382 uint32_t blockSize);
3383
3384
3396 arm_status arm_fir_decimate_init_q15(
3397 arm_fir_decimate_instance_q15 * S,
3398 uint16_t numTaps,
3399 uint8_t M,
3400 const q15_t * pCoeffs,
3401 q15_t * pState,
3402 uint32_t blockSize);
3403
3404
3412 void arm_fir_decimate_q31(
3413 const arm_fir_decimate_instance_q31 * S,
3414 const q31_t * pSrc,
3415 q31_t * pDst,
3416 uint32_t blockSize);
3417
3425 void arm_fir_decimate_fast_q31(
3426 const arm_fir_decimate_instance_q31 * S,
3427 const q31_t * pSrc,
3428 q31_t * pDst,
3429 uint32_t blockSize);
3430
3431
3443 arm_status arm_fir_decimate_init_q31(
3444 arm_fir_decimate_instance_q31 * S,
3445 uint16_t numTaps,
3446 uint8_t M,
3447 const q31_t * pCoeffs,
3448 q31_t * pState,
3449 uint32_t blockSize);
3450
3451
3455 typedef struct
3456 {
3457 uint8_t L;
3458 uint16_t phaseLength;
3459 const q15_t *pCoeffs;
3460 q15_t *pState;
3461 } arm_fir_interpolate_instance_q15;
3462
3466 typedef struct
3467 {
3468 uint8_t L;
3469 uint16_t phaseLength;
3470 const q31_t *pCoeffs;
3471 q31_t *pState;
3472 } arm_fir_interpolate_instance_q31;
3473
3477 typedef struct
3478 {
3479 uint8_t L;
3480 uint16_t phaseLength;
3481 const float32_t *pCoeffs;
3482 float32_t *pState;
3483 } arm_fir_interpolate_instance_f32;
3484
3485
3493 void arm_fir_interpolate_q15(
3494 const arm_fir_interpolate_instance_q15 * S,
3495 const q15_t * pSrc,
3496 q15_t * pDst,
3497 uint32_t blockSize);
3498
3499
3511 arm_status arm_fir_interpolate_init_q15(
3512 arm_fir_interpolate_instance_q15 * S,
3513 uint8_t L,
3514 uint16_t numTaps,
3515 const q15_t * pCoeffs,
3516 q15_t * pState,
3517 uint32_t blockSize);
3518
3519
3527 void arm_fir_interpolate_q31(
3528 const arm_fir_interpolate_instance_q31 * S,
3529 const q31_t * pSrc,
3530 q31_t * pDst,
3531 uint32_t blockSize);
3532
3533
3545 arm_status arm_fir_interpolate_init_q31(
3546 arm_fir_interpolate_instance_q31 * S,
3547 uint8_t L,
3548 uint16_t numTaps,
3549 const q31_t * pCoeffs,
3550 q31_t * pState,
3551 uint32_t blockSize);
3552
3553
3561 void arm_fir_interpolate_f32(
3562 const arm_fir_interpolate_instance_f32 * S,
3563 const float32_t * pSrc,
3564 float32_t * pDst,
3565 uint32_t blockSize);
3566
3567
3579 arm_status arm_fir_interpolate_init_f32(
3580 arm_fir_interpolate_instance_f32 * S,
3581 uint8_t L,
3582 uint16_t numTaps,
3583 const float32_t * pCoeffs,
3584 float32_t * pState,
3585 uint32_t blockSize);
3586
3587
3591 typedef struct
3592 {
3593 uint8_t numStages;
3594 q63_t *pState;
3595 const q31_t *pCoeffs;
3596 uint8_t postShift;
3597 } arm_biquad_cas_df1_32x64_ins_q31;
3598
3599
3606 void arm_biquad_cas_df1_32x64_q31(
3607 const arm_biquad_cas_df1_32x64_ins_q31 * S,
3608 q31_t * pSrc,
3609 q31_t * pDst,
3610 uint32_t blockSize);
3611
3612
3620 void arm_biquad_cas_df1_32x64_init_q31(
3621 arm_biquad_cas_df1_32x64_ins_q31 * S,
3622 uint8_t numStages,
3623 const q31_t * pCoeffs,
3624 q63_t * pState,
3625 uint8_t postShift);
3626
3627
3631 typedef struct
3632 {
3633 uint8_t numStages;
3634 float32_t *pState;
3635 const float32_t *pCoeffs;
3636 } arm_biquad_cascade_df2T_instance_f32;
3637
3641 typedef struct
3642 {
3643 uint8_t numStages;
3644 float32_t *pState;
3645 const float32_t *pCoeffs;
3646 } arm_biquad_cascade_stereo_df2T_instance_f32;
3647
3651 typedef struct
3652 {
3653 uint8_t numStages;
3654 float64_t *pState;
3655 float64_t *pCoeffs;
3656 } arm_biquad_cascade_df2T_instance_f64;
3657
3658
3666 void arm_biquad_cascade_df2T_f32(
3667 const arm_biquad_cascade_df2T_instance_f32 * S,
3668 const float32_t * pSrc,
3669 float32_t * pDst,
3670 uint32_t blockSize);
3671
3672
3680 void arm_biquad_cascade_stereo_df2T_f32(
3681 const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
3682 const float32_t * pSrc,
3683 float32_t * pDst,
3684 uint32_t blockSize);
3685
3686
3694 void arm_biquad_cascade_df2T_f64(
3695 const arm_biquad_cascade_df2T_instance_f64 * S,
3696 float64_t * pSrc,
3697 float64_t * pDst,
3698 uint32_t blockSize);
3699
3700
3708 void arm_biquad_cascade_df2T_init_f32(
3709 arm_biquad_cascade_df2T_instance_f32 * S,
3710 uint8_t numStages,
3711 const float32_t * pCoeffs,
3712 float32_t * pState);
3713
3714
3722 void arm_biquad_cascade_stereo_df2T_init_f32(
3723 arm_biquad_cascade_stereo_df2T_instance_f32 * S,
3724 uint8_t numStages,
3725 const float32_t * pCoeffs,
3726 float32_t * pState);
3727
3728
3736 void arm_biquad_cascade_df2T_init_f64(
3737 arm_biquad_cascade_df2T_instance_f64 * S,
3738 uint8_t numStages,
3739 float64_t * pCoeffs,
3740 float64_t * pState);
3741
3742
3746 typedef struct
3747 {
3748 uint16_t numStages;
3749 q15_t *pState;
3750 const q15_t *pCoeffs;
3751 } arm_fir_lattice_instance_q15;
3752
3756 typedef struct
3757 {
3758 uint16_t numStages;
3759 q31_t *pState;
3760 const q31_t *pCoeffs;
3761 } arm_fir_lattice_instance_q31;
3762
3766 typedef struct
3767 {
3768 uint16_t numStages;
3769 float32_t *pState;
3770 const float32_t *pCoeffs;
3771 } arm_fir_lattice_instance_f32;
3772
3773
3781 void arm_fir_lattice_init_q15(
3782 arm_fir_lattice_instance_q15 * S,
3783 uint16_t numStages,
3784 const q15_t * pCoeffs,
3785 q15_t * pState);
3786
3787
3795 void arm_fir_lattice_q15(
3796 const arm_fir_lattice_instance_q15 * S,
3797 const q15_t * pSrc,
3798 q15_t * pDst,
3799 uint32_t blockSize);
3800
3801
3809 void arm_fir_lattice_init_q31(
3810 arm_fir_lattice_instance_q31 * S,
3811 uint16_t numStages,
3812 const q31_t * pCoeffs,
3813 q31_t * pState);
3814
3815
3823 void arm_fir_lattice_q31(
3824 const arm_fir_lattice_instance_q31 * S,
3825 const q31_t * pSrc,
3826 q31_t * pDst,
3827 uint32_t blockSize);
3828
3829
3837 void arm_fir_lattice_init_f32(
3838 arm_fir_lattice_instance_f32 * S,
3839 uint16_t numStages,
3840 const float32_t * pCoeffs,
3841 float32_t * pState);
3842
3843
3851 void arm_fir_lattice_f32(
3852 const arm_fir_lattice_instance_f32 * S,
3853 const float32_t * pSrc,
3854 float32_t * pDst,
3855 uint32_t blockSize);
3856
3857
3861 typedef struct
3862 {
3863 uint16_t numStages;
3864 q15_t *pState;
3865 q15_t *pkCoeffs;
3866 q15_t *pvCoeffs;
3867 } arm_iir_lattice_instance_q15;
3868
3872 typedef struct
3873 {
3874 uint16_t numStages;
3875 q31_t *pState;
3876 q31_t *pkCoeffs;
3877 q31_t *pvCoeffs;
3878 } arm_iir_lattice_instance_q31;
3879
3883 typedef struct
3884 {
3885 uint16_t numStages;
3886 float32_t *pState;
3887 float32_t *pkCoeffs;
3888 float32_t *pvCoeffs;
3889 } arm_iir_lattice_instance_f32;
3890
3891
3899 void arm_iir_lattice_f32(
3900 const arm_iir_lattice_instance_f32 * S,
3901 const float32_t * pSrc,
3902 float32_t * pDst,
3903 uint32_t blockSize);
3904
3905
3915 void arm_iir_lattice_init_f32(
3916 arm_iir_lattice_instance_f32 * S,
3917 uint16_t numStages,
3918 float32_t * pkCoeffs,
3919 float32_t * pvCoeffs,
3920 float32_t * pState,
3921 uint32_t blockSize);
3922
3923
3931 void arm_iir_lattice_q31(
3932 const arm_iir_lattice_instance_q31 * S,
3933 const q31_t * pSrc,
3934 q31_t * pDst,
3935 uint32_t blockSize);
3936
3937
3947 void arm_iir_lattice_init_q31(
3948 arm_iir_lattice_instance_q31 * S,
3949 uint16_t numStages,
3950 q31_t * pkCoeffs,
3951 q31_t * pvCoeffs,
3952 q31_t * pState,
3953 uint32_t blockSize);
3954
3955
3963 void arm_iir_lattice_q15(
3964 const arm_iir_lattice_instance_q15 * S,
3965 const q15_t * pSrc,
3966 q15_t * pDst,
3967 uint32_t blockSize);
3968
3969
3979 void arm_iir_lattice_init_q15(
3980 arm_iir_lattice_instance_q15 * S,
3981 uint16_t numStages,
3982 q15_t * pkCoeffs,
3983 q15_t * pvCoeffs,
3984 q15_t * pState,
3985 uint32_t blockSize);
3986
3987
3991 typedef struct
3992 {
3993 uint16_t numTaps;
3994 float32_t *pState;
3995 float32_t *pCoeffs;
3996 float32_t mu;
3997 } arm_lms_instance_f32;
3998
3999
4009 void arm_lms_f32(
4010 const arm_lms_instance_f32 * S,
4011 const float32_t * pSrc,
4012 float32_t * pRef,
4013 float32_t * pOut,
4014 float32_t * pErr,
4015 uint32_t blockSize);
4016
4017
4027 void arm_lms_init_f32(
4028 arm_lms_instance_f32 * S,
4029 uint16_t numTaps,
4030 float32_t * pCoeffs,
4031 float32_t * pState,
4032 float32_t mu,
4033 uint32_t blockSize);
4034
4035
4039 typedef struct
4040 {
4041 uint16_t numTaps;
4042 q15_t *pState;
4043 q15_t *pCoeffs;
4044 q15_t mu;
4045 uint32_t postShift;
4046 } arm_lms_instance_q15;
4047
4048
4059 void arm_lms_init_q15(
4060 arm_lms_instance_q15 * S,
4061 uint16_t numTaps,
4062 q15_t * pCoeffs,
4063 q15_t * pState,
4064 q15_t mu,
4065 uint32_t blockSize,
4066 uint32_t postShift);
4067
4068
4078 void arm_lms_q15(
4079 const arm_lms_instance_q15 * S,
4080 const q15_t * pSrc,
4081 q15_t * pRef,
4082 q15_t * pOut,
4083 q15_t * pErr,
4084 uint32_t blockSize);
4085
4086
4090 typedef struct
4091 {
4092 uint16_t numTaps;
4093 q31_t *pState;
4094 q31_t *pCoeffs;
4095 q31_t mu;
4096 uint32_t postShift;
4097 } arm_lms_instance_q31;
4098
4099
4109 void arm_lms_q31(
4110 const arm_lms_instance_q31 * S,
4111 const q31_t * pSrc,
4112 q31_t * pRef,
4113 q31_t * pOut,
4114 q31_t * pErr,
4115 uint32_t blockSize);
4116
4117
4128 void arm_lms_init_q31(
4129 arm_lms_instance_q31 * S,
4130 uint16_t numTaps,
4131 q31_t * pCoeffs,
4132 q31_t * pState,
4133 q31_t mu,
4134 uint32_t blockSize,
4135 uint32_t postShift);
4136
4137
4141 typedef struct
4142 {
4143 uint16_t numTaps;
4144 float32_t *pState;
4145 float32_t *pCoeffs;
4146 float32_t mu;
4147 float32_t energy;
4148 float32_t x0;
4149 } arm_lms_norm_instance_f32;
4150
4151
4161 void arm_lms_norm_f32(
4162 arm_lms_norm_instance_f32 * S,
4163 const float32_t * pSrc,
4164 float32_t * pRef,
4165 float32_t * pOut,
4166 float32_t * pErr,
4167 uint32_t blockSize);
4168
4169
4179 void arm_lms_norm_init_f32(
4180 arm_lms_norm_instance_f32 * S,
4181 uint16_t numTaps,
4182 float32_t * pCoeffs,
4183 float32_t * pState,
4184 float32_t mu,
4185 uint32_t blockSize);
4186
4187
4191 typedef struct
4192 {
4193 uint16_t numTaps;
4194 q31_t *pState;
4195 q31_t *pCoeffs;
4196 q31_t mu;
4197 uint8_t postShift;
4198 const q31_t *recipTable;
4199 q31_t energy;
4200 q31_t x0;
4201 } arm_lms_norm_instance_q31;
4202
4203
4213 void arm_lms_norm_q31(
4214 arm_lms_norm_instance_q31 * S,
4215 const q31_t * pSrc,
4216 q31_t * pRef,
4217 q31_t * pOut,
4218 q31_t * pErr,
4219 uint32_t blockSize);
4220
4221
4232 void arm_lms_norm_init_q31(
4233 arm_lms_norm_instance_q31 * S,
4234 uint16_t numTaps,
4235 q31_t * pCoeffs,
4236 q31_t * pState,
4237 q31_t mu,
4238 uint32_t blockSize,
4239 uint8_t postShift);
4240
4241
4245 typedef struct
4246 {
4247 uint16_t numTaps;
4248 q15_t *pState;
4249 q15_t *pCoeffs;
4250 q15_t mu;
4251 uint8_t postShift;
4252 const q15_t *recipTable;
4253 q15_t energy;
4254 q15_t x0;
4255 } arm_lms_norm_instance_q15;
4256
4257
4267 void arm_lms_norm_q15(
4268 arm_lms_norm_instance_q15 * S,
4269 const q15_t * pSrc,
4270 q15_t * pRef,
4271 q15_t * pOut,
4272 q15_t * pErr,
4273 uint32_t blockSize);
4274
4275
4286 void arm_lms_norm_init_q15(
4287 arm_lms_norm_instance_q15 * S,
4288 uint16_t numTaps,
4289 q15_t * pCoeffs,
4290 q15_t * pState,
4291 q15_t mu,
4292 uint32_t blockSize,
4293 uint8_t postShift);
4294
4295
4304 void arm_correlate_f32(
4305 const float32_t * pSrcA,
4306 uint32_t srcALen,
4307 const float32_t * pSrcB,
4308 uint32_t srcBLen,
4309 float32_t * pDst);
4310
4311
4321 void arm_correlate_opt_q15(
4322 const q15_t * pSrcA,
4323 uint32_t srcALen,
4324 const q15_t * pSrcB,
4325 uint32_t srcBLen,
4326 q15_t * pDst,
4327 q15_t * pScratch);
4328
4329
4338 void arm_correlate_q15(
4339 const q15_t * pSrcA,
4340 uint32_t srcALen,
4341 const q15_t * pSrcB,
4342 uint32_t srcBLen,
4343 q15_t * pDst);
4344
4345
4355 void arm_correlate_fast_q15(
4356 const q15_t * pSrcA,
4357 uint32_t srcALen,
4358 const q15_t * pSrcB,
4359 uint32_t srcBLen,
4360 q15_t * pDst);
4361
4362
4372 void arm_correlate_fast_opt_q15(
4373 const q15_t * pSrcA,
4374 uint32_t srcALen,
4375 const q15_t * pSrcB,
4376 uint32_t srcBLen,
4377 q15_t * pDst,
4378 q15_t * pScratch);
4379
4380
4389 void arm_correlate_q31(
4390 const q31_t * pSrcA,
4391 uint32_t srcALen,
4392 const q31_t * pSrcB,
4393 uint32_t srcBLen,
4394 q31_t * pDst);
4395
4396
4405 void arm_correlate_fast_q31(
4406 const q31_t * pSrcA,
4407 uint32_t srcALen,
4408 const q31_t * pSrcB,
4409 uint32_t srcBLen,
4410 q31_t * pDst);
4411
4412
4423 void arm_correlate_opt_q7(
4424 const q7_t * pSrcA,
4425 uint32_t srcALen,
4426 const q7_t * pSrcB,
4427 uint32_t srcBLen,
4428 q7_t * pDst,
4429 q15_t * pScratch1,
4430 q15_t * pScratch2);
4431
4432
4441 void arm_correlate_q7(
4442 const q7_t * pSrcA,
4443 uint32_t srcALen,
4444 const q7_t * pSrcB,
4445 uint32_t srcBLen,
4446 q7_t * pDst);
4447
4448
4452 typedef struct
4453 {
4454 uint16_t numTaps;
4455 uint16_t stateIndex;
4456 float32_t *pState;
4457 const float32_t *pCoeffs;
4458 uint16_t maxDelay;
4459 int32_t *pTapDelay;
4460 } arm_fir_sparse_instance_f32;
4461
4465 typedef struct
4466 {
4467 uint16_t numTaps;
4468 uint16_t stateIndex;
4469 q31_t *pState;
4470 const q31_t *pCoeffs;
4471 uint16_t maxDelay;
4472 int32_t *pTapDelay;
4473 } arm_fir_sparse_instance_q31;
4474
4478 typedef struct
4479 {
4480 uint16_t numTaps;
4481 uint16_t stateIndex;
4482 q15_t *pState;
4483 const q15_t *pCoeffs;
4484 uint16_t maxDelay;
4485 int32_t *pTapDelay;
4486 } arm_fir_sparse_instance_q15;
4487
4491 typedef struct
4492 {
4493 uint16_t numTaps;
4494 uint16_t stateIndex;
4495 q7_t *pState;
4496 const q7_t *pCoeffs;
4497 uint16_t maxDelay;
4498 int32_t *pTapDelay;
4499 } arm_fir_sparse_instance_q7;
4500
4501
4510 void arm_fir_sparse_f32(
4511 arm_fir_sparse_instance_f32 * S,
4512 const float32_t * pSrc,
4513 float32_t * pDst,
4514 float32_t * pScratchIn,
4515 uint32_t blockSize);
4516
4517
4528 void arm_fir_sparse_init_f32(
4529 arm_fir_sparse_instance_f32 * S,
4530 uint16_t numTaps,
4531 const float32_t * pCoeffs,
4532 float32_t * pState,
4533 int32_t * pTapDelay,
4534 uint16_t maxDelay,
4535 uint32_t blockSize);
4536
4537
4546 void arm_fir_sparse_q31(
4547 arm_fir_sparse_instance_q31 * S,
4548 const q31_t * pSrc,
4549 q31_t * pDst,
4550 q31_t * pScratchIn,
4551 uint32_t blockSize);
4552
4553
4564 void arm_fir_sparse_init_q31(
4565 arm_fir_sparse_instance_q31 * S,
4566 uint16_t numTaps,
4567 const q31_t * pCoeffs,
4568 q31_t * pState,
4569 int32_t * pTapDelay,
4570 uint16_t maxDelay,
4571 uint32_t blockSize);
4572
4573
4583 void arm_fir_sparse_q15(
4584 arm_fir_sparse_instance_q15 * S,
4585 const q15_t * pSrc,
4586 q15_t * pDst,
4587 q15_t * pScratchIn,
4588 q31_t * pScratchOut,
4589 uint32_t blockSize);
4590
4591
4602 void arm_fir_sparse_init_q15(
4603 arm_fir_sparse_instance_q15 * S,
4604 uint16_t numTaps,
4605 const q15_t * pCoeffs,
4606 q15_t * pState,
4607 int32_t * pTapDelay,
4608 uint16_t maxDelay,
4609 uint32_t blockSize);
4610
4611
4621 void arm_fir_sparse_q7(
4622 arm_fir_sparse_instance_q7 * S,
4623 const q7_t * pSrc,
4624 q7_t * pDst,
4625 q7_t * pScratchIn,
4626 q31_t * pScratchOut,
4627 uint32_t blockSize);
4628
4629
4640 void arm_fir_sparse_init_q7(
4641 arm_fir_sparse_instance_q7 * S,
4642 uint16_t numTaps,
4643 const q7_t * pCoeffs,
4644 q7_t * pState,
4645 int32_t * pTapDelay,
4646 uint16_t maxDelay,
4647 uint32_t blockSize);
4648
4649
4656 void arm_sin_cos_f32(
4657 float32_t theta,
4658 float32_t * pSinVal,
4659 float32_t * pCosVal);
4660
4661
4668 void arm_sin_cos_q31(
4669 q31_t theta,
4670 q31_t * pSinVal,
4671 q31_t * pCosVal);
4672
4673
4680 void arm_cmplx_conj_f32(
4681 const float32_t * pSrc,
4682 float32_t * pDst,
4683 uint32_t numSamples);
4684
4691 void arm_cmplx_conj_q31(
4692 const q31_t * pSrc,
4693 q31_t * pDst,
4694 uint32_t numSamples);
4695
4696
4703 void arm_cmplx_conj_q15(
4704 const q15_t * pSrc,
4705 q15_t * pDst,
4706 uint32_t numSamples);
4707
4708
4715 void arm_cmplx_mag_squared_f32(
4716 const float32_t * pSrc,
4717 float32_t * pDst,
4718 uint32_t numSamples);
4719
4720
4727 void arm_cmplx_mag_squared_q31(
4728 const q31_t * pSrc,
4729 q31_t * pDst,
4730 uint32_t numSamples);
4731
4732
4739 void arm_cmplx_mag_squared_q15(
4740 const q15_t * pSrc,
4741 q15_t * pDst,
4742 uint32_t numSamples);
4743
4744
4818 __STATIC_FORCEINLINE float32_t arm_pid_f32(
4819 arm_pid_instance_f32 * S,
4820 float32_t in)
4821 {
4822 float32_t out;
4823
4824 /* y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] */
4825 out = (S->A0 * in) +
4826 (S->A1 * S->state[0]) + (S->A2 * S->state[1]) + (S->state[2]);
4827
4828 /* Update state */
4829 S->state[1] = S->state[0];
4830 S->state[0] = in;
4831 S->state[2] = out;
4832
4833 /* return to application */
4834 return (out);
4835
4836 }
4837
4851 __STATIC_FORCEINLINE q31_t arm_pid_q31(
4852 arm_pid_instance_q31 * S,
4853 q31_t in)
4854 {
4855 q63_t acc;
4856 q31_t out;
4857
4858 /* acc = A0 * x[n] */
4859 acc = (q63_t) S->A0 * in;
4860
4861 /* acc += A1 * x[n-1] */
4862 acc += (q63_t) S->A1 * S->state[0];
4863
4864 /* acc += A2 * x[n-2] */
4865 acc += (q63_t) S->A2 * S->state[1];
4866
4867 /* convert output to 1.31 format to add y[n-1] */
4868 out = (q31_t) (acc >> 31U);
4869
4870 /* out += y[n-1] */
4871 out += S->state[2];
4872
4873 /* Update state */
4874 S->state[1] = S->state[0];
4875 S->state[0] = in;
4876 S->state[2] = out;
4877
4878 /* return to application */
4879 return (out);
4880 }
4881
4882
4897 __STATIC_FORCEINLINE q15_t arm_pid_q15(
4898 arm_pid_instance_q15 * S,
4899 q15_t in)
4900 {
4901 q63_t acc;
4902 q15_t out;
4903
4904 #if defined (ARM_MATH_DSP)
4905 /* Implementation of PID controller */
4906
4907 /* acc = A0 * x[n] */
4908 acc = (q31_t) __SMUAD((uint32_t)S->A0, (uint32_t)in);
4909
4910 /* acc += A1 * x[n-1] + A2 * x[n-2] */
4911 acc = (q63_t)__SMLALD((uint32_t)S->A1, (uint32_t)read_q15x2 (S->state), (uint64_t)acc);
4912 #else
4913 /* acc = A0 * x[n] */
4914 acc = ((q31_t) S->A0) * in;
4915
4916 /* acc += A1 * x[n-1] + A2 * x[n-2] */
4917 acc += (q31_t) S->A1 * S->state[0];
4918 acc += (q31_t) S->A2 * S->state[1];
4919 #endif
4920
4921 /* acc += y[n-1] */
4922 acc += (q31_t) S->state[2] << 15;
4923
4924 /* saturate the output */
4925 out = (q15_t) (__SSAT((acc >> 15), 16));
4926
4927 /* Update state */
4928 S->state[1] = S->state[0];
4929 S->state[0] = in;
4930 S->state[2] = out;
4931
4932 /* return to application */
4933 return (out);
4934 }
4935
4948 arm_status arm_mat_inverse_f32(
4949 const arm_matrix_instance_f32 * src,
4950 arm_matrix_instance_f32 * dst);
4951
4952
4960 arm_status arm_mat_inverse_f64(
4961 const arm_matrix_instance_f64 * src,
4962 arm_matrix_instance_f64 * dst);
4963
4964
4965
5006 __STATIC_FORCEINLINE void arm_clarke_f32(
5007 float32_t Ia,
5008 float32_t Ib,
5009 float32_t * pIalpha,
5010 float32_t * pIbeta)
5011 {
5012 /* Calculate pIalpha using the equation, pIalpha = Ia */
5013 *pIalpha = Ia;
5014
5015 /* Calculate pIbeta using the equation, pIbeta = (1/sqrt(3)) * Ia + (2/sqrt(3)) * Ib */
5016 *pIbeta = ((float32_t) 0.57735026919 * Ia + (float32_t) 1.15470053838 * Ib);
5017 }
5018
5019
5033 __STATIC_FORCEINLINE void arm_clarke_q31(
5034 q31_t Ia,
5035 q31_t Ib,
5036 q31_t * pIalpha,
5037 q31_t * pIbeta)
5038 {
5039 q31_t product1, product2; /* Temporary variables used to store intermediate results */
5040
5041 /* Calculating pIalpha from Ia by equation pIalpha = Ia */
5042 *pIalpha = Ia;
5043
5044 /* Intermediate product is calculated by (1/(sqrt(3)) * Ia) */
5045 product1 = (q31_t) (((q63_t) Ia * 0x24F34E8B) >> 30);
5046
5047 /* Intermediate product is calculated by (2/sqrt(3) * Ib) */
5048 product2 = (q31_t) (((q63_t) Ib * 0x49E69D16) >> 30);
5049
5050 /* pIbeta is calculated by adding the intermediate products */
5051 *pIbeta = __QADD(product1, product2);
5052 }
5053
5092 __STATIC_FORCEINLINE void arm_inv_clarke_f32(
5093 float32_t Ialpha,
5094 float32_t Ibeta,
5095 float32_t * pIa,
5096 float32_t * pIb)
5097 {
5098 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5099 *pIa = Ialpha;
5100
5101 /* Calculating pIb from Ialpha and Ibeta by equation pIb = -(1/2) * Ialpha + (sqrt(3)/2) * Ibeta */
5102 *pIb = -0.5f * Ialpha + 0.8660254039f * Ibeta;
5103 }
5104
5105
5119 __STATIC_FORCEINLINE void arm_inv_clarke_q31(
5120 q31_t Ialpha,
5121 q31_t Ibeta,
5122 q31_t * pIa,
5123 q31_t * pIb)
5124 {
5125 q31_t product1, product2; /* Temporary variables used to store intermediate results */
5126
5127 /* Calculating pIa from Ialpha by equation pIa = Ialpha */
5128 *pIa = Ialpha;
5129
5130 /* Intermediate product is calculated by (1/(2*sqrt(3)) * Ia) */
5131 product1 = (q31_t) (((q63_t) (Ialpha) * (0x40000000)) >> 31);
5132
5133 /* Intermediate product is calculated by (1/sqrt(3) * pIb) */
5134 product2 = (q31_t) (((q63_t) (Ibeta) * (0x6ED9EBA1)) >> 31);
5135
5136 /* pIb is calculated by subtracting the products */
5137 *pIb = __QSUB(product2, product1);
5138 }
5139
5192 __STATIC_FORCEINLINE void arm_park_f32(
5193 float32_t Ialpha,
5194 float32_t Ibeta,
5195 float32_t * pId,
5196 float32_t * pIq,
5197 float32_t sinVal,
5198 float32_t cosVal)
5199 {
5200 /* Calculate pId using the equation, pId = Ialpha * cosVal + Ibeta * sinVal */
5201 *pId = Ialpha * cosVal + Ibeta * sinVal;
5202
5203 /* Calculate pIq using the equation, pIq = - Ialpha * sinVal + Ibeta * cosVal */
5204 *pIq = -Ialpha * sinVal + Ibeta * cosVal;
5205 }
5206
5207
5223 __STATIC_FORCEINLINE void arm_park_q31(
5224 q31_t Ialpha,
5225 q31_t Ibeta,
5226 q31_t * pId,
5227 q31_t * pIq,
5228 q31_t sinVal,
5229 q31_t cosVal)
5230 {
5231 q31_t product1, product2; /* Temporary variables used to store intermediate results */
5232 q31_t product3, product4; /* Temporary variables used to store intermediate results */
5233
5234 /* Intermediate product is calculated by (Ialpha * cosVal) */
5235 product1 = (q31_t) (((q63_t) (Ialpha) * (cosVal)) >> 31);
5236
5237 /* Intermediate product is calculated by (Ibeta * sinVal) */
5238 product2 = (q31_t) (((q63_t) (Ibeta) * (sinVal)) >> 31);
5239
5240
5241 /* Intermediate product is calculated by (Ialpha * sinVal) */
5242 product3 = (q31_t) (((q63_t) (Ialpha) * (sinVal)) >> 31);
5243
5244 /* Intermediate product is calculated by (Ibeta * cosVal) */
5245 product4 = (q31_t) (((q63_t) (Ibeta) * (cosVal)) >> 31);
5246
5247 /* Calculate pId by adding the two intermediate products 1 and 2 */
5248 *pId = __QADD(product1, product2);
5249
5250 /* Calculate pIq by subtracting the two intermediate products 3 from 4 */
5251 *pIq = __QSUB(product4, product3);
5252 }
5253
5295 __STATIC_FORCEINLINE void arm_inv_park_f32(
5296 float32_t Id,
5297 float32_t Iq,
5298 float32_t * pIalpha,
5299 float32_t * pIbeta,
5300 float32_t sinVal,
5301 float32_t cosVal)
5302 {
5303 /* Calculate pIalpha using the equation, pIalpha = Id * cosVal - Iq * sinVal */
5304 *pIalpha = Id * cosVal - Iq * sinVal;
5305
5306 /* Calculate pIbeta using the equation, pIbeta = Id * sinVal + Iq * cosVal */
5307 *pIbeta = Id * sinVal + Iq * cosVal;
5308 }
5309
5310
5326 __STATIC_FORCEINLINE void arm_inv_park_q31(
5327 q31_t Id,
5328 q31_t Iq,
5329 q31_t * pIalpha,
5330 q31_t * pIbeta,
5331 q31_t sinVal,
5332 q31_t cosVal)
5333 {
5334 q31_t product1, product2; /* Temporary variables used to store intermediate results */
5335 q31_t product3, product4; /* Temporary variables used to store intermediate results */
5336
5337 /* Intermediate product is calculated by (Id * cosVal) */
5338 product1 = (q31_t) (((q63_t) (Id) * (cosVal)) >> 31);
5339
5340 /* Intermediate product is calculated by (Iq * sinVal) */
5341 product2 = (q31_t) (((q63_t) (Iq) * (sinVal)) >> 31);
5342
5343
5344 /* Intermediate product is calculated by (Id * sinVal) */
5345 product3 = (q31_t) (((q63_t) (Id) * (sinVal)) >> 31);
5346
5347 /* Intermediate product is calculated by (Iq * cosVal) */
5348 product4 = (q31_t) (((q63_t) (Iq) * (cosVal)) >> 31);
5349
5350 /* Calculate pIalpha by using the two intermediate products 1 and 2 */
5351 *pIalpha = __QSUB(product1, product2);
5352
5353 /* Calculate pIbeta by using the two intermediate products 3 and 4 */
5354 *pIbeta = __QADD(product4, product3);
5355 }
5356
5410 __STATIC_FORCEINLINE float32_t arm_linear_interp_f32(
5411 arm_linear_interp_instance_f32 * S,
5412 float32_t x)
5413 {
5414 float32_t y;
5415 float32_t x0, x1; /* Nearest input values */
5416 float32_t y0, y1; /* Nearest output values */
5417 float32_t xSpacing = S->xSpacing; /* spacing between input values */
5418 int32_t i; /* Index variable */
5419 float32_t *pYData = S->pYData; /* pointer to output table */
5420
5421 /* Calculation of index */
5422 i = (int32_t) ((x - S->x1) / xSpacing);
5423
5424 if (i < 0)
5425 {
5426 /* Iniatilize output for below specified range as least output value of table */
5427 y = pYData[0];
5428 }
5429 else if ((uint32_t)i >= S->nValues)
5430 {
5431 /* Iniatilize output for above specified range as last output value of table */
5432 y = pYData[S->nValues - 1];
5433 }
5434 else
5435 {
5436 /* Calculation of nearest input values */
5437 x0 = S->x1 + i * xSpacing;
5438 x1 = S->x1 + (i + 1) * xSpacing;
5439
5440 /* Read of nearest output values */
5441 y0 = pYData[i];
5442 y1 = pYData[i + 1];
5443
5444 /* Calculation of output */
5445 y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
5446
5447 }
5448
5449 /* returns output value */
5450 return (y);
5451 }
5452
5453
5467 __STATIC_FORCEINLINE q31_t arm_linear_interp_q31(
5468 q31_t * pYData,
5469 q31_t x,
5470 uint32_t nValues)
5471 {
5472 q31_t y; /* output */
5473 q31_t y0, y1; /* Nearest output values */
5474 q31_t fract; /* fractional part */
5475 int32_t index; /* Index to read nearest output values */
5476
5477 /* Input is in 12.20 format */
5478 /* 12 bits for the table index */
5479 /* Index value calculation */
5480 index = ((x & (q31_t)0xFFF00000) >> 20);
5481
5482 if (index >= (int32_t)(nValues - 1))
5483 {
5484 return (pYData[nValues - 1]);
5485 }
5486 else if (index < 0)
5487 {
5488 return (pYData[0]);
5489 }
5490 else
5491 {
5492 /* 20 bits for the fractional part */
5493 /* shift left by 11 to keep fract in 1.31 format */
5494 fract = (x & 0x000FFFFF) << 11;
5495
5496 /* Read two nearest output values from the index in 1.31(q31) format */
5497 y0 = pYData[index];
5498 y1 = pYData[index + 1];
5499
5500 /* Calculation of y0 * (1-fract) and y is in 2.30 format */
5501 y = ((q31_t) ((q63_t) y0 * (0x7FFFFFFF - fract) >> 32));
5502
5503 /* Calculation of y0 * (1-fract) + y1 *fract and y is in 2.30 format */
5504 y += ((q31_t) (((q63_t) y1 * fract) >> 32));
5505
5506 /* Convert y to 1.31 format */
5507 return (y << 1U);
5508 }
5509 }
5510
5511
5525 __STATIC_FORCEINLINE q15_t arm_linear_interp_q15(
5526 q15_t * pYData,
5527 q31_t x,
5528 uint32_t nValues)
5529 {
5530 q63_t y; /* output */
5531 q15_t y0, y1; /* Nearest output values */
5532 q31_t fract; /* fractional part */
5533 int32_t index; /* Index to read nearest output values */
5534
5535 /* Input is in 12.20 format */
5536 /* 12 bits for the table index */
5537 /* Index value calculation */
5538 index = ((x & (int32_t)0xFFF00000) >> 20);
5539
5540 if (index >= (int32_t)(nValues - 1))
5541 {
5542 return (pYData[nValues - 1]);
5543 }
5544 else if (index < 0)
5545 {
5546 return (pYData[0]);
5547 }
5548 else
5549 {
5550 /* 20 bits for the fractional part */
5551 /* fract is in 12.20 format */
5552 fract = (x & 0x000FFFFF);
5553
5554 /* Read two nearest output values from the index */
5555 y0 = pYData[index];
5556 y1 = pYData[index + 1];
5557
5558 /* Calculation of y0 * (1-fract) and y is in 13.35 format */
5559 y = ((q63_t) y0 * (0xFFFFF - fract));
5560
5561 /* Calculation of (y0 * (1-fract) + y1 * fract) and y is in 13.35 format */
5562 y += ((q63_t) y1 * (fract));
5563
5564 /* convert y to 1.15 format */
5565 return (q15_t) (y >> 20);
5566 }
5567 }
5568
5569
5582 __STATIC_FORCEINLINE q7_t arm_linear_interp_q7(
5583 q7_t * pYData,
5584 q31_t x,
5585 uint32_t nValues)
5586 {
5587 q31_t y; /* output */
5588 q7_t y0, y1; /* Nearest output values */
5589 q31_t fract; /* fractional part */
5590 uint32_t index; /* Index to read nearest output values */
5591
5592 /* Input is in 12.20 format */
5593 /* 12 bits for the table index */
5594 /* Index value calculation */
5595 if (x < 0)
5596 {
5597 return (pYData[0]);
5598 }
5599 index = (x >> 20) & 0xfff;
5600
5601 if (index >= (nValues - 1))
5602 {
5603 return (pYData[nValues - 1]);
5604 }
5605 else
5606 {
5607 /* 20 bits for the fractional part */
5608 /* fract is in 12.20 format */
5609 fract = (x & 0x000FFFFF);
5610
5611 /* Read two nearest output values from the index and are in 1.7(q7) format */
5612 y0 = pYData[index];
5613 y1 = pYData[index + 1];
5614
5615 /* Calculation of y0 * (1-fract ) and y is in 13.27(q27) format */
5616 y = ((y0 * (0xFFFFF - fract)));
5617
5618 /* Calculation of y1 * fract + y0 * (1-fract) and y is in 13.27(q27) format */
5619 y += (y1 * fract);
5620
5621 /* convert y to 1.7(q7) format */
5622 return (q7_t) (y >> 20);
5623 }
5624 }
5625
5635 float32_t arm_sin_f32(
5636 float32_t x);
5637
5638
5644 q31_t arm_sin_q31(
5645 q31_t x);
5646
5647
5653 q15_t arm_sin_q15(
5654 q15_t x);
5655
5656
5662 float32_t arm_cos_f32(
5663 float32_t x);
5664
5665
5671 q31_t arm_cos_q31(
5672 q31_t x);
5673
5674
5680 q15_t arm_cos_q15(
5681 q15_t x);
5682
5683
5723 __STATIC_FORCEINLINE arm_status arm_sqrt_f32(
5724 float32_t in,
5725 float32_t * pOut)
5726 {
5727 if (in >= 0.0f)
5728 {
5729 #if defined ( __CC_ARM )
5730 #if defined __TARGET_FPU_VFP
5731 *pOut = __sqrtf(in);
5732 #else
5733 *pOut = sqrtf(in);
5734 #endif
5735
5736 #elif defined ( __ICCARM__ )
5737 #if defined __ARMVFP__
5738 __ASM("VSQRT.F32 %0,%1" : "=t"(*pOut) : "t"(in));
5739 #else
5740 *pOut = sqrtf(in);
5741 #endif
5742
5743 #else
5744 *pOut = sqrtf(in);
5745 #endif
5746
5747 return (ARM_MATH_SUCCESS);
5748 }
5749 else
5750 {
5751 *pOut = 0.0f;
5752 return (ARM_MATH_ARGUMENT_ERROR);
5753 }
5754 }
5755
5756
5765 arm_status arm_sqrt_q31(
5766 q31_t in,
5767 q31_t * pOut);
5768
5769
5778 arm_status arm_sqrt_q15(
5779 q15_t in,
5780 q15_t * pOut);
5781
5790 __STATIC_FORCEINLINE void arm_circularWrite_f32(
5791 int32_t * circBuffer,
5792 int32_t L,
5793 uint16_t * writeOffset,
5794 int32_t bufferInc,
5795 const int32_t * src,
5796 int32_t srcInc,
5797 uint32_t blockSize)
5798 {
5799 uint32_t i = 0U;
5800 int32_t wOffset;
5801
5802 /* Copy the value of Index pointer that points
5803 * to the current location where the input samples to be copied */
5804 wOffset = *writeOffset;
5805
5806 /* Loop over the blockSize */
5807 i = blockSize;
5808
5809 while (i > 0U)
5810 {
5811 /* copy the input sample to the circular buffer */
5812 circBuffer[wOffset] = *src;
5813
5814 /* Update the input pointer */
5815 src += srcInc;
5816
5817 /* Circularly update wOffset. Watch out for positive and negative value */
5818 wOffset += bufferInc;
5819 if (wOffset >= L)
5820 wOffset -= L;
5821
5822 /* Decrement the loop counter */
5823 i--;
5824 }
5825
5826 /* Update the index pointer */
5827 *writeOffset = (uint16_t)wOffset;
5828 }
5829
5830
5831
5835 __STATIC_FORCEINLINE void arm_circularRead_f32(
5836 int32_t * circBuffer,
5837 int32_t L,
5838 int32_t * readOffset,
5839 int32_t bufferInc,
5840 int32_t * dst,
5841 int32_t * dst_base,
5842 int32_t dst_length,
5843 int32_t dstInc,
5844 uint32_t blockSize)
5845 {
5846 uint32_t i = 0U;
5847 int32_t rOffset;
5848 int32_t* dst_end;
5849
5850 /* Copy the value of Index pointer that points
5851 * to the current location from where the input samples to be read */
5852 rOffset = *readOffset;
5853 dst_end = dst_base + dst_length;
5854
5855 /* Loop over the blockSize */
5856 i = blockSize;
5857
5858 while (i > 0U)
5859 {
5860 /* copy the sample from the circular buffer to the destination buffer */
5861 *dst = circBuffer[rOffset];
5862
5863 /* Update the input pointer */
5864 dst += dstInc;
5865
5866 if (dst == dst_end)
5867 {
5868 dst = dst_base;
5869 }
5870
5871 /* Circularly update rOffset. Watch out for positive and negative value */
5872 rOffset += bufferInc;
5873
5874 if (rOffset >= L)
5875 {
5876 rOffset -= L;
5877 }
5878
5879 /* Decrement the loop counter */
5880 i--;
5881 }
5882
5883 /* Update the index pointer */
5884 *readOffset = rOffset;
5885 }
5886
5887
5891 __STATIC_FORCEINLINE void arm_circularWrite_q15(
5892 q15_t * circBuffer,
5893 int32_t L,
5894 uint16_t * writeOffset,
5895 int32_t bufferInc,
5896 const q15_t * src,
5897 int32_t srcInc,
5898 uint32_t blockSize)
5899 {
5900 uint32_t i = 0U;
5901 int32_t wOffset;
5902
5903 /* Copy the value of Index pointer that points
5904 * to the current location where the input samples to be copied */
5905 wOffset = *writeOffset;
5906
5907 /* Loop over the blockSize */
5908 i = blockSize;
5909
5910 while (i > 0U)
5911 {
5912 /* copy the input sample to the circular buffer */
5913 circBuffer[wOffset] = *src;
5914
5915 /* Update the input pointer */
5916 src += srcInc;
5917
5918 /* Circularly update wOffset. Watch out for positive and negative value */
5919 wOffset += bufferInc;
5920 if (wOffset >= L)
5921 wOffset -= L;
5922
5923 /* Decrement the loop counter */
5924 i--;
5925 }
5926
5927 /* Update the index pointer */
5928 *writeOffset = (uint16_t)wOffset;
5929 }
5930
5931
5935 __STATIC_FORCEINLINE void arm_circularRead_q15(
5936 q15_t * circBuffer,
5937 int32_t L,
5938 int32_t * readOffset,
5939 int32_t bufferInc,
5940 q15_t * dst,
5941 q15_t * dst_base,
5942 int32_t dst_length,
5943 int32_t dstInc,
5944 uint32_t blockSize)
5945 {
5946 uint32_t i = 0;
5947 int32_t rOffset;
5948 q15_t* dst_end;
5949
5950 /* Copy the value of Index pointer that points
5951 * to the current location from where the input samples to be read */
5952 rOffset = *readOffset;
5953
5954 dst_end = dst_base + dst_length;
5955
5956 /* Loop over the blockSize */
5957 i = blockSize;
5958
5959 while (i > 0U)
5960 {
5961 /* copy the sample from the circular buffer to the destination buffer */
5962 *dst = circBuffer[rOffset];
5963
5964 /* Update the input pointer */
5965 dst += dstInc;
5966
5967 if (dst == dst_end)
5968 {
5969 dst = dst_base;
5970 }
5971
5972 /* Circularly update wOffset. Watch out for positive and negative value */
5973 rOffset += bufferInc;
5974
5975 if (rOffset >= L)
5976 {
5977 rOffset -= L;
5978 }
5979
5980 /* Decrement the loop counter */
5981 i--;
5982 }
5983
5984 /* Update the index pointer */
5985 *readOffset = rOffset;
5986 }
5987
5988
5992 __STATIC_FORCEINLINE void arm_circularWrite_q7(
5993 q7_t * circBuffer,
5994 int32_t L,
5995 uint16_t * writeOffset,
5996 int32_t bufferInc,
5997 const q7_t * src,
5998 int32_t srcInc,
5999 uint32_t blockSize)
6000 {
6001 uint32_t i = 0U;
6002 int32_t wOffset;
6003
6004 /* Copy the value of Index pointer that points
6005 * to the current location where the input samples to be copied */
6006 wOffset = *writeOffset;
6007
6008 /* Loop over the blockSize */
6009 i = blockSize;
6010
6011 while (i > 0U)
6012 {
6013 /* copy the input sample to the circular buffer */
6014 circBuffer[wOffset] = *src;
6015
6016 /* Update the input pointer */
6017 src += srcInc;
6018
6019 /* Circularly update wOffset. Watch out for positive and negative value */
6020 wOffset += bufferInc;
6021 if (wOffset >= L)
6022 wOffset -= L;
6023
6024 /* Decrement the loop counter */
6025 i--;
6026 }
6027
6028 /* Update the index pointer */
6029 *writeOffset = (uint16_t)wOffset;
6030 }
6031
6032
6036 __STATIC_FORCEINLINE void arm_circularRead_q7(
6037 q7_t * circBuffer,
6038 int32_t L,
6039 int32_t * readOffset,
6040 int32_t bufferInc,
6041 q7_t * dst,
6042 q7_t * dst_base,
6043 int32_t dst_length,
6044 int32_t dstInc,
6045 uint32_t blockSize)
6046 {
6047 uint32_t i = 0;
6048 int32_t rOffset;
6049 q7_t* dst_end;
6050
6051 /* Copy the value of Index pointer that points
6052 * to the current location from where the input samples to be read */
6053 rOffset = *readOffset;
6054
6055 dst_end = dst_base + dst_length;
6056
6057 /* Loop over the blockSize */
6058 i = blockSize;
6059
6060 while (i > 0U)
6061 {
6062 /* copy the sample from the circular buffer to the destination buffer */
6063 *dst = circBuffer[rOffset];
6064
6065 /* Update the input pointer */
6066 dst += dstInc;
6067
6068 if (dst == dst_end)
6069 {
6070 dst = dst_base;
6071 }
6072
6073 /* Circularly update rOffset. Watch out for positive and negative value */
6074 rOffset += bufferInc;
6075
6076 if (rOffset >= L)
6077 {
6078 rOffset -= L;
6079 }
6080
6081 /* Decrement the loop counter */
6082 i--;
6083 }
6084
6085 /* Update the index pointer */
6086 *readOffset = rOffset;
6087 }
6088
6089
6096 void arm_power_q31(
6097 const q31_t * pSrc,
6098 uint32_t blockSize,
6099 q63_t * pResult);
6100
6101
6108 void arm_power_f32(
6109 const float32_t * pSrc,
6110 uint32_t blockSize,
6111 float32_t * pResult);
6112
6113
6120 void arm_power_q15(
6121 const q15_t * pSrc,
6122 uint32_t blockSize,
6123 q63_t * pResult);
6124
6125
6132 void arm_power_q7(
6133 const q7_t * pSrc,
6134 uint32_t blockSize,
6135 q31_t * pResult);
6136
6137
6144 void arm_mean_q7(
6145 const q7_t * pSrc,
6146 uint32_t blockSize,
6147 q7_t * pResult);
6148
6149
6156 void arm_mean_q15(
6157 const q15_t * pSrc,
6158 uint32_t blockSize,
6159 q15_t * pResult);
6160
6161
6168 void arm_mean_q31(
6169 const q31_t * pSrc,
6170 uint32_t blockSize,
6171 q31_t * pResult);
6172
6173
6180 void arm_mean_f32(
6181 const float32_t * pSrc,
6182 uint32_t blockSize,
6183 float32_t * pResult);
6184
6185
6192 void arm_var_f32(
6193 const float32_t * pSrc,
6194 uint32_t blockSize,
6195 float32_t * pResult);
6196
6197
6204 void arm_var_q31(
6205 const q31_t * pSrc,
6206 uint32_t blockSize,
6207 q31_t * pResult);
6208
6209
6216 void arm_var_q15(
6217 const q15_t * pSrc,
6218 uint32_t blockSize,
6219 q15_t * pResult);
6220
6221
6228 void arm_rms_f32(
6229 const float32_t * pSrc,
6230 uint32_t blockSize,
6231 float32_t * pResult);
6232
6233
6240 void arm_rms_q31(
6241 const q31_t * pSrc,
6242 uint32_t blockSize,
6243 q31_t * pResult);
6244
6245
6252 void arm_rms_q15(
6253 const q15_t * pSrc,
6254 uint32_t blockSize,
6255 q15_t * pResult);
6256
6257
6264 void arm_std_f32(
6265 const float32_t * pSrc,
6266 uint32_t blockSize,
6267 float32_t * pResult);
6268
6269
6276 void arm_std_q31(
6277 const q31_t * pSrc,
6278 uint32_t blockSize,
6279 q31_t * pResult);
6280
6281
6288 void arm_std_q15(
6289 const q15_t * pSrc,
6290 uint32_t blockSize,
6291 q15_t * pResult);
6292
6293
6300 void arm_cmplx_mag_f32(
6301 const float32_t * pSrc,
6302 float32_t * pDst,
6303 uint32_t numSamples);
6304
6305
6312 void arm_cmplx_mag_q31(
6313 const q31_t * pSrc,
6314 q31_t * pDst,
6315 uint32_t numSamples);
6316
6317
6324 void arm_cmplx_mag_q15(
6325 const q15_t * pSrc,
6326 q15_t * pDst,
6327 uint32_t numSamples);
6328
6329
6338 void arm_cmplx_dot_prod_q15(
6339 const q15_t * pSrcA,
6340 const q15_t * pSrcB,
6341 uint32_t numSamples,
6342 q31_t * realResult,
6343 q31_t * imagResult);
6344
6345
6354 void arm_cmplx_dot_prod_q31(
6355 const q31_t * pSrcA,
6356 const q31_t * pSrcB,
6357 uint32_t numSamples,
6358 q63_t * realResult,
6359 q63_t * imagResult);
6360
6361
6370 void arm_cmplx_dot_prod_f32(
6371 const float32_t * pSrcA,
6372 const float32_t * pSrcB,
6373 uint32_t numSamples,
6374 float32_t * realResult,
6375 float32_t * imagResult);
6376
6377
6385 void arm_cmplx_mult_real_q15(
6386 const q15_t * pSrcCmplx,
6387 const q15_t * pSrcReal,
6388 q15_t * pCmplxDst,
6389 uint32_t numSamples);
6390
6391
6399 void arm_cmplx_mult_real_q31(
6400 const q31_t * pSrcCmplx,
6401 const q31_t * pSrcReal,
6402 q31_t * pCmplxDst,
6403 uint32_t numSamples);
6404
6405
6413 void arm_cmplx_mult_real_f32(
6414 const float32_t * pSrcCmplx,
6415 const float32_t * pSrcReal,
6416 float32_t * pCmplxDst,
6417 uint32_t numSamples);
6418
6419
6427 void arm_min_q7(
6428 const q7_t * pSrc,
6429 uint32_t blockSize,
6430 q7_t * result,
6431 uint32_t * index);
6432
6433
6441 void arm_min_q15(
6442 const q15_t * pSrc,
6443 uint32_t blockSize,
6444 q15_t * pResult,
6445 uint32_t * pIndex);
6446
6447
6455 void arm_min_q31(
6456 const q31_t * pSrc,
6457 uint32_t blockSize,
6458 q31_t * pResult,
6459 uint32_t * pIndex);
6460
6461
6469 void arm_min_f32(
6470 const float32_t * pSrc,
6471 uint32_t blockSize,
6472 float32_t * pResult,
6473 uint32_t * pIndex);
6474
6475
6483 void arm_max_q7(
6484 const q7_t * pSrc,
6485 uint32_t blockSize,
6486 q7_t * pResult,
6487 uint32_t * pIndex);
6488
6489
6497 void arm_max_q15(
6498 const q15_t * pSrc,
6499 uint32_t blockSize,
6500 q15_t * pResult,
6501 uint32_t * pIndex);
6502
6503
6511 void arm_max_q31(
6512 const q31_t * pSrc,
6513 uint32_t blockSize,
6514 q31_t * pResult,
6515 uint32_t * pIndex);
6516
6517
6525 void arm_max_f32(
6526 const float32_t * pSrc,
6527 uint32_t blockSize,
6528 float32_t * pResult,
6529 uint32_t * pIndex);
6530
6531
6539 void arm_cmplx_mult_cmplx_q15(
6540 const q15_t * pSrcA,
6541 const q15_t * pSrcB,
6542 q15_t * pDst,
6543 uint32_t numSamples);
6544
6545
6553 void arm_cmplx_mult_cmplx_q31(
6554 const q31_t * pSrcA,
6555 const q31_t * pSrcB,
6556 q31_t * pDst,
6557 uint32_t numSamples);
6558
6559
6567 void arm_cmplx_mult_cmplx_f32(
6568 const float32_t * pSrcA,
6569 const float32_t * pSrcB,
6570 float32_t * pDst,
6571 uint32_t numSamples);
6572
6573
6580 void arm_float_to_q31(
6581 const float32_t * pSrc,
6582 q31_t * pDst,
6583 uint32_t blockSize);
6584
6585
6592 void arm_float_to_q15(
6593 const float32_t * pSrc,
6594 q15_t * pDst,
6595 uint32_t blockSize);
6596
6597
6604 void arm_float_to_q7(
6605 const float32_t * pSrc,
6606 q7_t * pDst,
6607 uint32_t blockSize);
6608
6609
6616 void arm_q31_to_float(
6617 const q31_t * pSrc,
6618 float32_t * pDst,
6619 uint32_t blockSize);
6620
6621
6628 void arm_q31_to_q15(
6629 const q31_t * pSrc,
6630 q15_t * pDst,
6631 uint32_t blockSize);
6632
6633
6640 void arm_q31_to_q7(
6641 const q31_t * pSrc,
6642 q7_t * pDst,
6643 uint32_t blockSize);
6644
6645
6652 void arm_q15_to_float(
6653 const q15_t * pSrc,
6654 float32_t * pDst,
6655 uint32_t blockSize);
6656
6657
6664 void arm_q15_to_q31(
6665 const q15_t * pSrc,
6666 q31_t * pDst,
6667 uint32_t blockSize);
6668
6669
6676 void arm_q15_to_q7(
6677 const q15_t * pSrc,
6678 q7_t * pDst,
6679 uint32_t blockSize);
6680
6681
6688 void arm_q7_to_float(
6689 const q7_t * pSrc,
6690 float32_t * pDst,
6691 uint32_t blockSize);
6692
6693
6700 void arm_q7_to_q31(
6701 const q7_t * pSrc,
6702 q31_t * pDst,
6703 uint32_t blockSize);
6704
6705
6712 void arm_q7_to_q15(
6713 const q7_t * pSrc,
6714 q15_t * pDst,
6715 uint32_t blockSize);
6716
6717
6787 __STATIC_FORCEINLINE float32_t arm_bilinear_interp_f32(
6788 const arm_bilinear_interp_instance_f32 * S,
6789 float32_t X,
6790 float32_t Y)
6791 {
6792 float32_t out;
6793 float32_t f00, f01, f10, f11;
6794 float32_t *pData = S->pData;
6795 int32_t xIndex, yIndex, index;
6796 float32_t xdiff, ydiff;
6797 float32_t b1, b2, b3, b4;
6798
6799 xIndex = (int32_t) X;
6800 yIndex = (int32_t) Y;
6801
6802 /* Care taken for table outside boundary */
6803 /* Returns zero output when values are outside table boundary */
6804 if (xIndex < 0 || xIndex > (S->numRows - 1) || yIndex < 0 || yIndex > (S->numCols - 1))
6805 {
6806 return (0);
6807 }
6808
6809 /* Calculation of index for two nearest points in X-direction */
6810 index = (xIndex - 1) + (yIndex - 1) * S->numCols;
6811
6812
6813 /* Read two nearest points in X-direction */
6814 f00 = pData[index];
6815 f01 = pData[index + 1];
6816
6817 /* Calculation of index for two nearest points in Y-direction */
6818 index = (xIndex - 1) + (yIndex) * S->numCols;
6819
6820
6821 /* Read two nearest points in Y-direction */
6822 f10 = pData[index];
6823 f11 = pData[index + 1];
6824
6825 /* Calculation of intermediate values */
6826 b1 = f00;
6827 b2 = f01 - f00;
6828 b3 = f10 - f00;
6829 b4 = f00 - f01 - f10 + f11;
6830
6831 /* Calculation of fractional part in X */
6832 xdiff = X - xIndex;
6833
6834 /* Calculation of fractional part in Y */
6835 ydiff = Y - yIndex;
6836
6837 /* Calculation of bi-linear interpolated output */
6838 out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
6839
6840 /* return to application */
6841 return (out);
6842 }
6843
6844
6852 __STATIC_FORCEINLINE q31_t arm_bilinear_interp_q31(
6853 arm_bilinear_interp_instance_q31 * S,
6854 q31_t X,
6855 q31_t Y)
6856 {
6857 q31_t out; /* Temporary output */
6858 q31_t acc = 0; /* output */
6859 q31_t xfract, yfract; /* X, Y fractional parts */
6860 q31_t x1, x2, y1, y2; /* Nearest output values */
6861 int32_t rI, cI; /* Row and column indices */
6862 q31_t *pYData = S->pData; /* pointer to output table values */
6863 uint32_t nCols = S->numCols; /* num of rows */
6864
6865 /* Input is in 12.20 format */
6866 /* 12 bits for the table index */
6867 /* Index value calculation */
6868 rI = ((X & (q31_t)0xFFF00000) >> 20);
6869
6870 /* Input is in 12.20 format */
6871 /* 12 bits for the table index */
6872 /* Index value calculation */
6873 cI = ((Y & (q31_t)0xFFF00000) >> 20);
6874
6875 /* Care taken for table outside boundary */
6876 /* Returns zero output when values are outside table boundary */
6877 if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
6878 {
6879 return (0);
6880 }
6881
6882 /* 20 bits for the fractional part */
6883 /* shift left xfract by 11 to keep 1.31 format */
6884 xfract = (X & 0x000FFFFF) << 11U;
6885
6886 /* Read two nearest output values from the index */
6887 x1 = pYData[(rI) + (int32_t)nCols * (cI) ];
6888 x2 = pYData[(rI) + (int32_t)nCols * (cI) + 1];
6889
6890 /* 20 bits for the fractional part */
6891 /* shift left yfract by 11 to keep 1.31 format */
6892 yfract = (Y & 0x000FFFFF) << 11U;
6893
6894 /* Read two nearest output values from the index */
6895 y1 = pYData[(rI) + (int32_t)nCols * (cI + 1) ];
6896 y2 = pYData[(rI) + (int32_t)nCols * (cI + 1) + 1];
6897
6898 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 3.29(q29) format */
6899 out = ((q31_t) (((q63_t) x1 * (0x7FFFFFFF - xfract)) >> 32));
6900 acc = ((q31_t) (((q63_t) out * (0x7FFFFFFF - yfract)) >> 32));
6901
6902 /* x2 * (xfract) * (1-yfract) in 3.29(q29) and adding to acc */
6903 out = ((q31_t) ((q63_t) x2 * (0x7FFFFFFF - yfract) >> 32));
6904 acc += ((q31_t) ((q63_t) out * (xfract) >> 32));
6905
6906 /* y1 * (1 - xfract) * (yfract) in 3.29(q29) and adding to acc */
6907 out = ((q31_t) ((q63_t) y1 * (0x7FFFFFFF - xfract) >> 32));
6908 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
6909
6910 /* y2 * (xfract) * (yfract) in 3.29(q29) and adding to acc */
6911 out = ((q31_t) ((q63_t) y2 * (xfract) >> 32));
6912 acc += ((q31_t) ((q63_t) out * (yfract) >> 32));
6913
6914 /* Convert acc to 1.31(q31) format */
6915 return ((q31_t)(acc << 2));
6916 }
6917
6918
6926 __STATIC_FORCEINLINE q15_t arm_bilinear_interp_q15(
6927 arm_bilinear_interp_instance_q15 * S,
6928 q31_t X,
6929 q31_t Y)
6930 {
6931 q63_t acc = 0; /* output */
6932 q31_t out; /* Temporary output */
6933 q15_t x1, x2, y1, y2; /* Nearest output values */
6934 q31_t xfract, yfract; /* X, Y fractional parts */
6935 int32_t rI, cI; /* Row and column indices */
6936 q15_t *pYData = S->pData; /* pointer to output table values */
6937 uint32_t nCols = S->numCols; /* num of rows */
6938
6939 /* Input is in 12.20 format */
6940 /* 12 bits for the table index */
6941 /* Index value calculation */
6942 rI = ((X & (q31_t)0xFFF00000) >> 20);
6943
6944 /* Input is in 12.20 format */
6945 /* 12 bits for the table index */
6946 /* Index value calculation */
6947 cI = ((Y & (q31_t)0xFFF00000) >> 20);
6948
6949 /* Care taken for table outside boundary */
6950 /* Returns zero output when values are outside table boundary */
6951 if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
6952 {
6953 return (0);
6954 }
6955
6956 /* 20 bits for the fractional part */
6957 /* xfract should be in 12.20 format */
6958 xfract = (X & 0x000FFFFF);
6959
6960 /* Read two nearest output values from the index */
6961 x1 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI) ];
6962 x2 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI) + 1];
6963
6964 /* 20 bits for the fractional part */
6965 /* yfract should be in 12.20 format */
6966 yfract = (Y & 0x000FFFFF);
6967
6968 /* Read two nearest output values from the index */
6969 y1 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI + 1) ];
6970 y2 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI + 1) + 1];
6971
6972 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 13.51 format */
6973
6974 /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */
6975 /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */
6976 out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4U);
6977 acc = ((q63_t) out * (0xFFFFF - yfract));
6978
6979 /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */
6980 out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4U);
6981 acc += ((q63_t) out * (xfract));
6982
6983 /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */
6984 out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4U);
6985 acc += ((q63_t) out * (yfract));
6986
6987 /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */
6988 out = (q31_t) (((q63_t) y2 * (xfract)) >> 4U);
6989 acc += ((q63_t) out * (yfract));
6990
6991 /* acc is in 13.51 format and down shift acc by 36 times */
6992 /* Convert out to 1.15 format */
6993 return ((q15_t)(acc >> 36));
6994 }
6995
6996
7004 __STATIC_FORCEINLINE q7_t arm_bilinear_interp_q7(
7005 arm_bilinear_interp_instance_q7 * S,
7006 q31_t X,
7007 q31_t Y)
7008 {
7009 q63_t acc = 0; /* output */
7010 q31_t out; /* Temporary output */
7011 q31_t xfract, yfract; /* X, Y fractional parts */
7012 q7_t x1, x2, y1, y2; /* Nearest output values */
7013 int32_t rI, cI; /* Row and column indices */
7014 q7_t *pYData = S->pData; /* pointer to output table values */
7015 uint32_t nCols = S->numCols; /* num of rows */
7016
7017 /* Input is in 12.20 format */
7018 /* 12 bits for the table index */
7019 /* Index value calculation */
7020 rI = ((X & (q31_t)0xFFF00000) >> 20);
7021
7022 /* Input is in 12.20 format */
7023 /* 12 bits for the table index */
7024 /* Index value calculation */
7025 cI = ((Y & (q31_t)0xFFF00000) >> 20);
7026
7027 /* Care taken for table outside boundary */
7028 /* Returns zero output when values are outside table boundary */
7029 if (rI < 0 || rI > (S->numRows - 1) || cI < 0 || cI > (S->numCols - 1))
7030 {
7031 return (0);
7032 }
7033
7034 /* 20 bits for the fractional part */
7035 /* xfract should be in 12.20 format */
7036 xfract = (X & (q31_t)0x000FFFFF);
7037
7038 /* Read two nearest output values from the index */
7039 x1 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI) ];
7040 x2 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI) + 1];
7041
7042 /* 20 bits for the fractional part */
7043 /* yfract should be in 12.20 format */
7044 yfract = (Y & (q31_t)0x000FFFFF);
7045
7046 /* Read two nearest output values from the index */
7047 y1 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI + 1) ];
7048 y2 = pYData[((uint32_t)rI) + nCols * ((uint32_t)cI + 1) + 1];
7049
7050 /* Calculation of x1 * (1-xfract ) * (1-yfract) and acc is in 16.47 format */
7051 out = ((x1 * (0xFFFFF - xfract)));
7052 acc = (((q63_t) out * (0xFFFFF - yfract)));
7053
7054 /* x2 * (xfract) * (1-yfract) in 2.22 and adding to acc */
7055 out = ((x2 * (0xFFFFF - yfract)));
7056 acc += (((q63_t) out * (xfract)));
7057
7058 /* y1 * (1 - xfract) * (yfract) in 2.22 and adding to acc */
7059 out = ((y1 * (0xFFFFF - xfract)));
7060 acc += (((q63_t) out * (yfract)));
7061
7062 /* y2 * (xfract) * (yfract) in 2.22 and adding to acc */
7063 out = ((y2 * (yfract)));
7064 acc += (((q63_t) out * (xfract)));
7065
7066 /* acc in 16.47 format and down shift by 40 to convert to 1.7 format */
7067 return ((q7_t)(acc >> 40));
7068 }
7069
7075 /* SMMLAR */
7076 #define multAcc_32x32_keep32_R(a, x, y) \
7077 a = (q31_t) (((((q63_t) a) << 32) + ((q63_t) x * y) + 0x80000000LL ) >> 32)
7078
7079 /* SMMLSR */
7080 #define multSub_32x32_keep32_R(a, x, y) \
7081 a = (q31_t) (((((q63_t) a) << 32) - ((q63_t) x * y) + 0x80000000LL ) >> 32)
7082
7083 /* SMMULR */
7084 #define mult_32x32_keep32_R(a, x, y) \
7085 a = (q31_t) (((q63_t) x * y + 0x80000000LL ) >> 32)
7086
7087 /* SMMLA */
7088 #define multAcc_32x32_keep32(a, x, y) \
7089 a += (q31_t) (((q63_t) x * y) >> 32)
7090
7091 /* SMMLS */
7092 #define multSub_32x32_keep32(a, x, y) \
7093 a -= (q31_t) (((q63_t) x * y) >> 32)
7094
7095 /* SMMUL */
7096 #define mult_32x32_keep32(a, x, y) \
7097 a = (q31_t) (((q63_t) x * y ) >> 32)
7098
7099
7100 #if defined ( __CC_ARM )
7101 /* Enter low optimization region - place directly above function definition */
7102 #if defined( __ARM_ARCH_7EM__ )
7103 #define LOW_OPTIMIZATION_ENTER \
7104 _Pragma ("push") \
7105 _Pragma ("O1")
7106 #else
7107 #define LOW_OPTIMIZATION_ENTER
7108 #endif
7109
7110 /* Exit low optimization region - place directly after end of function definition */
7111 #if defined ( __ARM_ARCH_7EM__ )
7112 #define LOW_OPTIMIZATION_EXIT \
7113 _Pragma ("pop")
7114 #else
7115 #define LOW_OPTIMIZATION_EXIT
7116 #endif
7117
7118 /* Enter low optimization region - place directly above function definition */
7119 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7120
7121 /* Exit low optimization region - place directly after end of function definition */
7122 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7123
7124 #elif defined (__ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
7125 #define LOW_OPTIMIZATION_ENTER
7126 #define LOW_OPTIMIZATION_EXIT
7127 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7128 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7129
7130 #elif defined ( __GNUC__ )
7131 #define LOW_OPTIMIZATION_ENTER \
7132 __attribute__(( optimize("-O1") ))
7133 #define LOW_OPTIMIZATION_EXIT
7134 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7135 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7136
7137 #elif defined ( __ICCARM__ )
7138 /* Enter low optimization region - place directly above function definition */
7139 #if defined ( __ARM_ARCH_7EM__ )
7140 #define LOW_OPTIMIZATION_ENTER \
7141 _Pragma ("optimize=low")
7142 #else
7143 #define LOW_OPTIMIZATION_ENTER
7144 #endif
7145
7146 /* Exit low optimization region - place directly after end of function definition */
7147 #define LOW_OPTIMIZATION_EXIT
7148
7149 /* Enter low optimization region - place directly above function definition */
7150 #if defined ( __ARM_ARCH_7EM__ )
7151 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER \
7152 _Pragma ("optimize=low")
7153 #else
7154 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7155 #endif
7156
7157 /* Exit low optimization region - place directly after end of function definition */
7158 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7159
7160 #elif defined ( __TI_ARM__ )
7161 #define LOW_OPTIMIZATION_ENTER
7162 #define LOW_OPTIMIZATION_EXIT
7163 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7164 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7165
7166 #elif defined ( __CSMC__ )
7167 #define LOW_OPTIMIZATION_ENTER
7168 #define LOW_OPTIMIZATION_EXIT
7169 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7170 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7171
7172 #elif defined ( __TASKING__ )
7173 #define LOW_OPTIMIZATION_ENTER
7174 #define LOW_OPTIMIZATION_EXIT
7175 #define IAR_ONLY_LOW_OPTIMIZATION_ENTER
7176 #define IAR_ONLY_LOW_OPTIMIZATION_EXIT
7177
7178 #endif
7179
7180
7181 #ifdef __cplusplus
7182 }
7183 #endif
7184
7185 /* Compiler specific diagnostic adjustment */
7186 #if defined ( __CC_ARM )
7187
7188 #elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
7189
7190 #elif defined ( __GNUC__ )
7191 #pragma GCC diagnostic pop
7192
7193 #elif defined ( __ICCARM__ )
7194
7195 #elif defined ( __TI_ARM__ )
7196
7197 #elif defined ( __CSMC__ )
7198
7199 #elif defined ( __TASKING__ )
7200
7201 #else
7202 #error Unknown compiler
7203 #endif
7204
7205 #endif /* _ARM_MATH_H */
7206
arm_fir_instance_q31
Instance structure for the Q31 FIR filter.
Definition: arm_math.h:1096
arm_scale_q15
void arm_scale_q15(const q15_t *pSrc, q15_t scaleFract, int8_t shift, q15_t *pDst, uint32_t blockSize)
Multiplies a Q15 vector by a scalar.
arm_fir_decimate_q15
void arm_fir_decimate_q15(const arm_fir_decimate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator.
arm_sqrt_f32
__STATIC_FORCEINLINE arm_status arm_sqrt_f32(float32_t in, float32_t *pOut)
Floating-point square root function.
Definition: arm_math.h:5722
arm_inv_park_f32
__STATIC_FORCEINLINE 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:5294
arm_negate_q15
void arm_negate_q15(const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Negates the elements of a Q15 vector.
arm_fir_interpolate_instance_q31
Instance structure for the Q31 FIR interpolator.
Definition: arm_math.h:3465
arm_lms_norm_f32
void arm_lms_norm_f32(arm_lms_norm_instance_f32 *S, const float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point normalized LMS filter.
arm_fir_lattice_init_f32
void arm_fir_lattice_init_f32(arm_fir_lattice_instance_f32 *S, uint16_t numStages, const float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point FIR lattice filter.
arm_offset_q7
void arm_offset_q7(const q7_t *pSrc, q7_t offset, q7_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q7 vector.
arm_cfft_radix2_f32
void arm_cfft_radix2_f32(const arm_cfft_radix2_instance_f32 *S, float32_t *pSrc)
arm_fir_interpolate_init_q31
arm_status arm_fir_interpolate_init_q31(arm_fir_interpolate_instance_q31 *S, uint8_t L, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR interpolator.
arm_fill_f32
void arm_fill_f32(float32_t value, float32_t *pDst, uint32_t blockSize)
Fills a constant value into a floating-point vector.
float64_t
double float64_t
64-bit floating-point type definition.
Definition: arm_math.h:399
arm_q31_to_q15
void arm_q31_to_q15(const q31_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q15 vector.
arm_fir_interpolate_q31
void arm_fir_interpolate_q31(const arm_fir_interpolate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR interpolator.
arm_rfft_32_fast_init_f32
arm_status arm_rfft_32_fast_init_f32(arm_rfft_fast_instance_f32 *S)
float32_t
float float32_t
32-bit floating-point type definition.
Definition: arm_math.h:394
arm_pid_instance_q15::A0
q15_t A0
Definition: arm_math.h:1743
arm_bilinear_interp_instance_q31::numCols
uint16_t numCols
Definition: arm_math.h:1868
arm_correlate_q15
void arm_correlate_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences.
arm_max_q7
void arm_max_q7(const q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex)
Maximum value of a Q7 vector.
arm_lms_instance_f32
Instance structure for the floating-point LMS filter.
Definition: arm_math.h:3990
arm_conv_partial_fast_q15
arm_status arm_conv_partial_fast_q15(const q15_t *pSrcA, uint32_t srcALen, const 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.
arm_rms_f32
void arm_rms_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Root Mean Square of the elements of a floating-point vector.
arm_mat_mult_fast_q31
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.
arm_dot_prod_q7
void arm_dot_prod_q7(const q7_t *pSrcA, const q7_t *pSrcB, uint32_t blockSize, q31_t *result)
Dot product of Q7 vectors.
arm_recip_q31
__STATIC_FORCEINLINE uint32_t arm_recip_q31(q31_t in, q31_t *dst, const q31_t *pRecipTable)
Function to Calculates 1/in (reciprocal) value of Q31 Data type.
Definition: arm_math.h:639
__CLZ
__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value)
Count leading zeros.
Definition: cmsis_armclang.h:913
arm_mean_f32
void arm_mean_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Mean value of a floating-point vector.
__SMLALDX
__STATIC_FORCEINLINE uint64_t __SMLALDX(uint32_t x, uint32_t y, uint64_t sum)
Definition: arm_math.h:1013
arm_pid_init_q31
void arm_pid_init_q31(arm_pid_instance_q31 *S, int32_t resetStateFlag)
Initialization function for the Q31 PID Control.
__ASM
#define __ASM
Definition: cmsis_armcc.h:57
arm_fir_sparse_q15
void arm_fir_sparse_q15(arm_fir_sparse_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, q15_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q15 sparse FIR filter.
arm_cmplx_mult_cmplx_q15
void arm_cmplx_mult_cmplx_q15(const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t numSamples)
Q15 complex-by-complex multiplication.
q63_t
int64_t q63_t
64-bit fractional data type in 1.63 format.
Definition: arm_math.h:389
arm_fir_lattice_instance_f32
Instance structure for the floating-point FIR lattice filter.
Definition: arm_math.h:3765
arm_biquad_cascade_df1_f32
void arm_biquad_cascade_df1_f32(const arm_biquad_casd_df1_inst_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point Biquad cascade filter.
arm_circularRead_f32
__STATIC_FORCEINLINE 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:5834
arm_iir_lattice_instance_f32
Instance structure for the floating-point IIR lattice filter.
Definition: arm_math.h:3882
arm_lms_f32
void arm_lms_f32(const arm_lms_instance_f32 *S, const float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize)
Processing function for floating-point LMS filter.
arm_cfft_instance_q31
Instance structure for the fixed-point CFFT/CIFFT function.
Definition: arm_math.h:2128
arm_correlate_fast_q15
void arm_correlate_fast_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Correlation of Q15 sequences (fast version).
arm_max_q15
void arm_max_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Maximum value of a Q15 vector.
arm_mat_scale_q15
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.
arm_mult_f32
void arm_mult_f32(const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector multiplication.
arm_fir_sparse_instance_q15
Instance structure for the Q15 sparse FIR filter.
Definition: arm_math.h:4477
__SMUADX
__STATIC_FORCEINLINE uint32_t __SMUADX(uint32_t x, uint32_t y)
Definition: arm_math.h:922
arm_sin_q31
q31_t arm_sin_q31(q31_t x)
Fast approximation to the trigonometric sine function for Q31 data.
arm_cfft_radix4_q31
void arm_cfft_radix4_q31(const arm_cfft_radix4_instance_q31 *S, q31_t *pSrc)
arm_mat_sub_f32
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.
arm_rfft_1024_fast_init_f32
arm_status arm_rfft_1024_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_fir_fast_q31
void arm_fir_fast_q31(const arm_fir_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the fast Q31 FIR filter (fast version).
arm_mat_mult_q15
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.
arm_recip_q15
__STATIC_FORCEINLINE uint32_t arm_recip_q15(q15_t in, q15_t *dst, const q15_t *pRecipTable)
Function to Calculates 1/in (reciprocal) value of Q15 Data type.
Definition: arm_math.h:690
__SMUSD
__STATIC_FORCEINLINE uint32_t __SMUSD(uint32_t x, uint32_t y)
Definition: arm_math.h:1040
arm_pid_instance_q15
Instance structure for the Q15 PID Control.
Definition: arm_math.h:1741
arm_fir_decimate_fast_q15
void arm_fir_decimate_fast_q15(const arm_fir_decimate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
write_q15x2
__STATIC_FORCEINLINE void write_q15x2(q15_t *pQ15, q31_t value)
Write 2 Q15 to Q15 pointer.
Definition: arm_math.h:500
arm_mat_trans_q15
arm_status arm_mat_trans_q15(const arm_matrix_instance_q15 *pSrc, arm_matrix_instance_q15 *pDst)
Q15 matrix transpose.
arm_cfft_radix2_init_q15
arm_status arm_cfft_radix2_init_q15(arm_cfft_radix2_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_circularWrite_q7
__STATIC_FORCEINLINE 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:5991
arm_mat_init_f32
void arm_mat_init_f32(arm_matrix_instance_f32 *S, uint16_t nRows, uint16_t nColumns, float32_t *pData)
Floating-point matrix initialization.
arm_bilinear_interp_f32
__STATIC_FORCEINLINE 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:6786
arm_rfft_128_fast_init_f32
arm_status arm_rfft_128_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_fir_init_q7
void arm_fir_init_q7(arm_fir_instance_q7 *S, uint16_t numTaps, const q7_t *pCoeffs, q7_t *pState, uint32_t blockSize)
Initialization function for the Q7 FIR filter.
arm_inv_clarke_q31
__STATIC_FORCEINLINE 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:5118
arm_shift_q31
void arm_shift_q31(const 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_biquad_cascade_df2T_f64
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.
__QASX
__STATIC_FORCEINLINE uint32_t __QASX(uint32_t x, uint32_t y)
Definition: arm_math.h:847
ARM_MATH_TEST_FAILURE
Definition: arm_math.h:368
arm_conv_fast_q31
void arm_conv_fast_q31(const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
arm_pid_f32
__STATIC_FORCEINLINE 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:4817
arm_dct4_init_q31
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.
arm_q7_to_q15
void arm_q7_to_q15(const q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q15 vector.
arm_mat_cmplx_mult_q31
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_dct4_q31
void arm_dct4_q31(const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer)
Processing function for the Q31 DCT4/IDCT4.
arm_cmplx_dot_prod_q31
void arm_cmplx_dot_prod_q31(const q31_t *pSrcA, const q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult)
Q31 complex dot product.
arm_biquad_cascade_df2T_init_f32
void arm_biquad_cascade_df2T_init_f32(arm_biquad_cascade_df2T_instance_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
arm_mat_inverse_f32
arm_status arm_mat_inverse_f32(const arm_matrix_instance_f32 *src, arm_matrix_instance_f32 *dst)
Floating-point matrix inverse.
arm_fir_fast_q15
void arm_fir_fast_q15(const arm_fir_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the fast Q15 FIR filter (fast version).
arm_rfft_f32
void arm_rfft_f32(const arm_rfft_instance_f32 *S, float32_t *pSrc, float32_t *pDst)
arm_dct4_q15
void arm_dct4_q15(const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)
Processing function for the Q15 DCT4/IDCT4.
arm_lms_q31
void arm_lms_q31(const arm_lms_instance_q31 *S, const q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 LMS filter.
arm_rfft_fast_instance_f32
Instance structure for the floating-point RFFT/RIFFT function.
Definition: arm_math.h:2239
arm_matrix_instance_q15
Instance structure for the Q15 matrix structure.
Definition: arm_math.h:1418
arm_shift_q7
void arm_shift_q7(const q7_t *pSrc, int8_t shiftBits, q7_t *pDst, uint32_t blockSize)
Shifts the elements of a Q7 vector a specified number of bits.
__SHASX
__STATIC_FORCEINLINE uint32_t __SHASX(uint32_t x, uint32_t y)
Definition: arm_math.h:863
arm_mult_q7
void arm_mult_q7(const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector multiplication.
arm_pid_instance_f32::A1
float32_t A1
Definition: arm_math.h:1776
arm_cfft_radix2_q15
void arm_cfft_radix2_q15(const arm_cfft_radix2_instance_q15 *S, q15_t *pSrc)
arm_biquad_casd_df1_inst_f32
Instance structure for the floating-point Biquad cascade filter.
Definition: arm_math.h:1279
arm_rfft_q15
void arm_rfft_q15(const arm_rfft_instance_q15 *S, q15_t *pSrc, q15_t *pDst)
arm_power_q7
void arm_power_q7(const q7_t *pSrc, uint32_t blockSize, q31_t *pResult)
Sum of the squares of the elements of a Q7 vector.
arm_cfft_radix2_init_q31
arm_status arm_cfft_radix2_init_q31(arm_cfft_radix2_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_fir_lattice_q15
void arm_fir_lattice_q15(const arm_fir_lattice_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR lattice filter.
ARM_MATH_NANINF
Definition: arm_math.h:366
arm_std_q15
void arm_std_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Standard deviation of the elements of a Q15 vector.
arm_scale_q7
void arm_scale_q7(const q7_t *pSrc, q7_t scaleFract, int8_t shift, q7_t *pDst, uint32_t blockSize)
Multiplies a Q7 vector by a scalar.
arm_fir_interpolate_instance_q15
Instance structure for the Q15 FIR interpolator.
Definition: arm_math.h:3454
__SMLADX
__STATIC_FORCEINLINE uint32_t __SMLADX(uint32_t x, uint32_t y, uint32_t sum)
Definition: arm_math.h:970
arm_abs_f32
void arm_abs_f32(const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Floating-point vector absolute value.
arm_lms_init_q31
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.
arm_linear_interp_f32
__STATIC_FORCEINLINE 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:5409
arm_rfft_4096_fast_init_f32
arm_status arm_rfft_4096_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_bilinear_interp_instance_f32::numRows
uint16_t numRows
Definition: arm_math.h:1857
arm_bilinear_interp_instance_f32::numCols
uint16_t numCols
Definition: arm_math.h:1858
arm_linear_interp_instance_f32::x1
float32_t x1
Definition: arm_math.h:1847
INDEX_MASK
#define INDEX_MASK
Definition: arm_math.h:332
arm_bilinear_interp_instance_q7::numCols
uint16_t numCols
Definition: arm_math.h:1888
arm_cmplx_mult_cmplx_q31
void arm_cmplx_mult_cmplx_q31(const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t numSamples)
Q31 complex-by-complex multiplication.
__SHADD16
__STATIC_FORCEINLINE uint32_t __SHADD16(uint32_t x, uint32_t y)
Definition: arm_math.h:799
arm_cmplx_mult_real_f32
void arm_cmplx_mult_real_f32(const float32_t *pSrcCmplx, const float32_t *pSrcReal, float32_t *pCmplxDst, uint32_t numSamples)
Floating-point complex-by-real multiplication.
arm_linear_interp_q7
__STATIC_FORCEINLINE 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:5581
arm_fir_lattice_q31
void arm_fir_lattice_q31(const arm_fir_lattice_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR lattice filter.
arm_clarke_f32
__STATIC_FORCEINLINE void arm_clarke_f32(float32_t Ia, float32_t Ib, float32_t *pIalpha, float32_t *pIbeta)
Floating-point Clarke transform.
Definition: arm_math.h:5005
arm_matrix_instance_f64
Instance structure for the floating-point matrix structure.
Definition: arm_math.h:1408
arm_biquad_cascade_df2T_f32
void arm_biquad_cascade_df2T_f32(const arm_biquad_cascade_df2T_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter.
arm_matrix_instance_f32
Instance structure for the floating-point matrix structure.
Definition: arm_math.h:1397
arm_fill_q7
void arm_fill_q7(q7_t value, q7_t *pDst, uint32_t blockSize)
Fills a constant value into a Q7 vector.
arm_iir_lattice_instance_q15
Instance structure for the Q15 IIR lattice filter.
Definition: arm_math.h:3860
arm_fir_interpolate_init_q15
arm_status arm_fir_interpolate_init_q15(arm_fir_interpolate_instance_q15 *S, uint8_t L, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR interpolator.
arm_fir_lattice_instance_q15
Instance structure for the Q15 FIR lattice filter.
Definition: arm_math.h:3745
i
volatile int i
Definition: excep_test.c:17
arm_float_to_q31
void arm_float_to_q31(const float32_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q31 vector.
read_q7x4_ia
__STATIC_FORCEINLINE q31_t read_q7x4_ia(q7_t **pQ7)
Read 4 Q7 from Q7 pointer and increment pointer afterwards.
Definition: arm_math.h:515
__SXTB16
__STATIC_FORCEINLINE uint32_t __SXTB16(uint32_t x)
Definition: arm_math.h:1052
arm_park_f32
__STATIC_FORCEINLINE 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:5191
arm_fir_decimate_init_q15
arm_status arm_fir_decimate_init_q15(arm_fir_decimate_instance_q15 *S, uint16_t numTaps, uint8_t M, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR decimator.
arm_mean_q7
void arm_mean_q7(const q7_t *pSrc, uint32_t blockSize, q7_t *pResult)
Mean value of a Q7 vector.
arm_pid_init_f32
void arm_pid_init_f32(arm_pid_instance_f32 *S, int32_t resetStateFlag)
Initialization function for the floating-point PID Control.
arm_mat_inverse_f64
arm_status arm_mat_inverse_f64(const arm_matrix_instance_f64 *src, arm_matrix_instance_f64 *dst)
Floating-point matrix inverse.
arm_biquad_cas_df1_32x64_q31
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)
arm_var_q15
void arm_var_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Variance of the elements of a Q15 vector.
arm_conv_q31
void arm_conv_q31(const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Convolution of Q31 sequences.
arm_cfft_radix4_instance_q31
Instance structure for the Q31 CFFT/CIFFT function.
Definition: arm_math.h:2031
arm_pid_reset_f32
void arm_pid_reset_f32(arm_pid_instance_f32 *S)
Reset function for the floating-point PID Control.
__QADD16
__STATIC_FORCEINLINE uint32_t __QADD16(uint32_t x, uint32_t y)
Definition: arm_math.h:782
arm_fir_lattice_init_q31
void arm_fir_lattice_init_q31(arm_fir_lattice_instance_q31 *S, uint16_t numStages, const q31_t *pCoeffs, q31_t *pState)
Initialization function for the Q31 FIR lattice filter.
arm_sub_f32
void arm_sub_f32(const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector subtraction.
arm_pid_instance_q31::A2
q31_t A2
Definition: arm_math.h:1763
__SMLALD
__STATIC_FORCEINLINE uint64_t __SMLALD(uint32_t x, uint32_t y, uint64_t sum)
Definition: arm_math.h:998
arm_mat_trans_f32
arm_status arm_mat_trans_f32(const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst)
Floating-point matrix transpose.
ARM_MATH_LENGTH_ERROR
Definition: arm_math.h:364
arm_bilinear_interp_instance_q7
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1885
arm_max_f32
void arm_max_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Maximum value of a floating-point vector.
arm_correlate_opt_q15
void arm_correlate_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch)
Correlation of Q15 sequences.
arm_cmplx_mult_real_q15
void arm_cmplx_mult_real_q15(const q15_t *pSrcCmplx, const q15_t *pSrcReal, q15_t *pCmplxDst, uint32_t numSamples)
Q15 complex-by-real multiplication.
arm_scale_q31
void arm_scale_q31(const q31_t *pSrc, q31_t scaleFract, int8_t shift, q31_t *pDst, uint32_t blockSize)
Multiplies a Q31 vector by a scalar.
arm_lms_norm_instance_q15
Instance structure for the Q15 normalized LMS filter.
Definition: arm_math.h:4244
arm_conv_opt_q15
void arm_conv_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Convolution of Q15 sequences.
arm_biquad_cascade_df1_fast_q15
void arm_biquad_cascade_df1_fast_q15(const arm_biquad_casd_df1_inst_q15 *S, const 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-...
ARM_MATH_SUCCESS
Definition: arm_math.h:362
arm_lms_norm_init_f32
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.
arm_cfft_radix4_f32
void arm_cfft_radix4_f32(const arm_cfft_radix4_instance_f32 *S, float32_t *pSrc)
arm_linear_interp_instance_f32
Instance structure for the floating-point Linear Interpolate function.
Definition: arm_math.h:1844
arm_fir_sparse_instance_q31
Instance structure for the Q31 sparse FIR filter.
Definition: arm_math.h:4464
arm_fir_decimate_q31
void arm_fir_decimate_q31(const arm_fir_decimate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator.
arm_std_q31
void arm_std_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Standard deviation of the elements of a Q31 vector.
__QSUB
__STATIC_FORCEINLINE int32_t __QSUB(int32_t x, int32_t y)
Definition: arm_math.h:945
arm_linear_interp_instance_f32::nValues
uint32_t nValues
Definition: arm_math.h:1846
arm_mat_mult_q31
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.
arm_rfft_256_fast_init_f32
arm_status arm_rfft_256_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_pid_instance_q31
Instance structure for the Q31 PID Control.
Definition: arm_math.h:1759
arm_copy_q31
void arm_copy_q31(const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Copies the elements of a Q31 vector.
arm_inv_clarke_f32
__STATIC_FORCEINLINE 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:5091
arm_iir_lattice_init_f32
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_cmplx_mag_q15
void arm_cmplx_mag_q15(const q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude.
arm_cmplx_mag_q31
void arm_cmplx_mag_q31(const q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude.
arm_dct4_f32
void arm_dct4_f32(const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer)
Processing function for the floating-point DCT4/IDCT4.
__SMMLA
__STATIC_FORCEINLINE int32_t __SMMLA(int32_t x, int32_t y, int32_t sum)
Definition: arm_math.h:1062
arm_power_q31
void arm_power_q31(const q31_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q31 vector.
arm_lms_norm_instance_f32
Instance structure for the floating-point normalized LMS filter.
Definition: arm_math.h:4140
arm_linear_interp_instance_f32::xSpacing
float32_t xSpacing
Definition: arm_math.h:1848
arm_mat_cmplx_mult_q15
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.
arm_negate_f32
void arm_negate_f32(const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Negates the elements of a floating-point vector.
arm_min_q15
void arm_min_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex)
Minimum value of a Q15 vector.
arm_bilinear_interp_q15
__STATIC_FORCEINLINE 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:6925
arm_cmplx_mag_squared_f32
void arm_cmplx_mag_squared_f32(const float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude squared.
arm_fir_lattice_init_q15
void arm_fir_lattice_init_q15(arm_fir_lattice_instance_q15 *S, uint16_t numStages, const q15_t *pCoeffs, q15_t *pState)
Initialization function for the Q15 FIR lattice filter.
arm_mult_q15
void arm_mult_q15(const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector multiplication.
arm_sin_f32
float32_t arm_sin_f32(float32_t x)
Fast approximation to the trigonometric sine function for floating-point data.
q31_t
int32_t q31_t
32-bit fractional data type in 1.31 format.
Definition: arm_math.h:384
arm_fir_decimate_instance_f32
Instance structure for floating-point FIR decimator.
Definition: arm_math.h:3312
arm_dot_prod_f32
void arm_dot_prod_f32(const float32_t *pSrcA, const float32_t *pSrcB, uint32_t blockSize, float32_t *result)
Dot product of floating-point vectors.
clip_q63_to_q31
__STATIC_FORCEINLINE q31_t clip_q63_to_q31(q63_t x)
Clips Q63 to Q31 values.
Definition: arm_math.h:588
read_q7x4_da
__STATIC_FORCEINLINE q31_t read_q7x4_da(q7_t **pQ7)
Read 4 Q7 from Q7 pointer and decrement pointer afterwards.
Definition: arm_math.h:531
arm_fir_interpolate_q15
void arm_fir_interpolate_q15(const arm_fir_interpolate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR interpolator.
arm_abs_q7
void arm_abs_q7(const q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Q7 vector absolute value.
arm_q31_to_float
void arm_q31_to_float(const q31_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to floating-point vector.
arm_inv_park_q31
__STATIC_FORCEINLINE 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:5325
arm_conv_partial_q15
arm_status arm_conv_partial_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q15 sequences.
arm_biquad_cascade_df1_q15
void arm_biquad_cascade_df1_q15(const arm_biquad_casd_df1_inst_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 Biquad cascade filter.
arm_cfft_radix4_init_q31
arm_status arm_cfft_radix4_init_q31(arm_cfft_radix4_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_biquad_cascade_df2T_instance_f64
Instance structure for the floating-point transposed direct form II Biquad cascade filter.
Definition: arm_math.h:3650
arm_sqrt_q31
arm_status arm_sqrt_q31(q31_t in, q31_t *pOut)
Q31 square root function.
arm_fir_decimate_instance_q15
Instance structure for the Q15 FIR decimator.
Definition: arm_math.h:3290
arm_biquad_cascade_stereo_df2T_instance_f32
Instance structure for the floating-point transposed direct form II Biquad cascade filter.
Definition: arm_math.h:3640
arm_status
arm_status
Error status returned by some functions in the library.
Definition: arm_math.h:360
arm_fir_instance_q7
Instance structure for the Q7 FIR filter.
Definition: arm_math.h:1076
arm_cos_f32
float32_t arm_cos_f32(float32_t x)
Fast approximation to the trigonometric cosine function for floating-point data.
arm_sub_q31
void arm_sub_q31(const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector subtraction.
arm_bilinear_interp_instance_q31::pData
q31_t * pData
Definition: arm_math.h:1869
arm_var_f32
void arm_var_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Variance of the elements of a floating-point vector.
arm_fir_init_q15
arm_status arm_fir_init_q15(arm_fir_instance_q15 *S, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize)
Initialization function for the Q15 FIR filter.
arm_iir_lattice_f32
void arm_iir_lattice_f32(const arm_iir_lattice_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point IIR lattice filter.
arm_cfft_radix2_instance_q31
Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
Definition: arm_math.h:2005
arm_cfft_radix4_init_f32
arm_status arm_cfft_radix4_init_f32(arm_cfft_radix4_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
__QADD8
__STATIC_FORCEINLINE uint32_t __QADD8(uint32_t x, uint32_t y)
Definition: arm_math.h:746
arm_iir_lattice_q31
void arm_iir_lattice_q31(const arm_iir_lattice_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 IIR lattice filter.
arm_fir_init_f32
void arm_fir_init_f32(arm_fir_instance_f32 *S, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR filter.
arm_conv_f32
void arm_conv_f32(const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Convolution of floating-point sequences.
arm_pid_instance_q15::A1
q15_t A1
Definition: arm_math.h:1745
arm_pid_q31
__STATIC_FORCEINLINE q31_t arm_pid_q31(arm_pid_instance_q31 *S, q31_t in)
Process function for the Q31 PID Control.
Definition: arm_math.h:4850
read_q15x2
__STATIC_FORCEINLINE q31_t read_q15x2(q15_t *pQ15)
Read 2 Q15 from Q15 pointer.
Definition: arm_math.h:436
arm_lms_init_q15
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.
arm_iir_lattice_init_q15
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.
arm_dot_prod_q31
void arm_dot_prod_q31(const q31_t *pSrcA, const q31_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q31 vectors.
arm_fir_f32
void arm_fir_f32(const arm_fir_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR filter.
arm_cfft_radix4_instance_f32
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2084
arm_cmplx_dot_prod_q15
void arm_cmplx_dot_prod_q15(const q15_t *pSrcA, const q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult)
Q15 complex dot product.
__SMUSDX
__STATIC_FORCEINLINE uint32_t __SMUSDX(uint32_t x, uint32_t y)
Definition: arm_math.h:911
arm_mat_mult_fast_q15
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.
arm_matrix_instance_q31
Instance structure for the Q31 matrix structure.
Definition: arm_math.h:1428
arm_rfft_q31
void arm_rfft_q31(const arm_rfft_instance_q31 *S, q31_t *pSrc, q31_t *pDst)
arm_fir_sparse_init_q31
void arm_fir_sparse_init_q31(arm_fir_sparse_instance_q31 *S, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q31 sparse FIR filter.
arm_fir_sparse_f32
void arm_fir_sparse_f32(arm_fir_sparse_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, float32_t *pScratchIn, uint32_t blockSize)
Processing function for the floating-point sparse FIR filter.
arm_bilinear_interp_instance_q31::numRows
uint16_t numRows
Definition: arm_math.h:1867
arm_linear_interp_q15
__STATIC_FORCEINLINE 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:5524
arm_pid_instance_q15::A2
q15_t A2
Definition: arm_math.h:1746
arm_rfft_init_f32
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)
arm_mat_mult_f32
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.
arm_copy_f32
void arm_copy_f32(const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Copies the elements of a floating-point vector.
arm_iir_lattice_q15
void arm_iir_lattice_q15(const arm_iir_lattice_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 IIR lattice filter.
ARM_MATH_SINGULAR
Definition: arm_math.h:367
arm_mat_scale_f32
arm_status arm_mat_scale_f32(const arm_matrix_instance_f32 *pSrc, float32_t scale, arm_matrix_instance_f32 *pDst)
Floating-point matrix scaling.
arm_fir_q15
void arm_fir_q15(const arm_fir_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Processing function for the Q15 FIR filter.
arm_conv_fast_q15
void arm_conv_fast_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
arm_linear_interp_q31
__STATIC_FORCEINLINE 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:5466
arm_cmplx_conj_f32
void arm_cmplx_conj_f32(const float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex conjugate.
arm_fir_sparse_q7
void arm_fir_sparse_q7(arm_fir_sparse_instance_q7 *S, const q7_t *pSrc, q7_t *pDst, q7_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize)
Processing function for the Q7 sparse FIR filter.
arm_cmplx_mag_squared_q15
void arm_cmplx_mag_squared_q15(const q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex magnitude squared.
arm_q15_to_q7
void arm_q15_to_q7(const q15_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q7 vector.
arm_iir_lattice_init_q31
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.
arm_mat_add_q15
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.
arm_power_q15
void arm_power_q15(const q15_t *pSrc, uint32_t blockSize, q63_t *pResult)
Sum of the squares of the elements of a Q15 vector.
arm_pid_instance_f32::A2
float32_t A2
Definition: arm_math.h:1777
arm_mult_q31
void arm_mult_q31(const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector multiplication.
arm_circularWrite_q15
__STATIC_FORCEINLINE 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:5890
arm_fir_sparse_init_q15
void arm_fir_sparse_init_q15(arm_fir_sparse_instance_q15 *S, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q15 sparse FIR filter.
arm_lms_norm_init_q31
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.
write_q7x4_ia
__STATIC_FORCEINLINE void write_q7x4_ia(q7_t **pQ7, q31_t value)
Write 4 Q7 to Q7 pointer and increment pointer afterwards.
Definition: arm_math.h:548
arm_dct4_instance_q31
Instance structure for the Q31 DCT4/IDCT4 function.
Definition: arm_math.h:2321
arm_conv_q7
void arm_conv_q7(const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Convolution of Q7 sequences.
arm_pid_instance_q31::A0
q31_t A0
Definition: arm_math.h:1761
__SHSUB16
__STATIC_FORCEINLINE uint32_t __SHSUB16(uint32_t x, uint32_t y)
Definition: arm_math.h:831
__SMLAD
__STATIC_FORCEINLINE uint32_t __SMLAD(uint32_t x, uint32_t y, uint32_t sum)
Definition: arm_math.h:956
arm_conv_q15
void arm_conv_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst)
Convolution of Q15 sequences.
arm_sin_cos_q31
void arm_sin_cos_q31(q31_t theta, q31_t *pSinVal, q31_t *pCosVal)
Q31 sin_cos function.
arm_correlate_q31
void arm_correlate_q31(const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences.
arm_lms_q15
void arm_lms_q15(const arm_lms_instance_q15 *S, const q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 LMS filter.
__SHSAX
__STATIC_FORCEINLINE uint32_t __SHSAX(uint32_t x, uint32_t y)
Definition: arm_math.h:895
arm_cfft_radix4_instance_q15
Instance structure for the Q15 CFFT/CIFFT function.
Definition: arm_math.h:1979
arm_min_q31
void arm_min_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Minimum value of a Q31 vector.
arm_add_q15
void arm_add_q15(const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector addition.
arm_fir_sparse_q31
void arm_fir_sparse_q31(arm_fir_sparse_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, q31_t *pScratchIn, uint32_t blockSize)
Processing function for the Q31 sparse FIR filter.
arm_biquad_cascade_df2T_instance_f32
Instance structure for the floating-point transposed direct form II Biquad cascade filter.
Definition: arm_math.h:3630
arm_dct4_init_f32
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_offset_f32
void arm_offset_f32(const float32_t *pSrc, float32_t offset, float32_t *pDst, uint32_t blockSize)
Adds a constant offset to a floating-point vector.
ARM_MATH_ARGUMENT_ERROR
Definition: arm_math.h:363
arm_mat_cmplx_mult_f32
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.
arm_dct4_instance_q15
Instance structure for the Q15 DCT4/IDCT4 function.
Definition: arm_math.h:2367
arm_fir_q31
void arm_fir_q31(const arm_fir_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR filter.
arm_sin_cos_f32
void arm_sin_cos_f32(float32_t theta, float32_t *pSinVal, float32_t *pCosVal)
Floating-point sin_cos function.
arm_bilinear_interp_instance_q7::pData
q7_t * pData
Definition: arm_math.h:1889
arm_copy_q7
void arm_copy_q7(const q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Copies the elements of a Q7 vector.
arm_lms_norm_instance_q31
Instance structure for the Q31 normalized LMS filter.
Definition: arm_math.h:4190
arm_pid_instance_f32
Instance structure for the floating-point PID Control.
Definition: arm_math.h:1773
arm_fir_sparse_instance_f32
Instance structure for the floating-point sparse FIR filter.
Definition: arm_math.h:4451
arm_pid_instance_f32::A0
float32_t A0
Definition: arm_math.h:1775
arm_fir_sparse_instance_q7
Instance structure for the Q7 sparse FIR filter.
Definition: arm_math.h:4490
read_q15x2_ia
__STATIC_FORCEINLINE q31_t read_q15x2_ia(q15_t **pQ15)
Read 2 Q15 from Q15 pointer and increment pointer afterwards.
Definition: arm_math.h:451
arm_cfft_radix4_q15
void arm_cfft_radix4_q15(const arm_cfft_radix4_instance_q15 *S, q15_t *pSrc)
arm_pid_instance_q15::state
q15_t state[3]
Definition: arm_math.h:1750
arm_fir_decimate_instance_q31
Instance structure for the Q31 FIR decimator.
Definition: arm_math.h:3301
arm_mat_trans_q31
arm_status arm_mat_trans_q31(const arm_matrix_instance_q31 *pSrc, arm_matrix_instance_q31 *pDst)
Q31 matrix transpose.
arm_biquad_cascade_df1_init_q31
void arm_biquad_cascade_df1_init_q31(arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, const q31_t *pCoeffs, q31_t *pState, int8_t postShift)
Initialization function for the Q31 Biquad cascade filter.
arm_pid_instance_q31::A1
q31_t A1
Definition: arm_math.h:1762
arm_fir_sparse_init_q7
void arm_fir_sparse_init_q7(arm_fir_sparse_instance_q7 *S, uint16_t numTaps, const q7_t *pCoeffs, q7_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the Q7 sparse FIR filter.
arm_bilinear_interp_instance_q31
Instance structure for the Q31 bilinear interpolation function.
Definition: arm_math.h:1865
arm_float_to_q7
void arm_float_to_q7(const float32_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q7 vector.
q15_t
int16_t q15_t
16-bit fractional data type in 1.15 format.
Definition: arm_math.h:379
arm_biquad_cascade_df1_init_q15
void arm_biquad_cascade_df1_init_q15(arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, const q15_t *pCoeffs, q15_t *pState, int8_t postShift)
Initialization function for the Q15 Biquad cascade filter.
arm_rfft_fast_init_f32
arm_status arm_rfft_fast_init_f32(arm_rfft_fast_instance_f32 *S, uint16_t fftLen)
arm_pid_reset_q15
void arm_pid_reset_q15(arm_pid_instance_q15 *S)
Reset function for the Q15 PID Control.
arm_max_q31
void arm_max_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex)
Maximum value of a Q31 vector.
arm_correlate_f32
void arm_correlate_f32(const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst)
Correlation of floating-point sequences.
arm_cmplx_mag_squared_q31
void arm_cmplx_mag_squared_q31(const q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex magnitude squared.
arm_lms_instance_q15
Instance structure for the Q15 LMS filter.
Definition: arm_math.h:4038
arm_bilinear_interp_instance_q15::pData
q15_t * pData
Definition: arm_math.h:1879
arm_fir_interpolate_init_f32
arm_status arm_fir_interpolate_init_f32(arm_fir_interpolate_instance_f32 *S, uint8_t L, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR interpolator.
arm_cmplx_mag_f32
void arm_cmplx_mag_f32(const float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
Floating-point complex magnitude.
arm_std_f32
void arm_std_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Standard deviation of the elements of a floating-point vector.
arm_lms_norm_q31
void arm_lms_norm_q31(arm_lms_norm_instance_q31 *S, const q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize)
Processing function for Q31 normalized LMS filter.
arm_cfft_radix2_q31
void arm_cfft_radix2_q31(const arm_cfft_radix2_instance_q31 *S, q31_t *pSrc)
arm_cmplx_mult_cmplx_f32
void arm_cmplx_mult_cmplx_f32(const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t numSamples)
Floating-point complex-by-complex multiplication.
arm_biquad_cascade_stereo_df2T_f32
void arm_biquad_cascade_stereo_df2T_f32(const arm_biquad_cascade_stereo_df2T_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point transposed direct form II Biquad cascade filter....
arm_biquad_cascade_stereo_df2T_init_f32
void arm_biquad_cascade_stereo_df2T_init_f32(arm_biquad_cascade_stereo_df2T_instance_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
arm_circularRead_q15
__STATIC_FORCEINLINE 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:5934
__SSAT
__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat)
Signed Saturate.
Definition: cmsis_armclang.h:1139
arm_biquad_cascade_df1_init_f32
void arm_biquad_cascade_df1_init_f32(arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState)
Initialization function for the floating-point Biquad cascade filter.
arm_q15_to_float
void arm_q15_to_float(const q15_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to floating-point vector.
arm_rfft_instance_q15
Instance structure for the Q15 RFFT/RIFFT function.
Definition: arm_math.h:2162
arm_dot_prod_q15
void arm_dot_prod_q15(const q15_t *pSrcA, const q15_t *pSrcB, uint32_t blockSize, q63_t *result)
Dot product of Q15 vectors.
arm_cfft_q15
void arm_cfft_q15(const arm_cfft_instance_q15 *S, q15_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_dct4_instance_f32
Instance structure for the floating-point DCT4/IDCT4 function.
Definition: arm_math.h:2275
arm_offset_q31
void arm_offset_q31(const q31_t *pSrc, q31_t offset, q31_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q31 vector.
arm_fir_instance_f32
Instance structure for the floating-point FIR filter.
Definition: arm_math.h:1106
arm_min_f32
void arm_min_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex)
Minimum value of a floating-point vector.
mult32x64
__STATIC_FORCEINLINE 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:628
arm_lms_norm_init_q15
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.
arm_conv_partial_f32
arm_status arm_conv_partial_f32(const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of floating-point sequences.
arm_bilinear_interp_instance_f32::pData
float32_t * pData
Definition: arm_math.h:1859
arm_cmplx_dot_prod_f32
void arm_cmplx_dot_prod_f32(const float32_t *pSrcA, const float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult)
Floating-point complex dot product.
arm_correlate_fast_q31
void arm_correlate_fast_q31(const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst)
Correlation of Q31 sequences (fast version).
__QSUB8
__STATIC_FORCEINLINE uint32_t __QSUB8(uint32_t x, uint32_t y)
Definition: arm_math.h:764
arm_cfft_radix2_instance_f32
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2057
arm_fir_instance_q15
Instance structure for the Q15 FIR filter.
Definition: arm_math.h:1086
arm_mat_sub_q31
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.
__QSAX
__STATIC_FORCEINLINE uint32_t __QSAX(uint32_t x, uint32_t y)
Definition: arm_math.h:879
__QADD
__STATIC_FORCEINLINE int32_t __QADD(int32_t x, int32_t y)
Definition: arm_math.h:934
arm_biquad_cas_df1_32x64_ins_q31
Instance structure for the high precision Q31 Biquad cascade filter.
Definition: arm_math.h:3590
arm_cfft_radix2_init_f32
arm_status arm_cfft_radix2_init_f32(arm_cfft_radix2_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_var_q31
void arm_var_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Variance of the elements of a Q31 vector.
arm_cos_q31
q31_t arm_cos_q31(q31_t x)
Fast approximation to the trigonometric cosine function for Q31 data.
ARM_MATH_SIZE_MISMATCH
Definition: arm_math.h:365
arm_rfft_fast_f32
void arm_rfft_fast_f32(arm_rfft_fast_instance_f32 *S, float32_t *p, float32_t *pOut, uint8_t ifftFlag)
clip_q63_to_q15
__STATIC_FORCEINLINE q15_t clip_q63_to_q15(q63_t x)
Clips Q63 to Q15 values.
Definition: arm_math.h:598
arm_cfft_radix2_instance_q15
Instance structure for the Q15 CFFT/CIFFT function.
Definition: arm_math.h:1952
arm_rms_q31
void arm_rms_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Root Mean Square of the elements of a Q31 vector.
arm_mean_q15
void arm_mean_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Mean value of a Q15 vector.
arm_rfft_instance_q31
Instance structure for the Q31 RFFT/RIFFT function.
Definition: arm_math.h:2187
arm_biquad_cascade_df2T_init_f64
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.
arm_iir_lattice_instance_q31
Instance structure for the Q31 IIR lattice filter.
Definition: arm_math.h:3871
arm_fir_lattice_instance_q31
Instance structure for the Q31 FIR lattice filter.
Definition: arm_math.h:3755
cmsis_compiler.h
CMSIS compiler generic header file.
arm_sin_q15
q15_t arm_sin_q15(q15_t x)
Fast approximation to the trigonometric sine function for Q15 data.
arm_fir_decimate_init_f32
arm_status arm_fir_decimate_init_f32(arm_fir_decimate_instance_f32 *S, uint16_t numTaps, uint8_t M, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize)
Initialization function for the floating-point FIR decimator.
__SMUAD
__STATIC_FORCEINLINE uint32_t __SMUAD(uint32_t x, uint32_t y)
Definition: arm_math.h:1028
arm_abs_q31
void arm_abs_q31(const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Q31 vector absolute value.
arm_add_f32
void arm_add_f32(const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize)
Floating-point vector addition.
arm_biquad_cascade_df1_q31
void arm_biquad_cascade_df1_q31(const arm_biquad_casd_df1_inst_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 Biquad cascade filter.
arm_fir_sparse_init_f32
void arm_fir_sparse_init_f32(arm_fir_sparse_instance_f32 *S, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize)
Initialization function for the floating-point sparse FIR filter.
arm_fir_q7
void arm_fir_q7(const arm_fir_instance_q7 *S, const q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Processing function for the Q7 FIR filter.
arm_negate_q31
void arm_negate_q31(const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Negates the elements of a Q31 vector.
arm_bilinear_interp_instance_q7::numRows
uint16_t numRows
Definition: arm_math.h:1887
arm_rfft_init_q15
arm_status arm_rfft_init_q15(arm_rfft_instance_q15 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
arm_mat_scale_q31
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.
arm_rfft_init_q31
arm_status arm_rfft_init_q31(arm_rfft_instance_q31 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag)
arm_cfft_instance_f32
Instance structure for the floating-point CFFT/CIFFT function.
Definition: arm_math.h:2145
arm_copy_q15
void arm_copy_q15(const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Copies the elements of a Q15 vector.
arm_q7_to_q31
void arm_q7_to_q31(const q7_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to Q31 vector.
arm_park_q31
__STATIC_FORCEINLINE 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:5222
arm_sqrt_q15
arm_status arm_sqrt_q15(q15_t in, q15_t *pOut)
Q15 square root function.
arm_rfft_2048_fast_init_f32
arm_status arm_rfft_2048_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_correlate_opt_q7
void arm_correlate_opt_q7(const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Correlation of Q7 sequences.
arm_bilinear_interp_q7
__STATIC_FORCEINLINE 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:7003
arm_cos_q15
q15_t arm_cos_q15(q15_t x)
Fast approximation to the trigonometric cosine function for Q15 data.
arm_lms_init_f32
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.
arm_negate_q7
void arm_negate_q7(const q7_t *pSrc, q7_t *pDst, uint32_t blockSize)
Negates the elements of a Q7 vector.
arm_bilinear_interp_instance_q15::numCols
uint16_t numCols
Definition: arm_math.h:1878
arm_clarke_q31
__STATIC_FORCEINLINE 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:5032
arm_pid_q15
__STATIC_FORCEINLINE q15_t arm_pid_q15(arm_pid_instance_q15 *S, q15_t in)
Process function for the Q15 PID Control.
Definition: arm_math.h:4896
arm_conv_partial_fast_q31
arm_status arm_conv_partial_fast_q31(const q31_t *pSrcA, uint32_t srcALen, const 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.
arm_scale_f32
void arm_scale_f32(const float32_t *pSrc, float32_t scale, float32_t *pDst, uint32_t blockSize)
Multiplies a floating-point vector by a scalar.
arm_rfft_512_fast_init_f32
arm_status arm_rfft_512_fast_init_f32(arm_rfft_fast_instance_f32 *S)
arm_pid_instance_q31::state
q31_t state[3]
Definition: arm_math.h:1764
arm_rfft_64_fast_init_f32
arm_status arm_rfft_64_fast_init_f32(arm_rfft_fast_instance_f32 *S)
__STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE
Definition: cmsis_armcc.h:66
arm_bilinear_interp_q31
__STATIC_FORCEINLINE 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:6851
arm_q7_to_float
void arm_q7_to_float(const q7_t *pSrc, float32_t *pDst, uint32_t blockSize)
Converts the elements of the Q7 vector to floating-point vector.
arm_linear_interp_instance_f32::pYData
float32_t * pYData
Definition: arm_math.h:1849
arm_pid_instance_f32::state
float32_t state[3]
Definition: arm_math.h:1778
arm_conv_partial_opt_q7
arm_status arm_conv_partial_opt_q7(const q7_t *pSrcA, uint32_t srcALen, const 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.
arm_bilinear_interp_instance_f32
Instance structure for the floating-point bilinear interpolation function.
Definition: arm_math.h:1855
arm_correlate_q7
void arm_correlate_q7(const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst)
Correlation of Q7 sequences.
arm_sub_q15
void arm_sub_q15(const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize)
Q15 vector subtraction.
arm_float_to_q15
void arm_float_to_q15(const float32_t *pSrc, q15_t *pDst, uint32_t blockSize)
Converts the elements of the floating-point vector to Q15 vector.
arm_cmplx_conj_q31
void arm_cmplx_conj_q31(const q31_t *pSrc, q31_t *pDst, uint32_t numSamples)
Q31 complex conjugate.
arm_cfft_instance_q15
Instance structure for the fixed-point CFFT/CIFFT function.
Definition: arm_math.h:2111
arm_pid_reset_q31
void arm_pid_reset_q31(arm_pid_instance_q31 *S)
Reset function for the Q31 PID Control.
arm_add_q31
void arm_add_q31(const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize)
Q31 vector addition.
arm_conv_opt_q7
void arm_conv_opt_q7(const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2)
Convolution of Q7 sequences.
arm_circularRead_q7
__STATIC_FORCEINLINE 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:6035
arm_fir_interpolate_instance_f32
Instance structure for the floating-point FIR interpolator.
Definition: arm_math.h:3476
arm_rms_q15
void arm_rms_q15(const q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
Root Mean Square of the elements of a Q15 vector.
arm_biquad_cascade_df1_fast_q31
void arm_biquad_cascade_df1_fast_q31(const arm_biquad_casd_df1_inst_q31 *S, const 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-...
arm_cmplx_conj_q15
void arm_cmplx_conj_q15(const q15_t *pSrc, q15_t *pDst, uint32_t numSamples)
Q15 complex conjugate.
arm_fir_decimate_f32
void arm_fir_decimate_f32(const arm_fir_decimate_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for floating-point FIR decimator.
arm_fir_interpolate_f32
void arm_fir_interpolate_f32(const arm_fir_interpolate_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR interpolator.
arm_sub_q7
void arm_sub_q7(const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector subtraction.
arm_abs_q15
void arm_abs_q15(const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
Q15 vector absolute value.
arm_mat_add_q31
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.
arm_conv_partial_fast_opt_q15
arm_status arm_conv_partial_fast_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const 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.
arm_biquad_casd_df1_inst_q15
Instance structure for the Q15 Biquad cascade filter.
Definition: arm_math.h:1257
arm_q31_to_q7
void arm_q31_to_q7(const q31_t *pSrc, q7_t *pDst, uint32_t blockSize)
Converts the elements of the Q31 vector to Q7 vector.
arm_correlate_fast_opt_q15
void arm_correlate_fast_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch)
Correlation of Q15 sequences (fast version).
clip_q31_to_q7
__STATIC_FORCEINLINE q7_t clip_q31_to_q7(q31_t x)
Clips Q31 to Q7 values.
Definition: arm_math.h:608
arm_lms_norm_q15
void arm_lms_norm_q15(arm_lms_norm_instance_q15 *S, const q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize)
Processing function for Q15 normalized LMS filter.
arm_q15_to_q31
void arm_q15_to_q31(const q15_t *pSrc, q31_t *pDst, uint32_t blockSize)
Converts the elements of the Q15 vector to Q31 vector.
q7_t
int8_t q7_t
8-bit fractional data type in 1.7 format.
Definition: arm_math.h:374
arm_fir_decimate_init_q31
arm_status arm_fir_decimate_init_q31(arm_fir_decimate_instance_q31 *S, uint16_t numTaps, uint8_t M, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR decimator.
arm_conv_partial_q7
arm_status arm_conv_partial_q7(const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q7 sequences.
arm_cfft_q31
void arm_cfft_q31(const arm_cfft_instance_q31 *S, q31_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_fir_init_q31
void arm_fir_init_q31(arm_fir_instance_q31 *S, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize)
Initialization function for the Q31 FIR filter.
arm_bilinear_interp_instance_q15
Instance structure for the Q15 bilinear interpolation function.
Definition: arm_math.h:1875
arm_fir_decimate_fast_q31
void arm_fir_decimate_fast_q31(const arm_fir_decimate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
arm_conv_partial_opt_q15
arm_status arm_conv_partial_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const 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_rfft_instance_f32
Instance structure for the floating-point RFFT/RIFFT function.
Definition: arm_math.h:2212
arm_fill_q15
void arm_fill_q15(q15_t value, q15_t *pDst, uint32_t blockSize)
Fills a constant value into a Q15 vector.
arm_pid_init_q15
void arm_pid_init_q15(arm_pid_instance_q15 *S, int32_t resetStateFlag)
Initialization function for the Q15 PID Control.
arm_mean_q31
void arm_mean_q31(const q31_t *pSrc, uint32_t blockSize, q31_t *pResult)
Mean value of a Q31 vector.
arm_biquad_cas_df1_32x64_init_q31
void arm_biquad_cas_df1_32x64_init_q31(arm_biquad_cas_df1_32x64_ins_q31 *S, uint8_t numStages, const q31_t *pCoeffs, q63_t *pState, uint8_t postShift)
arm_biquad_casd_df1_inst_q31
Instance structure for the Q31 Biquad cascade filter.
Definition: arm_math.h:1268
read_q15x2_da
__STATIC_FORCEINLINE q31_t read_q15x2_da(q15_t **pQ15)
Read 2 Q15 from Q15 pointer and decrement pointer afterwards.
Definition: arm_math.h:467
arm_mat_sub_q15
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.
arm_add_q7
void arm_add_q7(const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize)
Q7 vector addition.
arm_offset_q15
void arm_offset_q15(const q15_t *pSrc, q15_t offset, q15_t *pDst, uint32_t blockSize)
Adds a constant offset to a Q15 vector.
arm_lms_instance_q31
Instance structure for the Q31 LMS filter.
Definition: arm_math.h:4089
arm_dct4_init_q15
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.
arm_cfft_f32
void arm_cfft_f32(const arm_cfft_instance_f32 *S, float32_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_mat_init_q31
void arm_mat_init_q31(arm_matrix_instance_q31 *S, uint16_t nRows, uint16_t nColumns, q31_t *pData)
Q31 matrix initialization.
arm_cmplx_mult_real_q31
void arm_cmplx_mult_real_q31(const q31_t *pSrcCmplx, const q31_t *pSrcReal, q31_t *pCmplxDst, uint32_t numSamples)
Q31 complex-by-real multiplication.
__QSUB16
__STATIC_FORCEINLINE uint32_t __QSUB16(uint32_t x, uint32_t y)
Definition: arm_math.h:815
arm_power_f32
void arm_power_f32(const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
Sum of the squares of the elements of a floating-point vector.
arm_cfft_radix4_init_q15
arm_status arm_cfft_radix4_init_q15(arm_cfft_radix4_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag)
arm_circularWrite_f32
__STATIC_FORCEINLINE 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:5789
__SMLSDX
__STATIC_FORCEINLINE uint32_t __SMLSDX(uint32_t x, uint32_t y, uint32_t sum)
Definition: arm_math.h:984
arm_fir_lattice_f32
void arm_fir_lattice_f32(const arm_fir_lattice_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
Processing function for the floating-point FIR lattice filter.
arm_bilinear_interp_instance_q15::numRows
uint16_t numRows
Definition: arm_math.h:1877
write_q15x2_ia
__STATIC_FORCEINLINE void write_q15x2_ia(q15_t **pQ15, q31_t value)
Write 2 Q15 to Q15 pointer and increment pointer afterwards.
Definition: arm_math.h:484
arm_mat_add_f32
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.
arm_mat_init_q15
void arm_mat_init_q15(arm_matrix_instance_q15 *S, uint16_t nRows, uint16_t nColumns, q15_t *pData)
Q15 matrix initialization.
arm_conv_fast_opt_q15
void arm_conv_fast_opt_q15(const q15_t *pSrcA, uint32_t srcALen, const 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.
clip_q31_to_q15
__STATIC_FORCEINLINE q15_t clip_q31_to_q15(q31_t x)
Clips Q31 to Q15 values.
Definition: arm_math.h:618
arm_fill_q31
void arm_fill_q31(q31_t value, q31_t *pDst, uint32_t blockSize)
Fills a constant value into a Q31 vector.
arm_shift_q15
void arm_shift_q15(const 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_min_q7
void arm_min_q7(const q7_t *pSrc, uint32_t blockSize, q7_t *result, uint32_t *index)
Minimum value of a Q7 vector.
arm_conv_partial_q31
arm_status arm_conv_partial_q31(const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints)
Partial convolution of Q31 sequences.