docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
loop_tiling.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace sdfg {
6namespace transformations {
7
19class LoopTiling : public Transformation {
20protected:
22 size_t tile_size_;
23 bool simplify_bounds_ = true;
24 bool applied_ = false;
25
28
38 analysis::AnalysisManager& analysis_manager,
39 const std::vector<size_t>& tile_sizes
40 ) const;
41
62 size_t tile_size,
63 bool simplify_bounds = true
64 );
65
66public:
74 LoopTiling(structured_control_flow::StructuredLoop& loop, size_t tile_size, bool simplify_bounds = true);
75
80 virtual std::string name() const override;
81
88 virtual bool
90
96 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
97
102 virtual void to_json(nlohmann::json& j) const override;
103
111
114};
115
116} // namespace transformations
117} // 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
Base class for structured loop constructs.
Definition structured_loop.h:244
bool reduction_buffers_supported(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager, const std::vector< size_t > &tile_sizes) const
Check reduction footprints using symbolic tile domains without changing the graph.
structured_control_flow::StructuredLoop * outer_loop()
structured_control_flow::StructuredLoop & loop_
Definition loop_tiling.h:21
virtual std::string name() const override
Get the name of this transformation.
LoopTiling(structured_control_flow::StructuredLoop &loop, size_t tile_size, bool simplify_bounds=true)
Construct a loop tiling transformation.
bool simplify_bounds_
Definition loop_tiling.h:23
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply the loop tiling transformation.
virtual bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be applied.
bool applied_
Definition loop_tiling.h:24
structured_control_flow::StructuredLoop * inner_loop_
Definition loop_tiling.h:26
virtual void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
structured_control_flow::StructuredLoop * inner_loop()
size_t tile_size_
Definition loop_tiling.h:22
structured_control_flow::StructuredLoop * outer_loop_
Definition loop_tiling.h:27
static LoopTiling from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
Deserialize a loop tiling transformation from JSON.
static structured_control_flow::StructuredLoop & tile_loop(builder::StructuredSDFGBuilder &builder, structured_control_flow::StructuredLoop &loop, size_t tile_size, bool simplify_bounds=true)
Tile a single loop into an outer tile loop and an inner element loop.
Base class for all SDFG transformations.
Definition transformation.h:25
Definition function_builder.h:10
Definition loop_parallelization.h:8
Definition analysis.h:7