From b4a08d0815342b6238d307864f0823d0f07bb691 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Tue, 26 May 2020 22:04:20 +0200 Subject: k1c -> kvx changes --- test/c/Makefile | 2 +- test/c/aes.c | 2 +- test/c/almabench.c | 2 +- test/c/binarytrees.c | 2 +- test/c/chomp.c | 2 +- test/c/fannkuch.c | 2 +- test/c/fft.c | 2 +- test/c/fftsp.c | 2 +- test/c/fftw.c | 2 +- test/c/fib.c | 2 +- test/c/integr.c | 2 +- test/c/lists.c | 2 +- test/c/mandelbrot.c | 8 ++++---- test/c/nbody.c | 2 +- test/c/nsieve.c | 4 ++-- test/c/nsievebits.c | 4 ++-- test/c/perlin.c | 2 +- test/c/qsort.c | 2 +- test/c/sha1.c | 2 +- test/c/sha3.c | 2 +- test/c/siphash24.c | 2 +- test/c/spectral.c | 2 +- test/c/vmach.c | 4 ++-- 23 files changed, 29 insertions(+), 29 deletions(-) (limited to 'test/c') diff --git a/test/c/Makefile b/test/c/Makefile index a2a80e06..726631d2 100644 --- a/test/c/Makefile +++ b/test/c/Makefile @@ -25,7 +25,7 @@ PROGS?=fib integr qsort fft fftsp fftw sha1 sha3 aes almabench \ # * also removed bisect, who is exhibiting different float values on the Kalray # architecture than using x86 GCC (for both CompCert and GCC ports) (tested with n=10) ## -ifeq ($(ARCH),mppa_k1c) +ifeq ($(ARCH),kvx) PROGS:=$(filter-out knucleotide,$(PROGS)) PROGS:=$(filter-out bisect,$(PROGS)) endif diff --git a/test/c/aes.c b/test/c/aes.c index 0a64fe60..c959a611 100644 --- a/test/c/aes.c +++ b/test/c/aes.c @@ -1441,7 +1441,7 @@ int main(int argc, char ** argv) (u8 *)"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF", (u8 *)"\x8E\xA2\xB7\xCA\x51\x67\x45\xBF\xEA\xFC\x49\x90\x4B\x49\x60\x89", 5, 6); -#ifdef __K1C__ +#ifdef __KVX__ do_bench(2000); #else do_bench(1000000); diff --git a/test/c/almabench.c b/test/c/almabench.c index 4417200c..823bc18f 100644 --- a/test/c/almabench.c +++ b/test/c/almabench.c @@ -45,7 +45,7 @@ #define sineps 0.3977771559319137 #define coseps 0.9174820620691818 -#ifdef __K1C__ +#ifdef __KVX__ #define TEST_LENGTH 12 #else #define TEST_LENGTH 36525 diff --git a/test/c/binarytrees.c b/test/c/binarytrees.c index becae164..fbcddea1 100644 --- a/test/c/binarytrees.c +++ b/test/c/binarytrees.c @@ -75,7 +75,7 @@ int main(int argc, char* argv[]) unsigned N, depth, minDepth, maxDepth, stretchDepth; treeNode *stretchTree, *longLivedTree, *tempTree; -#ifdef __K1C__ +#ifdef __KVX__ N = argc < 2 ? 6 : atol(argv[1]); #else N = argc < 2 ? 12 : atol(argv[1]); diff --git a/test/c/chomp.c b/test/c/chomp.c index 7e2f62c1..71931b3d 100644 --- a/test/c/chomp.c +++ b/test/c/chomp.c @@ -338,7 +338,7 @@ int main(void) struct _play *tree; -#ifdef __K1C__ +#ifdef __KVX__ ncol = 4; nrow = 4; #else diff --git a/test/c/fannkuch.c b/test/c/fannkuch.c index befccd8d..a075c988 100644 --- a/test/c/fannkuch.c +++ b/test/c/fannkuch.c @@ -102,7 +102,7 @@ fannkuch( int n ) int main( int argc, char* argv[] ) { -#ifdef __K1C__ +#ifdef __KVX__ int n = (argc>1) ? atoi(argv[1]) : 6; #else int n = (argc>1) ? atoi(argv[1]) : 10; diff --git a/test/c/fft.c b/test/c/fft.c index 8ab59c9a..3513319f 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; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 10; #else if (argc >= 2) n = atoi(argv[1]); else n = 18; diff --git a/test/c/fftsp.c b/test/c/fftsp.c index d327a74c..3215dca5 100644 --- a/test/c/fftsp.c +++ b/test/c/fftsp.c @@ -153,7 +153,7 @@ int main(int argc, char ** argv) float enp, t, y, z, zr, zi, zm, a; float * xr, * xi, * pxr, * pxi; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 3; #else if (argc >= 2) n = atoi(argv[1]); else n = 12; diff --git a/test/c/fftw.c b/test/c/fftw.c index 04d896ad..2d50022a 100644 --- a/test/c/fftw.c +++ b/test/c/fftw.c @@ -74,7 +74,7 @@ const E KP1_847759065 = ((E) +1.847759065022573512256366378793576573644833252); /* Test harness */ -#ifdef __K1C__ +#ifdef __KVX__ #define NRUNS (10 * 10) #else #define NRUNS (100 * 1000) diff --git a/test/c/fib.c b/test/c/fib.c index 168626bc..536038bd 100644 --- a/test/c/fib.c +++ b/test/c/fib.c @@ -12,7 +12,7 @@ int fib(int n) int main(int argc, char ** argv) { int n, r; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 15; #else if (argc >= 2) n = atoi(argv[1]); else n = 35; diff --git a/test/c/integr.c b/test/c/integr.c index cd0521f5..edd87def 100644 --- a/test/c/integr.c +++ b/test/c/integr.c @@ -25,7 +25,7 @@ double test(int n) int main(int argc, char ** argv) { int n; double r; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 100000; #else if (argc >= 2) n = atoi(argv[1]); else n = 10000000; diff --git a/test/c/lists.c b/test/c/lists.c index 8deb0f37..b995f6d0 100644 --- a/test/c/lists.c +++ b/test/c/lists.c @@ -61,7 +61,7 @@ int main(int argc, char ** argv) int n, niter, i; struct list * l; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 500; if (argc >= 3) niter = atoi(argv[1]); else niter = 100; #else diff --git a/test/c/mandelbrot.c b/test/c/mandelbrot.c index 548c3ffa..d862b1a3 100644 --- a/test/c/mandelbrot.c +++ b/test/c/mandelbrot.c @@ -17,7 +17,7 @@ int main (int argc, char **argv) { int w, h, bit_num = 0; char byte_acc = 0; -#ifdef __K1C__ +#ifdef __KVX__ int i, iter = 30; #else int i, iter = 50; @@ -26,7 +26,7 @@ int main (int argc, char **argv) double Zr, Zi, Cr, Ci, Tr, Ti; if (argc < 2) { -#ifdef __K1C__ +#ifdef __KVX__ w = h = 40; #else w = h = 1000; @@ -60,7 +60,7 @@ int main (int argc, char **argv) if(bit_num == 8) { putc(byte_acc,stdout); -#ifdef __K1C__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster +#ifdef __KVX__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster fflush(stdout); #endif byte_acc = 0; @@ -70,7 +70,7 @@ int main (int argc, char **argv) { byte_acc <<= (8-w%8); putc(byte_acc,stdout); -#ifdef __K1C__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster +#ifdef __KVX__ // stdout isn't flushed enough when --syscall=libstd_scalls.so is passed to the simulator k1-cluster fflush(stdout); #endif byte_acc = 0; diff --git a/test/c/nbody.c b/test/c/nbody.c index ab0ebabe..01b36d5a 100644 --- a/test/c/nbody.c +++ b/test/c/nbody.c @@ -140,7 +140,7 @@ void setup_bodies(void) int main(int argc, char ** argv) { -#ifdef __K1C__ +#ifdef __KVX__ int n = argc < 2 ? 100 : atoi(argv[1]); #else int n = argc < 2 ? 1000000 : atoi(argv[1]); diff --git a/test/c/nsieve.c b/test/c/nsieve.c index 3954bcbe..83e1e1f0 100644 --- a/test/c/nsieve.c +++ b/test/c/nsieve.c @@ -29,14 +29,14 @@ static unsigned int nsieve(int m) { #define NITER 2 int main(int argc, char * argv[]) { -#ifdef __K1C__ +#ifdef __KVX__ int m = argc < 2 ? 6 : atoi(argv[1]); #else int m = argc < 2 ? 9 : atoi(argv[1]); #endif int i, j; for (i = 0; i < 3; i++) { -#ifdef __K1C__ +#ifdef __KVX__ int n = 200 << (m-i); #else int n = 10000 << (m-i); diff --git a/test/c/nsievebits.c b/test/c/nsievebits.c index e3b7fd43..a723d6d8 100644 --- a/test/c/nsievebits.c +++ b/test/c/nsievebits.c @@ -30,7 +30,7 @@ nsieve(unsigned int m) return (count); } -#ifdef __K1C__ +#ifdef __KVX__ #define NITER 1 #else #define NITER 2 @@ -52,7 +52,7 @@ main(int ac, char **av) { unsigned int n; -#ifdef __K1C__ +#ifdef __KVX__ n = ac < 2 ? 2 : atoi(av[1]); #else n = ac < 2 ? 9 : atoi(av[1]); diff --git a/test/c/perlin.c b/test/c/perlin.c index 29ebf964..5fa83a81 100644 --- a/test/c/perlin.c +++ b/test/c/perlin.c @@ -63,7 +63,7 @@ static void init(void) { p[256+i] = p[i] = permutation[i]; } -#ifdef __K1C__ +#ifdef __KVX__ #define INCREMENT 0.5 #define MIN -3.0 #define MAX 3.0 diff --git a/test/c/qsort.c b/test/c/qsort.c index 1ebe1e11..298e131f 100644 --- a/test/c/qsort.c +++ b/test/c/qsort.c @@ -34,7 +34,7 @@ int main(int argc, char ** argv) int n, i, j; int * a, * b; -#ifdef __K1C__ +#ifdef __KVX__ if (argc >= 2) n = atoi(argv[1]); else n = 500; #else if (argc >= 2) n = atoi(argv[1]); else n = 100000; diff --git a/test/c/sha1.c b/test/c/sha1.c index 624030cc..ce827c4a 100644 --- a/test/c/sha1.c +++ b/test/c/sha1.c @@ -231,7 +231,7 @@ int main(int argc, char ** argv) } do_test(test_input_1, test_output_1); do_test(test_input_2, test_output_2); -#ifdef __K1C__ +#ifdef __KVX__ do_bench(500); #else do_bench(200000); diff --git a/test/c/sha3.c b/test/c/sha3.c index 164e3086..796162a5 100644 --- a/test/c/sha3.c +++ b/test/c/sha3.c @@ -190,7 +190,7 @@ test_triplet_t testvec[4] = { } }; -#ifdef __K1C__ +#ifdef __KVX__ #define DATALEN 1000 #define NITER 7 #else diff --git a/test/c/siphash24.c b/test/c/siphash24.c index ce0df78c..b4b4ff34 100644 --- a/test/c/siphash24.c +++ b/test/c/siphash24.c @@ -235,7 +235,7 @@ int test_vectors() u8 testdata[100] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 34, 56, 78, 90 }; -#ifdef __K1C__ +#ifdef __KVX__ #define NITER 1000 #else #define NITER 1000000 diff --git a/test/c/spectral.c b/test/c/spectral.c index dca78fe0..2d7604b2 100644 --- a/test/c/spectral.c +++ b/test/c/spectral.c @@ -43,7 +43,7 @@ void eval_AtA_times_u(int N, const double u[], double AtAu[]) int main(int argc, char *argv[]) { int i; -#ifdef __K1C__ +#ifdef __KVX__ int N = ((argc == 2) ? atoi(argv[1]) : 11); #else int N = ((argc == 2) ? atoi(argv[1]) : 1000); diff --git a/test/c/vmach.c b/test/c/vmach.c index 5858d4d6..56138104 100644 --- a/test/c/vmach.c +++ b/test/c/vmach.c @@ -159,7 +159,7 @@ long wordcode_interp(unsigned int* code) #define I(a,b,c,d) ((a) + ((b) << 8) + ((c) << 16) + ((d) << 24)) -#ifdef __K1C__ +#ifdef __KVX__ #define FIBSIZE 15 #else #define FIBSIZE 30 @@ -182,7 +182,7 @@ unsigned int wordcode_fib[] = { /* 13 */ I(WRETURN, 0, 2, 0) }; -#ifdef __K1C__ +#ifdef __KVX__ #define TAKSIZE1 6 #define TAKSIZE2 9 #define TAKSIZE3 12 -- cgit