| 1 |
/* OpenACC parallelism dimensions clauses: num_gangs, num_workers, |
| 2 |
vector_length. */ |
| 3 |
|
| 4 |
/* Copied from '../libgomp.oacc-c-c++-common/parallel-dims.c'. */ |
| 5 |
|
| 6 |
/* Used by 'parallel-dims.f90'. */ |
| 7 |
|
| 8 |
#include <gomp-constants.h> |
| 9 |
|
| 10 |
#pragma acc routine seq |
| 11 |
/* static */ int acc_gang () |
| 12 |
{ |
| 13 |
return __builtin_goacc_parlevel_id (GOMP_DIM_GANG); |
| 14 |
} |
| 15 |
|
| 16 |
#pragma acc routine seq |
| 17 |
/* static */ int acc_worker () |
| 18 |
{ |
| 19 |
return __builtin_goacc_parlevel_id (GOMP_DIM_WORKER); |
| 20 |
} |
| 21 |
|
| 22 |
#pragma acc routine seq |
| 23 |
/* static */ int acc_vector () |
| 24 |
{ |
| 25 |
return __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR); |
| 26 |
} |