Implementing OpenACC's Fortran module
Tobias Burnus
burnus@net-b.de
Tue Aug 19 19:44:00 GMT 2014
Hi James,
James Norris wrote:
> Tobias Burnus wrote:
>>> How about the following:
>>> * Keep the _h functions.
>>> * Create a "module openacc_internal" with interface blocks for the _h
>>> procedures and move the interface block for the _l procedures there
>>> from the module openacc.
>>> * In module openacc, remove the PUBLIC statement for the _l functions,
>>> USE the openacc_internal module, append in the "procedure ::"
>>> statements
>>> "_h" to the procedure names. And remove the "contains" with all its
>>> module procedures.
>>>
>>> That way you only have the procedures once - and not twice.
>>> Additionally,
>>> you avoid that "use openacc" imports the _l names into the namespace.
>>>
>
> Yes, that scheme seems to work very well. See attached.
Well, similar but not quite as I meant. Attached is what I meant: I
remove the _i functions and put the _h functions' interface into
openacc_internal. That should half the number of procedures one has in
the .o file.
Tobias
PS: As it was quickly done, I might have made some mistake;
additionally, I have not fully re-indented the functions in
openacc_internal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openacc.f90
Type: text/x-fortran
Size: 27665 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140819/7c44d8bb/attachment.bin>
More information about the Fortran
mailing list