docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
loop_shift.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace sdfg {
7namespace transformations {
8
35class LoopShift : public Transformation {
38
39 std::string shifted_container_name_;
40
41public:
47
54
55 virtual std::string name() const override;
56
57 virtual bool
59
60 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
61
62 virtual void to_json(nlohmann::json& j) const override;
63
64 static LoopShift from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& j);
65
70 const std::string& shifted_container_name() const {
71 return shifted_container_name_;
72 }
73};
74
75} // namespace transformations
76} // 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
static LoopShift from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
virtual std::string name() const override
Get the name of this transformation.
LoopShift(structured_control_flow::StructuredLoop &loop, const symbolic::Expression &offset)
Construct a LoopShift transformation with a custom offset.
virtual bool can_be_applied(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Check if this transformation can be safely applied.
const std::string & shifted_container_name() const
Get the name of the container holding the shifted (original) value.
Definition loop_shift.h:70
virtual void to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
LoopShift(structured_control_flow::StructuredLoop &loop)
Construct a LoopShift transformation to shift loop to start from 0.
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
Base class for all SDFG transformations.
Definition transformation.h:25
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
Definition function_builder.h:10
Definition loop_parallelization.h:8
Definition analysis.h:7