|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Simple computational operation in the dataflow graph. More...
#include <sdfg/data_flow/tasklet.h>
Public Member Functions | |
| Tasklet (const Tasklet &data_node)=delete | |
| Tasklet & | operator= (const Tasklet &)=delete |
| ElementType | type_id () const override |
| Returns the type of the element. | |
| void | validate (const Function &function) const override |
| Validate the tasklet. | |
| bool | side_effect () const override |
| Check if this node has side effects Side effect on dflow nodes is broad. | |
| TaskletCode | code () const |
| Get the operation code. | |
| bool | is_assign () const |
| Check if this is an assignment operation. | |
| bool | is_trivial (const Function &function) const |
| Check if this is a trivial (no-op) assignment. | |
| bool | is_cast (const Function &function) const |
| Check if this is a type cast. | |
| bool | is_zext (const Function &function) const |
| Check if this is a zero-extend cast. | |
| bool | is_sext (const Function &function) const |
| Check if this is a sign-extend cast. | |
| bool | is_trunc (const Function &function) const |
| Check if this is a truncate cast. | |
| bool | is_fptoui (const Function &function) const |
| Check if this is a float-to-unsigned-int cast. | |
| bool | is_fptosi (const Function &function) const |
| Check if this is a float-to-signed-int cast. | |
| bool | is_uitofp (const Function &function) const |
| Check if this is an unsigned-int-to-float cast. | |
| bool | is_sitofp (const Function &function) const |
| Check if this is a signed-int-to-float cast. | |
| bool | is_fpext (const Function &function) const |
| Check if this is a float precision extension cast. | |
| bool | is_fptrunc (const Function &function) const |
| Check if this is a float precision truncation cast. | |
| const std::string & | output () const |
| Get the output connector name (single output). | |
| virtual std::unique_ptr< DataFlowNode > | clone (size_t element_id, const graph::Vertex vertex, DataFlowGraph &parent) const override |
| Clone this tasklet for graph transformations. | |
| void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| Replace symbolic expressions in this tasklet. | |
| void | replace (const symbolic::ExpressionMapping &replacements) override |
| EdgeRemoveOption | can_remove_out_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const override |
| Is the edge in question removable, or will this make the node its an output on invalid? | |
| EdgeRemoveOption | can_remove_in_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const override |
| Public Member Functions inherited from sdfg::data_flow::CodeNode | |
| CodeNode (const CodeNode &data_node)=delete | |
| CodeNode & | operator= (const CodeNode &)=delete |
| const std::vector< std::string > & | outputs () const |
| Get output connector names (const). | |
| const std::vector< std::string > & | inputs () const |
| Get input connector names (const). | |
| std::vector< std::string > & | outputs () |
| Get output connector names (mutable). | |
| std::vector< std::string > & | inputs () |
| Get input connector names (mutable). | |
| const std::string & | output (size_t index) const |
| Get output connector name by index. | |
| const std::string & | input (size_t index) const |
| Get input connector name by index. | |
| bool | has_constant_input (size_t index) const |
| Check if an input is connected to a constant node. | |
| Public Member Functions inherited from sdfg::data_flow::DataFlowNode | |
| DataFlowNode (const DataFlowNode &data_node)=delete | |
| DataFlowNode & | operator= (const DataFlowNode &)=delete |
| graph::Vertex | vertex () const |
| Get the graph vertex for this node. | |
| const DataFlowGraph & | get_parent () const |
| Get the parent dataflow graph (const). | |
| DataFlowGraph & | get_parent () |
| Get the parent dataflow graph (mutable). | |
| virtual bool | update_edge_removed (const std::string &out_conn) |
| Public Member Functions inherited from sdfg::Element | |
| Element (size_t element_id, const DebugInfo &debug_info) | |
| virtual | ~Element ()=default |
| size_t | element_id () const |
| const DebugInfo & | debug_info () const |
| void | set_debug_info (const DebugInfo &debug_info) |
| void | add_metadata (const std::string &key, const std::string &value) |
| void | remove_metadata (const std::string &key) |
| const std::string & | metadata (const std::string &key) const |
| const std::string * | metadata_if_exists (const std::string &key) const |
| const std::unordered_map< std::string, std::string > & | metadata () const |
| std::string_view | element_type () const |
| Returns the type of the element as a human-readable string. | |
Static Public Member Functions | |
| static bool | classof (const Element &element) |
| Static Public Member Functions inherited from sdfg::data_flow::CodeNode | |
| static bool | classof (const Element &element) |
LLVM-style RTTI predicate: true if element is a CodeNode. | |
| Static Public Member Functions inherited from sdfg::data_flow::DataFlowNode | |
| static bool | classof (const Element &element) |
LLVM-style RTTI predicate: true if element is a DataFlowNode. | |
Friends | |
| class | sdfg::builder::FunctionBuilder |
| class | sdfg::builder::SDFGBuilder |
| class | sdfg::builder::StructuredSDFGBuilder |
Additional Inherited Members | |
| Static Public Attributes inherited from sdfg::data_flow::CodeNode | |
| static constexpr ElementType | TypeGroup = ElementType::Tasklet | ElementType::LibraryNode |
| Bitmask of all concrete ElementTypes that are CodeNodes. | |
| Static Public Attributes inherited from sdfg::data_flow::DataFlowNode | |
| static constexpr ElementType | TypeGroup |
| Bitmask of all concrete ElementTypes that are DataFlowNodes. | |
| Protected Member Functions inherited from sdfg::data_flow::CodeNode | |
| CodeNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs) | |
| Protected constructor for code nodes. | |
| Protected Member Functions inherited from sdfg::data_flow::DataFlowNode | |
| DataFlowNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent) | |
| Protected constructor for dataflow nodes. | |
| Protected Attributes inherited from sdfg::data_flow::CodeNode | |
| std::vector< std::string > | outputs_ |
| Names of output connectors. | |
| std::vector< std::string > | inputs_ |
| Names of input connectors. | |
| Protected Attributes inherited from sdfg::Element | |
| size_t | element_id_ |
| DebugInfo | debug_info_ |
| std::unordered_map< std::string, std::string > | metadata_ |
Simple computational operation in the dataflow graph.
Tasklets represent primitive operations like arithmetic, comparisons, and type conversions. They are lightweight code nodes with a single operation code and fixed input/output structure.
Key features:
|
delete |
|
overridevirtual |
Implements sdfg::data_flow::DataFlowNode.
|
overridevirtual |
Is the edge in question removable, or will this make the node its an output on invalid?
Currently, some nodes may require every out connector to have at least 1 connection attached
[NotRemovable] means only if the entire node can be removed, can the edge be removed [NoDependencies] means, the edge can be removed trivially, the node will work without for the remaining functions [CustomRemove] means, a call to [remove_out_edge] can have the node remove the edge itself and make necessary
Implements sdfg::data_flow::DataFlowNode.
|
inlinestatic |
|
overridevirtual |
Clone this tasklet for graph transformations.
| element_id | New element identifier |
| vertex | New graph vertex |
| parent | Parent graph for the clone |
Implements sdfg::data_flow::DataFlowNode.
| TaskletCode sdfg::data_flow::Tasklet::code | ( | ) | const |
Get the operation code.
| bool sdfg::data_flow::Tasklet::is_assign | ( | ) | const |
Check if this is an assignment operation.
| bool sdfg::data_flow::Tasklet::is_cast | ( | const Function & | function | ) | const |
Check if this is a type cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_fpext | ( | const Function & | function | ) | const |
Check if this is a float precision extension cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_fptosi | ( | const Function & | function | ) | const |
Check if this is a float-to-signed-int cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_fptoui | ( | const Function & | function | ) | const |
Check if this is a float-to-unsigned-int cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_fptrunc | ( | const Function & | function | ) | const |
Check if this is a float precision truncation cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_sext | ( | const Function & | function | ) | const |
Check if this is a sign-extend cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_sitofp | ( | const Function & | function | ) | const |
Check if this is a signed-int-to-float cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_trivial | ( | const Function & | function | ) | const |
Check if this is a trivial (no-op) assignment.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_trunc | ( | const Function & | function | ) | const |
Check if this is a truncate cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_uitofp | ( | const Function & | function | ) | const |
Check if this is an unsigned-int-to-float cast.
| function | Function context for type checking |
| bool sdfg::data_flow::Tasklet::is_zext | ( | const Function & | function | ) | const |
Check if this is a zero-extend cast.
| function | Function context for type checking |
|
delete |
| const std::string & sdfg::data_flow::Tasklet::output | ( | ) | const |
Get the output connector name (single output).
|
overridevirtual |
Replace symbolic expressions in this tasklet.
| old_expression | Expression to replace |
| new_expression | Replacement expression |
Implements sdfg::Element.
|
overridevirtual |
Reimplemented from sdfg::Element.
|
inlinenodiscardoverridevirtual |
Check if this node has side effects Side effect on dflow nodes is broad.
It just means it cannot be removed just because there are no more direct consumers in the dataflow But underneath, a accessNode-write is considered as having a side effect for this purpose. Closer inspection of access nodes could show those side effects as being irrelevant if never read and fully owned
Implements sdfg::data_flow::DataFlowNode.
|
inlineoverridevirtual |
Returns the type of the element.
Implements sdfg::Element.
|
overridevirtual |
Validate the tasklet.
| function | Function context for validation |
| InvalidSDFGException | if validation fails |
Reimplemented from sdfg::data_flow::CodeNode.
|
friend |
|
friend |
|
friend |