blob: 051f7937deee9a307ba7970fda3283fb5a74a481 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting
aspects of that functionality. */
#pragma acc routine gang
/* { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .+3 }
{ dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .+2 }
{ dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .+1 } */
void gang (void)
{
}
#pragma acc routine worker
/* { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .+2 }
{ dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .+1 } */
void worker (void)
{
}
#pragma acc routine vector
/* { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .+1 } */
void vector (void)
{
}
#pragma acc routine seq
void seq (void)
{
}
int main ()
{
#pragma acc kernels num_gangs (32) num_workers (32) vector_length (32)
{
gang ();
worker ();
vector ();
seq ();
}
#pragma acc parallel num_gangs (32) num_workers (32) vector_length (32)
{
gang ();
worker ();
vector ();
seq ();
}
return 0;
}
|