File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ cdef class _Memory:
228
228
229
229
def __repr__ (self ):
230
230
return " <Intel(R) USM allocated memory block of {} bytes at {}>" \
231
- .format(self .nbytes, hex (< object > (< Py_ssize_t > self .memory_ptr)))
231
+ .format(self .nbytes, hex (< object > (< size_t > self .memory_ptr)))
232
232
233
233
def __len__ (self ):
234
234
return self .nbytes
@@ -245,7 +245,7 @@ cdef class _Memory:
245
245
property __sycl_usm_array_interface__ :
246
246
def __get__ (self ):
247
247
cdef dict iface = {
248
- " data" : (< Py_ssize_t > (< void * > self .memory_ptr),
248
+ " data" : (< size_t > (< void * > self .memory_ptr),
249
249
True ), # bool(self.writeable)),
250
250
" shape" : (self .nbytes,),
251
251
" strides" : None ,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ cdef class _USMBufferData:
121
121
cdef object ary_syclobj = ary_iface.get(' syclobj' , None )
122
122
cdef Py_ssize_t ary_offset = ary_iface.get(' offset' , 0 )
123
123
cdef int ary_version = ary_iface.get(' version' , 0 )
124
- cdef Py_ssize_t arr_data_ptr = 0
124
+ cdef size_t arr_data_ptr = 0
125
125
cdef DPCTLSyclUSMRef memRef = NULL
126
126
cdef Py_ssize_t itemsize = - 1
127
127
cdef int writeable = - 1
@@ -141,7 +141,7 @@ cdef class _USMBufferData:
141
141
raise ValueError (" __sycl_usm_array_interface__ is malformed:"
142
142
" 'data' field is required, and must be a tuple"
143
143
" (usm_pointer, is_writeable_boolean)." )
144
- arr_data_ptr = < Py_ssize_t > ary_data_tuple[0 ]
144
+ arr_data_ptr = < size_t > ary_data_tuple[0 ]
145
145
writeable = 1 if ary_data_tuple[1 ] else 0
146
146
# Check that memory and syclobj are consistent:
147
147
# (USM pointer is bound to this sycl context)
You can’t perform that action at this time.
0 commit comments