MLIR  16.0.0git
Namespaces | Functions
IndexingUtils.h File Reference
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
+ Include dependency graph for IndexingUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


 Include the generated interface declarations.


int64_t mlir::linearize (ArrayRef< int64_t > offsets, ArrayRef< int64_t > basis)
 Computes and returns the linearized index of 'offsets' w.r.t. 'basis'. More...
SmallVector< int64_t, 4 > mlir::delinearize (ArrayRef< int64_t > strides, int64_t linearIndex)
 Given the strides together with a linear index in the dimension space, returns the vector-space offsets in each dimension for a de-linearized index. More...
template<typename T , unsigned N>
void mlir::applyPermutationToVector (SmallVector< T, N > &inVec, ArrayRef< int64_t > permutation)
 Apply the permutation defined by permutation to inVec. More...
SmallVector< int64_t, 4 > mlir::getI64SubArray (ArrayAttr arrayAttr, unsigned dropFront=0, unsigned dropBack=0)
 Helper that returns a subset of arrayAttr as a vector of int64_t. More...