modified autogen.sh to remove reference to osl/
[converter.git] / tests / c_files / matmul_dummy_fail.c
blob6aef06fec7f71ba39655eb42ddb55c076492aa55
1 /* matmul.c 128*128 matrix multiply */
2 #include <stdio.h>
3 #define N 128
5 int main()
7 int i,j,k;
8 float a[N][N], b[N][N], c[N][N];
9 float d[N], e;
11 /* We read matrix a */
12 for(i=0; i<N; i++)
13 for(j=0; j<N; j++)
14 scanf(" %f",&a[i][j]);
16 /* We read matrix b */
17 for(i=0; i<N; i++)
18 for(j=0; j<N; j++)
19 scanf(" %f",&b[i][j]);
21 /* c = a * b */
22 #pragma scop
23 for(i=0; i<N; i++)
24 for(j=0; j<N; j++)
26 e = 0.0;
27 d[0] = 0.0;
28 c[i][j] = 0.0;
29 for(k=0; k<N; k++)
30 c[i][j] = c[i][j] + a[i][k]*b[k][j];
32 #pragma endscop
34 /* We print matrix c */
35 for(i=0; i<N; i++)
37 for(j=0; j<N; j++)
38 printf("%6.2f ",c[i][j]);
39 printf("\n");
42 return 0;