File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 30
30
#include " Support/MemOwnershipAttrs.h"
31
31
#include " dpctl_data_types.h"
32
32
#include " dpctl_sycl_enum_types.h"
33
+ #include " dpctl_sycl_types.h"
33
34
34
35
DPCTL_C_EXTERN_C_BEGIN
35
36
37
+ /* !
38
+ * @brief Deletes the DPCTLSyclProgramRef pointer.
39
+ *
40
+ * @param PRef An opaque pointer to a sycl::platform.
41
+ */
42
+ DPCTL_API
43
+ void DPCTLPlatform_Delete (__dpctl_take DPCTLSyclPlatformRef PRef);
44
+
36
45
/* !
37
46
* @brief Returns the number of non-host type sycl::platform available on the
38
47
* system.
Original file line number Diff line number Diff line change 26
26
27
27
#include " dpctl_sycl_platform_interface.h"
28
28
#include " ../helper/include/dpctl_utils_helper.h"
29
+ #include " Support/CBindingWrapping.h"
29
30
#include < CL/sycl.hpp>
30
31
#include < iomanip>
31
32
#include < iostream>
@@ -36,6 +37,9 @@ using namespace cl::sycl;
36
37
37
38
namespace
38
39
{
40
+
41
+ DEFINE_SIMPLE_CONVERSION_FUNCTIONS (platform, DPCTLSyclPlatformRef);
42
+
39
43
std::set<DPCTLSyclBackendType> get_set_of_non_hostbackends ()
40
44
{
41
45
std::set<DPCTLSyclBackendType> be_set;
@@ -64,6 +68,12 @@ std::set<DPCTLSyclBackendType> get_set_of_non_hostbackends()
64
68
65
69
} // namespace
66
70
71
+ void DPCTLPlatform_Delete (__dpctl_take DPCTLSyclPlatformRef PRef)
72
+ {
73
+ auto P = unwrap (PRef);
74
+ delete P;
75
+ }
76
+
67
77
/* !
68
78
* Prints out the following sycl::info::platform attributes for each platform
69
79
* found on the system:
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ cdef extern from "dpctl_sycl_types.h":
75
75
cdef struct DPCTLOpaqueSyclDeviceSelector
76
76
cdef struct DPCTLOpaqueSyclEvent
77
77
cdef struct DPCTLOpaqueSyclKernel
78
+ cdef struct DPCTLOpaqueSyclPlatform
78
79
cdef struct DPCTLOpaqueSyclProgram
79
80
cdef struct DPCTLOpaqueSyclQueue
80
81
cdef struct DPCTLOpaqueSyclUSM
@@ -84,6 +85,7 @@ cdef extern from "dpctl_sycl_types.h":
84
85
ctypedef DPCTLOpaqueSyclDeviceSelector * DPCTLSyclDeviceSelectorRef
85
86
ctypedef DPCTLOpaqueSyclEvent * DPCTLSyclEventRef
86
87
ctypedef DPCTLOpaqueSyclKernel * DPCTLSyclKernelRef
88
+ ctypedef DPCTLOpaqueSyclPlatform * DPCTLSyclPlatformRef
87
89
ctypedef DPCTLOpaqueSyclProgram * DPCTLSyclProgramRef
88
90
ctypedef DPCTLOpaqueSyclQueue * DPCTLSyclQueueRef
89
91
ctypedef DPCTLOpaqueSyclUSM * DPCTLSyclUSMRef
@@ -138,6 +140,7 @@ cdef extern from "dpctl_sycl_kernel_interface.h":
138
140
139
141
140
142
cdef extern from " dpctl_sycl_platform_interface.h" :
143
+ cdef void DPCTLPlatform_Delete()
141
144
cdef size_t DPCTLPlatform_GetNumNonHostPlatforms()
142
145
cdef void DPCTLPlatform_DumpInfo()
143
146
cdef size_t DPCTLPlatform_GetNumNonHostBackends()
You can’t perform that action at this time.
0 commit comments