pub struct DLManagedTensor { /* private fields */ }Expand description
\brief C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn’t need the tensor, it should call the deleter to notify the host that the resource is no longer needed.
\note This data structure is used as Legacy DLManagedTensor in DLPack exchange and is deprecated after DLPack v0.8 Use DLManagedTensorVersioned instead. This data structure may get renamed or deleted in future versions.
\sa DLManagedTensorVersioned
Trait Implementations§
Source§impl CopyNew for DLManagedTensor
impl CopyNew for DLManagedTensor
Source§unsafe fn copy_new(
other: &DLManagedTensor,
this: Pin<&mut MaybeUninit<DLManagedTensor>>,
)
unsafe fn copy_new( other: &DLManagedTensor, this: Pin<&mut MaybeUninit<DLManagedTensor>>, )
Synthesized copy constructor.
Source§impl Drop for DLManagedTensor
impl Drop for DLManagedTensor
Source§fn drop(self: &mut DLManagedTensor)
fn drop(self: &mut DLManagedTensor)
Synthesized destructor.
Source§impl ExternType for DLManagedTensor
impl ExternType for DLManagedTensor
Source§impl MakeCppStorage for DLManagedTensor
impl MakeCppStorage for DLManagedTensor
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut DLManagedTensor
unsafe fn allocate_uninitialized_cpp_storage() -> *mut DLManagedTensor
Allocates heap space for this type in C++ and return a pointer
to that space, but do not initialize that space (i.e. do not
yet call a constructor). Read more
Source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut DLManagedTensor)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut DLManagedTensor)
Frees a C++ allocation which has not yet
had a constructor called. Read more
Source§impl MoveNew for DLManagedTensor
impl MoveNew for DLManagedTensor
Source§unsafe fn move_new(
other: Pin<MoveRef<'_, DLManagedTensor>>,
this: Pin<&mut MaybeUninit<DLManagedTensor>>,
)
unsafe fn move_new( other: Pin<MoveRef<'_, DLManagedTensor>>, this: Pin<&mut MaybeUninit<DLManagedTensor>>, )
Synthesized move constructor.
impl UniquePtrTarget for DLManagedTensor
impl VectorElement for DLManagedTensor
impl WeakPtrTarget for DLManagedTensor
Auto Trait Implementations§
impl !Freeze for DLManagedTensor
impl !RefUnwindSafe for DLManagedTensor
impl !Send for DLManagedTensor
impl !Sync for DLManagedTensor
impl Unpin for DLManagedTensor
impl UnwindSafe for DLManagedTensor
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