CMSIS-DSP: Temporary fix for the spline function.
The spline function was preventing the Python wrapper from
being built on windows.
It is a temporary fix. The spline function will have to be reworked.
* @param[in] blockSize number of samples of output data.
*/
+/*
+
+Temporary fix because some arrays are defined on the stack.
+They should be passed as additional arguments to the function.
+
+*/
+#define MAX_DATA_POINTS 40
+
void arm_spline_f32(
arm_spline_instance_f32 * S,
const float32_t * x,
@@ -157,6 +165,7 @@ void arm_spline_f32(
float32_t * pDst,
uint32_t blockSize)
{
+
/*
As explained in arm_spline_interp_init_f32.c, this must be > 1
@@ -167,8 +176,13 @@ void arm_spline_f32(
float32_t hi, hm1;
- /* Temporary variables for system AX=B */
- float32_t u[n-1], z[n], c[n];
+ /*
+
+ Temporary variables for system AX=B.
+ This will be replaced by new arguments for the function.
+
+ */
+ float32_t u[MAX_DATA_POINTS], z[MAX_DATA_POINTS], c[MAX_DATA_POINTS];
float32_t Bi, li;
float32_t bi, di;
@@ -349,6 +363,7 @@ void arm_spline_f32(
pDst++;
blkCnt2--;
}
+
}
/**
