public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"Schwinge, Thomas" <Thomas_Schwinge@mentor.com>
Subject: Fwd: [openacc, committed] Add oacc_get_default_dim
Date: Wed, 19 Dec 2018 15:26:00 -0000	[thread overview]
Message-ID: <59bf3552-b97c-6395-6273-0260518b2d15@suse.de> (raw)
In-Reply-To: <e2ffbca3-f421-66f6-cca3-e906432ecb15@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]

[ 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 <tdevries@suse.de>
To: Thomas Schwinge <Thomas_Schwinge@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 <tdevries@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 ...

Thanks,
- Tom


[-- Attachment #2: 0001-openacc-Add-oacc_get_default_dim.patch --]
[-- Type: text/x-patch, Size: 1333 bytes --]

[openacc] Add oacc_get_default_dim

Expose oacc_default_dims to backends.

2018-12-17  Tom de Vries  <tdevries@suse.de>

	* omp-offload.c (oacc_get_default_dim): New function.
	* omp-offload.h (oacc_get_default_dim): Declare.

---
 gcc/omp-offload.c | 7 +++++++
 gcc/omp-offload.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 4457e1a3079..9c7bd7328d1 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -573,6 +573,13 @@ oacc_xform_tile (gcall *call)
 static int oacc_default_dims[GOMP_DIM_MAX];
 static int oacc_min_dims[GOMP_DIM_MAX];
 
+int
+oacc_get_default_dim (int dim)
+{
+  gcc_assert (0 <= dim && dim < GOMP_DIM_MAX);
+  return oacc_default_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 6186f03649e..14edcad8a7d 100644
--- a/gcc/omp-offload.h
+++ b/gcc/omp-offload.h
@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_OMP_DEVICE_H
 #define GCC_OMP_DEVICE_H
 
+extern int oacc_get_default_dim (int dim);
+
 extern GTY(()) vec<tree, va_gc> *offload_funcs;
 extern GTY(()) vec<tree, va_gc> *offload_vars;
 


       reply	other threads:[~2018-12-19 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e2ffbca3-f421-66f6-cca3-e906432ecb15@suse.de>
2018-12-19 15:26 ` Tom de Vries [this message]
2018-12-19 15:28   ` [openacc] Make oacc_fn_attrib_level external Tom de Vries
2019-01-07  8:50   ` [openacc] Add oacc_get_min_dim Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59bf3552-b97c-6395-6273-0260518b2d15@suse.de \
    --to=tdevries@suse.de \
    --cc=Thomas_Schwinge@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).