docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
collapse_to_depth.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace sdfg {
7namespace transformations {
8
24 size_t target_loops_;
25 bool applied_ = false;
26
27 structured_control_flow::Map* outer_loop_ = nullptr;
28 structured_control_flow::Map* inner_loop_ = nullptr;
29
30public:
36 CollapseToDepth(structured_control_flow::Map& loop, size_t target_loops);
37
38 virtual std::string name() const override;
39
40 virtual bool
42
43 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
44
45 virtual void to_json(nlohmann::json& j) const override;
46
48
53
58};
59
60} // namespace transformations
61} // namespace sdfg
Definition analysis.h:53
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
structured_control_flow::Map * inner_loop()
Get the inner collapsed loop (nullptr when target_loops == 1).
CollapseToDepth(structured_control_flow::Map &loop, size_t target_loops)
Construct a collapse to depth transformation.
structured_control_flow::Map * outer_loop()
Get the outer collapsed loop (or the single loop when target_loops == 1).
virtual bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
virtual std::string name() const override
Get the name of this transformation.
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
static CollapseToDepth from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
virtual void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
Base class for all SDFG transformations.
Definition transformation.h:25
Definition function_builder.h:10
Definition loop_parallelization.h:8
Definition analysis.h:7