MLIR  20.0.0git
Functions
IndexingUtils.cpp File Reference
#include "mlir/Dialect/Utils/IndexingUtils.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/MLIRContext.h"
#include "llvm/ADT/STLExtras.h"
#include <numeric>
#include <optional>

Go to the source code of this file.

Functions

template<typename ExprType >
SmallVector< ExprType > computeSuffixProductImpl (ArrayRef< ExprType > sizes, ExprType unit)
 
template<typename ExprType >
SmallVector< ExprType > computeElementwiseMulImpl (ArrayRef< ExprType > v1, ArrayRef< ExprType > v2)
 
template<typename ExprType >
ExprType linearizeImpl (ArrayRef< ExprType > offsets, ArrayRef< ExprType > basis, ExprType zero)
 
template<typename ExprType , typename DivOpTy >
SmallVector< ExprType > delinearizeImpl (ExprType linearIndex, ArrayRef< ExprType > strides, DivOpTy divOp)
 
static MLIRContextgetContext (OpFoldResult val)
 
static SmallVector< int64_t > padTileShapeToSize (ArrayRef< int64_t > tileShape, unsigned paddedSize)
 Apply left-padding by 1 to the tile shape if required. More...
 

Function Documentation

◆ computeElementwiseMulImpl()

template<typename ExprType >
SmallVector<ExprType> computeElementwiseMulImpl ( ArrayRef< ExprType >  v1,
ArrayRef< ExprType >  v2 
)

Definition at line 33 of file IndexingUtils.cpp.

Referenced by mlir::computeElementwiseMul().

◆ computeSuffixProductImpl()

template<typename ExprType >
SmallVector<ExprType> computeSuffixProductImpl ( ArrayRef< ExprType >  sizes,
ExprType  unit 
)

Definition at line 22 of file IndexingUtils.cpp.

Referenced by mlir::computeSuffixProduct().

◆ delinearizeImpl()

template<typename ExprType , typename DivOpTy >
SmallVector<ExprType> delinearizeImpl ( ExprType  linearIndex,
ArrayRef< ExprType >  strides,
DivOpTy  divOp 
)

Definition at line 55 of file IndexingUtils.cpp.

Referenced by mlir::delinearize().

◆ getContext()

static MLIRContext* getContext ( OpFoldResult  val)
static

◆ linearizeImpl()

template<typename ExprType >
ExprType linearizeImpl ( ArrayRef< ExprType >  offsets,
ArrayRef< ExprType >  basis,
ExprType  zero 
)

Definition at line 45 of file IndexingUtils.cpp.

Referenced by mlir::linearize().

◆ padTileShapeToSize()

static SmallVector<int64_t> padTileShapeToSize ( ArrayRef< int64_t >  tileShape,
unsigned  paddedSize 
)
static

Apply left-padding by 1 to the tile shape if required.

Definition at line 347 of file IndexingUtils.cpp.