
..., by simplifying 'libgomp.oacc-c-c++-common/parallel-dims.c', and updating
the former correspondingly. '__builtin_goacc_parlevel_id' does the right thing
for all 'acc_device_*'.
Follow-up to commit 09e0ad6253
"Update OpenACC
tests for amdgcn".
libgomp/
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Simplify.
* testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: Update.
26 lines
567 B
C
26 lines
567 B
C
/* OpenACC parallelism dimensions clauses: num_gangs, num_workers,
|
|
vector_length. */
|
|
|
|
/* Copied from '../libgomp.oacc-c-c++-common/parallel-dims.c'. */
|
|
|
|
/* Used by 'parallel-dims.f90'. */
|
|
|
|
#include <gomp-constants.h>
|
|
|
|
#pragma acc routine seq
|
|
/* static */ int acc_gang ()
|
|
{
|
|
return __builtin_goacc_parlevel_id (GOMP_DIM_GANG);
|
|
}
|
|
|
|
#pragma acc routine seq
|
|
/* static */ int acc_worker ()
|
|
{
|
|
return __builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
|
|
}
|
|
|
|
#pragma acc routine seq
|
|
/* static */ int acc_vector ()
|
|
{
|
|
return __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR);
|
|
}
|