From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28517 invoked by alias); 7 Jan 2019 08:50:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28473 invoked by uid 89); 7 Jan 2019 08:50:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=expose, dimensions, device X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Jan 2019 08:50:01 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1A940AEE9; Mon, 7 Jan 2019 08:49:59 +0000 (UTC) Subject: [openacc] Add oacc_get_min_dim From: Tom de Vries To: "gcc-patches@gcc.gnu.org" , "Schwinge, Thomas" References: <59bf3552-b97c-6395-6273-0260518b2d15@suse.de> Message-ID: Date: Mon, 07 Jan 2019 08:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <59bf3552-b97c-6395-6273-0260518b2d15@suse.de> Content-Type: multipart/mixed; boundary="------------0593C2AE193FEA87D534DC7A" X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00269.txt.bz2 This is a multi-part message in MIME format. --------------0593C2AE193FEA87D534DC7A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 1313 [ 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 > To: Thomas Schwinge > > [ 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 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 --------------0593C2AE193FEA87D534DC7A Content-Type: text/x-patch; name="0001-openacc-Add-oacc_get_min_dim.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-openacc-Add-oacc_get_min_dim.patch" Content-length: 1269 [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. --- 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 *offload_funcs; --------------0593C2AE193FEA87D534DC7A--