[Openmp-commits] [PATCH] D102883: [OpenMP] Define named constants for interop's foreign runtime ID
Hansang Bae via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 1 11:07:28 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcf5c94ef08f9: [OpenMP] Define named constants for interop's foreign runtime ID (authored by hbae).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102883/new/
https://reviews.llvm.org/D102883
Files:
openmp/runtime/src/include/omp.h.var
openmp/runtime/src/include/omp_lib.f90.var
openmp/runtime/src/include/omp_lib.h.var
Index: openmp/runtime/src/include/omp_lib.h.var
===================================================================
--- openmp/runtime/src/include/omp_lib.h.var
+++ openmp/runtime/src/include/omp_lib.h.var
@@ -52,6 +52,10 @@
parameter(omp_depend_kind=int_ptr_kind())
integer omp_event_handle_kind
parameter(omp_event_handle_kind=int_ptr_kind())
+ integer omp_interop_kind
+ parameter(omp_interop_kind=int_ptr_kind())
+ integer omp_interop_fr_kind
+ parameter(omp_interop_fr_kind=omp_integer_kind)
integer(kind=omp_integer_kind)openmp_version
parameter(openmp_version=@LIBOMP_OMP_YEAR_MONTH@)
@@ -247,6 +251,24 @@
integer(kind=omp_pause_resource_kind)omp_pause_hard
parameter(omp_pause_hard=2)
+ integer(kind=omp_interop_fr_kind)omp_ifr_cuda
+ parameter(omp_ifr_cuda=1)
+ integer(kind=omp_interop_fr_kind)omp_ifr_cuda_driver
+ parameter(omp_ifr_cuda_driver=2)
+ integer(kind=omp_interop_fr_kind)omp_ifr_opencl
+ parameter(omp_ifr_opencl=3)
+ integer(kind=omp_interop_fr_kind)omp_ifr_sycl
+ parameter(omp_ifr_sycl=4)
+ integer(kind=omp_interop_fr_kind)omp_ifr_hip
+ parameter(omp_ifr_hip=5)
+ integer(kind=omp_interop_fr_kind)omp_ifr_level_zero
+ parameter(omp_ifr_level_zero=6)
+ integer(kind=omp_interop_fr_kind)omp_ifr_last
+ parameter(omp_ifr_last=7)
+
+ integer(kind=omp_interop_kind)omp_interop_none
+ parameter(omp_interop_none=0)
+
interface
! ***
Index: openmp/runtime/src/include/omp_lib.f90.var
===================================================================
--- openmp/runtime/src/include/omp_lib.f90.var
+++ openmp/runtime/src/include/omp_lib.f90.var
@@ -34,6 +34,8 @@
integer, parameter :: omp_memspace_handle_kind = c_intptr_t
integer, parameter :: omp_alloctrait_key_kind = omp_integer_kind
integer, parameter :: omp_alloctrait_val_kind = c_intptr_t
+ integer, parameter :: omp_interop_kind = c_intptr_t
+ integer, parameter :: omp_interop_fr_kind = omp_integer_kind
type omp_alloctrait
integer(kind=omp_alloctrait_key_kind) key
@@ -156,6 +158,16 @@
integer (kind=omp_pause_resource_kind), parameter :: omp_pause_soft = 1
integer (kind=omp_pause_resource_kind), parameter :: omp_pause_hard = 2
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_cuda = 1
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_cuda_driver = 2
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_opencl = 3
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_sycl = 4
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_hip = 5
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_level_zero = 6
+ integer (kind=omp_interop_fr_kind), parameter :: omp_ifr_last = 7
+
+ integer (kind=omp_interop_kind), parameter :: omp_interop_none = 0
+
interface
! ***
Index: openmp/runtime/src/include/omp.h.var
===================================================================
--- openmp/runtime/src/include/omp.h.var
+++ openmp/runtime/src/include/omp.h.var
@@ -182,6 +182,16 @@
omp_irc_other = -6
} omp_interop_rc_t;
+ typedef enum omp_interop_fr {
+ omp_ifr_cuda = 1,
+ omp_ifr_cuda_driver = 2,
+ omp_ifr_opencl = 3,
+ omp_ifr_sycl = 4,
+ omp_ifr_hip = 5,
+ omp_ifr_level_zero = 6,
+ omp_ifr_last = 7
+ } omp_interop_fr_t;
+
typedef void * omp_interop_t;
/*!
@@ -211,7 +221,7 @@
/*!
* The `omp_get_interop_rc_desc` routine retrieves a description of the return code associated with an `omp_interop_t` object.
*/
- extern const char * __KAI_KMPC_CONVENTION omp_get_interop_rc_desc(const omp_interop_rc_t, omp_interop_rc_t);
+ extern const char * __KAI_KMPC_CONVENTION omp_get_interop_rc_desc(const omp_interop_t, omp_interop_rc_t);
/* OpenMP 5.1 device memory routines */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102883.349028.patch
Type: text/x-patch
Size: 4045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210601/ac39f743/attachment.bin>
More information about the Openmp-commits
mailing list