|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Loop splitting transformation at a symbolic boundary. More...
#include <sdfg/transformations/loop_split.h>
Public Member Functions | |
| LoopSplit (structured_control_flow::StructuredLoop &loop, const symbolic::Expression &split_point) | |
| Construct a loop split 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 LoopSplit | from_json (builder::StructuredSDFGBuilder &builder, const nlohmann::json &j) |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::transformations::Transformation | |
| PassReportConsumer * | report_ = nullptr |
Loop splitting transformation at a symbolic boundary.
Splits a single loop into two consecutive loops at the same nesting level, partitioning the iteration space at a symbolic split point.
Given: for (i = init; i < bound; i = update) { body }
Produces: for (i = init; i < split_point; i = update) { body_copy } for (i = split_point; i < bound; i = update) { body }
The split point is an arbitrary symbolic expression (e.g., an enclosing loop's induction variable). The transformation is always semantically correct — it is an identity on the iteration space: [init, bound) = [init, split_point) ∪ [split_point, bound)
If split_point <= init, the first loop is empty (zero iterations). If split_point >= bound, the second loop is empty (zero iterations).
Primary use case: enabling LoopDistribute on triangular loop nests (e.g., splitting k in [0, i) at i_tile0 for blocked LU factorization).
| sdfg::transformations::LoopSplit::LoopSplit | ( | structured_control_flow::StructuredLoop & | loop, |
| const symbolic::Expression & | split_point ) |
Construct a loop split transformation.
| loop | The loop to split |
| split_point | Symbolic expression at which to split the iteration space |
|
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.