#[repr(C)]pub struct DLManagedTensorVersioned {
pub version: DLPackVersion,
pub manager_ctx: *mut c_void,
pub deleter: Option<unsafe extern "C" fn(*mut DLManagedTensorVersioned)>,
pub flags: u64,
pub dl_tensor: DLTensor,
}Expand description
A versioned managed tensor (DLPack 1.0).
Corresponds to DLManagedTensorVersioned in the DLPack specification.
The field order differs from DLManagedTensor: version is first and
dl_tensor is last. This is an ABI contract — do not reorder.
Fields§
§version: DLPackVersionProtocol version of this struct.
manager_ctx: *mut c_voidOpaque manager context for the producer’s use.
deleter: Option<unsafe extern "C" fn(*mut DLManagedTensorVersioned)>Deleter function called when the consumer is done. Can be null if no cleanup is needed.
flags: u64Bitmask of DLPACK_FLAG_BITMASK_* flags.
dl_tensor: DLTensorThe underlying tensor descriptor.
Auto Trait Implementations§
impl Freeze for DLManagedTensorVersioned
impl RefUnwindSafe for DLManagedTensorVersioned
impl !Send for DLManagedTensorVersioned
impl !Sync for DLManagedTensorVersioned
impl Unpin for DLManagedTensorVersioned
impl UnsafeUnpin for DLManagedTensorVersioned
impl UnwindSafe for DLManagedTensorVersioned
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