Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 0eb6dd2

Browse files
author
Sven Verdoolaege
committed
makeParamContext: take ParameterVector instead of SymbolTable
Only the ParameterVector is required and the SymbolTable is only available inside Scop::makeScop.
1 parent 9ac9985 commit 0eb6dd2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tc/core/halide2isl.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ isl::space makeParamSpace(isl::ctx ctx, const ParameterVector& params) {
236236
return space;
237237
}
238238

239-
isl::set makeParamContext(isl::ctx ctx, const SymbolTable& symbolTable) {
240-
auto space = makeParamSpace(ctx, symbolTable.params);
239+
isl::set makeParamContext(isl::ctx ctx, const ParameterVector& params) {
240+
auto space = makeParamSpace(ctx, params);
241241
auto context = isl::set::universe(space);
242-
for (auto p : symbolTable.params) {
242+
for (auto p : params) {
243243
isl::aff a(isl::aff::param_on_domain_space(space, isl::id(ctx, p.name())));
244244
context = context & (a >= 0);
245245
}

tc/core/halide2isl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ SymbolTable makeSymbolTable(const tc2halide::HalideComponents& components);
4444
/// Make the space of all given parameter values
4545
isl::space makeParamSpace(isl::ctx ctx, const ParameterVector& params);
4646

47-
/// Make the parameter set marking all parameters from the symbol table
47+
/// Make the parameter set marking all given parameters
4848
/// as non-negative.
49-
isl::set makeParamContext(isl::ctx ctx, const SymbolTable& symbolTable);
49+
isl::set makeParamContext(isl::ctx ctx, const ParameterVector& params);
5050

5151
/// Make a constant-valued affine function over a space.
5252
isl::aff makeIslAffFromInt(isl::space space, int64_t i);

tc/core/polyhedral/scop.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ScopUPtr Scop::makeScop(
4747

4848
halide2isl::SymbolTable sym = halide2isl::makeSymbolTable(components);
4949

50-
auto globalParameterContext = halide2isl::makeParamContext(ctx, sym);
50+
auto globalParameterContext = halide2isl::makeParamContext(ctx, sym.params);
5151
isl::space paramSpace = globalParameterContext.get_space();
5252

5353
ScopUPtr scop(new Scop());

0 commit comments

Comments
 (0)