From 5b6c019a507688dfcf63b9ef54f7731137422ab5 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Tue, 10 Sep 2019 17:50:42 +0200 Subject: Starting to modify official CompCert tests to be passable with the simu --- test/c/fft.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/c/fft.c') diff --git a/test/c/fft.c b/test/c/fft.c index 2bd55a18..f91f5300 100644 --- a/test/c/fft.c +++ b/test/c/fft.c @@ -3,6 +3,7 @@ by: Dave Edelblute, edelblut@cod.nosc.mil, 05 Jan 1993 */ +#include #include #include #include @@ -151,13 +152,15 @@ int main(int argc, char ** argv) double enp, t, y, z, zr, zi, zm, a; double * xr, * xi, * pxr, * pxi; - if (argc >= 2) n = atoi(argv[1]); else n = 18; + if (argc >= 2) n = atoi(argv[1]); else n = 12; np = 1 << n; enp = np; npm = np / 2 - 1; t = PI / enp; xr = calloc(np, sizeof(double)); + assert(xr != NULL && "xr calloc failed"); xi = calloc(np, sizeof(double)); + assert(xi != NULL && "xi calloc failed"); pxr = xr; pxi = xi; for (nruns = 0; nruns < NRUNS; nruns++) { -- cgit From 059664368a5f4ed036e87c0a5e0ed1fae1706f3d Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 13 Sep 2019 15:18:55 +0200 Subject: Reducing further the input size of the tests --- test/c/fft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/c/fft.c') diff --git a/test/c/fft.c b/test/c/fft.c index f91f5300..429181b1 100644 --- a/test/c/fft.c +++ b/test/c/fft.c @@ -152,7 +152,7 @@ int main(int argc, char ** argv) double enp, t, y, z, zr, zi, zm, a; double * xr, * xi, * pxr, * pxi; - if (argc >= 2) n = atoi(argv[1]); else n = 12; + if (argc >= 2) n = atoi(argv[1]); else n = 10; np = 1 << n; enp = np; npm = np / 2 - 1; -- cgit From 5ca4b192499ee4829aee1256a3bebf2318c68108 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 25 Sep 2019 14:37:23 +0200 Subject: Restored previous input sizes for other backends --- test/c/fft.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/c/fft.c') diff --git a/test/c/fft.c b/test/c/fft.c index 429181b1..8ab59c9a 100644 --- a/test/c/fft.c +++ b/test/c/fft.c @@ -152,7 +152,11 @@ int main(int argc, char ** argv) double enp, t, y, z, zr, zi, zm, a; double * xr, * xi, * pxr, * pxi; +#ifdef __K1C__ if (argc >= 2) n = atoi(argv[1]); else n = 10; +#else + if (argc >= 2) n = atoi(argv[1]); else n = 18; +#endif np = 1 << n; enp = np; npm = np / 2 - 1; -- cgit