pub struct DlpackExport { /* private fields */ }Expand description
Owner for a versioned DLPack managed tensor exported without copying CPU data.
Dropping this value calls the DLPack deleter. Self::into_raw transfers
that responsibility to a capsule or another consumer.
Implementations§
Source§impl DlpackExport
impl DlpackExport
Sourcepub fn from_tensor(tensor: &TensorBuffer) -> Result<Self, DlpackError>
pub fn from_tensor(tensor: &TensorBuffer) -> Result<Self, DlpackError>
Shares an owned CPU tensor allocation with a DLPack consumer without copying.
Trait Implementations§
Source§impl Drop for DlpackExport
impl Drop for DlpackExport
Auto Trait Implementations§
impl Freeze for DlpackExport
impl RefUnwindSafe for DlpackExport
impl !Send for DlpackExport
impl !Sync for DlpackExport
impl Unpin for DlpackExport
impl UnsafeUnpin for DlpackExport
impl UnwindSafe for DlpackExport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more