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
take into account contraction when generating OpenMP support
[ppcg.git]
/
tests
/
call4.c
blob
7002018a14a67f7bd9bcc6cf1f8f8646744bd7e1
1
#include <stdlib.h>
2
3
int
inline
get
(
int
a
[
1000
],
int
pos
)
4
{
5
int
tmp
=
a
[
pos
];
6
return
tmp
;
7
}
8
9
int
main
()
10
{
11
int
a
[
1000
],
b
[
1000
];
12
13
for
(
int
i
=
0
;
i
<
1000
; ++
i
)
14
a
[
i
] =
i
;
15
#pragma scop
16
for
(
int
i
=
0
;
i
<
999
; ++
i
)
17
b
[
i
] =
get
(
a
,
i
) +
get
(
a
,
i
+
1
);
18
#pragma endscop
19
for
(
int
i
=
0
;
i
<
999
; ++
i
)
20
if
(
b
[
i
] !=
a
[
i
] +
a
[
i
+
1
])
21
return
EXIT_FAILURE
;
22
23
return
EXIT_SUCCESS
;
24
}