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
OpenACC documentation updates.
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.oacc-c
/
lib-41.c
blob
01c5f3cfaa351c5dcc8e07f2f982204345e9a2f2
1
/* { dg-do run } */
2
3
#include <stdlib.h>
4
#include <openacc.h>
5
6
int
7
main
(
int
argc
,
char
**
argv
)
8
{
9
const int
N
=
256
;
10
int
i
;
11
unsigned char
*
h
;
12
void
*
d
;
13
14
h
= (
unsigned char
*)
malloc
(
N
);
15
16
for
(
i
=
0
;
i
<
N
;
i
++)
17
{
18
h
[
i
] =
i
;
19
}
20
21
d
=
acc_copyin
(
h
,
N
);
22
if
(!
d
)
23
abort
();
24
25
for
(
i
=
0
;
i
<
N
;
i
++)
26
{
27
h
[
i
] =
0xab
;
28
}
29
30
acc_update_device
(
h
,
N
);
31
32
acc_copyout
(
h
,
N
);
33
34
for
(
i
=
0
;
i
<
N
;
i
++)
35
{
36
if
(
h
[
i
] !=
0xab
)
37
abort
();
38
}
39
40
free
(
h
);
41
42
return
0
;
43
}