pub type DLPackManagedTensorFromPyObjectNoSync = Option<unsafe extern "C" fn(py_object: *mut c_void, out: *mut *mut DLManagedTensorVersioned) -> c_int>;Expand description
\brief Exports a PyObject* Tensor/NDArray to a DLManagedTensorVersioned.
This function does not perform any stream synchronization. The consumer should query DLPackCurrentWorkStream to get the current work stream and launch kernels on it.
This function is exposed by the framework through the DLPackExchangeAPI.
\param py_object The Python object to convert. Must have the same type
as the one the DLPackExchangeAPI was discovered from.
\return The owning DLManagedTensorVersioned* or NULL on failure with a
Python exception set. If the data cannot be described using DLPack
this should be a BufferError if possible.
\note - As a C function, must not thrown C++ exceptions.
\sa DLPackExchangeAPI, DLPackCurrentWorkStream
Aliased Type§
pub enum DLPackManagedTensorFromPyObjectNoSync {
None,
Some(unsafe extern "C" fn(*mut c_void, *mut *mut DLManagedTensorVersioned) -> i32),
}