[Openmp-commits] [PATCH] D61860: Introduce new OpenMP 5.0 depend object type.

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon May 13 09:46:40 PDT 2019


AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: tlwilmar, jlpeyton, hbae.
AndreyChurbanov added a project: OpenMP.
Herald added subscribers: openmp-commits, jdoerfert, guansong.

The implementation of depobj is actually transparent to runtime library (and to users) and should be done by compiler.  But the library needs type declarations in public headers, so that users could declare objects of omp_depend_t type (C/C++) or integers of omp_depend_kind kind (Fortran).  That is done by this patch.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D61860

Files:
  runtime/src/include/50/omp.h.var
  runtime/src/include/50/omp_lib.f.var
  runtime/src/include/50/omp_lib.f90.var
  runtime/src/include/50/omp_lib.h.var


Index: runtime/src/include/50/omp_lib.h.var
===================================================================
--- runtime/src/include/50/omp_lib.h.var
+++ runtime/src/include/50/omp_lib.h.var
@@ -48,6 +48,8 @@
       parameter(omp_alloctrait_val_kind=int_ptr_kind())
       integer omp_pause_resource_kind
       parameter(omp_pause_resource_kind=omp_integer_kind)
+      integer omp_depend_kind
+      parameter(omp_depend_kind=int_ptr_kind())
 
       integer(kind=omp_integer_kind)openmp_version
       parameter(openmp_version=@LIBOMP_OMP_YEAR_MONTH@)
Index: runtime/src/include/50/omp_lib.f90.var
===================================================================
--- runtime/src/include/50/omp_lib.f90.var
+++ runtime/src/include/50/omp_lib.f90.var
@@ -41,6 +41,7 @@
         end type omp_alloctrait
 
         integer, parameter :: omp_pause_resource_kind = omp_integer_kind
+        integer, parameter :: omp_depend_kind = c_intptr_t
 
       end module omp_lib_kinds
 
Index: runtime/src/include/50/omp_lib.f.var
===================================================================
--- runtime/src/include/50/omp_lib.f.var
+++ runtime/src/include/50/omp_lib.f.var
@@ -44,6 +44,7 @@
         end type omp_alloctrait
 
         integer, parameter :: omp_pause_resource_kind = omp_integer_kind
+        integer, parameter :: omp_depend_kind = int_ptr_kind()
 
       end module omp_lib_kinds
 
Index: runtime/src/include/50/omp.h.var
===================================================================
--- runtime/src/include/50/omp.h.var
+++ runtime/src/include/50/omp.h.var
@@ -149,6 +149,7 @@
 
     /* OpenMP 5.0 */
     extern int   __KAI_KMPC_CONVENTION  omp_get_device_num (void);
+    typedef void * omp_depend_t;
 
     /* kmp API functions */
     extern int    __KAI_KMPC_CONVENTION  kmp_get_stacksize          (void);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61860.199280.patch
Type: text/x-patch
Size: 1838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190513/da2499c5/attachment.bin>


More information about the Openmp-commits mailing list