@@ -290,63 +290,63 @@ cdef class _Memory:
290290 buffer .strides = & buffer .itemsize
291291 buffer .suboffsets = NULL # for pointer arrays only
292292
293- property nbytes :
293+ @property
294+ def nbytes (self ):
294295 """ Extent of this USM buffer in bytes."""
295- def __get__ (self ):
296- return self .nbytes
296+ return self .nbytes
297297
298- property size :
298+ @property
299+ def size (self ):
299300 """ Extent of this USM buffer in bytes."""
300- def __get__ (self ):
301- return self .nbytes
301+ return self .nbytes
302302
303- property _pointer :
303+ @property
304+ def _pointer (self ):
304305 """
305306 USM pointer at the start of this buffer
306307 represented as Python integer.
307308 """
308- def __get__ (self ):
309- return < size_t> (self ._memory_ptr)
309+ return < size_t> (self ._memory_ptr)
310310
311- property _context :
311+ @property
312+ def _context (self ):
312313 """ :class:`dpctl.SyclContext` the USM pointer is bound to. """
313- def __get__ (self ):
314- return self .queue.get_sycl_context()
314+ return self .queue.get_sycl_context()
315315
316- property _queue :
316+ @property
317+ def _queue (self ):
317318 """
318319 :class:`dpctl.SyclQueue` with :class:`dpctl.SyclContext` the
319320 USM allocation is bound to and :class:`dpctl.SyclDevice` it was
320321 allocated on.
321322 """
322- def __get__ (self ):
323- return self .queue
323+ return self .queue
324324
325- property reference_obj :
325+ @property
326+ def reference_obj (self ):
326327 """
327328 Reference to the Python object owning this USM buffer.
328329 """
329- def __get__ (self ):
330- return self .refobj
330+ return self .refobj
331331
332- property sycl_context :
332+ @property
333+ def sycl_context (self ):
333334 """ :class:`dpctl.SyclContext` the USM pointer is bound to."""
334- def __get__ (self ):
335- return self .queue.get_sycl_context()
335+ return self .queue.get_sycl_context()
336336
337- property sycl_device :
337+ @property
338+ def sycl_device (self ):
338339 """ :class:`dpctl.SyclDevice` the USM pointer is bound to."""
339- def __get__ (self ):
340- return self .queue.get_sycl_device()
340+ return self .queue.get_sycl_device()
341341
342- property sycl_queue :
342+ @property
343+ def sycl_queue (self ):
343344 """
344345 :class:`dpctl.SyclQueue` with :class:`dpctl.SyclContext` the
345346 USM allocation is bound to and :class:`dpctl.SyclDevice` it was
346347 allocated on.
347348 """
348- def __get__ (self ):
349- return self .queue
349+ return self .queue
350350
351351 def __repr__ (self ):
352352 return (
@@ -370,7 +370,8 @@ cdef class _Memory:
370370 def __reduce__ (self ):
371371 return _to_memory, (self .copy_to_host(), self .get_usm_type())
372372
373- property __sycl_usm_array_interface__ :
373+ @property
374+ def __sycl_usm_array_interface__ (self ):
374375 """
375376 Dictionary encoding information about USM allocation.
376377
@@ -396,17 +397,16 @@ cdef class _Memory:
396397 Queue associated with this class instance.
397398
398399 """
399- def __get__ (self ):
400- cdef dict iface = {
401- " data" : (< size_t> (< void * > self ._memory_ptr),
402- True ), # bool(self.writable)),
403- " shape" : (self .nbytes,),
404- " strides" : None ,
405- " typestr" : " |u1" ,
406- " version" : 1 ,
407- " syclobj" : self .queue
408- }
409- return iface
400+ cdef dict iface = {
401+ " data" : (< size_t> (< void * > self ._memory_ptr),
402+ True ), # bool(self.writable)),
403+ " shape" : (self .nbytes,),
404+ " strides" : None ,
405+ " typestr" : " |u1" ,
406+ " version" : 1 ,
407+ " syclobj" : self .queue,
408+ }
409+ return iface
410410
411411 def get_usm_type (self , syclobj = None ):
412412 """
0 commit comments