Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "arm_math.h"
00028
00070 void arm_cmplx_mag_f32(
00071 float32_t * pSrc,
00072 float32_t * pDst,
00073 uint32_t numSamples)
00074 {
00075 uint32_t blkCnt;
00076 float32_t realIn, imagIn;
00077
00078
00079
00080 blkCnt = numSamples >> 2u;
00081
00082
00083
00084 while(blkCnt > 0u)
00085 {
00086
00087
00088 realIn = *pSrc++;
00089 imagIn = *pSrc++;
00090
00091 arm_sqrt_f32((realIn * realIn) + (imagIn * imagIn), pDst++);
00092
00093 realIn = *pSrc++;
00094 imagIn = *pSrc++;
00095 arm_sqrt_f32((realIn * realIn) + (imagIn * imagIn), pDst++);
00096
00097 realIn = *pSrc++;
00098 imagIn = *pSrc++;
00099 arm_sqrt_f32((realIn * realIn) + (imagIn * imagIn), pDst++);
00100
00101 realIn = *pSrc++;
00102 imagIn = *pSrc++;
00103 arm_sqrt_f32((realIn * realIn) + (imagIn * imagIn), pDst++);
00104
00105
00106
00107 blkCnt--;
00108 }
00109
00110
00111
00112 blkCnt = numSamples % 0x4u;
00113
00114 while(blkCnt > 0u)
00115 {
00116
00117 realIn = *pSrc++;
00118 imagIn = *pSrc++;
00119
00120 arm_sqrt_f32((realIn * realIn) + (imagIn * imagIn), pDst++);
00121
00122
00123 blkCnt--;
00124 }
00125 }
00126