Skip to content

Change cast from long to size_t #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dpctl/sycl_core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cdef class SyclContext:
The address of the DPPLSyclContextRef object used to create this
SyclContext cast to a long.
"""
return int(<long>self._ctx_ref)
return int(<size_t>self._ctx_ref)

cdef class SyclDevice:
''' Wrapper class for a Sycl Device
Expand Down Expand Up @@ -180,7 +180,7 @@ cdef class SyclDevice:
The address of the DPPLSyclDeviceRef object used to create this
SyclDevice cast to a long.
"""
return int(<long>self._device_ref)
return int(<size_t>self._device_ref)

cdef class SyclEvent:
''' Wrapper class for a Sycl Event
Expand Down Expand Up @@ -213,7 +213,7 @@ cdef class SyclEvent:
The address of the DPPLSyclEventRef object used to create this
SyclEvent cast to a long.
"""
return int(<long>self._event_ref)
return int(<size_t>self._event_ref)


cdef class SyclKernel:
Expand Down Expand Up @@ -255,7 +255,7 @@ cdef class SyclKernel:
The address of the DPPLSyclKernelRef object used to create this
SyclKernel cast to a long.
"""
return int(<long>self._kernel_ref)
return int(<size_t>self._kernel_ref)

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

import ctypes

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

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