This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,14 @@ std::pair<isl::union_map, isl::union_map> extractAccesses(
334
334
return {finder.reads , finder.writes };
335
335
}
336
336
337
+ bool isReductionUpdate (const Provide* op) {
338
+ if (const Call* call = op->values [0 ].as <Call>()) {
339
+ return call->is_intrinsic (tc2halide::kReductionUpdate );
340
+ } else {
341
+ return false ;
342
+ }
343
+ }
344
+
337
345
/*
338
346
* Take a parametric expression "f" and convert it into an expression
339
347
* on the iteration domains in "domain" by reinterpreting the parameters
@@ -488,14 +496,6 @@ std::vector<Reduction> findReductions(const Stmt& s) {
488
496
class FindReductions : public IRVisitor {
489
497
using IRVisitor::visit;
490
498
491
- bool isReductionUpdate (const Provide* op) {
492
- if (const Call* call = op->values [0 ].as <Call>()) {
493
- return call->is_intrinsic (tc2halide::kReductionUpdate );
494
- } else {
495
- return false ;
496
- }
497
- }
498
-
499
499
// Keep track of any reduction variable name for use in visit(Provide*)
500
500
void visit (const Variable* op) {
501
501
if (op->reduction_domain .defined ()) {
You can’t perform that action at this time.
0 commit comments