public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
Cc: Cesar Philippidis <cesar@codesourcery.com>,
	gcc-patches@gcc.gnu.org,        fortran@gcc.gnu.org,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [gomp4] various OpenACC/PTX built-ins and a reduction tweak
Date: Wed, 17 Sep 2014 08:50:00 -0000	[thread overview]
Message-ID: <20140917084954.GB17454@tucnak.redhat.com> (raw)
In-Reply-To: <20140917084411.GA12930@physik.fu-berlin.de>

On Wed, Sep 17, 2014 at 10:44:12AM +0200, Tobias Burnus wrote:
> Cesar Philippidis wrote:
> > The patch introduces the following OpenACC/PTX-specific built-ins:
> ...
> 
> It is not completely clear how they are supposed to get used. Should the
> user call them directly in some cases? Or are they only used internally?
> 
> acc_on_device sounds like a function which would be in C/C++ made available
> to the user via #define acc_on_device __builtin_acc_on_device.

And not just providing acc_on_device prototype in some header?  Without
looking at the OpenACC standard, it sounds like this function could be
similar to omp_is_initial_device, so can and should be handled supposedly
similarly.
> 
> However, the rest looks as if it should rather be an internal function
> instead of a builtin. Or should the user really ever call the builtin
> directly?

GOMP_* functions are builtins and not internal functions too, all those
functions are library functions, while the user typically doesn't call them
directly, they still are implemented in the library.  Internal functions are
used for something that doesn't have a library implementation and is not
something user can call directly.

> Regarding Fortran: Builtins aren't directly available to the user. You have to
> wrap them into an intrinsic to make them available. If they have to be made
> available via a module (e.g. via "module acc) - you have to create a virtual
> module, which provides the intrinsic. If you don't want to convert the whole
> module, you could create an auxiliar module (e.g. acc_internal_) which provides
> only those bits - and then include it ("use,intrinsic :: ...") it in the
> main module - written in normal Fortran.

For the user callable fortran functions, for OpenMP libgomp just provides
*_ entrypoints to * functions.  Perhaps acc_on_device_ could be provided
too.

	Jakub

  reply	other threads:[~2014-09-17  8:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  0:33 Cesar Philippidis
2014-09-17  8:44 ` Tobias Burnus
2014-09-17  8:50   ` Jakub Jelinek [this message]
2014-09-17 14:12     ` Cesar Philippidis
2014-09-18 18:01     ` [gomp4] OpenACC acc_on_device (was: various OpenACC/PTX built-ins and a reduction tweak) Thomas Schwinge
2014-10-31 10:56       ` [gomp4] OpenACC acc_on_device Thomas Schwinge
2014-09-18 18:43 ` [gomp4] various OpenACC/PTX built-ins and a reduction tweak Thomas Schwinge
2014-09-18 19:10   ` Cesar Philippidis
2014-11-05 15:39   ` [gomp4] Remove unused BUILT_IN_OMP_SET_NUM_THREADS (was: various OpenACC/PTX built-ins and a reduction tweak) Thomas Schwinge

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=20140917084954.GB17454@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=cesar@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    --cc=tobias.burnus@physik.fu-berlin.de \
    /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).