MLIR
20.0.0git
|
Helper class that generates loop conditions, etc, to traverse a sparse tensor level. More...
#include "Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h"
Static Public Member Functions | |
static std::unique_ptr< SparseIterator > | fromValues (IteratorType dstTp, ValueRange values, unsigned tid) |
Public Attributes | |
const IterKind | kind |
const unsigned | tid |
const unsigned | lvl |
Protected Member Functions | |
SparseIterator (IterKind kind, unsigned tid, unsigned lvl, unsigned cursorValsCnt, SmallVectorImpl< Value > &cursorValStorage) | |
SparseIterator (IterKind kind, unsigned cursorValsCnt, SmallVectorImpl< Value > &cursorValStorage, const SparseIterator &delegate) | |
SparseIterator (IterKind kind, const SparseIterator &wrap, unsigned extraCursorCnt=0) | |
void | updateCrd (Value crd) |
MutableArrayRef< Value > | getMutCursorVals () |
void | inherentBatch (const SparseIterator &parent) |
Protected Attributes | |
SparseEmitStrategy | emitStrategy |
SmallVector< Value > | batchCrds |
Helper class that generates loop conditions, etc, to traverse a sparse tensor level.
Definition at line 148 of file SparseTensorIterator.h.
|
inlineprotected |
Definition at line 155 of file SparseTensorIterator.h.
|
inlineprotected |
Definition at line 161 of file SparseTensorIterator.h.
|
inlineprotected |
Definition at line 167 of file SparseTensorIterator.h.
References wrap().
|
virtualdefault |
Definition at line 1021 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), derefImpl(), emitStrategy, getCrd(), getCursor(), getDebugInterfacePrefix(), mlir::Builder::getIndexType(), mlir::Builder::getStringAttr(), mlir::kDebugInterface, and updateCrd().
Referenced by mlir::sparse_tensor::genCoIteration(), and genWhenInBound().
|
pure virtual |
Referenced by deref().
|
inlinevirtual |
Definition at line 239 of file SparseTensorIterator.h.
ValueRange SparseIterator::forward | ( | OpBuilder & | b, |
Location | l | ||
) |
Definition at line 1033 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), emitStrategy, forwardImpl(), getCursor(), getCursorValTypes(), getDebugInterfacePrefix(), mlir::Operation::getResults(), mlir::Builder::getStringAttr(), mlir::kDebugInterface, randomAccessible(), and seek().
Referenced by forwardIf(), and genLoopWithIterator().
|
virtual |
Definition at line 1045 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), forward(), getCursor(), mlir::ValueRange::getTypes(), seek(), mlir::OpBuilder::setInsertionPointAfter(), mlir::OpBuilder::setInsertionPointToStart(), and YIELD.
|
pure virtual |
Referenced by forward().
|
static |
|
inlinevirtual |
Definition at line 285 of file SparseTensorIterator.h.
References getCrd(), randomAccessible(), and upperBound().
Referenced by genLoopWithIterator().
void SparseIterator::genInit | ( | OpBuilder & | b, |
Location | l, | ||
const SparseIterator * | p | ||
) |
Definition at line 980 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), emitStrategy, genInitImpl(), getCursorValTypes(), getDebugInterfacePrefix(), mlir::Operation::getResults(), mlir::Builder::getStringAttr(), inherentBatch(), mlir::kDebugInterface, and seek().
Referenced by mlir::sparse_tensor::LoopEmitter::locateLvlAtAffineAddress().
|
pure virtual |
Referenced by genInit().
Definition at line 996 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), emitStrategy, genNotEndImpl(), getCursor(), getDebugInterfacePrefix(), mlir::Builder::getI1Type(), mlir::Operation::getResult(), mlir::Builder::getStringAttr(), and mlir::kDebugInterface.
Referenced by genWhenInBound(), and genWhileCond().
|
pure virtual |
Referenced by genNotEnd().
|
inline |
Definition at line 292 of file SparseTensorIterator.h.
References genNotEnd(), and linkNewScope().
Referenced by mlir::sparse_tensor::genCoIteration(), and genLoopWithIterator().
|
inline |
Definition at line 188 of file SparseTensorIterator.h.
References batchCrds.
|
inline |
Definition at line 187 of file SparseTensorIterator.h.
Referenced by deref(), genCoIterateBranchNest(), mlir::sparse_tensor::genCoIteration(), genForCond(), and mlir::sparse_tensor::LoopEmitter::getCoord().
|
inlinevirtual |
Definition at line 282 of file SparseTensorIterator.h.
References getCursor().
|
inline |
Definition at line 189 of file SparseTensorIterator.h.
Referenced by deref(), forward(), forwardIf(), mlir::sparse_tensor::genCoIteration(), genLoopWithIterator(), genNotEnd(), getCurPosition(), and locate().
|
pure virtual |
|
pure virtual |
Referenced by deref(), forward(), genInit(), genNotEnd(), and locate().
|
inlineprotected |
Definition at line 323 of file SparseTensorIterator.h.
|
inlineprotected |
Definition at line 328 of file SparseTensorIterator.h.
References batchCrds.
Referenced by genInit().
|
pure virtual |
|
inlinevirtual |
Definition at line 220 of file SparseTensorIterator.h.
Referenced by genLoopWithIterator().
|
inline |
Definition at line 313 of file SparseTensorIterator.h.
References randomAccessible(), and seek().
Referenced by mlir::sparse_tensor::genCoIteration(), genLoopWithIterator(), and genWhileCond().
Definition at line 1007 of file SparseTensorIterator.cpp.
References mlir::OpBuilder::create(), emitStrategy, getCursor(), getCursorValTypes(), getDebugInterfacePrefix(), mlir::Builder::getStringAttr(), mlir::kDebugInterface, locateImpl(), seek(), and updateCrd().
Referenced by mlir::sparse_tensor::LoopEmitter::enterCoIterationOverTensorsAtLvls(), and mlir::sparse_tensor::LoopEmitter::locateLvlAtAffineAddress().
|
inlinevirtual |
Definition at line 267 of file SparseTensorIterator.h.
Referenced by locate().
|
pure virtual |
Referenced by forward(), genForCond(), linkNewScope(), and mlir::sparse_tensor::LoopEmitter::locateLvlAtAffineAddress().
|
inline |
Definition at line 194 of file SparseTensorIterator.h.
References copy().
Referenced by forward(), forwardIf(), genInit(), linkNewScope(), and locate().
|
inlinevirtual |
Definition at line 236 of file SparseTensorIterator.h.
|
inline |
Definition at line 180 of file SparseTensorIterator.h.
References emitStrategy.
Referenced by mlir::sparse_tensor::makeSynLevelAndIterator().
|
inline |
Definition at line 206 of file SparseTensorIterator.h.
|
inlineprotected |
Definition at line 321 of file SparseTensorIterator.h.
|
pure virtual |
Referenced by genForCond().
|
protected |
Definition at line 333 of file SparseTensorIterator.h.
Referenced by getBatchCrds(), and inherentBatch().
|
protected |
Definition at line 332 of file SparseTensorIterator.h.
Referenced by deref(), forward(), genInit(), genNotEnd(), locate(), and setSparseEmitStrategy().
const IterKind mlir::sparse_tensor::SparseIterator::kind |
Definition at line 336 of file SparseTensorIterator.h.
Referenced by mlir::sparse_tensor::LoopEmitter::locateLvlAtAffineAddress().
const unsigned mlir::sparse_tensor::SparseIterator::lvl |
Definition at line 337 of file SparseTensorIterator.h.
Referenced by mlir::sparse_tensor::LoopEmitter::enterCoIterationOverTensorsAtLvls().
const unsigned mlir::sparse_tensor::SparseIterator::tid |
Definition at line 337 of file SparseTensorIterator.h.
Referenced by mlir::sparse_tensor::LoopEmitter::enterCoIterationOverTensorsAtLvls().