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/MatrixFunctions | |
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/MatrixFunctions')
7 files changed, 0 insertions, 523 deletions
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_add.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_add.c deleted file mode 100644 index a6e0067..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_add.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_add_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = pSrcA->pData[i] + pSrcB->pData[i];
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_add_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = ref_sat_q31( (q63_t)pSrcA->pData[i] + pSrcB->pData[i]);
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_add_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = ref_sat_q15( (q31_t)pSrcA->pData[i] + pSrcB->pData[i]);
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_cmplx_mult.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_cmplx_mult.c deleted file mode 100644 index 9364619..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_cmplx_mult.c +++ /dev/null @@ -1,118 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_cmplx_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- float32_t sumR,sumI;
- float32_t a0,b0,c0,d0;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sumR = 0;
- sumI = 0;
-
- for(i=0;i<innerSize;i++)
- {
- a0 = pSrcA->pData[2*(r*innerSize + i) + 0];
- b0 = pSrcA->pData[2*(r*innerSize + i) + 1];
- c0 = pSrcB->pData[2*(i*outC + c) + 0];
- d0 = pSrcB->pData[2*(i*outC + c) + 1];
-
- sumR += a0 * c0 - b0 * d0;
- sumI += b0 * c0 + a0 * d0;
- }
-
- pDst->pData[2*(r*outC + c) + 0] = sumR;
- pDst->pData[2*(r*outC + c) + 1] = sumI;
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_cmplx_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- q63_t sumR,sumI;
- q31_t a0,b0,c0,d0;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sumR = 0;
- sumI = 0;
-
- for(i=0;i<innerSize;i++)
- {
- a0 = pSrcA->pData[2*(r*innerSize + i) + 0];
- b0 = pSrcA->pData[2*(r*innerSize + i) + 1];
- c0 = pSrcB->pData[2*(i*outC + c) + 0];
- d0 = pSrcB->pData[2*(i*outC + c) + 1];
-
- sumR += (q63_t)a0 * c0 - (q63_t)b0 * d0;
- sumI += (q63_t)b0 * c0 + (q63_t)a0 * d0;
- }
-
- pDst->pData[2*(r*outC + c) + 0] = ref_sat_q31(sumR >> 31);
- pDst->pData[2*(r*outC + c) + 1] = ref_sat_q31(sumI >> 31);
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_cmplx_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- q63_t sumR,sumI;
- q15_t a0,b0,c0,d0;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sumR = 0;
- sumI = 0;
-
- for(i=0;i<innerSize;i++)
- {
- a0 = pSrcA->pData[2*(r*innerSize + i) + 0];
- b0 = pSrcA->pData[2*(r*innerSize + i) + 1];
- c0 = pSrcB->pData[2*(i*outC + c) + 0];
- d0 = pSrcB->pData[2*(i*outC + c) + 1];
-
- sumR += (q31_t)a0 * c0 - (q31_t)b0 * d0;
- sumI += (q31_t)b0 * c0 + (q31_t)a0 * d0;
- }
-
- pDst->pData[2*(r*outC + c) + 0] = ref_sat_q15(sumR >> 15);
- pDst->pData[2*(r*outC + c) + 1] = ref_sat_q15(sumI >> 15);
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_inverse.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_inverse.c deleted file mode 100644 index 74d3ccc..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_inverse.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_inverse_f32(
- const arm_matrix_instance_f32 * pSrc,
- arm_matrix_instance_f32 * pDst)
-{
- float32_t det;
- uint32_t i, size;
- arm_matrix_instance_f32 tmp;
-
- tmp.numCols = pSrc->numCols;
- tmp.numRows = pSrc->numRows;
- tmp.pData = scratchArray;
-
- det = ref_detrm(pSrc->pData,scratchArray,pSrc->numCols);
-
- size = pSrc->numCols * pSrc->numCols;
-
- ref_cofact(pSrc->pData,scratchArray,scratchArray + size,pSrc->numCols);
-
- ref_mat_trans_f32(&tmp,pDst);
-
- for(i=0;i<size;i++)
- {
- pDst->pData[i] /= det;
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_inverse_f64(
- const arm_matrix_instance_f64 * pSrc,
- arm_matrix_instance_f64 * pDst)
-{
- float64_t det;
- uint32_t i, size;
- arm_matrix_instance_f64 tmp;
-
- tmp.numCols = pSrc->numCols;
- tmp.numRows = pSrc->numRows;
- tmp.pData = (float64_t*)scratchArray;
-
- det = ref_detrm64(pSrc->pData,(float64_t*)scratchArray,pSrc->numCols);
-
- size = pSrc->numCols * pSrc->numCols;
-
- ref_cofact64(pSrc->pData,(float64_t*)scratchArray,(float64_t*)scratchArray + size,pSrc->numCols);
-
- ref_mat_trans_f64(&tmp,pDst);
-
- for(i=0;i<size;i++)
- {
- pDst->pData[i] /= det;
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_mult.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_mult.c deleted file mode 100644 index e9ef432..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_mult.c +++ /dev/null @@ -1,91 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- float32_t sum;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sum = 0;
-
- for(i=0;i<innerSize;i++)
- {
- sum += pSrcA->pData[r*innerSize + i] * pSrcB->pData[i*outC + c];
- }
-
- pDst->pData[r*outC + c] = sum;
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- q63_t sum;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sum = 0;
-
- for(i=0;i<innerSize;i++)
- {
- sum += (q63_t)(pSrcA->pData[r*innerSize + i]) * pSrcB->pData[i*outC + c];
- }
-
- pDst->pData[r*outC + c] = ref_sat_q31(sum >> 31);
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t r,c,i,outR,outC,innerSize;
- q63_t sum;
-
- outR = pSrcA->numRows;
- outC = pSrcB->numCols;
- innerSize = pSrcA->numCols;
-
- for(r=0;r<outR;r++)
- {
- for(c=0;c<outC;c++)
- {
- sum = 0;
-
- for(i=0;i<innerSize;i++)
- {
- sum += (q31_t)(pSrcA->pData[r*innerSize + i]) * pSrcB->pData[i*outC + c];
- }
-
- pDst->pData[r*outC + c] = ref_sat_q15(sum >> 15);
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_scale.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_scale.c deleted file mode 100644 index d426ad6..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_scale.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_scale_f32(
- const arm_matrix_instance_f32 * pSrc,
- float32_t scale,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrc->numRows * pSrc->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = pSrc->pData[i] * scale;
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_scale_q31(
- const arm_matrix_instance_q31 * pSrc,
- q31_t scale,
- int32_t shift,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
- int32_t totShift = shift + 1;
- q31_t tmp;
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrc->numRows * pSrc->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- tmp = ((q63_t)pSrc->pData[i] * scale) >> 32;
- pDst->pData[i] = ref_sat_q31((q63_t)tmp << totShift );
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_scale_q15(
- const arm_matrix_instance_q15 * pSrc,
- q15_t scale,
- int32_t shift,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
- int32_t totShift = 15 - shift;
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrc->numRows * pSrc->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = ref_sat_q15( ((q31_t)pSrc->pData[i] * scale) >> totShift);
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_sub.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_sub.c deleted file mode 100644 index bbd23f0..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_sub.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_sub_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = pSrcA->pData[i] - pSrcB->pData[i];
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_sub_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = ref_sat_q31( (q63_t)pSrcA->pData[i] - pSrcB->pData[i]);
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_sub_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t i;
- uint32_t numSamples; /* total number of elements in the matrix */
-
- /* Total number of samples in the input matrix */
- numSamples = (uint32_t) pSrcA->numRows * pSrcA->numCols;
-
- for(i=0;i<numSamples;i++)
- {
- pDst->pData[i] = ref_sat_q15( (q31_t)pSrcA->pData[i] - pSrcB->pData[i]);
- }
-
- return ARM_MATH_SUCCESS;
-}
diff --git a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_trans.c b/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_trans.c deleted file mode 100644 index 8cb9a8d..0000000 --- a/Blink/Drivers/CMSIS/DSP/DSP_Lib_TestSuite/RefLibs/src/MatrixFunctions/mat_trans.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "ref.h"
-
-arm_status ref_mat_trans_f64(
- const arm_matrix_instance_f64 * pSrc,
- arm_matrix_instance_f64 * pDst)
-{
- uint64_t r,c;
- uint64_t numR = pSrc->numRows;
- uint64_t numC = pSrc->numCols;
-
- for(r=0;r<numR;r++)
- {
- for(c=0;c<numC;c++)
- {
- pDst->pData[c*numR + r] = pSrc->pData[r*numC + c];
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_trans_f32(
- const arm_matrix_instance_f32 * pSrc,
- arm_matrix_instance_f32 * pDst)
-{
- uint32_t r,c;
- uint32_t numR = pSrc->numRows;
- uint32_t numC = pSrc->numCols;
-
- for(r=0;r<numR;r++)
- {
- for(c=0;c<numC;c++)
- {
- pDst->pData[c*numR + r] = pSrc->pData[r*numC + c];
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_trans_q31(
- const arm_matrix_instance_q31 * pSrc,
- arm_matrix_instance_q31 * pDst)
-{
- uint32_t r,c;
- uint32_t numR = pSrc->numRows;
- uint32_t numC = pSrc->numCols;
-
- for(r=0;r<numR;r++)
- {
- for(c=0;c<numC;c++)
- {
- pDst->pData[c*numR + r] = pSrc->pData[r*numC + c];
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
-
-arm_status ref_mat_trans_q15(
- const arm_matrix_instance_q15 * pSrc,
- arm_matrix_instance_q15 * pDst)
-{
- uint32_t r,c;
- uint32_t numR = pSrc->numRows;
- uint32_t numC = pSrc->numCols;
-
- for(r=0;r<numR;r++)
- {
- for(c=0;c<numC;c++)
- {
- pDst->pData[c*numR + r] = pSrc->pData[r*numC + c];
- }
- }
-
- return ARM_MATH_SUCCESS;
-}
|