Struct melior::dialect::ods::sparse_tensor::NewOperation
source · pub struct NewOperation<'c> { /* private fields */ }
Expand description
A new
operation. Materializes a new sparse tensor from given source.
Materializes a sparse tensor with contents taken from an opaque pointer
provided by source
. For targets that have access to a file system,
for example, this pointer may be a filename (or file) of a sparse
tensor in a particular external storage format. The form of the operation
is kept deliberately very general to allow for alternative implementations
in the future, such as pointers to buffers or runnable initialization
code. The operation is provided as an anchor that materializes a properly
typed sparse tensor with inital contents into a computation.
Reading in a symmetric matrix will result in just the lower/upper triangular part of the matrix (so that only relevant information is stored). Proper symmetry support for operating on symmetric matrices is still TBD.
Example:
sparse_tensor.new %source : !Source to tensor<1024x1024xf64, #CSR>
Implementations§
source§impl<'c> NewOperation<'c>
impl<'c> NewOperation<'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>
) -> NewOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> NewOperationBuilder<'c, Unset, Unset>
Creates a builder.