Skip to content

Commit 49293af

Browse files
Applied consistent style for references
1 parent 96636b2 commit 49293af

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

dpctl/tensor/_dlpack.pyx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ cdef extern from './include/dlpack/dlpack.h' nogil:
7272
uint16_t lanes
7373

7474
ctypedef struct DLTensor:
75-
void* data
75+
void *data
7676
DLDevice device
7777
int ndim
7878
DLDataType dtype
79-
int64_t* shape
80-
int64_t* strides
79+
int64_t *shape
80+
int64_t *strides
8181
uint64_t byte_offset
8282

8383
ctypedef struct DLManagedTensor:
8484
DLTensor dl_tensor
85-
void* manager_ctx
86-
void (*deleter)(DLManagedTensor*) # noqa: E211
85+
void *manager_ctx
86+
void (*deleter)(DLManagedTensor *) # noqa: E211
8787

8888

8989
def get_build_dlpack_version():
@@ -141,15 +141,15 @@ cpdef to_dlpack_capsule(usm_ndarray usm_ary) except+:
141141
cdef c_dpctl.SyclDevice ary_sycl_device
142142
cdef DPCTLSyclDeviceRef pDRef = NULL
143143
cdef DLManagedTensor *dlm_tensor = NULL
144-
cdef DLTensor* dl_tensor = NULL
144+
cdef DLTensor *dl_tensor = NULL
145145
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()
147147
cdef Py_ssize_t *shape_ptr = NULL
148148
cdef Py_ssize_t *strides_ptr = NULL
149149
cdef int64_t *shape_strides_ptr = NULL
150150
cdef int i = 0
151151
cdef int device_id = -1
152-
cdef char* base_ptr = NULL
152+
cdef char *base_ptr = NULL
153153
cdef Py_ssize_t element_offset = 0
154154
cdef Py_ssize_t byte_offset = 0
155155

@@ -291,7 +291,7 @@ cpdef usm_ndarray from_dlpack_capsule(object py_caps) except +:
291291
cdef Py_ssize_t offset_min = 0
292292
cdef Py_ssize_t offset_max = 0
293293
cdef int64_t stride_i
294-
cdef char* mem_ptr = NULL
294+
cdef char *mem_ptr = NULL
295295
cdef Py_ssize_t element_offset = 0
296296

297297
if not cpython.PyCapsule_IsValid(py_caps, 'dltensor'):

0 commit comments

Comments
 (0)