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

Commit a804fea

Browse files
author
Sven Verdoolaege
committed
[RFC] use templated isl types getTensorSize
Templated isl types require the user to specify the domain and range universes of isl objects, allowing the compiler to check whether it makes sense to combine pairs of objects. This RFC only converts isPromotableToRegistersBelow and some related functions to illustrate the effect. The isPromotableToRegistersBelow was already applying operations correctly, so the code itself did not require any changes. However, one variable was reused to store different types of intermediate result and this one had to be split up into several variables because they now have different types.
1 parent 4cbab8c commit a804fea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tc/core/polyhedral/codegen_llvm.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int64_t toSInt(isl::val v) {
7070
return v.get_num_si();
7171
}
7272

73-
int64_t getTensorSize(isl::set context, const Halide::Expr& e) {
73+
int64_t getTensorSize(isl::Set<> context, const Halide::Expr& e) {
7474
// isl will take care of substituting parameter values if they are known and
7575
// simplifying the expression.
7676
auto aff = halide2isl::makeIslAffFromExpr(context.get_space(), e);
@@ -81,7 +81,7 @@ int64_t getTensorSize(isl::set context, const Halide::Expr& e) {
8181

8282
std::vector<int64_t> getTensorSizesWithoutLeadingDim(
8383
const Halide::OutputImageParam& t,
84-
isl::set context) {
84+
isl::Set<> context) {
8585
auto dims = t.dimensions();
8686
std::vector<int64_t> sizes;
8787
sizes.reserve(dims);

0 commit comments

Comments
 (0)