FreeTensor
Loading...
Searching...
No Matches
swap.h
Go to the documentation of this file.
1#ifndef FREE_TENSOR_SWAP_H
2#define FREE_TENSOR_SWAP_H
3
4#include <string>
5#include <vector>
6
7#include <mutator.h>
8
9namespace freetensor {
10
11class Swap : public Mutator {
12 std::vector<ID> order_;
13 StmtSeq scope_;
14
15 public:
16 Swap(const std::vector<ID> &order) : order_(order) {}
17
18 const StmtSeq &scope() const { return scope_; }
19
20 protected:
21 Stmt visit(const StmtSeq &op) override;
22};
23
24Stmt swap(const Stmt &ast, const std::vector<ID> &order);
25
26} // namespace freetensor
27
28#endif // FREE_TENSOR_SWAP_H
Definition: mutator.h:11
Definition: swap.h:11
Stmt visit(const StmtSeq &op) override
Definition: swap.cc:16
Swap(const std::vector< ID > &order)
Definition: swap.h:16
const StmtSeq & scope() const
Definition: swap.h:18
Definition: allocator.h:9
Ref< StmtNode > Stmt
Definition: ast.h:152
Stmt swap(const Stmt &ast, const std::vector< ID > &order)
Definition: swap.cc:45