[PATCH] D84064: [flang][openacc] OpenACC module signature

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 17:20:22 PDT 2020


clementval added a comment.

Thanks for the review comments. Just updated the patch.



================
Comment at: flang/module/openacc.f90:17
+  ! 3.1 Runtime integer parameter openacc_version
+  integer(kind=4), parameter :: openacc_version = 201911
+
----------------
klausler wrote:
> Explicit `kind` parameter values are generally non-portable.  I think that you can use a default `INTEGER` here.
Right, switch to `INTEGER`


================
Comment at: flang/module/openacc.f90:19
+
+  integer(kind=4), parameter :: acc_handle_kind = 4
+
----------------
klausler wrote:
> `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.
I switched to use `int32` from `iso_fortran_env` similar to what is done in gfortran. 


================
Comment at: flang/module/openacc.f90:186
+
+contains
+  ! 3.2.1
----------------
klausler wrote:
> 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.
They will most probably be implemented in other module/submodule so I made them interfaces. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84064/new/

https://reviews.llvm.org/D84064





More information about the llvm-commits mailing list