This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp4] various OpenACC/PTX built-ins and a reduction tweak


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]