|
MLIR 22.0.0git
|
The base class for all types of sparse tensor levels. More...
#include "Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h"
Public Member Functions | |
| virtual | ~SparseTensorLevel ()=default |
| std::string | toString () const |
| virtual Value | peekCrdAt (OpBuilder &b, Location l, ValueRange batchPrefix, Value iv) const =0 |
| virtual std::pair< Value, Value > | peekRangeAt (OpBuilder &b, Location l, ValueRange batchPrefix, ValueRange parentPos, Value inPadZone=nullptr) const =0 |
| Peeks the lower and upper bound to fully traverse the level with the given position parentPos, see SparseTensorIterator::getCurPostion(), that the immediate parent level is current at. | |
| virtual std::pair< Value, Value > | collapseRangeBetween (OpBuilder &b, Location l, ValueRange batchPrefix, std::pair< Value, Value > parentRange) const |
| Level | getLevel () const |
| LevelType | getLT () const |
| Value | getSize () const |
| virtual ValueRange | getLvlBuffers () const =0 |
| bool | isUnique () const |
Public Attributes | |
| const unsigned | tid |
| const unsigned | lvl |
| const LevelType | lt |
| const Value | lvlSize |
Protected Member Functions | |
| SparseTensorLevel (unsigned tid, unsigned lvl, LevelType lt, Value lvlSize) | |
The base class for all types of sparse tensor levels.
It provides interfaces to query the loop range (see peekRangeAt) and look up the coordinates (see peekCrdAt).
Definition at line 24 of file SparseTensorIterator.h.
|
virtualdefault |
|
inlinevirtual |
Definition at line 57 of file SparseTensorIterator.h.
References b.
|
inline |
Definition at line 62 of file SparseTensorIterator.h.
References lvl.
|
inline |
Definition at line 63 of file SparseTensorIterator.h.
References lt.
Referenced by mlir::sparse_tensor::makeSimpleIterator().
|
pure virtual |
|
inline |
Definition at line 64 of file SparseTensorIterator.h.
References lvlSize.
|
inline |
Definition at line 70 of file SparseTensorIterator.h.
References mlir::sparse_tensor::isUniqueLT(), and lt.
|
pure virtual |
References b.
|
pure virtual |
Peeks the lower and upper bound to fully traverse the level with the given position parentPos, see SparseTensorIterator::getCurPostion(), that the immediate parent level is current at.
Returns a pair of values for posLo and loopHi respectively.
For a dense level, the posLo is the linearized position at beginning, while loopHi is the largest coordinate, it also implies that the smallest coordinate to start the loop is 0.
For a sparse level, [posLo, loopHi) specifies the range of index pointer to load coordinate from the coordinate buffer.
References b.
|
inline |
Definition at line 33 of file SparseTensorIterator.h.
References lt, lvl, tid, and mlir::sparse_tensor::toMLIRString().
| const LevelType mlir::sparse_tensor::SparseTensorLevel::lt |
Definition at line 78 of file SparseTensorIterator.h.
Referenced by getLT(), isUnique(), SparseTensorLevel(), and toString().
| const unsigned mlir::sparse_tensor::SparseTensorLevel::lvl |
Definition at line 77 of file SparseTensorIterator.h.
Referenced by getLevel(), SparseTensorLevel(), and toString().
| const Value mlir::sparse_tensor::SparseTensorLevel::lvlSize |
Definition at line 79 of file SparseTensorIterator.h.
Referenced by getSize(), and SparseTensorLevel().
| const unsigned mlir::sparse_tensor::SparseTensorLevel::tid |
Definition at line 77 of file SparseTensorIterator.h.
Referenced by SparseTensorLevel(), and toString().