modified autogen.sh to remove reference to osl/
[converter.git] / tests / c_files / clan_autopragma.c
blob3d12082c5ab34f6c924af2ac76cf8d0bc7a16d50
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];
10 /* We read matrix a */
12 #pragma scop
13 for(i=0; i<N; i++)
14 for(j=0; j<N; j++)
15 scanf(" %f",&a[i][j]);
17 /* We read matrix b */
18 for(i=0; i<N; i++)
19 for(j=0; j<N; j++)
20 scanf(" %f",&b[i][j]);
21 #pragma endscop
24 /* c = a * b */
25 #pragma scop
26 for(i=0; i<N; i++)
27 for(j=0; j<N; j++)
29 c[i][j] = 0.0;
30 for(k=0; k<N; k++)
31 c[i][j] = c[i][j] + a[i][k]*b[k][j];
33 #pragma endscop
35 /* We print matrix c */
37 #pragma scop
38 for(i=0; i<N; i++)
40 for(j=0; j<N; j++)
41 printf("%6.2f ",c[i][j]);
42 printf("\n");
44 #pragma endscop
47 return 0;