本文整理汇总了C++中Space::getTupleName方法的典型用法代码示例。如果您正苦于以下问题:C++ Space::getTupleName方法的具体用法?C++ Space::getTupleName怎么用?C++ Space::getTupleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Space
的用法示例。
在下文中一共展示了Space::getTupleName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printConditions
void AliasCheckGenerator::printConditions(const isl::Set &ParamContext,
const isl::Set &Acc,
const BoundsMapT &map) const {
void *np = NULL;
Set AccA = Acc;
// Eliminate all but one single dimension and take the min/max.
unsigned int ndims = AccA.dim(DimType::DTSet);
AccA = AccA.eliminate(DimType::DTSet, 1, ndims - 1);
PwAff minA = AccA.dimMin(0);
PwAff maxA = AccA.dimMax(0);
AstBuild Builder = AstBuild::fromContext(ParamContext);
Space A = AccA.getSpace();
std::string nA = A.getTupleName(DimType::DTSet);
Id idA = Id::alloc(nA, np);
AstExpr ExpMinA = Builder.exprFromPwAff(minA);
AstExpr ExpMaxA = Builder.exprFromPwAff(maxA);
AstExpr ExpIdA = AstExpr::fromId(idA);
ExpMinA = ExpIdA.add(ExpMinA);
ExpMaxA = ExpIdA.add(ExpMaxA);
for (const isl::Set &s : map) {
Set AccB = s;
Space B = AccB.getSpace();
std::string nB = B.getTupleName(DimType::DTSet);
Id idB = Id::alloc(nB, np);
PwAff minB = AccB.dimMin(0);
PwAff maxB = AccB.dimMax(0);
AstExpr ExpMinB = Builder.exprFromPwAff(minB);
AstExpr ExpMaxB = Builder.exprFromPwAff(maxB);
AstExpr ExpIdB = AstExpr::fromId(idB);
ExpMinB = ExpIdB.add(ExpMinB);
ExpMaxB = ExpIdB.add(ExpMaxB);
dbgs().indent(6) << "[ (" << ExpMinA.toStr(Format::FC) << ")";
dbgs() << " <= (" << ExpMaxB.toStr(Format::FC) << ")";
dbgs() << " && (" << ExpMinB.toStr(Format::FC) << ")";
dbgs() << " <= (" << ExpMaxA.toStr(Format::FC) << ") ]\n";
}
}
示例2: checkPairs
Set AliasCheckGenerator::checkPairs(const Set &Cond, const Set &Acc,
const BoundsMapT &map) const {
Set AccA = Acc;
Set ResCond = Cond;
// Eliminate all but one single dimension and take the min/max.
unsigned int ndims = AccA.dim(DimType::DTSet);
AccA = AccA.eliminate(DimType::DTSet, 1, ndims - 1);
PwAff minA = AccA.dimMin(0);
PwAff maxA = AccA.dimMax(0);
Space spaceA = AccA.getSpace();
std::string nA = spaceA.getTupleName(DimType::DTSet);
Set baseA = Set::readFromStr("[" + nA + "] -> { [" + nA + "] };");
PwAff bpA = baseA.dimMin(0);
minA = minA.add(bpA);
maxA = maxA.add(bpA);
for (const isl::Set &s : map) {
Set AccB = s;
ndims = AccB.dim(DimType::DTSet);
AccB = AccB.eliminate(DimType::DTSet, 1, ndims - 1);
Space spaceB = AccB.getSpace();
std::string nB = spaceB.getTupleName(DimType::DTSet);
Set baseB = Set::readFromStr("[" + nB + "] -> { [" + nB + "] };");
PwAff bpB = baseB.dimMin(0);
PwAff minB = AccB.dimMin(0).add(bpB);
PwAff maxB = AccB.dimMax(0).add(bpB);
ResCond = ResCond.intersect(minA.leSet(maxB).intersect(minB.leSet(maxA)));
ResCond = ResCond.coalesce();
}
return ResCond;
}