repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improve atomic store implementation on hppa-linux.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
kernels-reduction-1.c
blob
95f1b77986c5d4220ac5e03b0c33761dc33db2ac
1
/* Verify that a simple, explicit acc loop reduction works inside
2
a kernels region. */
3
4
#include <stdlib.h>
5
6
#define N 100
7
8
int
9
main
()
10
{
11
int
i
,
red
=
0
;
12
13
#pragma acc kernels
14
{
15
#pragma acc loop reduction (+:red)
16
for
(
i
=
0
;
i
<
N
;
i
++)
17
red
++;
18
}
19
20
if
(
red
!=
N
)
21
abort
();
22
23
return
0
;
24
}