@@ -34,17 +34,15 @@ cdef extern from "dpctl_utils.h":
34
34
35
35
36
36
cdef extern from " dpctl_sycl_enum_types.h" :
37
- cdef enum _backend_type ' DPCTLSyclBackendType' :
37
+ ctypedef enum _backend_type ' DPCTLSyclBackendType' :
38
38
_ALL_BACKENDS ' DPCTL_ALL_BACKENDS'
39
39
_CUDA ' DPCTL_CUDA'
40
40
_HOST ' DPCTL_HOST'
41
41
_LEVEL_ZERO ' DPCTL_LEVEL_ZERO'
42
42
_OPENCL ' DPCTL_OPENCL'
43
43
_UNKNOWN_BACKEND ' DPCTL_UNKNOWN_BACKEND'
44
44
45
- ctypedef _backend_type DPCTLSyclBackendType
46
-
47
- cdef enum _device_type ' DPCTLSyclDeviceType' :
45
+ ctypedef enum _device_type ' DPCTLSyclDeviceType' :
48
46
_ACCELERATOR ' DPCTL_ACCELERATOR'
49
47
_ALL_DEVICES ' DPCTL_ALL'
50
48
_AUTOMATIC ' DPCTL_AUTOMATIC'
@@ -54,9 +52,7 @@ cdef extern from "dpctl_sycl_enum_types.h":
54
52
_HOST_DEVICE ' DPCTL_HOST_DEVICE'
55
53
_UNKNOWN_DEVICE ' DPCTL_UNKNOWN_DEVICE'
56
54
57
- ctypedef _device_type DPCTLSyclDeviceType
58
-
59
- cdef enum _arg_data_type ' DPCTLKernelArgType' :
55
+ ctypedef enum _arg_data_type ' DPCTLKernelArgType' :
60
56
_CHAR ' DPCTL_CHAR' ,
61
57
_SIGNED_CHAR ' DPCTL_SIGNED_CHAR' ,
62
58
_UNSIGNED_CHAR ' DPCTL_UNSIGNED_CHAR' ,
@@ -74,14 +70,12 @@ cdef extern from "dpctl_sycl_enum_types.h":
74
70
_LONG_DOUBLE ' DPCTL_DOUBLE' ,
75
71
_VOID_PTR ' DPCTL_VOID_PTR'
76
72
77
- ctypedef _arg_data_type DPCTLKernelArgType
78
-
79
73
ctypedef enum _queue_property_type ' DPCTLQueuePropertyType' :
80
74
_DEFAULT_PROPERTY ' DPCTL_DEFAULT_PROPERTY'
81
75
_ENABLE_PROFILING ' DPCTL_ENABLE_PROFILING'
82
76
_IN_ORDER ' DPCTL_IN_ORDER'
83
77
84
- cdef enum _aspect_type ' DPCTLSyclAspectType' :
78
+ ctypedef enum _aspect_type ' DPCTLSyclAspectType' :
85
79
_host ' host' ,
86
80
_cpu ' cpu' ,
87
81
_gpu ' gpu' ,
@@ -101,10 +95,7 @@ cdef extern from "dpctl_sycl_enum_types.h":
101
95
_usm_restricted_shared_allocations ' usm_restricted_shared_allocations' ,
102
96
_usm_system_allocator ' usm_system_allocator'
103
97
104
- ctypedef _aspect_type DPCTLSyclAspectType
105
-
106
-
107
- cdef enum _partition_affinity_domain_type ' DPCTLPartitionAffinityDomainType' :
98
+ ctypedef enum _partition_affinity_domain_type ' DPCTLPartitionAffinityDomainType' :
108
99
_not_applicable ' not_applicable' ,
109
100
_numa ' numa' ,
110
101
_L4_cache ' L4_cache' ,
@@ -113,8 +104,6 @@ cdef extern from "dpctl_sycl_enum_types.h":
113
104
_L1_cache ' L1_cache' ,
114
105
_next_partitionable ' next_partitionable' ,
115
106
116
- ctypedef _partition_affinity_domain_type DPCTLPartitionAffinityDomainType
117
-
118
107
119
108
cdef extern from " dpctl_sycl_types.h" :
120
109
cdef struct DPCTLOpaqueSyclContext
@@ -151,10 +140,8 @@ cdef extern from "dpctl_sycl_device_interface.h":
151
140
cdef DPCTLSyclDeviceRef DPCTLDevice_CreateFromSelector(
152
141
const DPCTLSyclDeviceSelectorRef DSRef)
153
142
cdef void DPCTLDevice_Delete(DPCTLSyclDeviceRef DRef)
154
- cdef DPCTLSyclBackendType DPCTLDevice_GetBackend(
155
- const DPCTLSyclDeviceRef DRef)
156
- cdef DPCTLSyclDeviceType DPCTLDevice_GetDeviceType(
157
- const DPCTLSyclDeviceRef DRef)
143
+ cdef _backend_type DPCTLDevice_GetBackend(const DPCTLSyclDeviceRef)
144
+ cdef _device_type DPCTLDevice_GetDeviceType(const DPCTLSyclDeviceRef)
158
145
cdef const char * DPCTLDevice_GetDriverVersion(const DPCTLSyclDeviceRef DRef)
159
146
cdef uint32_t DPCTLDevice_GetMaxComputeUnits(const DPCTLSyclDeviceRef DRef)
160
147
cdef uint32_t DPCTLDevice_GetMaxNumSubGroups(const DPCTLSyclDeviceRef DRef)
@@ -178,8 +165,7 @@ cdef extern from "dpctl_sycl_device_interface.h":
178
165
cdef uint32_t DPCTLDevice_GetPreferredVectorWidthFloat(const DPCTLSyclDeviceRef DRef)
179
166
cdef uint32_t DPCTLDevice_GetPreferredVectorWidthDouble(const DPCTLSyclDeviceRef DRef)
180
167
cdef uint32_t DPCTLDevice_GetPreferredVectorWidthHalf(const DPCTLSyclDeviceRef DRef)
181
- cpdef bool DPCTLDevice_HasAspect(
182
- const DPCTLSyclDeviceRef DRef, DPCTLSyclAspectType AT)
168
+ cpdef bool DPCTLDevice_HasAspect(const DPCTLSyclDeviceRef, _aspect_type)
183
169
cdef uint32_t DPCTLDevice_GetMaxReadImageArgs(const DPCTLSyclDeviceRef DRef)
184
170
cdef uint32_t DPCTLDevice_GetMaxWriteImageArgs(const DPCTLSyclDeviceRef DRef)
185
171
cdef size_t DPCTLDevice_GetImage2dMaxWidth(const DPCTLSyclDeviceRef DRef)
@@ -193,7 +179,7 @@ cdef extern from "dpctl_sycl_device_interface.h":
193
179
const DPCTLSyclDeviceRef DRef, size_t * counts, size_t ncounts)
194
180
cdef DPCTLDeviceVectorRef DPCTLDevice_CreateSubDevicesByAffinity(
195
181
const DPCTLSyclDeviceRef DRef,
196
- DPCTLPartitionAffinityDomainType PartitionAffinityDomainTy)
182
+ _partition_affinity_domain_type PartitionAffinityDomainTy)
197
183
cdef DPCTLSyclDeviceRef DPCTLDevice_GetParentDevice(const DPCTLSyclDeviceRef DRef)
198
184
199
185
@@ -259,8 +245,7 @@ cdef extern from "dpctl_sycl_platform_interface.h":
259
245
cdef DPCTLSyclPlatformRef DPCTLPlatform_CreateFromSelector(
260
246
const DPCTLSyclDeviceSelectorRef)
261
247
cdef void DPCTLPlatform_Delete(DPCTLSyclPlatformRef)
262
- cdef DPCTLSyclBackendType DPCTLPlatform_GetBackend(
263
- const DPCTLSyclPlatformRef)
248
+ cdef _backend_type DPCTLPlatform_GetBackend(const DPCTLSyclPlatformRef)
264
249
cdef const char * DPCTLPlatform_GetName(const DPCTLSyclPlatformRef)
265
250
cdef const char * DPCTLPlatform_GetVendor(const DPCTLSyclPlatformRef)
266
251
cdef const char * DPCTLPlatform_GetVersion(const DPCTLSyclPlatformRef)
@@ -283,8 +268,7 @@ cdef extern from "dpctl_sycl_context_interface.h":
283
268
cdef size_t DPCTLContext_DeviceCount(const DPCTLSyclContextRef CRef)
284
269
cdef bool DPCTLContext_AreEq(const DPCTLSyclContextRef CtxRef1,
285
270
const DPCTLSyclContextRef CtxRef2)
286
- cdef DPCTLSyclBackendType DPCTLContext_GetBackend(
287
- const DPCTLSyclContextRef CtxRef)
271
+ cdef _backend_type DPCTLContext_GetBackend(const DPCTLSyclContextRef)
288
272
cdef void DPCTLContext_Delete(DPCTLSyclContextRef CtxRef)
289
273
290
274
@@ -320,14 +304,14 @@ cdef extern from "dpctl_sycl_queue_interface.h":
320
304
int properties)
321
305
cdef void DPCTLQueue_Delete(DPCTLSyclQueueRef QRef)
322
306
cdef DPCTLSyclQueueRef DPCTLQueue_Copy(DPCTLSyclQueueRef QRef)
323
- cdef DPCTLSyclBackendType DPCTLQueue_GetBackend(const DPCTLSyclQueueRef Q)
307
+ cdef _backend_type DPCTLQueue_GetBackend(const DPCTLSyclQueueRef Q)
324
308
cdef DPCTLSyclContextRef DPCTLQueue_GetContext(const DPCTLSyclQueueRef Q)
325
309
cdef DPCTLSyclDeviceRef DPCTLQueue_GetDevice(const DPCTLSyclQueueRef Q)
326
310
cdef DPCTLSyclEventRef DPCTLQueue_SubmitRange(
327
311
const DPCTLSyclKernelRef Ref,
328
312
const DPCTLSyclQueueRef QRef,
329
313
void ** Args,
330
- const DPCTLKernelArgType * ArgTypes,
314
+ const _arg_data_type * ArgTypes,
331
315
size_t NArgs,
332
316
const size_t Range[3 ],
333
317
size_t NDims,
@@ -337,7 +321,7 @@ cdef extern from "dpctl_sycl_queue_interface.h":
337
321
const DPCTLSyclKernelRef Ref,
338
322
const DPCTLSyclQueueRef QRef,
339
323
void ** Args,
340
- const DPCTLKernelArgType * ArgTypes,
324
+ const _arg_data_type * ArgTypes,
341
325
size_t NArgs,
342
326
const size_t gRange[3 ],
343
327
const size_t lRange[3 ],
0 commit comments