1#ifndef FREE_TENSOR_FOR_PROPERTY_H
2#define FREE_TENSOR_FOR_PROPERTY_H
25template <
class Tbegins,
class Tends>
27 Tbegins &&begins, Tends &&ends,
32 r->begins_ = std::forward<Tbegins>(begins);
33 r->ends_ = std::forward<Tends>(ends);
34 r->syncFlush_ = syncFlush;
52 ret->parallel_ = parallel;
67 ret->noDeps_ = noDeps;
72 ret->preferLibs_ = preferLibs;
80 std::vector<Expr> begins, ends;
81 begins.reserve(r->begins_.size());
82 ends.reserve(r->ends_.size());
83 for (
auto &&item : r->begins_) {
86 for (
auto &&item : r->ends_) {
90 std::move(ends), r->syncFlush_);
95 p->parallel_ = _p->parallel_;
96 p->unroll_ = _p->unroll_;
97 p->vectorize_ = _p->vectorize_;
98 p->reductions_ = _p->reductions_;
99 p->noDeps_ = _p->noDeps_;
100 p->preferLibs_ = _p->preferLibs_;
Definition: sub_tree.h:50
static Ref make()
Definition: ref.h:105
Definition: sub_tree.h:305
Definition: allocator.h:9
Ref< ReductionItem > makeReductionItem(ReduceOp op, const std::string &var, Tbegins &&begins, Tends &&ends, bool syncFlush)
Definition: for_property.h:26
Stmt unroll(const Stmt &ast, const ID &loop, bool immediate)
Definition: unroll.cc:64
std::variant< SerialScope, OpenMPScope, CUDAStreamScope, CUDAScope > ParallelScope
Definition: parallel_scope.h:73
Expr deepCopy(const Expr &op)
Definition: ast.cc:364
ReduceOp
Definition: reduce_op.h:30
Stmt vectorize(const Stmt &ast, const ID &loop)
Definition: vectorize.cc:19
Definition: sub_tree.h:20
Definition: for_property.h:38
Ref< ForProperty > withNoDeps(const std::vector< std::string > &noDeps)
Definition: for_property.h:65
ForProperty()
Definition: for_property.h:47
std::vector< std::string > noDeps_
Definition: for_property.h:42
Ref< ForProperty > withParallel(const ParallelScope ¶llel)
Definition: for_property.h:50
bool unroll_
Definition: for_property.h:40
Ref< ForProperty > withPreferLibs(bool preferLibs=true)
Definition: for_property.h:70
Ref< ForProperty > withVectorize(bool vectorize=true)
Definition: for_property.h:60
bool preferLibs_
Definition: for_property.h:44
ParallelScope parallel_
Definition: for_property.h:39
Ref< ForProperty > withUnroll(bool unroll=true)
Definition: for_property.h:55
SubTreeList< ReductionItem > reductions_
Definition: for_property.h:41
void compHash() override
Definition: for_property.cc:8
bool vectorize_
Definition: for_property.h:40
Definition: for_property.h:11
SubTreeList< ExprNode > begins_
Definition: for_property.h:14
ReduceOp op_
Definition: for_property.h:12
void compHash() override
Definition: for_property.cc:6
SubTreeList< ExprNode > ends_
Definition: for_property.h:15
bool syncFlush_
[begins_, ends_)
Definition: for_property.h:16
std::string var_
Definition: for_property.h:13