Page MenuHomePhabricator

[flang][openacc] OpenACC module signature
AcceptedPublic

Authored by clementval on Jul 17 2020, 11:28 AM.

Details

Summary

This patch introduce the OpenACC 3.0 module with all the runtime interface declarations.

Diff Detail

Event Timeline

clementval created this revision.Jul 17 2020, 11:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2020, 11:28 AM
clementval added a project: Restricted Project.Jul 17 2020, 11:28 AM
klausler requested changes to this revision.Jul 17 2020, 11:43 AM
klausler added inline comments.
flang/module/openacc.f90
18

Explicit kind parameter values are generally non-portable. I think that you can use a default INTEGER here.

20

acc_handle_kind = kind(0) or acc_handle_kind = selected_int_kind(9) would be better, I think.

Or define a PRIVATE parameter at the head of the file (integer, private, parameter :: default_int_kind(kind(0)) and use that. But kind(0) is idiomatic and clear.

187

Is your intent to implement these subprograms here in this module eventually?

If so, it might be better to define their module interfaces here in the module, and put their implementations into one or more submodules.

If not, then these subprograms should probably be just interfaces.

This revision now requires changes to proceed.Jul 17 2020, 11:43 AM
clementval marked 6 inline comments as done.

Address review comment

Thanks for the review comments. Just updated the patch.

flang/module/openacc.f90
18

Right, switch to INTEGER

20

I switched to use int32 from iso_fortran_env similar to what is done in gfortran.

187

They will most probably be implemented in other module/submodule so I made them interfaces.

@klausler Anything else to be changed?

klausler accepted this revision.Jul 23 2020, 8:47 AM
klausler added inline comments.
flang/module/openacc.f90
187

If they're going to be implemented in a submodule (which makes sense to me), these interfaces should be module functions and subroutines. They can't be implemented in another module.

This revision is now accepted and ready to land.Jul 23 2020, 8:47 AM
clementval marked 2 inline comments as done.Jul 23 2020, 8:44 PM
clementval added inline comments.
flang/module/openacc.f90
187

Yeah right. I'm gonna update this module and the patch.

DavidTruby resigned from this revision.Sep 30 2020, 5:41 AM