[ was: Re: Fwd: [openacc, committed] Add oacc_get_default_dim ] On 19-12-18 16:27, Tom de Vries wrote: > [ Adding gcc-patches ] > > -------- Forwarded Message -------- > Subject: [openacc, committed] Add oacc_get_default_dim > Date: Wed, 19 Dec 2018 16:24:25 +0100 > From: Tom de Vries <tdevr...@suse.de> > To: Thomas Schwinge <thomas_schwi...@mentor.com> > > [ was: Re: [nvptx] vector length patch series -- openacc parts ] > > On 19-12-18 11:40, Thomas Schwinge wrote: >> Hi Tom! >> >> Thanks for picking up this series! >> >> >> And just to note: >> >> On Tue, 18 Dec 2018 00:52:30 +0100, Tom de Vries <tdevr...@suse.de> wrote: >>> On 14-12-18 20:58, Tom de Vries wrote: >>> >>>> 0003-openacc-Add-target-hook-TARGET_GOACC_ADJUST_PARALLEL.patch >>> >>>> 0017-nvptx-Enable-large-vectors.patch >>> >>>> 0023-nvptx-Force-vl32-if-calling-vector-partitionable-rou.patch >>> >>> Thomas, >>> >>> these patches are openacc (0003) or have openacc components (0017, 0023). >>> >>> Can you review and possibly approve the openacc parts? >> >> I've seen this (and your earlier questions), and will get to it >> eventually, thanks. >> >> > > In that case, let's make the review for the IMO trivial bits post-commit. > > Committed the openacc component of 0017 ... >
Likewise, added oacc_get_min_dim. Thanks, - Tom
[openacc] Add oacc_get_min_dim Expose oacc_min_dims to backends. 2019-01-07 Tom de Vries <tdevr...@suse.de> * omp-offload.c (oacc_get_min_dim): New function. * omp-offload.h (oacc_get_min_dim): Declare. --- gcc/omp-offload.c | 7 +++++++ gcc/omp-offload.h | 1 + 2 files changed, 8 insertions(+) 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<tree, va_gc> *offload_funcs;