Skip to content

Commit 9449986

Browse files
authored
Change cast from long to size_t (#111)
1 parent e351cb2 commit 9449986

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpctl/sycl_core.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ cdef class SyclContext:
113113
The address of the DPPLSyclContextRef object used to create this
114114
SyclContext cast to a long.
115115
"""
116-
return int(<long>self._ctx_ref)
116+
return int(<size_t>self._ctx_ref)
117117

118118
cdef class SyclDevice:
119119
''' Wrapper class for a Sycl Device
@@ -180,7 +180,7 @@ cdef class SyclDevice:
180180
The address of the DPPLSyclDeviceRef object used to create this
181181
SyclDevice cast to a long.
182182
"""
183-
return int(<long>self._device_ref)
183+
return int(<size_t>self._device_ref)
184184

185185
cdef class SyclEvent:
186186
''' Wrapper class for a Sycl Event
@@ -213,7 +213,7 @@ cdef class SyclEvent:
213213
The address of the DPPLSyclEventRef object used to create this
214214
SyclEvent cast to a long.
215215
"""
216-
return int(<long>self._event_ref)
216+
return int(<size_t>self._event_ref)
217217

218218

219219
cdef class SyclKernel:
@@ -255,7 +255,7 @@ cdef class SyclKernel:
255255
The address of the DPPLSyclKernelRef object used to create this
256256
SyclKernel cast to a long.
257257
"""
258-
return int(<long>self._kernel_ref)
258+
return int(<size_t>self._kernel_ref)
259259

260260
cdef class SyclProgram:
261261
''' Wraps a sycl::program object created from an OpenCL interoperability
@@ -295,7 +295,7 @@ cdef class SyclProgram:
295295
The address of the DPPLSyclProgramRef object used to create this
296296
SyclProgram cast to a long.
297297
"""
298-
return int(<long>self._program_ref)
298+
return int(<size_t>self._program_ref)
299299

300300
import ctypes
301301

@@ -435,7 +435,7 @@ cdef class SyclQueue:
435435
The address of the DPPLSyclQueueRef object used to create this
436436
SyclQueue cast to a long.
437437
"""
438-
return int(<long>self._queue_ref)
438+
return int(<size_t>self._queue_ref)
439439

440440
cpdef SyclEvent submit (self, SyclKernel kernel, list args, list gS, \
441441
list lS = None, list dEvents = None):

0 commit comments

Comments
 (0)