Correction of issue #93

Const qualifier in interpolation functions
pull/95/head
Christophe Favergeon 3 years ago
parent 61478be82a
commit 2458ff8670

@ -55,7 +55,7 @@ extern "C"
uint32_t nValues; /**< nValues */
float32_t x1; /**< x1 */
float32_t xSpacing; /**< xSpacing */
float32_t *pYData; /**< pointer to the table of Y values */
const float32_t *pYData; /**< pointer to the table of Y values */
} arm_linear_interp_instance_f32;
/**
@ -65,7 +65,7 @@ extern "C"
{
uint16_t numRows; /**< number of rows in the data table. */
uint16_t numCols; /**< number of columns in the data table. */
float32_t *pData; /**< points to the data table. */
const float32_t *pData; /**< points to the data table. */
} arm_bilinear_interp_instance_f32;
/**
@ -75,7 +75,7 @@ extern "C"
{
uint16_t numRows; /**< number of rows in the data table. */
uint16_t numCols; /**< number of columns in the data table. */
q31_t *pData; /**< points to the data table. */
const q31_t *pData; /**< points to the data table. */
} arm_bilinear_interp_instance_q31;
/**
@ -85,7 +85,7 @@ extern "C"
{
uint16_t numRows; /**< number of rows in the data table. */
uint16_t numCols; /**< number of columns in the data table. */
q15_t *pData; /**< points to the data table. */
const q15_t *pData; /**< points to the data table. */
} arm_bilinear_interp_instance_q15;
/**
@ -95,7 +95,7 @@ extern "C"
{
uint16_t numRows; /**< number of rows in the data table. */
uint16_t numCols; /**< number of columns in the data table. */
q7_t *pData; /**< points to the data table. */
const q7_t *pData; /**< points to the data table. */
} arm_bilinear_interp_instance_q7;

@ -45,7 +45,7 @@ typedef struct
uint32_t nValues; /**< nValues */
float16_t x1; /**< x1 */
float16_t xSpacing; /**< xSpacing */
float16_t *pYData; /**< pointer to the table of Y values */
const float16_t *pYData; /**< pointer to the table of Y values */
} arm_linear_interp_instance_f16;
/**
@ -55,7 +55,7 @@ typedef struct
{
uint16_t numRows;/**< number of rows in the data table. */
uint16_t numCols;/**< number of columns in the data table. */
float16_t *pData; /**< points to the data table. */
const float16_t *pData; /**< points to the data table. */
} arm_bilinear_interp_instance_f16;
/**

@ -57,7 +57,7 @@
{
float16_t out;
float16_t f00, f01, f10, f11;
float16_t *pData = S->pData;
const float16_t *pData = S->pData;
int32_t xIndex, yIndex, index;
float16_t xdiff, ydiff;
float16_t b1, b2, b3, b4;

@ -51,7 +51,7 @@
* {
* uint16_t numRows;
* uint16_t numCols;
* float32_t *pData;
* const float32_t *pData;
* } arm_bilinear_interp_instance_f32;
* </pre>
*
@ -105,7 +105,7 @@
{
float32_t out;
float32_t f00, f01, f10, f11;
float32_t *pData = S->pData;
const float32_t *pData = S->pData;
int32_t xIndex, yIndex, index;
float32_t xdiff, ydiff;
float32_t b1, b2, b3, b4;

@ -54,7 +54,7 @@
q15_t x1, x2, y1, y2; /* Nearest output values */
q31_t xfract, yfract; /* X, Y fractional parts */
int32_t rI, cI; /* Row and column indices */
q15_t *pYData = S->pData; /* pointer to output table values */
const q15_t *pYData = S->pData; /* pointer to output table values */
uint32_t nCols = S->numCols; /* num of rows */
/* Input is in 12.20 format */

@ -55,7 +55,7 @@
q31_t xfract, yfract; /* X, Y fractional parts */
q31_t x1, x2, y1, y2; /* Nearest output values */
int32_t rI, cI; /* Row and column indices */
q31_t *pYData = S->pData; /* pointer to output table values */
const q31_t *pYData = S->pData; /* pointer to output table values */
uint32_t nCols = S->numCols; /* num of rows */
/* Input is in 12.20 format */

@ -55,7 +55,7 @@
q31_t xfract, yfract; /* X, Y fractional parts */
q7_t x1, x2, y1, y2; /* Nearest output values */
int32_t rI, cI; /* Row and column indices */
q7_t *pYData = S->pData; /* pointer to output table values */
const q7_t *pYData = S->pData; /* pointer to output table values */
uint32_t nCols = S->numCols; /* num of rows */
/* Input is in 12.20 format */

@ -57,7 +57,7 @@
float16_t y0, y1; /* Nearest output values */
float16_t xSpacing = S->xSpacing; /* spacing between input values */
int32_t i; /* Index variable */
float16_t *pYData = S->pYData; /* pointer to output table */
const float16_t *pYData = S->pYData; /* pointer to output table */
/* Calculation of index */
i = (int32_t) (((_Float16)x - (_Float16)S->x1) / (_Float16)xSpacing);

@ -85,7 +85,7 @@
float32_t y0, y1; /* Nearest output values */
float32_t xSpacing = S->xSpacing; /* spacing between input values */
int32_t i; /* Index variable */
float32_t *pYData = S->pYData; /* pointer to output table */
const float32_t *pYData = S->pYData; /* pointer to output table */
/* Calculation of index */
i = (int32_t) ((x - S->x1) / xSpacing);

@ -167,7 +167,12 @@ for t in tests:
#("StatsTestsF32","../Output.pickle")
#]
allSuites=[("DistanceTestsF32","../Output.pickle")]
allSuites=[("InterpolationTestsF32","../Output.pickle"),
("InterpolationTestsQ31","../Output.pickle"),
("InterpolationTestsQ15","../Output.pickle"),
("InterpolationTestsQ7","../Output.pickle"),
("InterpolationTestsF16","../Output_f16.pickle"),
]
#allSuites=[("StatsTestsQ7","../Output.pickle")]
@ -201,18 +206,19 @@ solutions={
]
}
solutions={
'testac6.csolution.yml':[
# ("VHT-Corstone-310","CS310"),
("VHT-Corstone-300","CS300")
],
'testgcc.csolution.yml':[
#("VHT-Corstone-310","CS310"),
#("VHT_M55","M55"),
##("VHT_M33","M33_DSP_FP"),
("VHT_M7","M7DP"),
]
}
# Override previous solutions for more restricted testing.
#solutions={
# 'testac6.csolution.yml':[
# # ("VHT-Corstone-310","CS310"),
# ("VHT-Corstone-300","CS300")
# ],
# 'testgcc.csolution.yml':[
# #("VHT-Corstone-310","CS310"),
# #("VHT_M55","M55"),
# ##("VHT_M33","M33_DSP_FP"),
# ("VHT_M7","M7DP"),
# ]
#}
HTMLHEADER="""<html>
<header>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:44" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:34:32" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:51" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:42:04" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="1.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2023-02-15T07:28:44" tool="csolution 1.4.0"/>
<created timestamp="2023-03-09T07:34:32" tool="csolution 1.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

Loading…
Cancel
Save