docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
unfuse_fma.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json_fwd.hpp>
4#include <string>
5
10
11namespace sdfg {
12namespace fp_math {
13
22private:
24
25 data_flow::Tasklet* multiply_ = nullptr;
26 data_flow::Tasklet* add_ = nullptr;
27 std::string product_;
28
29public:
31
32 virtual std::string name() const override;
33
34 virtual bool
36
37 virtual void apply(builder::StructuredSDFGBuilder& builder, analysis::AnalysisManager& analysis_manager) override;
38
39 virtual void to_json(nlohmann::json& j) const override;
40
41 static UnfuseFMA from_json(builder::StructuredSDFGBuilder& builder, const nlohmann::json& j);
42
45
48
50 const std::string& product() const;
51};
52
53} // namespace fp_math
54} // namespace sdfg
Definition analysis.h:53
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Simple computational operation in the dataflow graph.
Definition tasklet.h:348
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 to_json(nlohmann::json &j) const override
Serialize this transformation to JSON.
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().
virtual void apply(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
Apply this transformation to the SDFG.
UnfuseFMA(data_flow::Tasklet &fma)
data_flow::Tasklet * multiply() const
The fp_mul tasklet created by apply(), or nullptr before.
static UnfuseFMA from_json(builder::StructuredSDFGBuilder &builder, const nlohmann::json &j)
Base class for all SDFG transformations.
Definition transformation.h:25
Definition function_builder.h:10
Definition kernel_builder.h:18
Definition analysis.h:7
Simple computational operations in the dataflow graph.