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
Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c-c++-common
/
kernels-loop-and-seq-3.c
blob
e62297129fd07794fcb553db2dd392ad4dc12623
1
#include <stdlib.h>
2
3
#define N 32
4
5
unsigned int
6
foo
(
int
n
,
unsigned int
*
a
)
7
{
8
9
#pragma acc kernels copy (a[0:N])
10
{
11
for
(
int
i
=
0
;
i
<
n
;
i
++)
12
a
[
i
] =
1
;
13
14
a
[
0
] =
2
;
15
}
16
17
return
a
[
0
];
18
}
19
20
int
21
main
(
void
)
22
{
23
unsigned int
a
[
N
];
24
unsigned
res
,
i
;
25
26
for
(
i
=
0
;
i
<
N
; ++
i
)
27
a
[
i
] =
i
%
4
;
28
29
res
=
foo
(
N
,
a
);
30
if
(
res
!=
2
)
31
abort
();
32
33
return
0
;
34
}