From: Tom de Vries Date: Mon, 7 Jan 2019 08:09:40 +0000 (+0000) Subject: [openacc] Add oacc_get_min_dim X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e373d1369491dffbdd3d2336d07e086caafb380;p=gcc.git [openacc] Add oacc_get_min_dim Expose oacc_min_dims to backends. 2019-01-07 Tom de Vries * omp-offload.c (oacc_get_min_dim): New function. * omp-offload.h (oacc_get_min_dim): Declare. From-SVN: r267623 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a0151684f5..a2d4e60b926 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-01-07 Tom de Vries + + * omp-offload.c (oacc_get_min_dim): New function. + * omp-offload.h (oacc_get_min_dim): Declare. + 2018-12-26 Mateusz B PR target/88521 diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index aade9f2dc60..9cac5655c63 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -580,6 +580,13 @@ oacc_get_default_dim (int dim) return oacc_default_dims[dim]; } +int +oacc_get_min_dim (int dim) +{ + gcc_assert (0 <= dim && dim < GOMP_DIM_MAX); + return oacc_min_dims[dim]; +} + /* Parse the default dimension parameter. This is a set of :-separated optional compute dimensions. Each specified dimension is a positive integer. When device type support is added, it is diff --git a/gcc/omp-offload.h b/gcc/omp-offload.h index 6759a832d2b..21c9236b74f 100644 --- a/gcc/omp-offload.h +++ b/gcc/omp-offload.h @@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see #define GCC_OMP_DEVICE_H extern int oacc_get_default_dim (int dim); +extern int oacc_get_min_dim (int dim); extern int oacc_fn_attrib_level (tree attr); extern GTY(()) vec *offload_funcs;