|
docc 0.8.3 (0d44999b)
C++ API Reference
|
#include <sdfg/codegen/code_generators/cpp_code_generator.h>
Public Member Functions | |
| CPPCodeGenerator (StructuredSDFG &sdfg, analysis::AnalysisManager &analysis_manager, InstrumentationPlan &instrumentation_plan, ArgCapturePlan &arg_capture_plan, std::shared_ptr< CodeSnippetFactory > library_snippet_factory=std::make_shared< CodeSnippetFactory >(), const std::string &externals_prefix="", GlobalConstructor global_constructor=GlobalConstructor::None) | |
| std::string | function_definition () override |
| Generate a function definition for the SDFG. | |
| void | emit_capture_context_init (std::ostream &ofs_source) const override |
| Public Member Functions inherited from sdfg::codegen::CStyleBaseCodeGenerator | |
| CStyleBaseCodeGenerator (StructuredSDFG &sdfg, analysis::AnalysisManager &analysis_manager, InstrumentationPlan &instrumentation_plan, ArgCapturePlan &arg_capture_plan, std::shared_ptr< CodeSnippetFactory > library_snippet_factory=std::make_shared< CodeSnippetFactory >(), const std::string &externals_prefix="") | |
| bool | generate () override |
| Generate the code. | |
| bool | emit_header (PrettyPrinter &out) override |
| write the contents of the main header into out | |
| bool | emit_main_source (std::ostream &out, const std::filesystem::path &header_path) override |
| write the contents of the main source file into out. | |
| bool | as_source (const std::filesystem::path &header_path, const std::filesystem::path &source_path) override |
| Generate the SDFG's code into source files. | |
| void | append_function_source (std::ostream &ofs_source) override |
| Generate only the function source code and append it to the source file. | |
| Public Member Functions inherited from sdfg::codegen::CodeGenerator | |
| CodeGenerator (StructuredSDFG &sdfg, analysis::AnalysisManager &analysis_manager, InstrumentationPlan &instrumentation_plan, ArgCapturePlan &arg_capture_plan, std::shared_ptr< CodeSnippetFactory > library_snippet_factory=std::make_shared< CodeSnippetFactory >(), const std::string &externals_prefix="") | |
| virtual | ~CodeGenerator ()=default |
| const StructuredSDFG & | sdfg () const |
| const PrettyPrinter & | includes () const |
| Get the includes. | |
| const PrettyPrinter & | classes () const |
| Get the classes. | |
| const PrettyPrinter & | globals () const |
| Get the globals. | |
| const std::unordered_map< std::string, CodeSnippet > & | library_snippets () const |
| all created library snippets | |
| const PrettyPrinter & | main () const |
| Get the main stream. | |
Protected Member Functions | |
| void | dispatch_header_includes (PrettyPrinter &out) override |
| void | dispatch_header_structures (PrettyPrinter &out) override |
| void | dispatch_globals () override |
| void | dispatch_schedule () override |
| LanguageExtension & | language_extension () override |
| Protected Member Functions inherited from sdfg::codegen::CStyleBaseCodeGenerator | |
| void | dispatch_header (PrettyPrinter &out) |
| void | dispatch_includes () |
| void | dispatch_structures () |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::codegen::CodeGenerator | |
| StructuredSDFG & | sdfg_ |
| Reference to the schedule. | |
| analysis::AnalysisManager & | analysis_manager_ |
| Analysis manager for the SDFG. | |
| InstrumentationPlan & | instrumentation_plan_ |
| Instrumentation strategy. | |
| ArgCapturePlan & | arg_capture_plan_ |
| PrettyPrinter | includes_stream_ |
| Stream for includes. | |
| PrettyPrinter | classes_stream_ |
| Stream for classes. | |
| PrettyPrinter | globals_stream_ |
| Stream for global variables and functions. | |
| std::shared_ptr< CodeSnippetFactory > | library_snippet_factory_ |
| Stream for library functions. | |
| PrettyPrinter | main_stream_ |
| Main stream. | |
| std::string | externals_prefix_ |
| Prefix to use for external functions. | |
|
inlineexplicit |
|
overrideprotectedvirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.
|
overrideprotectedvirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.
|
overrideprotectedvirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.
|
overrideprotectedvirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.
|
overridevirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.
|
overridevirtual |
Generate a function definition for the SDFG.
Implements sdfg::codegen::CodeGenerator.
|
inlineoverrideprotectedvirtual |
Implements sdfg::codegen::CStyleBaseCodeGenerator.