docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::passes::LibNodeExpander::AccessNodeExpand Class Referenceabstract

#include <sdfg/passes/expansion/lib_node_expander.h>

Public Types

enum class  LoopType { For , Map }

Public Member Functions

virtual ~AccessNodeExpand ()=default
virtual builder::StructuredSDFGBuilder & builder ()=0
virtual structured_control_flow::Sequence & replace_with_sequence ()=0
 Creates a new sequence where the libNode was.
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
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, including debug info and metadata Used as a scalar input (for pointers, the value of the pointer is read).
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, including debug info and metadata Used for indirect reads.
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, including debug info and metadata Used for indirect writes.
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, including debug info and metadata Used for outputs of the original lib-node.
virtual ExpandOutcome successfully_expanded ()=0
 The expansion is now complete.

Member Enumeration Documentation

◆ LoopType

Enumerator
For 
Map 

Constructor & Destructor Documentation

◆ ~AccessNodeExpand()

virtual sdfg::passes::LibNodeExpander::AccessNodeExpand::~AccessNodeExpand ( )
virtualdefault

Member Function Documentation

◆ add_indirect_read_access()

virtual data_flow::AccessNode & sdfg::passes::LibNodeExpander::AccessNodeExpand::add_indirect_read_access ( structured_control_flow::Block & block,
size_t input_idx )
pure virtual

Creates an access node that represents the input of the original lib-node as accurately as possible, including debug info and metadata Used for indirect reads.

Only valid if the original input is pointer-like and it was requested for IndirectRead (or IndirectReadWrite)

Parameters
blockblock to insert into
input_idxthe index in the list of access_dirs requested & input-connectors
Returns
newly created access node

◆ add_indirect_write_access()

virtual data_flow::AccessNode & sdfg::passes::LibNodeExpander::AccessNodeExpand::add_indirect_write_access ( structured_control_flow::Block & block,
size_t input_idx )
pure virtual

Creates an access node that represents the input of the original lib-node as accurately as possible, including debug info and metadata Used for indirect writes.

Only valid if the original input is pointer-like and it was requested for IndirectWrite (or IndirectReadWrite)

Example: the libnode gets a pointer to an array. The expansion will now write to elements of this array in a loop

Parameters
blockblock to insert into
input_idxthe index in the list of access_dirs requested & input-connectors
Returns
newly created access node

◆ add_output_access()

virtual data_flow::AccessNode & sdfg::passes::LibNodeExpander::AccessNodeExpand::add_output_access ( structured_control_flow::Block & block,
size_t output_idx )
pure virtual

Creates an access node that represents the output of the original lib-node as accurately as possible, including debug info and metadata Used for outputs of the original lib-node.

Parameters
blockblock to insert into
input_idxthe index in the list of output-connectors
Returns
newly created access node

◆ add_scalar_input_access()

virtual data_flow::AccessNode & sdfg::passes::LibNodeExpander::AccessNodeExpand::add_scalar_input_access ( structured_control_flow::Block & block,
size_t input_idx )
pure virtual

Creates an access node that represents the input of the original lib-node as accurately as possible, including debug info and metadata Used as a scalar input (for pointers, the value of the pointer is read).

Only valid if the input was not requested as "Skip"

Parameters
blockblock to insert into
input_idxthe index in the list of access_dirs requested & input-connectors
Returns
newly created access node

◆ builder()

virtual builder::StructuredSDFGBuilder & sdfg::passes::LibNodeExpander::AccessNodeExpand::builder ( )
pure virtual

◆ replace_with_sequence()

virtual structured_control_flow::Sequence & sdfg::passes::LibNodeExpander::AccessNodeExpand::replace_with_sequence ( )
pure virtual

Creates a new sequence where the libNode was.

So if the original libNode was inside a block, after this call, there might be a lead-in block with nodes that precede the libNode, the replacement sequence and a lead-out block with nodes that succeeded the original libNode

Nothing outside of this sequence must be modified, to keep the expansion stable and correct.

Returns
new sequence

◆ replace_with_structured_loop()

virtual structured_control_flow::StructuredLoop & sdfg::passes::LibNodeExpander::AccessNodeExpand::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 )
pure virtual

◆ successfully_expanded()

virtual ExpandOutcome sdfg::passes::LibNodeExpander::AccessNodeExpand::successfully_expanded ( )
pure virtual

The expansion is now complete.

Certain replacements that require understanding all of the changes may be applied now


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