var 48 python_bindings/python/Expr.cpp h::Expr *expr_from_var_constructor(h::Var &var) { var 49 python_bindings/python/Expr.cpp return new h::Expr(var); var 149 python_bindings/python/Func.cpp h::Func &func_store_at0(h::Func &that, h::Func f, h::Var var) { var 150 python_bindings/python/Func.cpp return that.store_at(f, var); var 153 python_bindings/python/Func.cpp h::Func &func_store_at1(h::Func &that, h::Func f, h::RVar var) { var 154 python_bindings/python/Func.cpp return that.store_at(f, var); var 157 python_bindings/python/Func.cpp h::Func &func_compute_at0(h::Func &that, h::Func f, h::Var var) { var 158 python_bindings/python/Func.cpp return that.compute_at(f, var); var 161 python_bindings/python/Func.cpp h::Func &func_compute_at1(h::Func &that, h::Func f, h::RVar var) { var 162 python_bindings/python/Func.cpp return that.compute_at(f, var); var 23 python_bindings/python/Func.h FuncOrStage &func_parallel0(FuncOrStage &that, hh::VarOrRVar var) { var 24 python_bindings/python/Func.h return that.parallel(var); var 28 python_bindings/python/Func.h FuncOrStage &func_parallel1(FuncOrStage &that, hh::VarOrRVar var, int factor) { var 29 python_bindings/python/Func.h return that.parallel(var, factor); var 33 python_bindings/python/Func.h FuncOrStage &func_split(FuncOrStage &that, hh::VarOrRVar var, hh::VarOrRVar outer, hh::VarOrRVar inner, int factor) { var 34 python_bindings/python/Func.h return that.split(var, outer, inner, factor); var 38 python_bindings/python/Func.h FuncOrStage &func_vectorize0(FuncOrStage &that, hh::VarOrRVar var) { var 39 python_bindings/python/Func.h return that.vectorize(var); var 43 python_bindings/python/Func.h FuncOrStage &func_vectorize1(FuncOrStage &that, hh::VarOrRVar var, int factor) { var 44 python_bindings/python/Func.h return that.vectorize(var, factor); var 48 python_bindings/python/Func.h FuncOrStage &func_unroll0(FuncOrStage &that, hh::VarOrRVar var) { var 49 python_bindings/python/Func.h return that.unroll(var); var 53 python_bindings/python/Func.h FuncOrStage &func_unroll1(FuncOrStage &that, hh::VarOrRVar var, int factor) { var 54 python_bindings/python/Func.h return that.unroll(var, factor); var 25 python_bindings/python/Func_VarOrRVar.cpp .def_readonly("var", &VarOrRVar::var) var 42 python_bindings/python/Var.cpp std::string var_repr(const h::Var &var) { var 45 python_bindings/python/Var.cpp repr = boost::str(f % var.name()); var 480 src/AddImageChecks.cpp Expr var = constraints[i].first; var 481 src/AddImageChecks.cpp const string &name = var.as<Variable>()->name; var 493 src/AddImageChecks.cpp {name, var, constrained_var_str, constrained_var}, var 497 src/AddImageChecks.cpp asserts_constrained.push_back(AssertStmt::make(var == constrained_var, error)); var 60 src/AllocationBoundsInference.cpp if (f_args[i] == b.var) { var 499 src/Associativity.cpp replacement.emplace(assoc_op.xs[i].var, Variable::make(result.xs[i].expr.type(), result.xs[i].var)); var 502 src/Associativity.cpp replacement.emplace(assoc_op.ys[i].var, Variable::make(result.ys[i].expr.type(), result.ys[i].var)); var 516 src/Associativity.cpp debug(5) << " x: " << result.xs[i].var << " -> " << result.xs[i].expr << "\n"; var 517 src/Associativity.cpp debug(5) << " y: " << result.ys[i].var << " -> " << result.ys[i].expr << "\n"; var 55 src/Associativity.h std::string var; var 59 src/Associativity.h Replacement(const std::string &var, Expr expr) : var(var), expr(expr) {} var 62 src/Associativity.h return (var == other.var) && equal(expr, other.expr); var 565 src/Bounds.cpp Expr var = Variable::make(op->base.type(), var_name); var 566 src/Bounds.cpp Expr lane = op->base + var * op->stride; var 567 src/Bounds.cpp scope.push(var_name, Interval(make_const(var.type(), 0), var 568 src/Bounds.cpp make_const(var.type(), op->lanes-1))); var 690 src/Bounds.cpp Interval var; var 697 src/Bounds.cpp var.min = val.min; var 700 src/Bounds.cpp var.min = Variable::make(op->value.type().element_of(), min_name); var 707 src/Bounds.cpp var.max = val.max; var 710 src/Bounds.cpp var.max = Variable::make(op->value.type().element_of(), max_name); var 714 src/Bounds.cpp scope.push(op->name, var); var 1033 src/Bounds.cpp void visit(const Variable *var) { var 23 src/BoundsInference.cpp void visit(const Variable *var) { var 24 src/BoundsInference.cpp if (ends_with(var->name, ".max") || var 25 src/BoundsInference.cpp ends_with(var->name, ".min")) { var 64 src/BoundsInference.cpp BoundsOfInnerVar(const string &v) : var(v) {} var 67 src/BoundsInference.cpp string var; var 74 src/BoundsInference.cpp if (op->name == var) { var 89 src/BoundsInference.cpp if (op->name == var) { var 99 src/BoundsInference.cpp Interval bounds_of_inner_var(string var, Stmt s) { var 100 src/BoundsInference.cpp BoundsOfInnerVar b(var); var 248 src/BoundsInference.cpp const Variable *var = def.args()[dim_idx].as<Variable>(); var 249 src/BoundsInference.cpp if ((!var) || (var->name != dim)) { var 408 src/BoundsInference.cpp string min_var = prefix + bound.var + ".min"; var 409 src/BoundsInference.cpp string max_var = prefix + bound.var + ".max"; var 464 src/BoundsInference.cpp string arg = name + ".s" + std::to_string(stage) + "." + rvar.var; var 619 src/BoundsInference.cpp string arg = name + ".s" + std::to_string(stage) + "." + rv.var; var 620 src/BoundsInference.cpp result.push(rv.var, Interval(Variable::make(Int(32), arg + ".min"), var 920 src/BoundsInference.cpp string var = stage_name + "." + f_args[i]; var 923 src/BoundsInference.cpp body = LetStmt::make(var + ".max", Variable::make(Int(32), var + ".min"), body); var 925 src/BoundsInference.cpp body = LetStmt::make(var + ".max", box[i].max, body); var 928 src/BoundsInference.cpp body = LetStmt::make(var + ".min", box[i].min, body); var 951 src/BoundsInference.cpp string var = s.stage_prefix + rv.var; var 952 src/BoundsInference.cpp Interval in = bounds_of_inner_var(var, body); var 954 src/BoundsInference.cpp body = LetStmt::make(var + ".min", in.min, body); var 955 src/BoundsInference.cpp body = LetStmt::make(var + ".max", in.max, body); var 960 src/BoundsInference.cpp Expr val = Variable::make(Int(32), var); var 961 src/BoundsInference.cpp body = LetStmt::make(var + ".min", val, body); var 962 src/BoundsInference.cpp body = LetStmt::make(var + ".max", val, body); var 107 src/CSE.cpp if (const Variable *var = e.as<Variable>()) { var 108 src/CSE.cpp if (let_substitutions.contains(var->name)) { var 109 src/CSE.cpp number = let_substitutions.get(var->name); var 336 src/CSE.cpp void visit(const Variable *var) { var 337 src/CSE.cpp map<string, string>::iterator iter = new_names.find(var->name); var 339 src/CSE.cpp expr = var; var 341 src/CSE.cpp expr = Variable::make(var->type, iter->second); var 63 src/EarlyFree.cpp void visit(const Variable *var) { var 64 src/EarlyFree.cpp if (var->name == func || var->name == func + ".buffer") { var 137 src/Func.cpp rvs[i] = RVar(rvars[i].var); var 238 src/Func.cpp const Variable *var = iter->as<Variable>(); var 239 src/Func.cpp if (var && var->name == _.name()) var 264 src/Func.cpp bool var_name_match(string candidate, string var) { var 265 src/Func.cpp internal_assert(var.find('.') == string::npos) var 267 src/Func.cpp << "Name passed: " << var << "\n"; var 268 src/Func.cpp if (candidate == var) return true; var 269 src/Func.cpp return Internal::ends_with(candidate, "." + var); var 277 src/Func.cpp void Stage::set_dim_type(VarOrRVar var, ForType t) { var 281 src/Func.cpp if (var_name_match(dims[i].var, var.name())) { var 287 src/Func.cpp if (!dims[i].is_pure() && var.is_rvar && var 292 src/Func.cpp << ", marking var " << var.name() var 307 src/Func.cpp << ", can't vectorize across " << var.name() var 308 src/Func.cpp << " because Func is already vectorized across " << dims[i].var << "\n"; var 315 src/Func.cpp << var.name() var 322 src/Func.cpp void Stage::set_dim_device_api(VarOrRVar var, DeviceAPI device_api) { var 326 src/Func.cpp if (var_name_match(dims[i].var, var.name())) { var 335 src/Func.cpp << var.name() var 346 src/Func.cpp oss << " " << definition.schedule().dims()[i].var; var 438 src/Func.cpp [&s](const ReductionVariable& rv) { return (s.old_var == rv.var); }); var 443 src/Func.cpp debug(4) << " Splitting " << it->var << " into " << s.outer << " and " << s.inner << "\n"; var 449 src/Func.cpp it->var = s.inner; var 471 src/Func.cpp [&s](const ReductionVariable& rv) { return (s.outer == rv.var); }); var 473 src/Func.cpp [&s](const ReductionVariable& rv) { return (s.inner == rv.var); }); var 485 src/Func.cpp iter_outer->var = s.old_var; var 508 src/Func.cpp [&s](const ReductionVariable& rv) { return (s.old_var == rv.var); }); var 510 src/Func.cpp debug(4) << " Purify RVar " << iter->var << " into Var " << s.outer var 529 src/Func.cpp [&s](const ReductionVariable& rv) { return (s.old_var == rv.var); }); var 531 src/Func.cpp debug(4) << " Renaming " << iter->var << " into " << s.outer << "\n"; var 532 src/Func.cpp iter->var = s.outer; var 550 src/Func.cpp dim_extent_alignment[rv.var] = rv.extent; var 555 src/Func.cpp rvar_bounds.push_back({ rv.var + ".loop_min", rv.min }); var 556 src/Func.cpp rvar_bounds.push_back({ rv.var + ".loop_max", simplify(rv.min + rv.extent - 1) }); var 557 src/Func.cpp rvar_bounds.push_back({ rv.var + ".loop_extent", rv.extent }); var 624 src/Func.cpp [&rv](const Dim& dim) { return var_name_match(dim.var, rv.name()); }); var 635 src/Func.cpp [&v](const Dim& dim) { return var_name_match(dim.var, v.name()); }); var 652 src/Func.cpp << ", can't rfactor an inner dimension " << dims[i].var var 681 src/Func.cpp [&rv](const pair<RVar, Var>& pair) { return var_name_match(rv.var, pair.first.name()); }); var 684 src/Func.cpp scope.push(rv.var, rv.var); var 696 src/Func.cpp [&lhs](const ReductionVariable& rv) { return var_name_match(rv.var, lhs.first.name()); }); var 698 src/Func.cpp [&rhs](const ReductionVariable& rv) { return var_name_match(rv.var, rhs.first.name()); }); var 718 src/Func.cpp [&rv](const RVar &rvar) { return var_name_match(rv.var, rvar.name()); }); var 722 src/Func.cpp rvars_removed.push_back(rv.var); var 763 src/Func.cpp substitution_map[intm_rvars[i].var] = intm_rdom[i]; var 770 src/Func.cpp [&rvar_kept](const ReductionVariable &rv) { return var_name_match(rv.var, rvar_kept.name()); }); var 771 src/Func.cpp substitution_map[iter->var] = vars_rename[i]; var 829 src/Func.cpp [&v](const Dim& dim) { return var_name_match(dim.var, v.name()); }); var 866 src/Func.cpp internal_assert(!prover_result.ys[i].var.empty()); var 867 src/Func.cpp replacement.emplace(prover_result.ys[i].var, intm(f_load_args)[i]); var 869 src/Func.cpp if (!prover_result.xs[i].var.empty()) { var 873 src/Func.cpp replacement.emplace(prover_result.xs[i].var, prev_val); var 886 src/Func.cpp internal_assert(!prover_result.ys[0].var.empty()); var 887 src/Func.cpp Expr val = substitute(prover_result.ys[0].var, intm(f_load_args), prover_result.pattern.ops[0]); var 888 src/Func.cpp if (!prover_result.xs[0].var.empty()) { var 889 src/Func.cpp val = substitute(prover_result.xs[0].var, prev_val, val); var 914 src/Func.cpp if (var_name_match(dims[i].var, new_names[j]) && new_names[j] != old) { var 929 src/Func.cpp if (var_name_match(dims[i].var, old)) { var 931 src/Func.cpp old_name = dims[i].var; var 935 src/Func.cpp dims[i].var = inner_name; var 936 src/Func.cpp dims[i+1].var = outer_name; var 1051 src/Func.cpp if (var_name_match(dims[i].var, outer.name())) { var 1053 src/Func.cpp outer_name = dims[i].var; var 1067 src/Func.cpp if (var_name_match(dims[i].var, inner.name())) { var 1069 src/Func.cpp inner_name = dims[i].var; var 1071 src/Func.cpp dims[i].var = fused_name; var 1105 src/Func.cpp void visit(const Variable *var) { var 1106 src/Func.cpp if (!var->param.defined() && !var->image.defined()) { var 1107 src/Func.cpp offending_var = var->name; var 1170 src/Func.cpp if (var_name_match(dims[i].var, old_var.name())) { var 1172 src/Func.cpp old_name = dims[i].var; var 1173 src/Func.cpp dims[i].var = new_name; var 1192 src/Func.cpp void Stage::remove(const string &var) { var 1193 src/Func.cpp debug(4) << "In schedule for " << stage_name << ", remove " << var << "\n"; var 1199 src/Func.cpp string old_name = var; var 1202 src/Func.cpp if (dims[i].var == var) { var 1204 src/Func.cpp old_name = dims[i].var; var 1213 src/Func.cpp << var var 1220 src/Func.cpp removed_vars.insert(var); var 1222 src/Func.cpp auto should_remove = [&removed_vars](const string &var) { var 1224 src/Func.cpp removed_vars.begin(), removed_vars.end(), [&var](const string& rv) { return rv == var; }); var 1311 src/Func.cpp if (var_name_match(dims[i].var, old_var.name())) { var 1313 src/Func.cpp old_name = dims[i].var; var 1314 src/Func.cpp dims[i].var += "." + new_var.name(); var 1382 src/Func.cpp Stage &Stage::serial(VarOrRVar var) { var 1383 src/Func.cpp set_dim_type(var, ForType::Serial); var 1387 src/Func.cpp Stage &Stage::parallel(VarOrRVar var) { var 1388 src/Func.cpp set_dim_type(var, ForType::Parallel); var 1392 src/Func.cpp Stage &Stage::vectorize(VarOrRVar var) { var 1393 src/Func.cpp set_dim_type(var, ForType::Vectorized); var 1397 src/Func.cpp Stage &Stage::unroll(VarOrRVar var) { var 1398 src/Func.cpp set_dim_type(var, ForType::Unrolled); var 1402 src/Func.cpp Stage &Stage::parallel(VarOrRVar var, Expr factor, TailStrategy tail) { var 1403 src/Func.cpp if (var.is_rvar) { var 1405 src/Func.cpp split(var.rvar, var.rvar, tmp, factor, tail); var 1408 src/Func.cpp split(var.var, var.var, tmp, factor, tail); var 1410 src/Func.cpp parallel(var); var 1414 src/Func.cpp Stage &Stage::vectorize(VarOrRVar var, Expr factor, TailStrategy tail) { var 1415 src/Func.cpp if (var.is_rvar) { var 1417 src/Func.cpp split(var.rvar, var.rvar, tmp, factor, tail); var 1421 src/Func.cpp split(var.var, var.var, tmp, factor, tail); var 1427 src/Func.cpp Stage &Stage::unroll(VarOrRVar var, Expr factor, TailStrategy tail) { var 1428 src/Func.cpp if (var.is_rvar) { var 1430 src/Func.cpp split(var.rvar, var.rvar, tmp, factor, tail); var 1434 src/Func.cpp split(var.var, var.var, tmp, factor, tail); var 1472 src/Func.cpp if (var_name_match(dims[j].var, vars[i].name())) { var 1735 src/Func.cpp Stage &Stage::prefetch(const Func &f, VarOrRVar var, Expr offset, PrefetchBoundStrategy strategy) { var 1736 src/Func.cpp PrefetchDirective prefetch = {f.name(), var.name(), offset, strategy, Parameter()}; var 1741 src/Func.cpp Stage &Stage::prefetch(const Internal::Parameter ¶m, VarOrRVar var, Expr offset, PrefetchBoundStrategy strategy) { var 1742 src/Func.cpp PrefetchDirective prefetch = {param.name(), var.name(), offset, strategy, param}; var 1894 src/Func.cpp Func &Func::serial(VarOrRVar var) { var 1896 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).serial(var); var 1900 src/Func.cpp Func &Func::parallel(VarOrRVar var) { var 1902 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).parallel(var); var 1906 src/Func.cpp Func &Func::vectorize(VarOrRVar var) { var 1908 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).vectorize(var); var 1912 src/Func.cpp Func &Func::unroll(VarOrRVar var) { var 1914 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).unroll(var); var 1918 src/Func.cpp Func &Func::parallel(VarOrRVar var, Expr factor, TailStrategy tail) { var 1920 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).parallel(var, factor, tail); var 1924 src/Func.cpp Func &Func::vectorize(VarOrRVar var, Expr factor, TailStrategy tail) { var 1926 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).vectorize(var, factor, tail); var 1930 src/Func.cpp Func &Func::unroll(VarOrRVar var, Expr factor, TailStrategy tail) { var 1932 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).unroll(var, factor, tail); var 1936 src/Func.cpp Func &Func::bound(Var var, Expr min, Expr extent) { var 1949 src/Func.cpp if (var.name() == func.args()[i]) { var 1954 src/Func.cpp << "Can't bound variable " << var.name() var 1956 src/Func.cpp << " because " << var.name() var 1959 src/Func.cpp Bound b = {var.name(), min, extent, Expr(), Expr()}; var 1964 src/Func.cpp Func &Func::bound_extent(Var var, Expr extent) { var 1965 src/Func.cpp return bound(var, Expr(), extent); var 1968 src/Func.cpp Func &Func::align_bounds(Var var, Expr modulus, Expr remainder) { var 1984 src/Func.cpp if (var.name() == func.args()[i]) { var 1989 src/Func.cpp << "Can't align bounds of variable " << var.name() var 1991 src/Func.cpp << " because " << var.name() var 1994 src/Func.cpp Bound b = {var.name(), Expr(), Expr(), modulus, remainder}; var 2197 src/Func.cpp if (c.name() == sched.bounds()[i].var) { var 2218 src/Func.cpp Func &Func::prefetch(const Func &f, VarOrRVar var, Expr offset, PrefetchBoundStrategy strategy) { var 2220 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).prefetch(f, var, offset, strategy); var 2224 src/Func.cpp Func &Func::prefetch(const Internal::Parameter ¶m, VarOrRVar var, Expr offset, PrefetchBoundStrategy strategy) { var 2226 src/Func.cpp Stage(func.definition(), name(), args(), func.schedule().storage_dims()).prefetch(param, var, offset, strategy); var 2237 src/Func.cpp if (var_name_match(dims[i].var, y.name())) { var 2240 src/Func.cpp } else if (var_name_match(dims[i].var, x.name())) { var 2274 src/Func.cpp if (var_name_match(dims[i].var, dim.name())) { var 2289 src/Func.cpp if (var_name_match(dims[i].var, dim.name())) { var 2309 src/Func.cpp Func &Func::compute_at(Func f, RVar var) { var 2310 src/Func.cpp return compute_at(LoopLevel(f, var)); var 2313 src/Func.cpp Func &Func::compute_at(Func f, Var var) { var 2314 src/Func.cpp return compute_at(LoopLevel(f, var)); var 2327 src/Func.cpp Func &Func::store_at(Func f, RVar var) { var 2328 src/Func.cpp return store_at(LoopLevel(f, var)); var 2331 src/Func.cpp Func &Func::store_at(Func f, Var var) { var 2332 src/Func.cpp return store_at(LoopLevel(f, var)); var 2485 src/Func.cpp const Variable *var = args[i].as<Variable>(); var 2486 src/Func.cpp user_assert((var != nullptr) && (!var->reduction_domain.defined())) var 29 src/Func.h VarOrRVar(const std::string &n, bool r) : var(n), rvar(n), is_rvar(r) {} var 30 src/Func.h VarOrRVar(const Var &v) : var(v), is_rvar(false) {} var 36 src/Func.h else return var.name(); var 39 src/Func.h Var var; var 58 src/Func.h void set_dim_type(VarOrRVar var, Internal::ForType t); var 59 src/Func.h void set_dim_device_api(VarOrRVar var, DeviceAPI device_api); var 62 src/Func.h void remove(const std::string &var); var 177 src/Func.h EXPORT Stage &serial(VarOrRVar var); var 178 src/Func.h EXPORT Stage ¶llel(VarOrRVar var); var 179 src/Func.h EXPORT Stage &vectorize(VarOrRVar var); var 180 src/Func.h EXPORT Stage &unroll(VarOrRVar var); var 181 src/Func.h EXPORT Stage ¶llel(VarOrRVar var, Expr task_size, TailStrategy tail = TailStrategy::Auto); var 182 src/Func.h EXPORT Stage &vectorize(VarOrRVar var, Expr factor, TailStrategy tail = TailStrategy::Auto); var 183 src/Func.h EXPORT Stage &unroll(VarOrRVar var, Expr factor, TailStrategy tail = TailStrategy::Auto); var 288 src/Func.h EXPORT Stage &prefetch(const Func &f, VarOrRVar var, Expr offset = 1, var 290 src/Func.h EXPORT Stage &prefetch(const Internal::Parameter ¶m, VarOrRVar var, Expr offset = 1, var 293 src/Func.h Stage &prefetch(const T &image, VarOrRVar var, Expr offset = 1, var 295 src/Func.h return prefetch(image.parameter(), var, offset, strategy); var 1117 src/Func.h EXPORT Func &serial(VarOrRVar var); var 1120 src/Func.h EXPORT Func ¶llel(VarOrRVar var); var 1128 src/Func.h EXPORT Func ¶llel(VarOrRVar var, Expr task_size, TailStrategy tail = TailStrategy::Auto); var 1136 src/Func.h EXPORT Func &vectorize(VarOrRVar var); var 1142 src/Func.h EXPORT Func &unroll(VarOrRVar var); var 1149 src/Func.h EXPORT Func &vectorize(VarOrRVar var, Expr factor, TailStrategy tail = TailStrategy::Auto); var 1155 src/Func.h EXPORT Func &unroll(VarOrRVar var, Expr factor, TailStrategy tail = TailStrategy::Auto); var 1165 src/Func.h EXPORT Func &bound(Var var, Expr min, Expr extent); var 1175 src/Func.h EXPORT Func &align_bounds(Var var, Expr modulus, Expr remainder = 0); var 1183 src/Func.h EXPORT Func &bound_extent(Var var, Expr extent); var 1578 src/Func.h EXPORT Func &prefetch(const Func &f, VarOrRVar var, Expr offset = 1, var 1580 src/Func.h EXPORT Func &prefetch(const Internal::Parameter ¶m, VarOrRVar var, Expr offset = 1, var 1583 src/Func.h Func &prefetch(const T &image, VarOrRVar var, Expr offset = 1, var 1585 src/Func.h return prefetch(image.parameter(), var, offset, strategy); var 1728 src/Func.h EXPORT Func &compute_at(Func f, Var var); var 1733 src/Func.h EXPORT Func &compute_at(Func f, RVar var); var 1876 src/Func.h EXPORT Func &store_at(Func f, Var var); var 1881 src/Func.h EXPORT Func &store_at(Func f, RVar var); var 149 src/Function.cpp const Variable *var = op->args[i].as<Variable>(); var 151 src/Function.cpp user_assert(var && var->name == pure_args[i]) var 161 src/Function.cpp void visit(const Variable *var) { var 163 src/Function.cpp if (var->param.defined()) return; var 166 src/Function.cpp if (defined_internally.contains(var->name)) return; var 170 src/Function.cpp if (var->name == pure_args[i]) return; var 174 src/Function.cpp if (var->reduction_domain.defined()) { var 176 src/Function.cpp reduction_domain = var->reduction_domain; var 178 src/Function.cpp } else if (var->reduction_domain.same_as(reduction_domain)) { var 188 src/Function.cpp if (rv.var == var->name) { var 194 src/Function.cpp user_error << "Undefined variable \"" << var->name << "\" in definition of Func \"" << name << "\"\n"; var 540 src/Function.cpp if (const Variable *var = args[i].as<Variable>()) { var 543 src/Function.cpp if (!var->param.defined() && var 544 src/Function.cpp !var->reduction_domain.defined() && var 545 src/Function.cpp var->name == pure_var->name) { var 546 src/Function.cpp pure_args[i] = var->name; var 596 src/Function.cpp string rvar = check.reduction_domain.domain()[i].var; var 639 src/Function.cpp const string &v = rvar.var; var 742 src/Function.cpp const Variable *var = pure_def_args[i].as<Variable>(); var 743 src/Function.cpp internal_assert(var); var 744 src/Function.cpp arg_names[i] = var->name; var 205 src/FuseGPUThreadLoops.cpp Expr var = Variable::make(Int(32), "." + thread_names[dim]); var 206 src/FuseGPUThreadLoops.cpp body = substitute(op->name, var + op->min, body); var 211 src/FuseGPUThreadLoops.cpp Expr cond = var < op->extent; var 940 src/HexagonOptimize.cpp const Variable *var = x.as<Variable>(); var 941 src/HexagonOptimize.cpp if (var && vars.contains(var->name + ".deinterleaved")) { var 969 src/HexagonOptimize.cpp const Variable *var = x.as<Variable>(); var 970 src/HexagonOptimize.cpp if (var && vars.contains(var->name + ".weak_deinterleaved")) { var 1000 src/HexagonOptimize.cpp if (const Variable *var = x.as<Variable>()) { var 1001 src/HexagonOptimize.cpp if (vars.contains(var->name + ".deinterleaved")) { var 1002 src/HexagonOptimize.cpp return Variable::make(var->type, var->name + ".deinterleaved"); var 1003 src/HexagonOptimize.cpp } else if (vars.contains(var->name + ".weak_deinterleaved")) { var 1004 src/HexagonOptimize.cpp return Variable::make(var->type, var->name + ".weak_deinterleaved"); var 1095 src/HexagonOptimize.cpp static bool uses_var(Stmt s, const string &var) { var 1096 src/HexagonOptimize.cpp return stmt_uses_var(s, var); var 1098 src/HexagonOptimize.cpp static bool uses_var(Expr e, const string &var) { var 1099 src/HexagonOptimize.cpp return expr_uses_var(e, var); var 163 src/IRPrinter.cpp stream << " " << op.xs[i].var << " -> " << op.xs[i].expr << "\n"; var 164 src/IRPrinter.cpp stream << " " << op.ys[i].var << " -> " << op.ys[i].expr << "\n"; var 42 src/Inline.cpp << d.var << " of function " var 46 src/Inline.cpp << d.var << " of function " var 50 src/Inline.cpp << d.var << " of function " var 79 src/Inline.cpp << s.bounds()[i].var << " of function " var 85 src/Inline.cpp << s.bounds()[i].var << " of function " var 657 src/Introspection.cpp const LocalVariable &var = func->variables[j]; var 658 src/Introspection.cpp debug(5) << "Var " << var.name << " is at offset " << var.stack_offset << "\n"; var 661 src/Introspection.cpp if (var.live_ranges.size()) { var 663 src/Introspection.cpp for (size_t i = 0; i < var.live_ranges.size(); i++) { var 664 src/Introspection.cpp if (pc >= var.live_ranges[i].pc_begin && var 665 src/Introspection.cpp pc < var.live_ranges[i].pc_end) { var 676 src/Introspection.cpp TypeInfo *type = var.type; var 682 src/Introspection.cpp if (offset == var.stack_offset && var.type) { var 683 src/Introspection.cpp debug(5) << "Considering match: " << var.type->name << ", " << var.name << "\n"; var 686 src/Introspection.cpp if (offset == var.stack_offset && var 690 src/Introspection.cpp return var.name; var 696 src/Introspection.cpp int64_t pos_bytes = offset - var.stack_offset; var 701 src/Introspection.cpp oss << var.name << '[' << (pos_bytes / elem_type->size) << ']'; var 1113 src/Introspection.cpp LocalVariable var; var 1120 src/Introspection.cpp var.def_loc = location; var 1133 src/Introspection.cpp var.stack_offset = no_location; var 1445 src/Introspection.cpp gvar.name = var.name = std::string((const char *)payload); var 1453 src/Introspection.cpp var.stack_offset = (int)(get_sleb128(payload+1)); var 1461 src/Introspection.cpp var.stack_offset = no_location; var 1464 src/Introspection.cpp var.type_def_loc = val; var 1468 src/Introspection.cpp var.origin_loc = val; var 1475 src/Introspection.cpp var.name = std::string((const char *)payload); var 1477 src/Introspection.cpp gvar.name = type_stack.back().first.name + "::" + var.name; var 1479 src/Introspection.cpp gvar.name = var.name; var 1483 src/Introspection.cpp var.stack_offset = val; var 1485 src/Introspection.cpp var.stack_offset = (int)(get_uleb128(payload+1)); var 1488 src/Introspection.cpp var.type_def_loc = val; var 1544 src/Introspection.cpp var.live_ranges = live_range_stack.back().first; var 1546 src/Introspection.cpp func_stack.back().first.variables.push_back(var); var 1552 src/Introspection.cpp if (var.stack_offset == no_location) { var 1556 src/Introspection.cpp type_stack.back().first.members.push_back(var); var 1641 src/Introspection.cpp GlobalVariable &var = global_variables[i]; var 1642 src/Introspection.cpp debug(5) << "var " << var.name << " is at " << var.def_loc << "\n"; var 1643 src/Introspection.cpp if (var.spec_loc || var.name.empty()) { var 1647 src/Introspection.cpp var_map[var.def_loc] = &var; var 1651 src/Introspection.cpp GlobalVariable &var = global_variables[i]; var 1652 src/Introspection.cpp if (var.name.empty() && var.spec_loc) { var 1653 src/Introspection.cpp GlobalVariable *spec = var_map[var.spec_loc]; var 1655 src/Introspection.cpp var.name = spec->name; var 1656 src/Introspection.cpp var.type = spec->type; var 1657 src/Introspection.cpp var.type_def_loc = spec->type_def_loc; var 1659 src/Introspection.cpp debug(5) << "Global variable with bad spec loc: " << var.spec_loc << "\n"; var 2182 src/Introspection.cpp std::string get_variable_name(const void *var, const std::string &expected_type) { var 2185 src/Introspection.cpp std::string name = debug_sections->get_stack_variable_name(var, expected_type); var 2188 src/Introspection.cpp name = debug_sections->get_heap_member_name(var, expected_type); var 2192 src/Introspection.cpp name = debug_sections->get_global_variable_name(var, expected_type); var 2280 src/Introspection.cpp std::string get_variable_name(const void *var, const std::string &expected_type) { var 69 src/Introspection.h static bool check_introspection(const void *var, const std::string &type, var 74 src/Introspection.h std::string name = Introspection::get_variable_name(var, type); var 483 src/LoopCarry.cpp LoopCarryOverLoop(const string &var, const Scope<int> &s, int max_carried_values) var 485 src/LoopCarry.cpp linear.push(var, 1); var 75 src/Memoization.cpp void visit(const Variable *var) { var 76 src/Memoization.cpp if (var->param.defined()) { var 77 src/Memoization.cpp record(var->param); var 79 src/Memoization.cpp IRGraphVisitor::visit(var); var 486 src/Memoization.cpp const Variable *var = call->args[2].as<Variable>(); var 487 src/Memoization.cpp if (var && get_realization_name(var->name) == innermost_realization_name) { var 14 src/Monotonic.cpp const string &var; var 55 src/Monotonic.cpp if (op->name == var) { var 388 src/Monotonic.cpp MonotonicVisitor(const std::string &v) : var(v), result(Monotonic::Unknown) {} var 391 src/Monotonic.cpp Monotonic is_monotonic(Expr e, const std::string &var) { var 393 src/Monotonic.cpp MonotonicVisitor m(var); var 19 src/Monotonic.h EXPORT Monotonic is_monotonic(Expr e, const std::string &var); var 139 src/ParallelRVar.cpp bounds.push(rv.var, in); var 140 src/ParallelRVar.cpp bounds.push(renamer.get_new_name(rv.var), in); var 901 src/PartitionLoops.cpp Expr var = Variable::make(true_value.type(), var_name); var 902 src/PartitionLoops.cpp expr = mutate(Select::make(o->a, var, Select::make(o->b, var, false_value))); var 910 src/PartitionLoops.cpp Expr var = Variable::make(false_value.type(), var_name); var 911 src/PartitionLoops.cpp expr = mutate(Select::make(a->a, Select::make(a->b, true_value, var), var)); var 207 src/Prefetch.cpp if (!ends_with(op->name, "." + p.var) || (seen.find(p.name) != seen.end())) { var 42 src/RDom.cpp return _var().var; var 135 src/RDom.cpp rv.var = name + "$" + rvar_uniquifier; var 149 src/RDom.cpp ReductionVariable var = { var 154 src/RDom.cpp vars.push_back(var); var 165 src/RDom.cpp ReductionVariable var = { var 170 src/RDom.cpp vars.push_back(var); var 17 src/Reduction.h std::string var; var 24 src/Reduction.h return a.var < b.var; var 18 src/RemoveDeadAllocations.cpp const Variable *var = op->args[i].as<Variable>(); var 19 src/RemoveDeadAllocations.cpp if (var && ends_with(var->name, ".buffer")) { var 20 src/RemoveDeadAllocations.cpp std::string func = var->name.substr(0, var->name.find_first_of('.')); var 129 src/Schedule.h EXPORT VarOrRVar var() const; var 199 src/Schedule.h std::string var; var 216 src/Schedule.h std::string var; var 223 src/Schedule.h std::string var; var 231 src/Schedule.h std::string var; var 87 src/ScheduleFunctions.cpp dim_extent_alignment[i.var] = i.extent; var 90 src/ScheduleFunctions.cpp dim_extent_alignment[i.var] = i.modulus; var 95 src/ScheduleFunctions.cpp dim_extent_alignment[i.var] = i.extent; var 122 src/ScheduleFunctions.cpp Container c = {Container::For, i, prefix + dim.var, Expr()}; var 239 src/ScheduleFunctions.cpp string var = prefix + i; var 240 src/ScheduleFunctions.cpp Expr max = Variable::make(Int(32), var + ".max"); var 241 src/ScheduleFunctions.cpp Expr min = Variable::make(Int(32), var + ".min"); // Inject instance name here? (compute instance names during lowering) var 242 src/ScheduleFunctions.cpp stmt = LetStmt::make(var + ".loop_extent", var 245 src/ScheduleFunctions.cpp stmt = LetStmt::make(var + ".loop_min", min, stmt); var 246 src/ScheduleFunctions.cpp stmt = LetStmt::make(var + ".loop_max", max, stmt); var 252 src/ScheduleFunctions.cpp string p = prefix + rv.var; var 430 src/ScheduleFunctions.cpp string var = stage_name + arg; var 431 src/ScheduleFunctions.cpp Expr min = Variable::make(Int(32), var + ".min"); var 432 src/ScheduleFunctions.cpp Expr max = Variable::make(Int(32), var + ".max"); var 548 src/ScheduleFunctions.cpp string prefix = func.name() + ".s" + std::to_string(stage) + "." + b.var; var 566 src/ScheduleFunctions.cpp {b.var, func.name(), min_val, max_val, min_var, max_var}, var 804 src/ScheduleFunctions.cpp string var = f->name.substr(last_dot + 1); var 807 src/ScheduleFunctions.cpp internal_assert(!var.empty()); var 811 src/ScheduleFunctions.cpp internal_assert(it != env.end()) << "Unable to find Function " << func << " in env (Var = " << var << ")\n"; var 812 src/ScheduleFunctions.cpp loop_level = LoopLevel(it->second, Var(var)); var 872 src/ScheduleFunctions.cpp string store_var_name = store_at.var().name(); var 882 src/ScheduleFunctions.cpp string compute_var_name = compute_at.var().name(); var 3932 src/Simplify.cpp const Variable *var = eq ? eq->a.as<Variable>() : next.as<Variable>(); var 3934 src/Simplify.cpp if (eq && var) { var 3936 src/Simplify.cpp then_case = substitute(var->name, eq->b, then_case); var 3939 src/Simplify.cpp else_case = substitute(var->name, !eq->b, else_case); var 3941 src/Simplify.cpp } else if (var) { var 3943 src/Simplify.cpp then_case = substitute(var->name, const_true(), then_case); var 3946 src/Simplify.cpp else_case = substitute(var->name, const_false(), else_case); var 4569 src/Simplify.cpp const Variable *var = new_value.as<Variable>(); var 4598 src/Simplify.cpp } else if (var) { var 4599 src/Simplify.cpp replacement = substitute(new_name, var, replacement); var 21 src/SimplifySpecializations.cpp void substitute_value_in_var(const string &var, Expr value, vector<Definition> &definitions) { var 24 src/SimplifySpecializations.cpp def_arg = simplify(substitute(var, value, def_arg)); var 27 src/SimplifySpecializations.cpp def_val = simplify(substitute(var, value, def_val)); var 128 src/SimplifySpecializations.cpp const Variable *var = eq ? eq->a.as<Variable>() : c.as<Variable>(); var 132 src/SimplifySpecializations.cpp if (var && eq) { var 134 src/SimplifySpecializations.cpp substitute_value_in_var(var->name, eq->b, s_result); var 138 src/SimplifySpecializations.cpp substitute_value_in_var(var->name, !eq->b, result); var 140 src/SimplifySpecializations.cpp } else if (var) { var 142 src/SimplifySpecializations.cpp substitute_value_in_var(var->name, const_true(), s_result); var 145 src/SimplifySpecializations.cpp substitute_value_in_var(var->name, const_false(), result); var 29 src/SkipStages.cpp const Variable *var = op->args[i].as<Variable>(); var 30 src/SkipStages.cpp if (var && var 31 src/SkipStages.cpp starts_with(var->name, func + ".") && var 32 src/SkipStages.cpp ends_with(var->name, ".buffer")) { var 253 src/SkipStages.cpp const Variable *var = op->args[i].as<Variable>(); var 254 src/SkipStages.cpp if (var && var 255 src/SkipStages.cpp starts_with(var->name, buffer + ".") && var 256 src/SkipStages.cpp ends_with(var->name, ".buffer")) { var 25 src/SlidingWindow.cpp if (op->name == var) result = true; var 32 src/SlidingWindow.cpp if (op->name != var) { var 39 src/SlidingWindow.cpp string var; var 56 src/SlidingWindow.cpp void visit(const Variable *var) { var 57 src/SlidingWindow.cpp if (scope.contains(var->name)) { var 58 src/SlidingWindow.cpp expr = scope.get(var->name); var 59 src/SlidingWindow.cpp debug(3) << "Fully expanded " << var->name << " -> " << expr << "\n"; var 61 src/SlidingWindow.cpp expr = var; var 95 src/SlidingWindow.cpp const Variable *var = def.args()[dim_idx].as<Variable>(); var 96 src/SlidingWindow.cpp if ((!var) || (var->name != dim)) { var 131 src/SlidingWindow.cpp string var = prefix + func_args[i]; var 132 src/SlidingWindow.cpp internal_assert(scope.contains(var + ".min") && scope.contains(var + ".max")); var 133 src/SlidingWindow.cpp Expr min_req = scope.get(var + ".min"); var 134 src/SlidingWindow.cpp Expr max_req = scope.get(var + ".max"); var 266 src/SlidingWindow.cpp Expr var = Variable::make(Int(32), n); var 267 src/SlidingWindow.cpp stmt = LetStmt::make(n, min(var, b[dim_idx].min), stmt); var 270 src/SlidingWindow.cpp Expr var = Variable::make(Int(32), n); var 271 src/SlidingWindow.cpp stmt = LetStmt::make(n, max(var, b[dim_idx].max), stmt); var 32 src/Solve.cpp failed(false), var(v), uses_var(false), external_scope(es) {} var 63 src/Solve.cpp string var; var 699 src/Solve.cpp if (op->name == var) { var 734 src/Solve.cpp const string &var; var 845 src/Solve.cpp bool uses_var = expr_uses_var(op->value, var) || expr_uses_vars(op->value, scope); var 920 src/Solve.cpp SolverResult solved = solve_expression(le, var, scope); var 928 src/Solve.cpp } else if (v && v->name == var) { var 977 src/Solve.cpp SolverResult solved = solve_expression(ge, var, scope); var 985 src/Solve.cpp } else if (v && v->name == var) { var 1067 src/Solve.cpp SolveForInterval(const string &v, bool o) : var(v), outer(o) {} var 1326 src/Solve.cpp Interval solve_for_inner_interval(Expr c, const std::string &var) { var 1327 src/Solve.cpp SolveForInterval s(var, false); var 1340 src/Solve.cpp Interval solve_for_outer_interval(Expr c, const std::string &var) { var 1341 src/Solve.cpp SolveForInterval s(var, true); var 194 src/StmtToHtml.cpp stream << var(op->name); var 260 src/StmtToHtml.cpp stream << var(op->name) << "["; var 295 src/StmtToHtml.cpp stream << var(op->name); var 310 src/StmtToHtml.cpp stream << var(op->name); var 334 src/StmtToHtml.cpp stream << var(op->name); var 383 src/StmtToHtml.cpp stream << var(op->name) << "["; var 400 src/StmtToHtml.cpp stream << var(op->name) << "("; var 417 src/StmtToHtml.cpp stream << var(op->name) << "["; var 455 src/StmtToHtml.cpp stream << var(op->name); var 464 src/StmtToHtml.cpp stream << var(op->name); var 489 src/StmtToHtml.cpp stream << var(op->name); var 615 src/StmtToHtml.cpp stream << var(op.args[i].name); var 631 src/StmtToHtml.cpp stream << keyword("buffer ") << var(op.name()); var 121 src/StorageFlattening.cpp if (args[j] == storage_dims[i].var) { var 254 src/StorageFlattening.cpp if (args[j] == storage_dims[i].var) { var 172 src/StorageFolding.cpp {func.name(), storage_dim.var, op->name}, var 185 src/StorageFolding.cpp {func.name(), storage_dim.var, explicit_factor, op->name, extent}, var 278 src/StorageFolding.cpp void visit(const Variable *var) { var 279 src/StorageFolding.cpp if (var->type.is_handle() && var 280 src/StorageFolding.cpp var->name == func + ".buffer") { var 306 src/StorageFolding.cpp << "Dimension " << i.var << " of " << op->name var 142 src/Substitute.cpp string var; var 148 src/Substitute.cpp if (op->name == var) { var 157 src/Substitute.cpp GraphSubstitute(const string &var, const Expr &value) : var(var), value(value) {} var 179 src/TrimNoOps.cpp string var; var 197 src/TrimNoOps.cpp } else if (!expr_uses_var(test, loop.var)) { var 201 src/TrimNoOps.cpp expr_uses_var(test, loop.var)) { var 206 src/TrimNoOps.cpp test = common_subexpression_elimination(Let::make(loop.var, loop.i.min, test)); var 209 src/TrimNoOps.cpp expr_uses_var(test, loop.var)) { var 215 src/TrimNoOps.cpp test = common_subexpression_elimination(Let::make(loop.var, loop.i.min, test) || var 216 src/TrimNoOps.cpp Let::make(loop.var, loop.i.max, test)); var 221 src/TrimNoOps.cpp SolverResult solved = solve_expression(test, loop.var); var 225 src/TrimNoOps.cpp s.push(loop.var, loop.i); var 29 src/VectorizeLoops.cpp string var; var 37 src/VectorizeLoops.cpp v->name == var) { var 38 src/VectorizeLoops.cpp expr = Variable::make(op->type, var + ".lane." + std::to_string(op->indices[0])); var 44 src/VectorizeLoops.cpp ReplaceShuffleVectors(const string &v) : var(v) {} var 143 src/VectorizeLoops.cpp } else if (const Variable *var = e.as<Variable>()) { var 144 src/VectorizeLoops.cpp return {Variable::make(var->type.element_of(), var->name + ".min_lane"), var 145 src/VectorizeLoops.cpp Variable::make(var->type.element_of(), var->name + ".max_lane")}; var 185 src/VectorizeLoops.cpp Expr var; var 194 src/VectorizeLoops.cpp return index * lanes + var; var 212 src/VectorizeLoops.cpp var(Variable::make(Int(32), v)), alloc(a), lanes(l) {} var 236 src/VectorizeLoops.cpp string var; var 283 src/VectorizeLoops.cpp } else if (expr_uses_var(op->index, var)) { var 316 src/VectorizeLoops.cpp } else if (expr_uses_var(op->index, var)) { var 342 src/VectorizeLoops.cpp var(v), vector_predicate(vpred), in_hexagon(in_hexagon), target(t), var 356 src/VectorizeLoops.cpp string var; var 402 src/VectorizeLoops.cpp if (op->name == var) { var 679 src/VectorizeLoops.cpp debug(3) << "Vectorizing over " << var << "\n" var 694 src/VectorizeLoops.cpp PredicateLoadStore p(var, cond, in_hexagon, target); var 699 src/VectorizeLoops.cpp PredicateLoadStore p(var, !cond, in_hexagon, target); var 704 src/VectorizeLoops.cpp debug(4) << "IfThenElse should vectorize predicate over var " << var << "? " << vectorize_predicate << "; cond: " << cond << "\n"; var 769 src/VectorizeLoops.cpp << " inside vector for loop over " << var << "." var 781 src/VectorizeLoops.cpp Expr var = Variable::make(Int(32), op->name); var 782 src/VectorizeLoops.cpp Stmt body = substitute(op->name, var + op->min, op->body); var 794 src/VectorizeLoops.cpp Expr var = Variable::make(Int(32), op->name); var 795 src/VectorizeLoops.cpp body = IfThenElse::make(likely(var < op->min + op->extent), body); var 854 src/VectorizeLoops.cpp body = substitute(v, Variable::make(Int(32), var), body); var 871 src/VectorizeLoops.cpp s = For::make(var, r->base, r->lanes, ForType::Serial, DeviceAPI::None, s); var 894 src/VectorizeLoops.cpp e = substitute(var, i, e); var 911 src/VectorizeLoops.cpp var(v), replacement(r), target(t), in_hexagon(in_hexagon) { var 823 src/runtime/HalideRuntime.h extern int halide_error_constraint_violated(void *user_context, const char *var, int val, var 97 src/runtime/errors.cpp WEAK int halide_error_constraint_violated(void *user_context, const char *var, int val, var 100 src/runtime/errors.cpp << "Constraint violated: " << var << " (" << val var 25 src/runtime/gpu_device_selection.cpp const char *var = getenv("HL_GPU_DEVICE"); var 26 src/runtime/gpu_device_selection.cpp if (var) { var 27 src/runtime/gpu_device_selection.cpp halide_gpu_device = atoi(var); var 42 test/correctness/fuzz_simplify.cpp int var = rng()%fuzz_var_count + 1; var 43 test/correctness/fuzz_simplify.cpp if (!imm_only && var < fuzz_var_count) { var 6 test/correctness/introspection.cpp void check(const void *var, const std::string &type, var 11 test/correctness/introspection.cpp std::string name = Halide::Internal::Introspection::get_variable_name(var, type);