This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] various OpenACC/PTX built-ins and a reduction tweak
- From: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Wed, 17 Sep 2014 10:44:12 +0200
- Subject: Re: [gomp4] various OpenACC/PTX built-ins and a reduction tweak
- Authentication-results: sourceware.org; auth=none
Hi,
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.
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?
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.
But in any case, it would be helpful to know how those new built ins are intended
to be used.
Tobias