Lines Matching defs:xPerm

52 ///   <namePrefix><xPerm>_<x type>_<y0 type>..._<yn type> for sort
53 /// <namePrefix><xPerm>_<x type>_coo_<ny>_<y0 type>..._<yn type> for sort_coo
55 StringRef namePrefix, AffineMap xPerm,
58 for (auto res : xPerm.getResults())
71 /// parameters `xPerm` and `ny` tell the number of x and y values provided
80 StringRef namePrefix, AffineMap xPerm, uint64_t ny, ValueRange operands,
84 getMangledSortHelperFuncName(nameOstream, namePrefix, xPerm, ny,
101 createFunc(builder, module, func, xPerm, ny, nTrailingP);
110 OpBuilder &builder, Location loc, ValueRange args, AffineMap xPerm,
113 Value cstep = constantIndex(builder, loc, xPerm.getNumResults() + ny);
116 for (unsigned k = 0, e = xPerm.getNumResults(); k < e; k++) {
117 unsigned actualK = cast<AffineDimExpr>(xPerm.getResult(k)).getPosition();
130 OpBuilder &builder, Location loc, ValueRange args, AffineMap xPerm,
134 // Create code for the first (xPerm + ny) buffers.
135 SmallVector<AffineExpr> exps(xPerm.getResults());
137 exps.push_back(builder.getAffineDimExpr(y + xPerm.getNumResults()));
150 bodyBuilder(arg.index() + xPerm.getNumResults() + ny, i, j, arg.value());
166 AffineMap xPerm, uint64_t ny) {
174 forEachIJPairInAllBuffers(builder, loc, args, xPerm, ny, swapOnePair);
180 OpBuilder &builder, Location loc, ValueRange args, AffineMap xPerm,
187 bool isLastDim = (k == xPerm.getNumResults() - 1);
200 forEachIJPairInXs(builder, loc, args, xPerm, ny, bodyBuilder);
250 ValueRange args, AffineMap xPerm,
255 return createInlinedCompareImplementation(builder, loc, args, xPerm, ny,
304 ValueRange args, AffineMap xPerm,
309 return createInlinedCompareImplementation(builder, loc, args, xPerm, ny,
327 func::FuncOp func, AffineMap xPerm,
369 Value cond2 = createInlinedLessThan(builder, loc, compareOperands, xPerm, ny);
392 Value i, Value p, AffineMap xPerm,
411 Value cond = createInlinedLessThan(builder, loc, compareOperands, xPerm, ny);
426 createInlinedEqCompare(builder, loc, compareOperands, xPerm, ny);
435 AffineMap xPerm, uint64_t ny,
442 Value cond = createInlinedLessThan(builder, loc, compareOperands, xPerm, ny);
447 createSwap(builder, loc, swapOperands, xPerm, ny);
452 static void createInsert3rd(OpBuilder &builder, Location loc, AffineMap xPerm,
456 scf::IfOp ifOp = createCompareThenSwap(builder, loc, xPerm, ny, swapOperands,
458 createCompareThenSwap(builder, loc, xPerm, ny, swapOperands, compareOperands,
464 static void createSort3(OpBuilder &builder, Location loc, AffineMap xPerm,
469 scf::IfOp ifOp1 = createCompareThenSwap(builder, loc, xPerm, ny, swapOperands,
474 createInsert3rd(builder, loc, xPerm, ny, swapOperands, compareOperands, v0,
479 static void createSort5(OpBuilder &builder, Location loc, AffineMap xPerm,
484 createSort3(builder, loc, xPerm, ny, swapOperands, compareOperands, v0, v1,
489 builder, loc, xPerm, ny, swapOperands, compareOperands, v2, v3);
490 createInsert3rd(builder, loc, xPerm, ny, swapOperands, compareOperands, v0,
499 scf::IfOp ifOp = createCompareThenSwap(builder, loc, xPerm, ny, swapOperands,
510 func::FuncOp func, AffineMap xPerm, uint64_t ny,
529 createSort3(builder, loc, xPerm, ny, swapOperands, compareOperands, lo, mi,
541 createSort5(builder, loc, xPerm, ny, swapOperands, compareOperands, lo, a, mi,
578 func::FuncOp func, AffineMap xPerm, uint64_t ny,
598 createChoosePivot(builder, module, func, xPerm, ny, i, j, p, args);
623 i, p, xPerm, ny, 1);
627 j, p, xPerm, ny, -1);
637 createSwap(builder, loc, swapOperands, xPerm, ny);
729 func::FuncOp func, AffineMap xPerm, uint64_t ny,
786 createInlinedLessThan(builder, loc, compareOperands, xPerm, ny);
817 Value cond = createInlinedLessThan(builder, loc, compareOperands, xPerm, ny);
827 createSwap(builder, loc, swapOperands, xPerm, ny);
860 func::FuncOp func, AffineMap xPerm, uint64_t ny,
888 builder, func, TypeRange(), kShiftDownFuncNamePrefix, xPerm, ny,
903 createSwap(builder, loc, swapOperands, xPerm, ny);
919 ValueRange args, AffineMap xPerm, uint64_t ny,
928 builder, func, {IndexType::get(context)}, kPartitionFuncNamePrefix, xPerm,
999 func::FuncOp func, AffineMap xPerm,
1026 xPerm, ny, operands, createBinarySearchFunc);
1036 builder, loc, operands, xPerm, ny,
1052 builder, loc, operands, xPerm, ny,
1062 builder, loc, operands, xPerm, ny,
1114 func::FuncOp func, AffineMap xPerm, uint64_t ny,
1164 builder, func, TypeRange(), kSortStableFuncNamePrefix, xPerm, ny,
1184 builder, func, TypeRange(), kHeapSortFuncNamePrefix, xPerm, ny,
1194 createQuickSort(builder, module, func, args, xPerm, ny, nTrailingP);
1207 createQuickSort(builder, module, func, args, xPerm, ny, nTrailingP);
1220 LogicalResult matchAndRewriteSortOp(OpTy op, ValueRange xys, AffineMap xPerm,
1276 xPerm, ny, operands, funcGenerator, nTrailingP);
1410 auto xPerm = op.getPermMap();
1415 return matchAndRewriteSortOp(op, xys, xPerm, ny, rewriter);