aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/fft.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/c/fft.c')
-rw-r--r--test/c/fft.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/c/fft.c b/test/c/fft.c
index 2bd55a18..3513319f 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 <assert.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
@@ -151,13 +152,19 @@ int main(int argc, char ** argv)
double enp, t, y, z, zr, zi, zm, a;
double * xr, * xi, * pxr, * pxi;
+#ifdef __KVX__
+ 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;
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++) {