1+ ! Made-up directives to test OpenACC support
2+ program main
3+ implicit none
4+
5+ ! The highlighting should continue on the second line
6+ ! $acc data copy(A) copyin(B(:)) copyout(C(1:N)) present(D) &
7+ ! $acc& no_create(E) deviceptr(F)
8+
9+ ! $acc parallel loop private(foo) firstprivate(bar) tile(32,32)
10+
11+ ! $acc parallel
12+ ! $acc loop collapse(2)
13+ ! $acc end parallel
14+
15+ ! $acc end data
16+
17+ ! $acc kernels default(present)
18+ ! $acc loop independent
19+ ! $acc loop reduction(+:sum)
20+ ! $acc loop reduction(max:the_max)
21+ ! $acc loop gang worker vector
22+ ! $acc loop gang(128) worker(4) vector(128)
23+ ! $acc loop seq
24+ ! $acc end kernels
25+
26+ ! $acc parallel loop num_gangs(1) num_workers(1) vector_length(1) default(none)
27+
28+ ! $acc enter data create(A(1:N)) attach(B)
29+
30+ ! $acc update device(A) async
31+ ! $acc update host(A(1:N)) async(1)
32+ ! $acc update self(A(:)) async(2) wait(1)
33+ ! $acc wait(1)
34+ ! $acc wait
35+
36+ ! $acc exit data delete(A) detach(B) finalize
37+
38+ ! $acc serial self(.TRUE.) if(.FALSE.)
39+
40+ ! $acc host_data use_device(A)
41+ ! $acc end host_data
42+
43+ ! $acc declare device_resident(A)
44+
45+ ! $acc init device_type(foo) device_num(bar)
46+ ! $acc shutdown device_type(foo) device_num(bar)
47+ ! $acc set default_async(1)
48+
49+ ! $acc cache(A(:))
50+
51+ ! Test all four forms of atomic
52+ ! $acc atomic capture(A)
53+ ! $acc end atomic
54+ ! $acc atomic update(A)
55+ ! $acc end atomic
56+ ! $acc atomic read(A)
57+ ! $acc end atomic
58+ ! $acc atomic write(A)
59+ ! $acc end atomic
60+
61+ ! The "do" should not highlight, if it does it's coming from OpenMP
62+ ! $acc parallel do
63+ ! The "do" here still should, since it is OpenMP
64+ ! $omp parallel do
65+
66+ end program main
0 commit comments