Struct melior::dialect::ods::sparse_tensor::StorageSpecifierInitOperation
source · pub struct StorageSpecifierInitOperation<'c> { /* private fields */ }
Expand description
A storage_specifier.init
operation.
Returns an initial storage specifier value. A storage specifier value holds the level-sizes, position arrays, coordinate arrays, and the value array. If this is a specifier for slices, it also holds the extra strides/offsets for each tensor dimension.
TODO: The sparse tensor slice support is currently in a unstable state, and is subject to change in the future.
Example:
#CSR = #sparse_tensor.encoding<{ dimLevelType = [ "dense", "compressed" ]}>
#CSR_SLICE = #sparse_tensor.encoding<{
dimLevelType = [ "dense", "compressed" ],
slice = [ (1, 4, 1), (1, 4, 2) ]
}>
%0 = sparse_tensor.storage_specifier.init : !sparse_tensor.storage_specifier<#CSR>
%1 = sparse_tensor.storage_specifier.init with %src
: !sparse_tensor.storage_specifier<#CSR> to
!sparse_tensor.storage_specifier<#CSR_SLICE>
Implementations§
source§impl<'c> StorageSpecifierInitOperation<'c>
impl<'c> StorageSpecifierInitOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> StorageSpecifierInitOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> StorageSpecifierInitOperationBuilder<'c, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn source(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<StorageSpecifierInitOperation<'c>> for Operation<'c>
impl<'c> From<StorageSpecifierInitOperation<'c>> for Operation<'c>
source§fn from(operation: StorageSpecifierInitOperation<'c>) -> Self
fn from(operation: StorageSpecifierInitOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for StorageSpecifierInitOperation<'c>
impl<'c> !Send for StorageSpecifierInitOperation<'c>
impl<'c> !Sync for StorageSpecifierInitOperation<'c>
impl<'c> Unpin for StorageSpecifierInitOperation<'c>
impl<'c> UnwindSafe for StorageSpecifierInitOperation<'c>
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