123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- #include "arm_math.h"
- void arm_mult_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize)
- {
- uint32_t blkCnt;
- #ifndef ARM_MATH_CM0_FAMILY
-
- float32_t inA1, inA2, inA3, inA4;
- float32_t inB1, inB2, inB3, inB4;
- float32_t out1, out2, out3, out4;
-
- blkCnt = blockSize >> 2u;
-
- while(blkCnt > 0u)
- {
-
-
-
- inA1 = *pSrcA;
-
- inB1 = *pSrcB;
-
- inA2 = *(pSrcA + 1);
-
- inB2 = *(pSrcB + 1);
-
- out1 = inA1 * inB1;
-
- inA3 = *(pSrcA + 2);
-
- inB3 = *(pSrcB + 2);
-
- out2 = inA2 * inB2;
-
- inA4 = *(pSrcA + 3);
-
- *pDst = out1;
-
- inB4 = *(pSrcB + 3);
-
- out3 = inA3 * inB3;
-
- *(pDst + 1) = out2;
-
- out4 = inA4 * inB4;
-
- *(pDst + 2) = out3;
-
- *(pDst + 3) = out4;
-
- pSrcA += 4u;
- pSrcB += 4u;
- pDst += 4u;
-
- blkCnt--;
- }
-
- blkCnt = blockSize % 0x4u;
- #else
-
-
- blkCnt = blockSize;
- #endif
- while(blkCnt > 0u)
- {
-
-
- *pDst++ = (*pSrcA++) * (*pSrcB++);
-
- blkCnt--;
- }
- }
|