Commit c3b569d2 by Changming Sun Committed by Tianqi Chen

up (#1940)

parent 02a8be10
......@@ -430,7 +430,8 @@ class VTInjector : public IRMutator {
} else {
// insert a for loop
Var idx(var_->name_hint + ".s", var_->type);
stmt = Substitute(stmt, {{var_, idx}});
Map<Var, Expr> values{{var_, idx}};
stmt = Substitute(stmt, values);
return For::make(idx, make_zero(idx.type()),
make_const(idx.type(), num_threads_),
ForType::Serial, DeviceAPI::None, stmt);
......
......@@ -355,7 +355,8 @@ class Vectorizer : public IRMutator {
// scalarize the statment
Stmt Scalarize(Stmt stmt) {
Var idx(var_->name_hint + ".s", var_->type);
stmt = Substitute(stmt, {{var_, idx}});
Map<Var, Expr> values{{var_, idx}};
stmt = Substitute(stmt, values);
return For::make(idx, 0, var_lanes_, ForType::Serial, DeviceAPI::None, stmt);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment