docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::codegen Namespace Reference

Classes

class  ArgumentRegistry
class  CodeGenerator
 Base class for code generators. More...
class  CCodeGenerator
class  CStyleBaseCodeGenerator
class  CPPCodeGenerator
class  CodeSnippet
class  LibDependency
struct  DependencyState
class  CodeSnippetFactory
 Originally started out as a handler for additional source files, like hardware-accelerator kernels that are called from the main code, it has morphed more into a CodegenState That also includes library dependencies and header definitions that could be used with the existing arguments given to any dispatcher. More...
class  NestedCodeSnippetFactory
 Used when we need to dispatch main SDFG elements into a subset of files (like offloaded kernels). More...
class  BlockDispatcher
class  AssignmentDispatcher
class  DataFlowDispatcher
struct  CodegenOutput
struct  DispatchInput
 Short-lived container for an input into a dispatcher (based on dflow edges) references are only valid up until the return of the dispatch call. More...
struct  DispatchOutput
class  LibraryNodeDispatcher
 Base class for library node code generation dispatchers. More...
class  ForDispatcher
class  IfElseDispatcher
class  LibraryNodeDispatcherBase
class  SchedTypeMapDispatcher
 Dispatches to the actual NodeDispatcher based on scheduleType and the MapDispatcherRegistry. More...
class  SequentialMapDispatcher
class  NodeDispatcher
 Base class for dispatching control flow nodes to code. More...
class  NodeDispatcherRegistry
class  MapDispatcherRegistry
 Registry for map-specific dispatchers based on schedule type. More...
class  ReduceDispatcherRegistry
 Registry for reduce-specific dispatchers based on schedule type. More...
class  LibraryNodeDispatcherRegistry
 Registry for library node dispatchers. More...
class  SchedTypeReduceDispatcher
 Dispatches to the actual NodeDispatcher based on the Reduce's schedule type and the ReduceDispatcherRegistry. More...
class  SequentialReduceDispatcher
 Default (sequential) code generator for structured_control_flow::Reduce. More...
class  SequenceDispatcher
class  WhileDispatcher
class  BreakDispatcher
class  ContinueDispatcher
class  ReturnDispatcher
class  CaptureVarPlan
class  ArgCapturePlan
struct  InstrumentationMemberInfo
class  InstrumentationInfo
class  InstrumentationPlan
struct  LoopHints
 Loop properties a language may be able to express (e.g. clang loop pragmas in C). More...
struct  Body
 An open region of emitted code, closed by LanguageExtension::end. More...
class  LanguageExtension
class  CLanguageExtension
class  CSymbolicPrinter
class  CStyleLanguageExtension
 Statement and control-flow syntax shared by the C family (C, C++, CUDA, HIP). More...
class  CPPLanguageExtension
class  CPPSymbolicPrinter
class  LoopReport
class  PrettyPrinter
class  Reference

Typedefs

typedef SchedTypeMapDispatcher MapDispatcher
using NodeDispatcherFn
using MapDispatcherFn
using ReduceDispatcherFn
using LibraryNodeDispatcherFn
typedef SchedTypeReduceDispatcher ReduceDispatcher
typedef StringEnum TargetType

Enumerations

enum class  GlobalConstructor { None , CUDA , ROCM }
 Optional GPU-runtime context warmup emitted as a .so-load constructor. More...
enum  InstrumentationEventType { CPU = 0 , CUDA = 1 , NONE = 2 }

Functions

bool base_include_paths ()
bool write_library_snippets_to_files (std::filesystem::path build_path, std::unordered_set< std::string > lib_files, const std::unordered_map< std::string, sdfg::codegen::CodeSnippet > &snippets, std::unordered_map< std::string, std::vector< std::filesystem::path > > &files_for_post_processing)
bool compile_additional_files (const std::filesystem::path &build_path, const std::vector< std::string > &compile_args, std::set< std::string > &link_2nd_args, std::unordered_map< std::string, std::vector< std::filesystem::path > > files_for_post_processing)
bool compile_to_object_file (const std::filesystem::path &source_file, const std::filesystem::path &object_file, const std::vector< std::string > &compile_args)
void add_schedule_type_specific_linker_args (const structured_control_flow::ScheduleType &schedule_type, std::set< std::string > &linker_args)
void add_schedule_type_specific_compile_args (const structured_control_flow::ScheduleType &schedule_type, std::vector< std::string > &compile_args)
std::unique_ptr< NodeDispatcher > create_dispatcher (LanguageExtension &language_extension, StructuredSDFG &sdfg, analysis::AnalysisManager &analysis_manager, structured_control_flow::ControlFlowNode &node, InstrumentationPlan &instrumentation_plan, ArgCapturePlan &arg_capture_plan)
void register_default_dispatchers ()

Variables

std::string CODE_SNIPPET_INIT_ONCE = "init_once"
std::string CODE_SNIPPET_DEINIT_ONCE = "deinit_once"
TargetType TargetType_SEQUENTIAL {structured_control_flow::ScheduleType_Sequential::value()}
TargetType TargetType_CPU_PARALLEL {"CPU_PARALLEL"}
constexpr OptionKey< bool > INSTRUMENTATION_ADAPTIVE_SAMPLING {"instrumentation.adaptive_sampling"}

Typedef Documentation

◆ LibraryNodeDispatcherFn

Initial value:
std::function<std::unique_ptr<LibraryNodeDispatcher>(
)>
Definition function.h:43
Definition language_extension.h:39
Definition data_flow_graph.h:29
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106

◆ MapDispatcher

Deprecated
Use the new nyme [SchedTypeMapDispatcher]. The old name suggests it is perhaps a base class for other dispatchers, which it is not

◆ MapDispatcherFn

Initial value:
std::function<std::unique_ptr<NodeDispatcher>(
)>
Definition structured_sdfg.h:30
Definition analysis.h:53
Definition arg_capture_plan.h:36
Definition instrumentation_plan.h:26
Represents a parallel map loop with configurable scheduling.
Definition map.h:47

◆ NodeDispatcherFn

Initial value:
std::function<std::unique_ptr<NodeDispatcher>(
)>
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44

◆ ReduceDispatcher

Deprecated
Use the new name [SchedTypeReduceDispatcher]. The old name suggests it is perhaps a base class for other dispatchers, which it is not

◆ ReduceDispatcherFn

Initial value:
std::function<std::unique_ptr<NodeDispatcher>(
)>
Represents a loop with an associative/commutative reduction carried dependency.
Definition reduce.h:106

◆ TargetType

Enumeration Type Documentation

◆ GlobalConstructor

Optional GPU-runtime context warmup emitted as a .so-load constructor.

Off by default; enable to amortize the one-shot CUDA/HIP driver/context init cost out of the first kernel call (and out of any measured region wrapping it).

Enumerator
None 
CUDA 
ROCM 

◆ InstrumentationEventType

Enumerator
CPU 
CUDA 
NONE 

Function Documentation

◆ add_schedule_type_specific_compile_args()

void sdfg::codegen::add_schedule_type_specific_compile_args ( const structured_control_flow::ScheduleType & schedule_type,
std::vector< std::string > & compile_args )

◆ add_schedule_type_specific_linker_args()

void sdfg::codegen::add_schedule_type_specific_linker_args ( const structured_control_flow::ScheduleType & schedule_type,
std::set< std::string > & linker_args )

◆ base_include_paths()

bool sdfg::codegen::base_include_paths ( )

◆ compile_additional_files()

bool sdfg::codegen::compile_additional_files ( const std::filesystem::path & build_path,
const std::vector< std::string > & compile_args,
std::set< std::string > & link_2nd_args,
std::unordered_map< std::string, std::vector< std::filesystem::path > > files_for_post_processing )

◆ compile_to_object_file()

bool sdfg::codegen::compile_to_object_file ( const std::filesystem::path & source_file,
const std::filesystem::path & object_file,
const std::vector< std::string > & compile_args )

◆ create_dispatcher()

std::unique_ptr< NodeDispatcher > sdfg::codegen::create_dispatcher ( LanguageExtension & language_extension,
StructuredSDFG & sdfg,
analysis::AnalysisManager & analysis_manager,
structured_control_flow::ControlFlowNode & node,
InstrumentationPlan & instrumentation_plan,
ArgCapturePlan & arg_capture_plan )

◆ register_default_dispatchers()

void sdfg::codegen::register_default_dispatchers ( )

◆ write_library_snippets_to_files()

bool sdfg::codegen::write_library_snippets_to_files ( std::filesystem::path build_path,
std::unordered_set< std::string > lib_files,
const std::unordered_map< std::string, sdfg::codegen::CodeSnippet > & snippets,
std::unordered_map< std::string, std::vector< std::filesystem::path > > & files_for_post_processing )

Variable Documentation

◆ CODE_SNIPPET_DEINIT_ONCE

std::string sdfg::codegen::CODE_SNIPPET_DEINIT_ONCE = "deinit_once"
inline

◆ CODE_SNIPPET_INIT_ONCE

std::string sdfg::codegen::CODE_SNIPPET_INIT_ONCE = "init_once"
inline

◆ INSTRUMENTATION_ADAPTIVE_SAMPLING

OptionKey<bool> sdfg::codegen::INSTRUMENTATION_ADAPTIVE_SAMPLING {"instrumentation.adaptive_sampling"}
inlineconstexpr

◆ TargetType_CPU_PARALLEL

TargetType sdfg::codegen::TargetType_CPU_PARALLEL {"CPU_PARALLEL"}
inline

◆ TargetType_SEQUENTIAL

TargetType sdfg::codegen::TargetType_SEQUENTIAL {structured_control_flow::ScheduleType_Sequential::value()}
inline