Skip to content

Commit ca6dcfb

Browse files
formating: func (args) -> func(args)
1 parent 8f634ec commit ca6dcfb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dpctl/memory/_memory.pyx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ cdef class _Memory:
302302
return _to_memory, (self.copy_to_host(), self.get_usm_type())
303303

304304
property __sycl_usm_array_interface__:
305-
def __get__ (self):
305+
def __get__(self):
306306
cdef dict iface = {
307307
"data": (<Py_ssize_t>(<void *>self.memory_ptr),
308308
True), # bool(self.writeable)),
@@ -336,7 +336,7 @@ cdef class _Memory:
336336
"or an instance of SyclContext or SyclQueue")
337337
return kind.decode('UTF-8')
338338

339-
cpdef copy_to_host (self, obj=None):
339+
cpdef copy_to_host(self, obj=None):
340340
"""Copy content of instance's memory into memory of
341341
`obj`, or allocate NumPy array of obj is None"""
342342
# Cython does the right thing here
@@ -360,8 +360,8 @@ cdef class _Memory:
360360

361361
return obj
362362

363-
cpdef copy_from_host (self, object obj):
364-
"""Copy contant of Python buffer provided by `obj` to instance memory."""
363+
cpdef copy_from_host(self, object obj):
364+
"""Copy content of Python buffer provided by `obj` to instance memory."""
365365
cdef const unsigned char[::1] host_buf = obj
366366
cdef Py_ssize_t buf_len = len(host_buf)
367367

@@ -376,7 +376,7 @@ cdef class _Memory:
376376
<size_t>buf_len
377377
)
378378

379-
cpdef copy_from_device (self, object sycl_usm_ary):
379+
cpdef copy_from_device(self, object sycl_usm_ary):
380380
"""Copy SYCL memory underlying the argument object into
381381
the memory of the instance"""
382382
cdef _BufferData src_buf
@@ -410,8 +410,8 @@ cdef class _Memory:
410410
else:
411411
raise TypeError
412412

413-
cpdef bytes tobytes (self):
414-
""""""
413+
cpdef bytes tobytes(self):
414+
"""Constructs bytes object populated with copy of USM memory"""
415415
cdef Py_ssize_t nb = self.nbytes
416416
cdef bytes b = PyBytes_FromStringAndSize(NULL, nb)
417417
# convert bytes to memory view

0 commit comments

Comments
 (0)