@@ -72,18 +72,18 @@ cdef extern from './include/dlpack/dlpack.h' nogil:
72
72
uint16_t lanes
73
73
74
74
ctypedef struct DLTensor:
75
- void * data
75
+ void * data
76
76
DLDevice device
77
77
int ndim
78
78
DLDataType dtype
79
- int64_t* shape
80
- int64_t* strides
79
+ int64_t * shape
80
+ int64_t * strides
81
81
uint64_t byte_offset
82
82
83
83
ctypedef struct DLManagedTensor:
84
84
DLTensor dl_tensor
85
- void * manager_ctx
86
- void (* deleter)(DLManagedTensor* ) # noqa: E211
85
+ void * manager_ctx
86
+ void (* deleter)(DLManagedTensor * ) # noqa: E211
87
87
88
88
89
89
def get_build_dlpack_version ():
@@ -141,15 +141,15 @@ cpdef to_dlpack_capsule(usm_ndarray usm_ary) except+:
141
141
cdef c_dpctl.SyclDevice ary_sycl_device
142
142
cdef DPCTLSyclDeviceRef pDRef = NULL
143
143
cdef DLManagedTensor * dlm_tensor = NULL
144
- cdef DLTensor* dl_tensor = NULL
144
+ cdef DLTensor * dl_tensor = NULL
145
145
cdef int nd = usm_ary.get_ndim()
146
- cdef char * data_ptr = usm_ary.get_data()
146
+ cdef char * data_ptr = usm_ary.get_data()
147
147
cdef Py_ssize_t * shape_ptr = NULL
148
148
cdef Py_ssize_t * strides_ptr = NULL
149
149
cdef int64_t * shape_strides_ptr = NULL
150
150
cdef int i = 0
151
151
cdef int device_id = - 1
152
- cdef char * base_ptr = NULL
152
+ cdef char * base_ptr = NULL
153
153
cdef Py_ssize_t element_offset = 0
154
154
cdef Py_ssize_t byte_offset = 0
155
155
@@ -291,7 +291,7 @@ cpdef usm_ndarray from_dlpack_capsule(object py_caps) except +:
291
291
cdef Py_ssize_t offset_min = 0
292
292
cdef Py_ssize_t offset_max = 0
293
293
cdef int64_t stride_i
294
- cdef char * mem_ptr = NULL
294
+ cdef char * mem_ptr = NULL
295
295
cdef Py_ssize_t element_offset = 0
296
296
297
297
if not cpython.PyCapsule_IsValid(py_caps, ' dltensor' ):
0 commit comments