Records transformation history for replay and analysis.
More...
#include <sdfg/transformations/recorder.h>
Records transformation history for replay and analysis.
The Recorder class tracks all transformations applied to an SDFG and serializes them to JSON. This enables:
- Replay of transformation sequences on different SDFGs
- Analysis of transformation impact
- Debugging and validation of transformation sequences
◆ Recorder()
| sdfg::transformations::Recorder::Recorder |
( |
| ) |
|
Construct an empty recorder.
◆ ~Recorder()
| virtual sdfg::transformations::Recorder::~Recorder |
( |
| ) |
|
|
virtualdefault |
◆ apply()
template<typename T, typename... Args>
requires transformation_concept<T>
Construct a transformation from args and record it.
Convenience wrapper around record for call sites that hold the transformation's constructor arguments rather than a built object.
- Template Parameters
-
| T | The transformation type (must satisfy transformation_concept) |
| Args | Argument types for transformation constructor |
- Exceptions
-
◆ enrich()
Enrich a transformation descriptor after to_json and before it is recorded and applied.
The base implementation annotates each loop anchor of the descriptor's subgraph with loop_info.
◆ get_history()
| nlohmann::json sdfg::transformations::Recorder::get_history |
( |
| ) |
const |
|
inline |
Get the transformation history.
- Returns
- JSON array of transformation descriptions
◆ history()
| nlohmann::json & sdfg::transformations::Recorder::history |
( |
| ) |
|
|
inline |
Get mutable reference to transformation history.
- Returns
- JSON array of transformation descriptions
◆ record()
Apply an already-constructed transformation and record it.
The single implementation of the record-and-apply flow: check applicability, serialize, run the virtual enrich hook, append to the history and apply. The templated apply overload is a thin constructor-forwarding wrapper around this.
- Returns
- true if applied, false if skipped (not applicable).
- Exceptions
-
◆ save()
| void sdfg::transformations::Recorder::save |
( |
std::filesystem::path | path | ) |
const |
Save recorded transformation history to a file.
- Parameters
-
| path | The file path to save to |
The documentation for this class was generated from the following file: