|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Loop peeling for a perfectly nested chain of compound-condition loops. More...
#include <sdfg/transformations/loop_peeling.h>
Public Member Functions | |
| LoopPeeling (structured_control_flow::StructuredLoop &loop, bool predicate=false) | |
| Construct a loop peeling transformation. | |
| virtual std::string | name () const override |
| Get the name of this transformation. | |
| virtual bool | can_be_applied (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override |
| Check if this transformation can be safely applied. | |
| virtual void | apply (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override |
| Apply this transformation to the SDFG. | |
| virtual void | to_json (nlohmann::json &j) const override |
| Serialize this transformation to JSON. | |
| Public Member Functions inherited from sdfg::transformations::Transformation | |
| virtual | ~Transformation ()=default |
| virtual void | set_report (PassReportConsumer *report) |
| Set the report consumer for transformation feedback. | |
| virtual bool | try_apply (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) |
| Attempt to apply the transformation if possible. | |
Static Public Member Functions | |
| static LoopPeeling | from_json (builder::StructuredSDFGBuilder &builder, const nlohmann::json &j) |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::transformations::Transformation | |
| PassReportConsumer * | report_ = nullptr |
Loop peeling for a perfectly nested chain of compound-condition loops.
Targets a loop whose condition is a conjunction of a canonical (constant-trip) bound and one or more dynamic bounds, e.g. for (k = k0; k < TK + k0 && k < N; ++k), and greedily collects the perfectly nested chain of such loops beneath it. All loops in the chain are over-approximated to their constant trip counts and shifted to a 0-based induction variable, so the whole nest becomes compile-time constant and can be fully unrolled/vectorized. The dropped dynamic bounds are re-applied in one of two ways, selected by predicate:
|
explicit |
Construct a loop peeling transformation.
| loop | The outermost loop of the perfectly nested compound-condition chain. |
| predicate | If true, emit the predicated (GPU register-tiling) form; if false (default), emit the hoisted then/else form. |
|
overridevirtual |
Apply this transformation to the SDFG.
| builder | The SDFG builder |
| analysis_manager | The analysis manager (may be invalidated) |
Implements sdfg::transformations::Transformation.
|
overridevirtual |
Check if this transformation can be safely applied.
| builder | The SDFG builder |
| analysis_manager | The analysis manager providing necessary analyses |
Implements sdfg::transformations::Transformation.
|
static |
|
overridevirtual |
Get the name of this transformation.
Implements sdfg::transformations::Transformation.
|
overridevirtual |
Serialize this transformation to JSON.
| j | JSON object to populate with transformation description |
| std::logic_error | if not implemented |
Implements sdfg::transformations::Transformation.