@@ -289,18 +289,13 @@ cdef class SyclQueue(_SyclQueue):
289
289
status = self ._init_queue_default(props)
290
290
elif len_args == 1 :
291
291
arg = args[0 ]
292
- if type (arg) is unicode :
293
- string = bytes(< unicode > arg, " utf-8" )
292
+ if type (arg) is str :
293
+ string = bytes(< str > arg, " utf-8" )
294
294
filter_c_str = string
295
295
status = self ._init_queue_from_filter_string(
296
296
filter_c_str, props)
297
297
elif type (arg) is _SyclQueue:
298
298
status = self ._init_queue_from__SyclQueue(< _SyclQueue> arg)
299
- elif isinstance (arg, unicode ):
300
- string = bytes(< unicode > unicode (arg), " utf-8" )
301
- filter_c_str = string
302
- status = self ._init_queue_from_filter_string(
303
- filter_c_str, props)
304
299
elif isinstance (arg, SyclDevice):
305
300
status = self ._init_queue_from_device(< SyclDevice> arg, props)
306
301
elif pycapsule.PyCapsule_IsValid(arg, " SyclQueueRef" ):
@@ -690,7 +685,7 @@ cdef class SyclQueue(_SyclQueue):
690
685
The address of the ``DPCTLSyclQueueRef`` object used to create this
691
686
:class:`dpctl.SyclQueue` cast to a ``size_t``.
692
687
"""
693
- return int ( < size_t> self ._queue_ref)
688
+ return < size_t> self ._queue_ref
694
689
695
690
cpdef SyclEvent submit(
696
691
self ,
@@ -848,8 +843,8 @@ cdef class SyclQueue(_SyclQueue):
848
843
else :
849
844
raise TypeError (" Parameter `mem` should have type _Memory" )
850
845
851
- if (count <= 0 or count > self .nbytes):
852
- count = self .nbytes
846
+ if (count <= 0 or count > mem .nbytes):
847
+ count = mem .nbytes
853
848
854
849
ERef = DPCTLQueue_Prefetch(self ._queue_ref, ptr, count)
855
850
if (ERef is NULL ):
@@ -868,8 +863,8 @@ cdef class SyclQueue(_SyclQueue):
868
863
else :
869
864
raise TypeError (" Parameter `mem` should have type _Memory" )
870
865
871
- if (count <= 0 or count > self .nbytes):
872
- count = self .nbytes
866
+ if (count <= 0 or count > mem .nbytes):
867
+ count = mem .nbytes
873
868
874
869
ERef = DPCTLQueue_MemAdvise(self ._queue_ref, ptr, count, advice)
875
870
if (ERef is NULL ):
0 commit comments