#[repr(i32)]pub enum DimLevelType {
DimDense = 0,
DimCompressed = 1,
DimSingleton = 2,
DimLooseCompressed = 3,
}Expand description
A DimLevelType indicates the encoding method for a dimension in an array. The semantics of this field are identical to those of the MLIR SparseTensor dialect. This should be kept in sync with the SparseTensor DimLevelType enum: https://github.com/llvm/llvm-project/blob/5674a3c88088e668b684326c2194a6282e8270ff/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td#L86
Variants§
DimDense = 0
The corresponding dimension is Dense, every entry is stored.
DimCompressed = 1
The corresponding dimension is Compressed, only nonzeros are stored.
DimSingleton = 2
The corresponding dimension contains a single coordinate, no sibling elements for each parent.
DimLooseCompressed = 3
The corresponding dimension is Compressed, but with potential trailing zeros, thus an extra upper bound (high) is used to exclude those zeros. E.g., indices = [1, 2, 0, 0, 3, 4, 0, 0], position = [(0, 2), (4, 6)].
Implementations§
Source§impl DimLevelType
impl DimLevelType
Source§impl DimLevelType
impl DimLevelType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for DimLevelType
impl Clone for DimLevelType
Source§fn clone(&self) -> DimLevelType
fn clone(&self) -> DimLevelType
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DimLevelType
impl Debug for DimLevelType
Source§impl Default for DimLevelType
impl Default for DimLevelType
Source§fn default() -> DimLevelType
fn default() -> DimLevelType
Source§impl From<DimLevelType> for i32
impl From<DimLevelType> for i32
Source§fn from(value: DimLevelType) -> i32
fn from(value: DimLevelType) -> i32
Source§impl Hash for DimLevelType
impl Hash for DimLevelType
Source§impl Ord for DimLevelType
impl Ord for DimLevelType
Source§impl PartialEq for DimLevelType
impl PartialEq for DimLevelType
Source§impl PartialOrd for DimLevelType
impl PartialOrd for DimLevelType
Source§impl TryFrom<i32> for DimLevelType
impl TryFrom<i32> for DimLevelType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<DimLevelType, UnknownEnumValue>
fn try_from(value: i32) -> Result<DimLevelType, UnknownEnumValue>
impl Copy for DimLevelType
impl Eq for DimLevelType
impl StructuralPartialEq for DimLevelType
Auto Trait Implementations§
impl Freeze for DimLevelType
impl RefUnwindSafe for DimLevelType
impl Send for DimLevelType
impl Sync for DimLevelType
impl Unpin for DimLevelType
impl UnwindSafe for DimLevelType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)