14 : dimRank(d), lvlRank(l), dim2lvl(d2l), lvl2dim(l2d),
17 for (uint64_t l = 0; l < lvlRank; l++)
18 assert(lvl2dim[dim2lvl[l]] == l);
22 bool mlir::sparse_tensor::MapRef::isPermutationMap()
const {
23 if (dimRank != lvlRank)
25 std::vector<bool> seen(dimRank,
false);
26 for (uint64_t l = 0; l < lvlRank; l++) {
27 const uint64_t d = dim2lvl[l];
28 if (d >= dimRank || seen[d])
35 bool mlir::sparse_tensor::MapRef::isFloor(uint64_t l, uint64_t &i,
45 bool mlir::sparse_tensor::MapRef::isMod(uint64_t l, uint64_t &i,
55 bool mlir::sparse_tensor::MapRef::isMul(uint64_t d, uint64_t &i, uint64_t &c,
static bool isPermutation(std::vector< PermutationTy > permutation)
MapRef(uint64_t d, uint64_t l, const uint64_t *d2l, const uint64_t *l2d)
constexpr uint64_t decodeMuli(uint64_t v)
constexpr bool isEncodedMul(uint64_t v)
constexpr bool isEncodedMod(uint64_t v)
constexpr uint64_t decodeConst(uint64_t v)
constexpr uint64_t decodeIndex(uint64_t v)
constexpr uint64_t decodeMulc(uint64_t v)
constexpr bool isEncodedFloor(uint64_t v)