|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Base class for computational nodes with inputs and outputs. More...
#include <sdfg/data_flow/code_node.h>
Public Member Functions | |
| CodeNode (const CodeNode &data_node)=delete | |
| CodeNode & | operator= (const CodeNode &)=delete |
| void | validate (const Function &function) const override |
| Validate the code node's configuration. | |
| 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 |
| virtual bool | side_effect () const =0 |
| Check if this node has side effects Side effect on dflow nodes is broad. | |
| 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 std::unique_ptr< DataFlowNode > | clone (size_t element_id, const graph::Vertex vertex, DataFlowGraph &parent) const =0 |
| Clone this node for graph transformations. | |
| virtual EdgeRemoveOption | can_remove_out_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const =0 |
| Is the edge in question removable, or will this make the node its an output on invalid? | |
| virtual EdgeRemoveOption | can_remove_in_edge (const data_flow::DataFlowGraph &graph, const Memlet *memlet) const =0 |
| 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 |
| virtual ElementType | type_id () const =0 |
| Returns the type of the element. | |
| std::string_view | element_type () const |
| Returns the type of the element as a human-readable string. | |
| virtual void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression)=0 |
| virtual void | replace (const symbolic::ExpressionMapping &replacements) |
Static Public Member Functions | |
| 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. | |
Static Public Attributes | |
| 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 | |
| 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 | |
| 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_ |
Friends | |
| class | sdfg::builder::SDFGBuilder |
| class | sdfg::builder::StructuredSDFGBuilder |
Base class for computational nodes with inputs and outputs.
CodeNode represents any computational operation in the dataflow graph. It provides:
Derived classes must implement:
|
protected |
Protected constructor for code nodes.
| element_id | Unique element identifier |
| debug_info | Debug information for this node |
| vertex | Graph vertex for this node |
| parent | Parent dataflow graph |
| outputs | Names of output connectors |
| inputs | Names of input connectors |
|
delete |
|
inlinestatic |
LLVM-style RTTI predicate: true if element is a CodeNode.
| bool sdfg::data_flow::CodeNode::has_constant_input | ( | size_t | index | ) | const |
Check if an input is connected to a constant node.
| index | Index of the input connector to check |
| const std::string & sdfg::data_flow::CodeNode::input | ( | size_t | index | ) | const |
Get input connector name by index.
| index | Index of the input connector |
| std::vector< std::string > & sdfg::data_flow::CodeNode::inputs | ( | ) |
Get input connector names (mutable).
| const std::vector< std::string > & sdfg::data_flow::CodeNode::inputs | ( | ) | const |
Get input connector names (const).
| const std::string & sdfg::data_flow::CodeNode::output | ( | size_t | index | ) | const |
Get output connector name by index.
| index | Index of the output connector |
| std::vector< std::string > & sdfg::data_flow::CodeNode::outputs | ( | ) |
Get output connector names (mutable).
| const std::vector< std::string > & sdfg::data_flow::CodeNode::outputs | ( | ) | const |
Get output connector names (const).
|
overridevirtual |
Validate the code node's configuration.
| function | Function context for validation |
Ensures that:
Implements sdfg::Element.
Reimplemented in sdfg::cuda::CUDADataOffloadingNode, sdfg::data_flow::InvokeNode, sdfg::data_flow::MetadataNode, sdfg::data_flow::Tasklet, sdfg::einsum::EinsumNode, sdfg::fp_math::OzakiMatMulNode, sdfg::gpu::GpuMmaFillNode, sdfg::gpu::GpuMmaFragmentEltwiseAddNode, sdfg::gpu::GpuMmaFragmentLoadNode, sdfg::gpu::GpuMmaFragmentStoreNode, sdfg::gpu::GpuMmaMatmulNode, sdfg::gpu::GpuTileArrivalNode, sdfg::math::blas::DotNode, sdfg::math::blas::GEMMNode, sdfg::math::tensor::ConcatNode, sdfg::math::tensor::ConditionalTensorCopyNode, sdfg::math::tensor::ConstPaddingNode, sdfg::math::tensor::ConvNode, sdfg::math::tensor::ElementWiseDataflowTensorNode, sdfg::math::tensor::EluNode, sdfg::math::tensor::EmbeddingNode, sdfg::math::tensor::EmbeddingRenormNode, sdfg::math::tensor::IndexNode, sdfg::math::tensor::LayerNormNode, sdfg::math::tensor::LeakyReLUNode, sdfg::math::tensor::LogicalNotNode, sdfg::math::tensor::MatMulNode, sdfg::math::tensor::PoolingNode, sdfg::math::tensor::ReduceNode, sdfg::math::tensor::SoftmaxNode, sdfg::math::tensor::TaskletTensorNode, sdfg::math::tensor::TensorCopyNode, sdfg::math::tensor::TensorNode, sdfg::math::tensor::UpsampleBilinear2DNode, sdfg::offloading::ExternalDataOffloadingNode, sdfg::rocm::ROCMDataOffloadingNode, sdfg::stdlib::FreeNode, sdfg::stdlib::MallocNode, sdfg::stdlib::MemcpyNode, sdfg::stdlib::MemmoveNode, sdfg::stdlib::MemsetNode, sdfg::stdlib::TrapNode, sdfg::stdlib::UnreachableNode, sdfg::tiles::PipelineCommitNode, sdfg::tiles::PipelineWaitNode, and sdfg::tiles::TileCopyNode.
|
friend |
|
friend |
|
protected |
Names of input connectors.
|
protected |
Names of output connectors.
|
staticconstexpr |
Bitmask of all concrete ElementTypes that are CodeNodes.