#[repr(C)]pub struct DLPackVersion {
pub major: u32,
pub minor: u32,
}Expand description
\brief The DLPack version.
A change in major version indicates that we have changed the data layout of the ABI - DLManagedTensorVersioned.
A change in minor version indicates that we have added new code, such as a new device type, but the ABI is kept the same.
If an obtained DLPack tensor has a major version that disagrees with the version number specified in this header file (i.e. major != DLPACK_MAJOR_VERSION), the consumer must call the deleter (and it is safe to do so). It is not safe to access any other fields as the memory layout will have changed.
In the case of a minor version mismatch, the tensor can be safely used as long as the consumer knows how to interpret all fields. Minor version updates indicate the addition of enumeration values.
Fields§
§major: u32\brief DLPack major version.
minor: u32\brief DLPack minor version.
Trait Implementations§
Source§impl Clone for DLPackVersion
impl Clone for DLPackVersion
Source§fn clone(&self) -> DLPackVersion
fn clone(&self) -> DLPackVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more