aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/fftsp.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2016-07-24 16:09:47 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2016-07-24 16:09:47 +0200
commit04941b3cb8712cee9c3b0806cfe7aa76287c40e8 (patch)
tree54f8cb441d348c3c06821ff288086d2cde19c9a2 /test/c/fftsp.c
parent8a9bb1e699d62a8b5c88a54440ee2149acf7021a (diff)
downloadcompcert-kvx-04941b3cb8712cee9c3b0806cfe7aa76287c40e8.tar.gz
compcert-kvx-04941b3cb8712cee9c3b0806cfe7aa76287c40e8.zip
Updates to the local test suite
- Adjust parameters to bring the running time of each test closer to 1 second - compression/arcode.c: array access one past - "inline" -> "static inline" - Remove cchecklink support
Diffstat (limited to 'test/c/fftsp.c')
-rw-r--r--test/c/fftsp.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/test/c/fftsp.c b/test/c/fftsp.c
index 3c7c23c3..f83bd41f 100644
--- a/test/c/fftsp.c
+++ b/test/c/fftsp.c
@@ -145,13 +145,13 @@ int dfft(float x[], float y[], int np)
/* Test harness */
-float * xr, * xi;
+#define NRUNS 3000
int main(int argc, char ** argv)
{
- int n, np, npm, n2, i, j;
+ int n, np, npm, n2, i, j, nruns;
float enp, t, y, z, zr, zi, zm, a;
- float * pxr, * pxi;
+ float * xr, * xi, * pxr, * pxi;
if (argc >= 2) n = atoi(argv[1]); else n = 12;
np = 1 << n;
@@ -162,21 +162,23 @@ int main(int argc, char ** argv)
xi = calloc(np, sizeof(float));
pxr = xr;
pxi = xi;
- *pxr = (enp - 1.0) * 0.5f;
- *pxi = 0.0;
- n2 = np / 2;
- *(pxr+n2) = -0.5;
- *(pxi+n2) = 0.0;
- for (i = 1; i <= npm; i++) {
- j = np - i;
- *(pxr+i) = -0.5;
- *(pxr+j) = -0.5;
- z = t * (float)i;
- y = -0.5f*(cosf(z)/sinf(z));
- *(pxi+i) = y;
- *(pxi+j) = -y;
+ for (nruns = 0; nruns < NRUNS; nruns++) {
+ *pxr = (enp - 1.0) * 0.5f;
+ *pxi = 0.0;
+ n2 = np / 2;
+ *(pxr+n2) = -0.5;
+ *(pxi+n2) = 0.0;
+ for (i = 1; i <= npm; i++) {
+ j = np - i;
+ *(pxr+i) = -0.5;
+ *(pxr+j) = -0.5;
+ z = t * (float)i;
+ y = -0.5f*(cosf(z)/sinf(z));
+ *(pxi+i) = y;
+ *(pxi+j) = -y;
+ }
+ dfft(xr,xi,np);
}
- dfft(xr,xi,np);
zr = 0.0;
zi = 0.0;
npm = np-1;