From 600fa18324c21a162c50c40ae5f00c899a41dd24 Mon Sep 17 00:00:00 2001 From: dhuth Date: Wed, 17 Sep 2014 18:09:29 -0600 Subject: removed submodule, added test-chill --- test-chill/test-cases/examples/chill/gemv.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test-chill/test-cases/examples/chill/gemv.c (limited to 'test-chill/test-cases/examples/chill/gemv.c') diff --git a/test-chill/test-cases/examples/chill/gemv.c b/test-chill/test-cases/examples/chill/gemv.c new file mode 100644 index 0000000..39b083c --- /dev/null +++ b/test-chill/test-cases/examples/chill/gemv.c @@ -0,0 +1,21 @@ +#ifndef N +#define N 512 +#endif + +/* + +procedure int gemv( + out float[N] a = matrix([], lambda i: random(2,-2)), + in float[N] b = matrix([], lambda i: random(2,-2)), + in float[N][N] c = matrix([,], lambda i,j: random(2,-2))) + +*/ +int gemv(float a[N], float b[N], float c[N][N]) { + int i, j; + + for (i = 1; i < N; i++) + for (j = 1; j < N; j++) + a[i] = a[i] + c[i][j] * b[j]; + + return 0; +} -- cgit v1.2.3-70-g09d2