|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Node representing access to a data container in the dataflow graph. More...
#include <sdfg/data_flow/access_node.h>
Public Member Functions | |
| AccessNode (const AccessNode &data_node)=delete | |
| AccessNode & | operator= (const AccessNode &)=delete |
| ElementType | type_id () const override |
| Returns the type of the element. | |
| void | validate (const Function &function) const override |
| Validate the access node. | |
| const std::string & | data () const |
| Get the name of the data container. | |
| virtual bool | is_constant () const |
| void | data (const std::string data) |
| Set the name of the data container. | |
| bool | side_effect () const override |
| An access node with incoming edges writes the container and therefore has side effects. | |
| virtual std::unique_ptr< DataFlowNode > | clone (size_t element_id, const graph::Vertex vertex, DataFlowGraph &parent) const override |
| Clone this access node for graph transformations. | |
| void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| Replace symbolic expressions in this node. | |
| EdgeRemoveOption | can_remove_out_edge (const 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 DataFlowGraph &graph, const Memlet *memlet) const override |
| 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. | |
| virtual void | replace (const symbolic::ExpressionMapping &replacements) |
Static Public Member Functions | |
| static bool | classof (const Element &element) |
| static bool | identicalBackingData (const AccessNode &src1, const AccessNode &src2) |
| Checks if 2 access nodes refer to the same container / ptr Ready for when we identify them by sth more efficient then strings. | |
| static bool | has_constant_value (const AccessNode &node, long long constant_number) |
| Checks if the access node is constant and matches the provided constant number. | |
| 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. | |
Protected Member Functions | |
| AccessNode (size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent, const std::string &data) | |
| Protected constructor for access 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 | |
| std::string | data_ |
| Name of the data container this node accesses. | |
| Protected Attributes inherited from sdfg::Element | |
| size_t | element_id_ |
| DebugInfo | debug_info_ |
| std::unordered_map< std::string, std::string > | metadata_ |
Friends | |
| class | sdfg::builder::SDFGBuilder |
| class | sdfg::builder::StructuredSDFGBuilder |
Additional Inherited Members | |
| Static Public Attributes inherited from sdfg::data_flow::DataFlowNode | |
| static constexpr ElementType | TypeGroup |
| Bitmask of all concrete ElementTypes that are DataFlowNodes. | |
Node representing access to a data container in the dataflow graph.
AccessNode provides an interface for reading from or writing to data containers defined in the function. Each access node references a data container by name and can be connected to code nodes via memlets.
Access nodes support:
|
protected |
Protected constructor for access nodes.
| element_id | Unique element identifier |
| debug_info | Debug information for this node |
| vertex | Graph vertex for this node |
| parent | Parent dataflow graph |
| data | Name of the data container to access |
|
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 access node for graph transformations.
| element_id | New element identifier for the clone |
| vertex | New graph vertex for the clone |
| parent | Parent graph for the clone |
Implements sdfg::data_flow::DataFlowNode.
Reimplemented in sdfg::data_flow::ConstantNode.
| const std::string & sdfg::data_flow::AccessNode::data | ( | ) | const |
Get the name of the data container.
| void sdfg::data_flow::AccessNode::data | ( | const std::string | data | ) |
Set the name of the data container.
| data | New name for the data container |
|
static |
Checks if the access node is constant and matches the provided constant number.
|
static |
Checks if 2 access nodes refer to the same container / ptr Ready for when we identify them by sth more efficient then strings.
|
inlinevirtual |
Reimplemented in sdfg::data_flow::ConstantNode.
|
delete |
|
overridevirtual |
Replace symbolic expressions in this node.
| old_expression | Expression to replace |
| new_expression | Replacement expression |
If both expressions are symbols and old_expression matches the data name, replaces the data name with new_expression.
Implements sdfg::Element.
|
nodiscardoverridevirtual |
An access node with incoming edges writes the container and therefore has side effects.
Implements sdfg::data_flow::DataFlowNode.
Reimplemented in sdfg::data_flow::ConstantNode.
|
inlineoverridevirtual |
Returns the type of the element.
Implements sdfg::Element.
Reimplemented in sdfg::data_flow::ConstantNode.
|
overridevirtual |
Validate the access node.
| function | Function context for validation |
| InvalidSDFGException | if validation fails |
Validates that:
Implements sdfg::Element.
Reimplemented in sdfg::data_flow::ConstantNode.
|
friend |
|
friend |
|
protected |
Name of the data container this node accesses.