|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Map collapse transformation. More...
#include <sdfg/transformations/map_collapse.h>
Public Member Functions | |
| MapCollapse (structured_control_flow::Map &loop, size_t count) | |
| Construct a map collapse 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 applied. | |
| virtual void | apply (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override |
| Apply the map collapse transformation. | |
| virtual void | to_json (nlohmann::json &j) const override |
| Serialize this transformation to JSON. | |
| structured_control_flow::Map * | collapsed_loop () |
| Get the resulting collapsed map after the transformation has been applied. | |
| 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 MapCollapse | from_json (builder::StructuredSDFGBuilder &builder, const nlohmann::json &j) |
| Deserialize a map collapse transformation from JSON. | |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::transformations::Transformation | |
| PassReportConsumer * | report_ = nullptr |
Map collapse transformation.
This transformation collapses tightly-nested maps into a single flat map, increasing the iteration space and exposing more parallelism.
Two modes are supported:
| sdfg::transformations::MapCollapse::MapCollapse | ( | structured_control_flow::Map & | loop, |
| size_t | count ) |
Construct a map collapse transformation.
| loop | The outermost map of the nest to collapse |
| count | The number of maps to collapse (must be >= 2) |
|
overridevirtual |
Apply the map collapse transformation.
| builder | The SDFG builder |
| analysis_manager | The analysis manager |
Implements sdfg::transformations::Transformation.
|
overridevirtual |
Check if this transformation can be applied.
| builder | The SDFG builder |
| analysis_manager | The analysis manager |
Implements sdfg::transformations::Transformation.
| structured_control_flow::Map * sdfg::transformations::MapCollapse::collapsed_loop | ( | ) |
Get the resulting collapsed map after the transformation has been applied.
|
static |
Deserialize a map collapse transformation from JSON.
| builder | The SDFG builder |
| j | JSON description of the transformation |
|
overridevirtual |
Get the name of this transformation.
Implements sdfg::transformations::Transformation.
|
overridevirtual |
Serialize this transformation to JSON.
| j | JSON object to populate |
Implements sdfg::transformations::Transformation.