repo.or.cz
/
ppcg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
initial version of ppcg
[ppcg.git]
/
clan
/
tests
/
ax-do.c
blob
2ce459413dc601d6ab4ef214486f0bc6fd5bd75c
1
#include <stdio.h>
2
#define N 100
3
4
int
main
()
5
{
int
i
=
0
,
j
=
0
,
n
=
100
;
6
float
a
[
N
+
1
][
N
+
1
],
b
[
N
+
1
],
c
[
N
+
1
],
result
;
7
8
/* ax-do kernel */
9
#pragma scop
10
for
(
i
=
1
;
i
<=
n
;
i
++)
11
c
[
i
] =
0
;
12
for
(
i
=
1
;
i
<=
n
;
i
++)
13
for
(
j
=
1
;
j
<=
n
;
j
++)
14
c
[
i
] =
c
[
i
] +
a
[
i
][
j
] *
b
[
j
] ;
15
#pragma endscop
16
17
result
=
c
[
N
-
1
];
18
printf
(
"fib[%d] = %d
\n
"
,
N
-
1
,
result
);
19
20
return
0
;
21
}