diff --git a/src/Func.cpp b/src/Func.cpp index dc77fb89be46..88ad5e78986e 100644 --- a/src/Func.cpp +++ b/src/Func.cpp @@ -772,9 +772,9 @@ pair project_rdom(const vector &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)) { @@ -791,7 +791,7 @@ pair project_rdom(const vector &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; } } @@ -799,7 +799,7 @@ pair project_rdom(const vector &dims, con 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)); } diff --git a/test/error/rfactor_after_var_and_rvar_fusion.cpp b/test/error/rfactor_after_var_and_rvar_fusion.cpp index 8b94fbdd1b16..acda4e4bb6fb 100644 --- a/test/error/rfactor_after_var_and_rvar_fusion.cpp +++ b/test/error/rfactor_after_var_and_rvar_fusion.cpp @@ -22,4 +22,4 @@ int main(int argc, char **argv) { printf("Success!\n"); return 0; -} \ No newline at end of file +} diff --git a/test/error/rfactor_fused_var_and_rvar.cpp b/test/error/rfactor_fused_var_and_rvar.cpp index a167ca543c47..64a79c269690 100644 --- a/test/error/rfactor_fused_var_and_rvar.cpp +++ b/test/error/rfactor_fused_var_and_rvar.cpp @@ -23,4 +23,4 @@ int main(int argc, char **argv) { printf("Success!\n"); return 0; -} \ No newline at end of file +}