140 virtual std::unique_ptr<AccessNodeExpand>
173 if (
auto* cast =
dynamic_cast<const T*
>(&node)) {
185 auto& typed_node =
static_cast<T&
>(node);
208 if (node.
code() == code_) {
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Node representing access to a data container in the dataflow graph.
Definition access_node.h:84
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
const LibraryNodeCode & code() const
Get the operation code.
const data_flow::LibraryNodeCode & code() const
The fixed library node code this expander dispatches on.
Definition lib_node_expander.h:199
const LibNodeExpander * for_lib_node(const data_flow::LibraryNode &node) const override
Prefiltering of libnodes.
Definition lib_node_expander.h:207
CodeLibNodeExpander(const data_flow::LibraryNodeCode &code)
Definition lib_node_expander.h:195
const data_flow::LibraryNodeCode * matched_code() const override
If this expander dispatches on a single, fixed library node code, expose it here.
Definition lib_node_expander.h:203
Definition lib_node_expander.h:45
virtual ~AccessNodeExpand()=default
virtual data_flow::AccessNode & add_indirect_read_access(structured_control_flow::Block &block, size_t input_idx)=0
Creates an access node that represents the input of the original lib-node as accurately as possible,...
virtual structured_control_flow::Sequence & replace_with_sequence()=0
Creates a new sequence where the libNode was.
virtual builder::StructuredSDFGBuilder & builder()=0
virtual data_flow::AccessNode & add_output_access(structured_control_flow::Block &block, size_t output_idx)=0
Creates an access node that represents the output of the original lib-node as accurately as possible,...
virtual data_flow::AccessNode & add_scalar_input_access(structured_control_flow::Block &block, size_t input_idx)=0
Creates an access node that represents the input of the original lib-node as accurately as possible,...
LoopType
Definition lib_node_expander.h:63
virtual data_flow::AccessNode & add_indirect_write_access(structured_control_flow::Block &block, size_t input_idx)=0
Creates an access node that represents the input of the original lib-node as accurately as possible,...
virtual ExpandOutcome successfully_expanded()=0
The expansion is now complete.
virtual structured_control_flow::StructuredLoop & replace_with_structured_loop(LoopType type, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type)=0
Definition lib_node_expander.h:122
virtual ExpandOutcome successfully_modified_node_only()=0
Only properties of the node under expansion had to be changed, no change to the dataflow were necessa...
virtual std::unique_ptr< AccessNodeExpand > replacement_requires_access_nodes(const std::vector< InputUse > &access_dirs)=0
start expansion with access nodes.
virtual const Options & options() const =0
Compile options for this run, so expanders can select variants (e.g.
virtual ExpandOutcome unapplicable()=0
virtual ~ExpandContext()=default
virtual ExpandOutcome unable()=0
Definition lib_node_expander.h:8
virtual ~LibNodeExpander()=default
InputUse
Definition lib_node_expander.h:10
@ IndirectWrite
Definition lib_node_expander.h:10
@ IndirectRead
Definition lib_node_expander.h:10
@ Skip
Definition lib_node_expander.h:10
@ IndirectReadWrite
Definition lib_node_expander.h:10
@ Scalar
Definition lib_node_expander.h:10
virtual const LibNodeExpander * for_lib_node(const data_flow::LibraryNode &node) const
Prefiltering of libnodes.
Definition lib_node_expander.h:28
virtual ExpandOutcome handle_expand(ExpandContext &context, structured_control_flow::Block &block, data_flow::LibraryNode &node) const =0
virtual const data_flow::LibraryNodeCode * matched_code() const
If this expander dispatches on a single, fixed library node code, expose it here.
Definition lib_node_expander.h:41
Definition lib_node_expander.h:168
virtual LibNodeExpander::ExpandOutcome handle_expand(LibNodeExpander::ExpandContext &context, structured_control_flow::Block &block, T &node) const =0
LibNodeExpander::ExpandOutcome handle_expand(LibNodeExpander::ExpandContext &context, structured_control_flow::Block &block, data_flow::LibraryNode &node) const override
Definition lib_node_expander.h:182
const LibNodeExpander * for_lib_node(const data_flow::LibraryNode &node) const override
Prefiltering of libnodes.
Definition lib_node_expander.h:172
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
Represents a traditional for-loop with sequential execution.
Definition for.h:43
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
Represents a schedule type for Map nodes.
Definition structured_loop.h:31
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for structured loop constructs.
Definition structured_loop.h:244
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
SymEngine::RCP< const SymEngine::Symbol > Symbol
Reference-counted pointer to a SymEngine Symbol.
Definition symbolic.h:71
SymEngine::RCP< const SymEngine::Boolean > Condition
Reference-counted pointer to a boolean condition expression.
Definition symbolic.h:86
StringEnum LibraryNodeCode
Definition library_node.h:65
Definition approximate_math.h:12
Definition lib_node_expander.h:12
ExpandOutcome(bool applied)
Definition lib_node_expander.h:14
bool applied
Definition lib_node_expander.h:13