Skip to content

Commit

Permalink
More cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreinking committed Nov 25, 2024
1 parent 9b7a4a2 commit ce9af71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,9 @@ pair<ReductionDomain, SubstitutionMap> project_rdom(const vector<Dim> &dims, con
// Compute the mapping of old dimensions to the projected RDom values.
SubstitutionMap dim_projection{};
SubstitutionMap dim_extent_alignment{};
for (const ReductionVariable &rv : rdom) {
add_let(dim_projection, rv.var, Variable::make(Int(32), rv.var));
dim_extent_alignment[rv.var] = rv.extent;
for (const auto &[var, _, extent] : rdom) {
add_let(dim_projection, var, Variable::make(Int(32), var));
dim_extent_alignment[var] = extent;
}
for (const Split &split : splits) {
for (const auto &result : apply_split(split, "", dim_extent_alignment)) {
Expand All @@ -791,15 +791,15 @@ pair<ReductionDomain, SubstitutionMap> project_rdom(const vector<Dim> &dims, con
case ApplySplitResult::SubstitutionInCalls:
case ApplySplitResult::SubstitutionInProvides:
case ApplySplitResult::BlendProvides:
// TODO: what to do here? BlendProvides is not included in the above checks.
// The lets returned by ApplySplit are sufficient
break;
}
}
}
for (auto &[_, e] : dim_projection) {
e = substitute(bounds_projection, e);
}
for (const ReductionVariable &rv : new_rdom.domain()) {
for (const auto &rv : new_rdom.domain()) {
add_let(dim_projection, rv.var, Variable::make(Int(32), rv.var, new_rdom));
}

Expand Down
2 changes: 1 addition & 1 deletion test/error/rfactor_after_var_and_rvar_fusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ int main(int argc, char **argv) {

printf("Success!\n");
return 0;
}
}
2 changes: 1 addition & 1 deletion test/error/rfactor_fused_var_and_rvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ int main(int argc, char **argv) {

printf("Success!\n");
return 0;
}
}

0 comments on commit ce9af71

Please sign in to comment.