@@ -34,17 +34,15 @@ cdef extern from "dpctl_utils.h":
3434
3535
3636cdef extern from " dpctl_sycl_enum_types.h" :
37- cdef enum _backend_type ' DPCTLSyclBackendType' :
37+ ctypedef enum _backend_type ' DPCTLSyclBackendType' :
3838 _ALL_BACKENDS ' DPCTL_ALL_BACKENDS'
3939 _CUDA ' DPCTL_CUDA'
4040 _HOST ' DPCTL_HOST'
4141 _LEVEL_ZERO ' DPCTL_LEVEL_ZERO'
4242 _OPENCL ' DPCTL_OPENCL'
4343 _UNKNOWN_BACKEND ' DPCTL_UNKNOWN_BACKEND'
4444
45- ctypedef _backend_type DPCTLSyclBackendType
46-
47- cdef enum _device_type ' DPCTLSyclDeviceType' :
45+ ctypedef enum _device_type ' DPCTLSyclDeviceType' :
4846 _ACCELERATOR ' DPCTL_ACCELERATOR'
4947 _ALL_DEVICES ' DPCTL_ALL'
5048 _AUTOMATIC ' DPCTL_AUTOMATIC'
@@ -54,9 +52,7 @@ cdef extern from "dpctl_sycl_enum_types.h":
5452 _HOST_DEVICE ' DPCTL_HOST_DEVICE'
5553 _UNKNOWN_DEVICE ' DPCTL_UNKNOWN_DEVICE'
5654
57- ctypedef _device_type DPCTLSyclDeviceType
58-
59- cdef enum _arg_data_type ' DPCTLKernelArgType' :
55+ ctypedef enum _arg_data_type ' DPCTLKernelArgType' :
6056 _CHAR ' DPCTL_CHAR' ,
6157 _SIGNED_CHAR ' DPCTL_SIGNED_CHAR' ,
6258 _UNSIGNED_CHAR ' DPCTL_UNSIGNED_CHAR' ,
@@ -74,14 +70,12 @@ cdef extern from "dpctl_sycl_enum_types.h":
7470 _LONG_DOUBLE ' DPCTL_DOUBLE' ,
7571 _VOID_PTR ' DPCTL_VOID_PTR'
7672
77- ctypedef _arg_data_type DPCTLKernelArgType
78-
7973 ctypedef enum _queue_property_type ' DPCTLQueuePropertyType' :
8074 _DEFAULT_PROPERTY ' DPCTL_DEFAULT_PROPERTY'
8175 _ENABLE_PROFILING ' DPCTL_ENABLE_PROFILING'
8276 _IN_ORDER ' DPCTL_IN_ORDER'
8377
84- cdef enum _aspect_type ' DPCTLSyclAspectType' :
78+ ctypedef enum _aspect_type ' DPCTLSyclAspectType' :
8579 _host ' host' ,
8680 _cpu ' cpu' ,
8781 _gpu ' gpu' ,
@@ -101,10 +95,7 @@ cdef extern from "dpctl_sycl_enum_types.h":
10195 _usm_restricted_shared_allocations ' usm_restricted_shared_allocations' ,
10296 _usm_system_allocator ' usm_system_allocator'
10397
104- ctypedef _aspect_type DPCTLSyclAspectType
105-
106-
107- cdef enum _partition_affinity_domain_type ' DPCTLPartitionAffinityDomainType' :
98+ ctypedef enum _partition_affinity_domain_type ' DPCTLPartitionAffinityDomainType' :
10899 _not_applicable ' not_applicable' ,
109100 _numa ' numa' ,
110101 _L4_cache ' L4_cache' ,
@@ -113,8 +104,6 @@ cdef extern from "dpctl_sycl_enum_types.h":
113104 _L1_cache ' L1_cache' ,
114105 _next_partitionable ' next_partitionable' ,
115106
116- ctypedef _partition_affinity_domain_type DPCTLPartitionAffinityDomainType
117-
118107
119108cdef extern from " dpctl_sycl_types.h" :
120109 cdef struct DPCTLOpaqueSyclContext
@@ -151,10 +140,8 @@ cdef extern from "dpctl_sycl_device_interface.h":
151140 cdef DPCTLSyclDeviceRef DPCTLDevice_CreateFromSelector(
152141 const DPCTLSyclDeviceSelectorRef DSRef)
153142 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)
158145 cdef const char * DPCTLDevice_GetDriverVersion(const DPCTLSyclDeviceRef DRef)
159146 cdef uint32_t DPCTLDevice_GetMaxComputeUnits(const DPCTLSyclDeviceRef DRef)
160147 cdef uint32_t DPCTLDevice_GetMaxNumSubGroups(const DPCTLSyclDeviceRef DRef)
@@ -178,8 +165,7 @@ cdef extern from "dpctl_sycl_device_interface.h":
178165 cdef uint32_t DPCTLDevice_GetPreferredVectorWidthFloat(const DPCTLSyclDeviceRef DRef)
179166 cdef uint32_t DPCTLDevice_GetPreferredVectorWidthDouble(const DPCTLSyclDeviceRef DRef)
180167 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)
183169 cdef uint32_t DPCTLDevice_GetMaxReadImageArgs(const DPCTLSyclDeviceRef DRef)
184170 cdef uint32_t DPCTLDevice_GetMaxWriteImageArgs(const DPCTLSyclDeviceRef DRef)
185171 cdef size_t DPCTLDevice_GetImage2dMaxWidth(const DPCTLSyclDeviceRef DRef)
@@ -193,7 +179,7 @@ cdef extern from "dpctl_sycl_device_interface.h":
193179 const DPCTLSyclDeviceRef DRef, size_t * counts, size_t ncounts)
194180 cdef DPCTLDeviceVectorRef DPCTLDevice_CreateSubDevicesByAffinity(
195181 const DPCTLSyclDeviceRef DRef,
196- DPCTLPartitionAffinityDomainType PartitionAffinityDomainTy)
182+ _partition_affinity_domain_type PartitionAffinityDomainTy)
197183 cdef DPCTLSyclDeviceRef DPCTLDevice_GetParentDevice(const DPCTLSyclDeviceRef DRef)
198184
199185
@@ -259,8 +245,7 @@ cdef extern from "dpctl_sycl_platform_interface.h":
259245 cdef DPCTLSyclPlatformRef DPCTLPlatform_CreateFromSelector(
260246 const DPCTLSyclDeviceSelectorRef)
261247 cdef void DPCTLPlatform_Delete(DPCTLSyclPlatformRef)
262- cdef DPCTLSyclBackendType DPCTLPlatform_GetBackend(
263- const DPCTLSyclPlatformRef)
248+ cdef _backend_type DPCTLPlatform_GetBackend(const DPCTLSyclPlatformRef)
264249 cdef const char * DPCTLPlatform_GetName(const DPCTLSyclPlatformRef)
265250 cdef const char * DPCTLPlatform_GetVendor(const DPCTLSyclPlatformRef)
266251 cdef const char * DPCTLPlatform_GetVersion(const DPCTLSyclPlatformRef)
@@ -283,8 +268,7 @@ cdef extern from "dpctl_sycl_context_interface.h":
283268 cdef size_t DPCTLContext_DeviceCount(const DPCTLSyclContextRef CRef)
284269 cdef bool DPCTLContext_AreEq(const DPCTLSyclContextRef CtxRef1,
285270 const DPCTLSyclContextRef CtxRef2)
286- cdef DPCTLSyclBackendType DPCTLContext_GetBackend(
287- const DPCTLSyclContextRef CtxRef)
271+ cdef _backend_type DPCTLContext_GetBackend(const DPCTLSyclContextRef)
288272 cdef void DPCTLContext_Delete(DPCTLSyclContextRef CtxRef)
289273
290274
@@ -320,14 +304,14 @@ cdef extern from "dpctl_sycl_queue_interface.h":
320304 int properties)
321305 cdef void DPCTLQueue_Delete(DPCTLSyclQueueRef QRef)
322306 cdef DPCTLSyclQueueRef DPCTLQueue_Copy(DPCTLSyclQueueRef QRef)
323- cdef DPCTLSyclBackendType DPCTLQueue_GetBackend(const DPCTLSyclQueueRef Q)
307+ cdef _backend_type DPCTLQueue_GetBackend(const DPCTLSyclQueueRef Q)
324308 cdef DPCTLSyclContextRef DPCTLQueue_GetContext(const DPCTLSyclQueueRef Q)
325309 cdef DPCTLSyclDeviceRef DPCTLQueue_GetDevice(const DPCTLSyclQueueRef Q)
326310 cdef DPCTLSyclEventRef DPCTLQueue_SubmitRange(
327311 const DPCTLSyclKernelRef Ref,
328312 const DPCTLSyclQueueRef QRef,
329313 void ** Args,
330- const DPCTLKernelArgType * ArgTypes,
314+ const _arg_data_type * ArgTypes,
331315 size_t NArgs,
332316 const size_t Range[3 ],
333317 size_t NDims,
@@ -337,7 +321,7 @@ cdef extern from "dpctl_sycl_queue_interface.h":
337321 const DPCTLSyclKernelRef Ref,
338322 const DPCTLSyclQueueRef QRef,
339323 void ** Args,
340- const DPCTLKernelArgType * ArgTypes,
324+ const _arg_data_type * ArgTypes,
341325 size_t NArgs,
342326 const size_t gRange[3 ],
343327 const size_t lRange[3 ],
0 commit comments