docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::codegen::LibraryNodeDispatcherBase< NodeType > Class Template Reference

#include <sdfg/codegen/dispatchers/library_node_dispatcher_base.h>

Inheritance diagram for sdfg::codegen::LibraryNodeDispatcherBase< NodeType >:
[legend]

Public Member Functions

 LibraryNodeDispatcherBase (codegen::LanguageExtension &language_extension, const Function &function, const data_flow::DataFlowGraph &data_flow_graph, const NodeType &node)
virtual ~LibraryNodeDispatcherBase ()=default
virtual bool begin_node (codegen::PrettyPrinter &stream)
 Begin code generation for the node.
virtual void end_node (codegen::PrettyPrinter &stream, bool has_declaration)
 End code generation for the node.
Public Member Functions inherited from sdfg::codegen::LibraryNodeDispatcher
 LibraryNodeDispatcher (LanguageExtension &language_extension, const Function &function, const data_flow::DataFlowGraph &data_flow_graph, const data_flow::LibraryNode &node)
 Construct a library node dispatcher.
virtual ~LibraryNodeDispatcher ()=default
virtual void dispatch (PrettyPrinter &stream, PrettyPrinter &globals_stream, CodeSnippetFactory &library_snippet_factory)
 Dispatch the library node to code.
virtual void dispatch_code (PrettyPrinter &stream, PrettyPrinter &globals_stream, CodeSnippetFactory &library_snippet_factory)
 Generate the operation-specific code.
virtual void dispatch_code_with_edges (CodegenOutput &out, std::vector< DispatchInput > &inputs, std::vector< DispatchOutput > &outputs)
virtual InstrumentationInfo instrumentation_info () const
 Get instrumentation information for this node.

Protected Member Functions

const std::string & require_param_as_var_equivalent (codegen::PrettyPrinter &stream, const data_flow::AccessNode *node, const std::string &name)
Protected Member Functions inherited from sdfg::codegen::LibraryNodeDispatcher
void require_locally_modifiable_var (CodegenOutput &out, DispatchInput &input) const
 Ensure that [input] points to a local copy that can be changed without modifying the actual source of the input Should only be needed to ensure that legacy [dispatch_code] code can act as before, where it always was a copy.
void pre_allocate_output (CodegenOutput &out, DispatchOutput &output, const std::string &var_name) const
 Declare a variable of the type of the output and with the name "var_name".
void register_output (DispatchOutput &output, const std::string &result_identifier) const
 The dispatcher as created an output that is identified by [result_identifier].
void copy_output (CodegenOutput &out, const DispatchOutput &output, const data_flow::Memlet &oedge) const
 This is a temporary & hopefully short-lived workaround.

Additional Inherited Members

Protected Attributes inherited from sdfg::codegen::LibraryNodeDispatcher
LanguageExtension & language_extension_
 Language extension for code generation.
const Function & function_
 Function context.
const data_flow::DataFlowGraph & data_flow_graph_
 Containing dataflow graph.
const data_flow::LibraryNode & node_
 Library node being dispatched.

Constructor & Destructor Documentation

◆ LibraryNodeDispatcherBase()

template<typename NodeType>
sdfg::codegen::LibraryNodeDispatcherBase< NodeType >::LibraryNodeDispatcherBase ( codegen::LanguageExtension & language_extension,
const Function & function,
const data_flow::DataFlowGraph & data_flow_graph,
const NodeType & node )
inline

◆ ~LibraryNodeDispatcherBase()

template<typename NodeType>
virtual sdfg::codegen::LibraryNodeDispatcherBase< NodeType >::~LibraryNodeDispatcherBase ( )
virtualdefault

Member Function Documentation

◆ begin_node()

template<typename NodeType>
virtual bool sdfg::codegen::LibraryNodeDispatcherBase< NodeType >::begin_node ( codegen::PrettyPrinter & stream)
inlinevirtual

Begin code generation for the node.

Parameters
streamOutput stream for generated code
Returns
True if a declaration was generated

Reimplemented from sdfg::codegen::LibraryNodeDispatcher.

◆ end_node()

template<typename NodeType>
virtual void sdfg::codegen::LibraryNodeDispatcherBase< NodeType >::end_node ( codegen::PrettyPrinter & stream,
bool has_declaration )
inlinevirtual

End code generation for the node.

Parameters
streamOutput stream for generated code
has_declarationWhether a declaration was generated

Reimplemented from sdfg::codegen::LibraryNodeDispatcher.

◆ require_param_as_var_equivalent()

template<typename NodeType>
const std::string & sdfg::codegen::LibraryNodeDispatcherBase< NodeType >::require_param_as_var_equivalent ( codegen::PrettyPrinter & stream,
const data_flow::AccessNode * node,
const std::string & name )
inlineprotected

The documentation for this class was generated from the following file: