File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
docs/doc_sources/api_reference Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,16 @@ API for :c:struct:`Py_MemoryObject`
152
152
:param nbytes: The size of allocation in bytes
153
153
:param QRef: instance of :c:struct: `PySyclQueueRef ` corresponding
154
154
to ``sycl::queue `` to be associated with this allocation
155
- :param owner: Python object instance whose deleter triggers freeing of this USM allocation
155
+ :param owner: Python object instance whose deleter triggers freeing of this USM allocation. Specify `owner=None `
156
+ to pass ownership to created Python memory object, which will use ``sycl::free(ptr, sycl_queue) `` for
157
+ deallocation.
158
+
159
+ .. c :function :: void * Memory_GetOpaquePointer (struct Py_MemoryObject *o)
160
+
161
+ :param o: Input ojbect
162
+ :returns: Returns opaque pointer to `std::shared_ptr<void> ` which manages the USM allocation,
163
+ or a `nullptr ` if this USM allocation represented by `o ` is not managed by the smart
164
+ pointer.
156
165
157
166
API for :c:struct: `PyUSMArrayObject `
158
167
------------------------------------
@@ -221,6 +230,11 @@ API for :c:struct:`PyUSMArrayObject`
221
230
:returns: Offset of zero multi-index array element from the beginning of
222
231
the USM allocation.
223
232
233
+ .. c :function :: PyObject * UsmNDArray_GetUSMData (struct PyUSMArrayObject *arr)
234
+
235
+ :param arr: Input object
236
+ :returns: Python memory object underlying input array `arr `.
237
+
224
238
.. c :function :: void UsmNDArray_SetWritableFlag (struct PyUSMArrayObject *arr, int flag)
225
239
226
240
:param arr: Input object
You can’t perform that action at this time.
0 commit comments