diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-03 19:53:02 +0200 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-05-03 19:53:02 +0200 |
commit | 2628932a40d769d8d0180ba6fed1e7b9b2718982 (patch) | |
tree | ea485897653003d01cd16e2b506f69363928fafa /Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions | |
parent | 972da3c0fd449dd6153edaf3c56e0c50d16b726b (diff) | |
download | minikbd-2628932a40d769d8d0180ba6fed1e7b9b2718982.tar.gz minikbd-2628932a40d769d8d0180ba6fed1e7b9b2718982.tar.bz2 minikbd-2628932a40d769d8d0180ba6fed1e7b9b2718982.zip |
minkbd: repo restructure
Diffstat (limited to 'Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions')
6 files changed, 0 insertions, 315 deletions
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_conj.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_conj.c deleted file mode 100644 index 6b80de0..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_conj.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_conj_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- for(i=0;i<numSamples*2;i+=2)
- {
- pDst[i] = pSrc[i];
- pDst[i+1] = -pSrc[i+1];
- }
-}
-
-void ref_cmplx_conj_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- for(i=0;i<numSamples*2;i+=2)
- {
- pDst[i] = pSrc[i];
- pDst[i+1] = -pSrc[i+1];
- }
-}
-
-void ref_cmplx_conj_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- for(i=0;i<numSamples*2;i+=2)
- {
- pDst[i] = pSrc[i];
- pDst[i+1] = -pSrc[i+1];
- }
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_dot_prod.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_dot_prod.c deleted file mode 100644 index 19b1e1c..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_dot_prod.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t numSamples,
- float32_t * realResult,
- float32_t * imagResult)
-{
- float32_t sumr, sumi;
- uint32_t i;
-
- sumr = 0;
- sumi = 0;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- sumr += pSrcA[i] * pSrcB[i] - pSrcA[i+1] * pSrcB[i+1];
- sumi += pSrcA[i] * pSrcB[i+1] + pSrcA[i+1] * pSrcB[i];
- }
-
- *realResult = sumr;
- *imagResult = sumi;
-}
-
-void ref_cmplx_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t numSamples,
- q63_t * realResult,
- q63_t * imagResult)
-{
- q63_t sumr, sumi;
- uint32_t i;
-
- sumr = 0;
- sumi = 0;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- //shifting down 14 here to provide guard bits
- sumr += (((q63_t)pSrcA[i] * pSrcB[i] ) >> 14) - (((q63_t)pSrcA[i+1] * pSrcB[i+1]) >> 14);
- sumi += (((q63_t)pSrcA[i] * pSrcB[i+1]) >> 14) + (((q63_t)pSrcA[i+1] * pSrcB[i] ) >> 14);
- }
-
- *realResult = sumr;
- *imagResult = sumi;
-}
-
-void ref_cmplx_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t numSamples,
- q31_t * realResult,
- q31_t * imagResult)
-{
- q63_t sumr, sumi;
- uint32_t i;
-
- sumr = 0;
- sumi = 0;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- sumr += (q31_t)pSrcA[i] * pSrcB[i] - (q31_t)pSrcA[i+1] * pSrcB[i+1];
- sumi += (q31_t)pSrcA[i] * pSrcB[i+1] + (q31_t)pSrcA[i+1] * pSrcB[i];
- }
-
- //shifting down 6 at the end here because there are already 32 guard bits available, this method is more accurate
- *realResult = (q31_t)(sumr >> 6);
- *imagResult = (q31_t)(sumi >> 6);
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag.c deleted file mode 100644 index b5ac28d..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_mag_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- *pDst++ = sqrtf(pSrc[i] * pSrc[i] + pSrc[i+1] * pSrc[i+1]);
- }
-}
-
-void ref_cmplx_mag_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t acc0,acc1,out;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- acc0 = (q31_t)(((q63_t)pSrc[i] * pSrc[i]) >> 33);
- acc1 = (q31_t)(((q63_t)pSrc[i+1] * pSrc[i+1]) >> 33);
- out = acc0 + acc1;
- *pDst++ = (q31_t)(sqrtf((float)out / 2147483648.0f) * 2147483648.0f);
- }
-}
-
-void ref_cmplx_mag_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t acc0,acc1;
- q15_t out;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- acc0 = pSrc[i] * pSrc[i];
- acc1 = pSrc[i+1] * pSrc[i+1];
- out = (q15_t) (((q63_t) acc0 + acc1) >> 17);
- *pDst++ = (q15_t)(sqrtf((float)out / 32768.0f) * 32768.0f);
- }
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag_squared.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag_squared.c deleted file mode 100644 index aec7bd5..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mag_squared.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_mag_squared_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- *pDst++ = pSrc[i] * pSrc[i] + pSrc[i+1] * pSrc[i+1];
- }
-}
-
-void ref_cmplx_mag_squared_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t acc0,acc1;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- acc0 = (q31_t)(((q63_t)pSrc[i] * pSrc[i]) >> 33);
- acc1 = (q31_t)(((q63_t)pSrc[i+1] * pSrc[i+1]) >> 33);
- *pDst++ = acc0 + acc1;
- }
-}
-
-void ref_cmplx_mag_squared_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t acc0,acc1;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- acc0 = pSrc[i] * pSrc[i];
- acc1 = pSrc[i+1] * pSrc[i+1];
- *pDst++ = (q15_t) (((q63_t) acc0 + acc1) >> 17);
- }
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_cmplx.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_cmplx.c deleted file mode 100644 index c7a5409..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_cmplx.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_mult_cmplx_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- pDst[i] = pSrcA[i] * pSrcB[i] - pSrcA[i+1] * pSrcB[i+1];
- pDst[i+1] = pSrcA[i] * pSrcB[i+1] + pSrcA[i+1] * pSrcB[i];
- }
-}
-
-void ref_cmplx_mult_cmplx_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t mul1, mul2, mul3, mul4;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- mul1 = ((q63_t)pSrcA[i] * pSrcB[i]) >> 33;
- mul2 = ((q63_t)pSrcA[i+1] * pSrcB[i+1]) >> 33;
- mul3 = ((q63_t)pSrcA[i] * pSrcB[i+1]) >> 33;
- mul4 = ((q63_t)pSrcA[i+1] * pSrcB[i]) >> 33;
- pDst[i] = mul1 - mul2;
- pDst[i+1] = mul3 + mul4;
- }
-}
-
-void ref_cmplx_mult_cmplx_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t mul1, mul2, mul3, mul4;
-
- for(i=0;i<numSamples*2;i+=2)
- {
- mul1 = ((q31_t)pSrcA[i] * pSrcB[i]) >> 17;
- mul2 = ((q31_t)pSrcA[i+1] * pSrcB[i+1]) >> 17;
- mul3 = ((q31_t)pSrcA[i] * pSrcB[i+1]) >> 17;
- mul4 = ((q31_t)pSrcA[i+1] * pSrcB[i]) >> 17;
- pDst[i] = mul1 - mul2;
- pDst[i+1] = mul3 + mul4;
- }
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_real.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_real.c deleted file mode 100644 index dc4928e..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/ComplexMathFunctions/cmplx_mult_real.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "ref.h"
-
-void ref_cmplx_mult_real_f32(
- float32_t * pSrcCmplx,
- float32_t * pSrcReal,
- float32_t * pCmplxDst,
- uint32_t numSamples)
-{
- uint32_t i;
-
- for(i=0;i<numSamples;i++)
- {
- pCmplxDst[2*i+0] = pSrcCmplx[2*i+0] * pSrcReal[i];
- pCmplxDst[2*i+1] = pSrcCmplx[2*i+1] * pSrcReal[i];
- }
-}
-
-void ref_cmplx_mult_real_q31(
- q31_t * pSrcCmplx,
- q31_t * pSrcReal,
- q31_t * pCmplxDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t tempR, tempI;
-
- for(i=0;i<numSamples;i++)
- {
- tempR = ((q63_t) pSrcCmplx[2*i+0] * pSrcReal[i]) >> 32;
- tempI = ((q63_t) pSrcCmplx[2*i+1] * pSrcReal[i]) >> 32;
- pCmplxDst[2*i+0] = ref_sat_n(tempR, 31) << 1;
- pCmplxDst[2*i+1] = ref_sat_n(tempI, 31) << 1;
- }
-}
-
-void ref_cmplx_mult_real_q15(
- q15_t * pSrcCmplx,
- q15_t * pSrcReal,
- q15_t * pCmplxDst,
- uint32_t numSamples)
-{
- uint32_t i;
- q31_t tempR, tempI;
-
- for(i=0;i<numSamples;i++)
- {
- tempR = ((q31_t) pSrcCmplx[2*i+0] * pSrcReal[i]) >> 15;
- tempI = ((q31_t) pSrcCmplx[2*i+1] * pSrcReal[i]) >> 15;
- pCmplxDst[2*i+0] = ref_sat_q15(tempR);
- pCmplxDst[2*i+1] = ref_sat_q15(tempI);
- }
-}
|