MLIR  20.0.0git
Public Member Functions | List of all members
mlir::sparse_tensor::ir_detail::DimSpec Class Referencefinal

The full dimVar = dimExpr : dimSlice specification for a given dimension. More...

#include "Dialect/SparseTensor/IR/Detail/DimLvlMap.h"

Public Member Functions

 DimSpec (DimVar var, DimExpr expr, SparseTensorDimSliceAttr slice)
 
MLIRContexttryGetContext () const
 
constexpr DimVar getBoundVar () const
 
bool hasExpr () const
 
constexpr DimExpr getExpr () const
 
void setExpr (DimExpr newExpr)
 
constexpr bool canElideExpr () const
 
void setElideExpr (bool b)
 
constexpr SparseTensorDimSliceAttr getSlice () const
 
bool isValid (Ranks const &ranks) const
 Checks whether the variables bound/used by this spec are valid with respect to the given ranks. More...
 

Detailed Description

The full dimVar = dimExpr : dimSlice specification for a given dimension.

Definition at line 155 of file DimLvlMap.h.

Constructor & Destructor Documentation

◆ DimSpec()

DimSpec::DimSpec ( DimVar  var,
DimExpr  expr,
SparseTensorDimSliceAttr  slice 
)

Definition at line 52 of file DimLvlMap.cpp.

Member Function Documentation

◆ canElideExpr()

constexpr bool mlir::sparse_tensor::ir_detail::DimSpec::canElideExpr ( ) const
inlineconstexpr

Definition at line 181 of file DimLvlMap.h.

◆ getBoundVar()

constexpr DimVar mlir::sparse_tensor::ir_detail::DimSpec::getBoundVar ( ) const
inlineconstexpr

Definition at line 174 of file DimLvlMap.h.

◆ getExpr()

constexpr DimExpr mlir::sparse_tensor::ir_detail::DimSpec::getExpr ( ) const
inlineconstexpr

Definition at line 176 of file DimLvlMap.h.

◆ getSlice()

constexpr SparseTensorDimSliceAttr mlir::sparse_tensor::ir_detail::DimSpec::getSlice ( ) const
inlineconstexpr

Definition at line 183 of file DimLvlMap.h.

Referenced by mlir::sparse_tensor::ir_detail::DimLvlMap::getDimSlice().

◆ hasExpr()

bool mlir::sparse_tensor::ir_detail::DimSpec::hasExpr ( ) const
inline

Definition at line 175 of file DimLvlMap.h.

Referenced by setExpr().

◆ isValid()

bool DimSpec::isValid ( Ranks const &  ranks) const

Checks whether the variables bound/used by this spec are valid with respect to the given ranks.

Note that null DimExpr is considered to be vacuously valid, and therefore calling setExpr invalidates the result of this predicate.

Definition at line 55 of file DimLvlMap.cpp.

References mlir::sparse_tensor::ir_detail::Ranks::isValid().

◆ setElideExpr()

void mlir::sparse_tensor::ir_detail::DimSpec::setElideExpr ( bool  b)
inline

Definition at line 182 of file DimLvlMap.h.

◆ setExpr()

void mlir::sparse_tensor::ir_detail::DimSpec::setExpr ( DimExpr  newExpr)
inline

Definition at line 177 of file DimLvlMap.h.

References hasExpr().

◆ tryGetContext()

MLIRContext* mlir::sparse_tensor::ir_detail::DimSpec::tryGetContext ( ) const
inline

The documentation for this class was generated from the following files: