| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-std=c23" } */ |
| 3 |
|
| 4 |
|
| 5 |
void variant_fn(int *x, int *y, int *z); |
| 6 |
|
| 7 |
[[omp::directive (declare variant(variant_fn) match(construct={dispatch}) adjust_args(need_device_ptr: x,y) adjust_args(nothing: z))]] |
| 8 |
void bar(int *x, int *y, int *z); |
| 9 |
|
| 10 |
void sub(int *x, int *y, int *z) |
| 11 |
{ |
| 12 |
[[omp::directive (dispatch is_device_ptr(y))]] |
| 13 |
bar(x, y, z); |
| 14 |
[[omp::directive (dispatch device(0))]] |
| 15 |
bar(x, y, z); |
| 16 |
[[omp::directive (dispatch nocontext(1) novariants(1))]] |
| 17 |
bar(x, y, z); |
| 18 |
[[omp::directive (dispatch depend(inout: x) nowait)]] |
| 19 |
bar(x, y, z); |
| 20 |
} |
| 21 |
|