Skip to content

Commit e73c817

Browse files
deleted obsolete FIXME comment, added explanation for what the code does
1 parent 3951ee6 commit e73c817

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

dpctl/_memory.pyx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,11 @@ cdef class _BufferData:
123123
if isinstance(ary_syclobj, dpctl.SyclQueue):
124124
buf.queue = <SyclQueue>ary_syclobj
125125
else:
126-
# FIXME: need a way to construct a queue from
127-
# context and device, which can be obtaine from the
128-
# pointer and the context.
129-
#
130-
# cdef SyclQueue new_queue = SyclQueue._create_from_dev_context(dev, <SyclContext> ary_syclobj)
131-
# buf.queue = new_queue
126+
# Obtain device from pointer and context
132127
ctx = <SyclContext> ary_syclobj
133128
dev = Memory.get_pointer_device(buf.p, ctx)
129+
# Use context and device to create a queue to
130+
# be able to copy memory
134131
buf.queue = SyclQueue._create_from_context_and_device(ctx, dev)
135132

136133
return buf

0 commit comments

Comments
 (0)