modified autogen.sh to remove reference to osl/
[converter.git] / tests / c_files / gemver.c
blobda32b4bfc39948b8eaba068a95cda44e17e4002a
1 #include <stdio.h>
2 #define n 100
4 int main()
5 { int i=0, j=0, N=n, alpha, beta;
6 float A[n][n], u1[n], u2[n], v1[n], v2[n], w[n], x[n], y[n], z[n];
8 /* GEMVER kernel */
9 #pragma scop
10 for (i=0; i<N; i++)
11 for (j=0; j<N; j++)
12 A[i][j] = A[i][j] + u1[i]*v1[j] + u2[i]*v2[j];
14 for (i=0; i<N; i++)
15 for (j=0; j<N; j++)
16 x[i] = x[i] + beta* A[i][j]*y[j];
19 for (i=0; i<N; i++)
20 x[i] = x[i] + z[i];
22 for (i=0; i<N; i++)
23 for (j=0; j<N; j++)
24 w[i] = w[i] + alpha* A[i][j]*x[j];
25 #pragma endscop
27 return 0;