File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -752,10 +752,28 @@ def as_usm_memory(obj):
752
752
753
753
754
754
cdef api DPCTLSyclUSMRef get_usm_pointer(_Memory obj):
755
+ " Pointer of USM allocation"
755
756
return obj.memory_ptr
756
757
757
- cdef api DPCTLSyclContextRef get_context(_Memory obj):
758
+ cdef api DPCTLSyclContextRef get_context_ref(_Memory obj):
759
+ " Context reference to which USM allocation is bound"
758
760
return obj.queue._context.get_context_ref()
759
761
762
+ cdef api DPCTLSyclQueueRef get_queue_ref(_Memory obj):
763
+ """ Queue associated with this allocation, used
764
+ for copying, population, etc."""
765
+ return obj.queue.get_queue_ref()
766
+
760
767
cdef api size_t get_nbytes(_Memory obj):
768
+ " Size of the allocation in bytes."
761
769
return < size_t> obj.nbytes
770
+
771
+ cdef api object make_Memory(
772
+ DPCTLSyclUSMRef ptr,
773
+ size_t nbytes,
774
+ DPCTLSyclQueueRef QRef,
775
+ object owner
776
+ ):
777
+ return _Memory.create_from_usm_pointer_size_qref(
778
+ ptr, nbytes, QRef, memory_owner = owner
779
+ )
You can’t perform that action at this time.
0 commit comments