|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Splits a fused multiply-add into a multiplication and an addition. More...
#include <sdfg/fp_math/transformations/unfuse_fma.h>
Public Member Functions | |
| UnfuseFMA (data_flow::Tasklet &fma) | |
| 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. | |
| data_flow::Tasklet * | multiply () const |
| The fp_mul tasklet created by apply(), or nullptr before. | |
| data_flow::Tasklet * | add () const |
| The fp_add tasklet created by apply(), or nullptr before. | |
| const std::string & | product () const |
| The transient scalar holding the product, empty before apply(). | |
| 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 UnfuseFMA | from_json (builder::StructuredSDFGBuilder &builder, const nlohmann::json &j) |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::transformations::Transformation | |
| PassReportConsumer * | report_ = nullptr |
Splits a fused multiply-add into a multiplication and an addition.
Replaces an fp_fma tasklet d = fma(a, b, c) by t = a * b and d = t + c, where t is a new transient scalar of the result's precision. This is the inverse of FuseFMA and reintroduces the intermediate rounding of the product, e.g. so that a later transformation can hand t on to another computation.
|
explicit |
| data_flow::Tasklet * sdfg::fp_math::UnfuseFMA::add | ( | ) | const |
The fp_add tasklet created by apply(), or nullptr before.
|
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 |
| data_flow::Tasklet * sdfg::fp_math::UnfuseFMA::multiply | ( | ) | const |
The fp_mul tasklet created by apply(), or nullptr before.
|
overridevirtual |
Get the name of this transformation.
Implements sdfg::transformations::Transformation.
| const std::string & sdfg::fp_math::UnfuseFMA::product | ( | ) | const |
The transient scalar holding the product, empty before apply().
|
overridevirtual |
Serialize this transformation to JSON.
| j | JSON object to populate with transformation description |
| std::logic_error | if not implemented |
Implements sdfg::transformations::Transformation.