[Mlir-commits] [mlir] [mlir] [presburger] Add IntegerRelation::rangeProduct (PR #148092)
Jeremy Kun
llvmlistbot at llvm.org
Tue Jul 15 13:51:44 PDT 2025
================
@@ -2481,6 +2481,41 @@ void IntegerRelation::applyDomain(const IntegerRelation &rel) {
void IntegerRelation::applyRange(const IntegerRelation &rel) { compose(rel); }
+IntegerRelation IntegerRelation::rangeProduct(const IntegerRelation &rel) {
+ /// R1: (i, j) -> k : f(i, j, k) = 0
+ /// R2: (i, j) -> l : g(i, j, l) = 0
+ /// R1.rangeProduct(R2): (i, j) -> (k, l) : f(i, j, k) = 0 and g(i, j, l) = 0
+ assert(getNumDomainVars() == rel.getNumDomainVars() &&
+ "Range product is only defined for relations with equal domains");
+
+ // explicit copy of the context relation
----------------
j2kun wrote:
I guess this is not common terminology, but I have historically used "the context object" to mean "the `this` instance for the current class method." Changed in this PR to just `this`.
https://github.com/llvm/llvm-project/pull/148092
More information about the Mlir-commits
mailing list