|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to. More...
#include <sdfg/builder/structured_sdfg_builder.h>
Public Types | |
| using | InsertionPoint = int32_t |
Public Member Functions | |
| StructuredSDFGBuilder (StructuredSDFG &sdfg) | |
| To modify an existing SDFG. | |
| StructuredSDFGBuilder (std::unique_ptr< StructuredSDFG > &sdfg) | |
| Will take ownership of the SDFG Increases compatibility with legacy code. | |
| StructuredSDFGBuilder (const std::string &name, FunctionType type) | |
| StructuredSDFGBuilder (const std::string &name, FunctionType type, const types::IType &return_type) | |
| StructuredSDFGBuilder (SDFG &sdfg) | |
| StructuredSDFG & | subject () const |
| std::unique_ptr< StructuredSDFG > | move () |
| void | rename_container (const std::string &old_name, const std::string &new_name) const override |
| void | rename_containers (const std::vector< std::pair< std::string, std::string > > &renames) const |
| Applies several renames with a single tree traversal; old names must be distinct and not renamed targets. | |
| Element * | find_element_by_id (const size_t &element_id) const |
| virtual void | replace_symbols (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| Replace symbolic expressions on the whole SDFG. | |
| virtual void | replace_symbols (const symbolic::ExpressionMapping &replacements) override |
| Sequence & | add_sequence (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| Sequence & | add_sequence_before (Sequence &parent, ControlFlowNode &block, const DebugInfo &debug_info=DebugInfo()) |
| Sequence & | add_sequence_after (Sequence &parent, ControlFlowNode &block, const DebugInfo &debug_info=DebugInfo()) |
| Sequence & | add_sequence_at (Sequence &parent, InsertionPoint insertion_point, const DebugInfo &debug_info=DebugInfo()) |
| void | remove_from_parent (ControlFlowNode &child) |
| void | remove_child (Sequence &parent, size_t index) |
| void | remove_children (Sequence &parent) |
| void | move_child (Sequence &source, size_t source_index, Sequence &target) |
| void | move_child (Sequence &source, size_t source_index, Sequence &target, size_t target_index) |
| void | move_children (Sequence &source, Sequence &target) |
| void | move_children (Sequence &source, Sequence &target, size_t target_index) |
| Sequence & | hoist_root () |
| AssignmentBlock & | add_assignments (Sequence &parent, const Assignments &assignments, const DebugInfo &debug_info=DebugInfo()) |
| AssignmentBlock & | add_assignments_before (Sequence &parent, ControlFlowNode &child, const Assignments &assignments, const DebugInfo &debug_info=DebugInfo()) |
| AssignmentBlock & | add_assignments_after (Sequence &parent, ControlFlowNode &child, const Assignments &assignments, const DebugInfo &debug_info=DebugInfo()) |
| AssignmentBlock & | add_assignments_at (Sequence &parent, InsertionPoint insertion_point, const Assignments &assignments, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block (Sequence &parent, const data_flow::DataFlowGraph &data_flow_graph, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block_before (Sequence &parent, ControlFlowNode &child, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block_before (Sequence &parent, ControlFlowNode &child, data_flow::DataFlowGraph &data_flow_graph, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block_after (Sequence &parent, ControlFlowNode &child, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block_after (Sequence &parent, ControlFlowNode &child, data_flow::DataFlowGraph &data_flow_graph, const DebugInfo &debug_info=DebugInfo()) |
| Block & | add_block_at (Sequence &parent, InsertionPoint insertion_point, const DebugInfo &debug_info=DebugInfo()) |
| IfElse & | add_if_else (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| IfElse & | add_if_else_before (Sequence &parent, ControlFlowNode &child, const DebugInfo &debug_info=DebugInfo()) |
| IfElse & | add_if_else_after (Sequence &parent, ControlFlowNode &child, const DebugInfo &debug_info=DebugInfo()) |
| Sequence & | add_case (IfElse &scope, const sdfg::symbolic::Condition cond, const DebugInfo &debug_info=DebugInfo()) |
| void | remove_case (IfElse &scope, size_t i, const DebugInfo &debug_info=DebugInfo()) |
| While & | add_while (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| For & | add_for (Sequence &parent, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const DebugInfo &debug_info=DebugInfo()) |
| For & | add_for_before (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const DebugInfo &debug_info=DebugInfo()) |
| For & | add_for_after (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const DebugInfo &debug_info=DebugInfo()) |
| For & | add_for_at (Sequence &parent, InsertionPoint insertion_point, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Map & | add_map (Sequence &parent, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Map & | add_map_after (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Map & | add_map_before (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Map & | add_map_at (Sequence &parent, InsertionPoint insertion_point, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Reduce & | add_reduce (Sequence &parent, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const std::vector< structured_control_flow::ReductionInfo > &reductions, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Reduce & | add_reduce_before (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const std::vector< structured_control_flow::ReductionInfo > &reductions, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Reduce & | add_reduce_after (Sequence &parent, ControlFlowNode &child, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update, const std::vector< structured_control_flow::ReductionInfo > &reductions, const ScheduleType &schedule_type, const DebugInfo &debug_info=DebugInfo()) |
| Continue & | add_continue (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| Break & | add_break (Sequence &parent, const DebugInfo &debug_info=DebugInfo()) |
| Return & | add_return (Sequence &parent, const std::string &data, const DebugInfo &debug_info=DebugInfo()) |
| Return & | add_constant_return (Sequence &parent, const std::string &data, const types::IType &type, const DebugInfo &debug_info=DebugInfo()) |
| For & | convert_while (Sequence &parent, While &loop, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update) |
| Map & | convert_for (Sequence &parent, For &loop) |
| Reduce & | convert_for_to_reduce (Sequence &parent, For &loop, const std::vector< structured_control_flow::ReductionInfo > &reductions) |
| Map & | convert_reduce_to_map (Sequence &parent, Reduce &reduce) |
| void | update_if_else_condition (IfElse &if_else, size_t branch, const symbolic::Condition cond) |
| void | update_loop (StructuredLoop &loop, const symbolic::Symbol indvar, const symbolic::Condition condition, const symbolic::Expression init, const symbolic::Expression update) |
| void | update_schedule_type (StructuredLoop &loop, const ScheduleType &schedule_type, bool keep_nest_annotations=true) |
| Replace the schedule type of a loop. | |
| void | remove_schedule_property (StructuredLoop &loop, const std::string &key) |
| Remove a single property (if present) from the schedule type of a loop. | |
| data_flow::AccessNode & | add_access (structured_control_flow::Block &block, const std::string &data, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::ConstantNode & | add_constant (structured_control_flow::Block &block, const std::string &data, const types::IType &type, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Tasklet & | add_tasklet (structured_control_flow::Block &block, const data_flow::TaskletCode code, const std::string &output, const std::vector< std::string > &inputs, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_memlet (structured_control_flow::Block &block, data_flow::DataFlowNode &src, const std::string &src_conn, data_flow::DataFlowNode &dst, const std::string &dst_conn, const data_flow::Subset &subset, const types::IType &base_type, const DebugInfo &debug_info) |
| data_flow::Memlet & | add_computational_memlet (structured_control_flow::Block &block, data_flow::AccessNode &src, data_flow::CodeNode &dst, const std::string &dst_conn, const data_flow::Subset &subset, const types::IType &base_type, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_computational_memlet (structured_control_flow::Block &block, data_flow::CodeNode &src, const std::string &src_conn, data_flow::AccessNode &dst, const data_flow::Subset &subset, const types::IType &base_type, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_computational_memlet (structured_control_flow::Block &block, data_flow::AccessNode &src, data_flow::Tasklet &dst, const std::string &dst_conn, const data_flow::Subset &subset, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_computational_memlet (structured_control_flow::Block &block, data_flow::Tasklet &src, const std::string &src_conn, data_flow::AccessNode &dst, const data_flow::Subset &subset, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_reference_memlet (structured_control_flow::Block &block, data_flow::AccessNode &src, data_flow::AccessNode &dst, const data_flow::Subset &subset, const types::IType &base_type, const DebugInfo &debug_info=DebugInfo()) |
| data_flow::Memlet & | add_dereference_memlet (structured_control_flow::Block &block, data_flow::AccessNode &src, data_flow::AccessNode &dst, bool derefs_src, const types::IType &base_type, const DebugInfo &debug_info=DebugInfo()) |
| template<typename T, typename... Args> | |
| data_flow::LibraryNode & | add_library_node (structured_control_flow::Block &block, const DebugInfo &debug_info, Args... arguments) |
| data_flow::DataFlowNode & | copy_node (structured_control_flow::Block &block, const data_flow::DataFlowNode &node) |
| void | remove_memlet (structured_control_flow::Block &block, const data_flow::Memlet &edge) |
| void | remove_node (structured_control_flow::Block &block, const data_flow::DataFlowNode &node) |
| data_flow::Memlet & | replace_memlet_src_with_constant (structured_control_flow::Block &block, data_flow::Memlet &edge, const std::string &data, const types::IType &type) |
| Replaces the source of a computational read memlet with a new ConstantNode carrying data/type. | |
| void | clear_code_node_legacy (structured_control_flow::Block &block, const data_flow::CodeNode &node) |
| Removes a code node and all its input and output edges. | |
| void | clear_access_node_legacy (structured_control_flow::Block &block, const data_flow::AccessNode &node) |
| Removes a code node and maybe some of its inputs as well. | |
| int | clear_node (structured_control_flow::Block &block, const data_flow::DataFlowNode &node) |
| Shorthand for clear_node with the node itself being the only one to ignore side-effects on. | |
| int | clear_node (structured_control_flow::Block &block, const data_flow::DataFlowNode &node, const std::unordered_set< const data_flow::DataFlowNode * > &ignore_side_effects) |
| New function to remove all unneeded edges and nodes transitively. | |
| int | clear_ptr_borrow_edge (Block &block, const data_flow::Memlet &edge) |
| void | merge_siblings (data_flow::AccessNode &in_node) |
| void | merge_sinks (structured_control_flow::Block &block) |
| Walks all sink nodes of a block's dataflow graph and merges access nodes that refer to the same container into a single sink access node, redirecting their incoming memlets. | |
| Public Member Functions inherited from sdfg::builder::FunctionBuilder | |
| virtual | ~FunctionBuilder ()=default |
| void | set_return_type (const types::IType &type) const |
| const types::IType & | add_container (const std::string &name, const types::IType &type, bool is_argument=false, bool is_external=false) const |
| const types::IType & | add_external (const std::string &name, const types::IType &type, LinkageType linkage_type) const |
| void | remove_container (const std::string &name) const |
| void | change_type (const std::string &name, const types::IType &type) const |
| types::StructureDefinition & | add_structure (const std::string &name, bool is_packed) const |
| std::unique_ptr< types::Structure > | create_vector_type (const types::Scalar &element_type, size_t vector_size) |
| std::string | find_new_name (std::string prefix="tmp_") const |
| void | set_element_counter (size_t element_counter) |
| void | update_tasklet (data_flow::Tasklet &tasklet, const data_flow::TaskletCode code) |
| Common Dataflow Operations. | |
Protected Member Functions | |
| Function & | function () const override |
| Protected Member Functions inherited from sdfg::builder::FunctionBuilder | |
| size_t | new_element_id () const |
| size_t | new_element_id_batch (size_t batch) const |
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to.
| using sdfg::builder::StructuredSDFGBuilder::InsertionPoint = int32_t |
| sdfg::builder::StructuredSDFGBuilder::StructuredSDFGBuilder | ( | StructuredSDFG & | sdfg | ) |
To modify an existing SDFG.
| sdfg::builder::StructuredSDFGBuilder::StructuredSDFGBuilder | ( | std::unique_ptr< StructuredSDFG > & | sdfg | ) |
Will take ownership of the SDFG Increases compatibility with legacy code.
Also more idiomatic for SDFGs that are being deserialized and are not yet owned_ by the registry
| sdfg::builder::StructuredSDFGBuilder::StructuredSDFGBuilder | ( | const std::string & | name, |
| FunctionType | type ) |
| sdfg::builder::StructuredSDFGBuilder::StructuredSDFGBuilder | ( | const std::string & | name, |
| FunctionType | type, | ||
| const types::IType & | return_type ) |
| sdfg::builder::StructuredSDFGBuilder::StructuredSDFGBuilder | ( | SDFG & | sdfg | ) |
| data_flow::AccessNode & sdfg::builder::StructuredSDFGBuilder::add_access | ( | structured_control_flow::Block & | block, |
| const std::string & | data, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| AssignmentBlock & sdfg::builder::StructuredSDFGBuilder::add_assignments | ( | Sequence & | parent, |
| const Assignments & | assignments, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| AssignmentBlock & sdfg::builder::StructuredSDFGBuilder::add_assignments_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const Assignments & | assignments, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| AssignmentBlock & sdfg::builder::StructuredSDFGBuilder::add_assignments_at | ( | Sequence & | parent, |
| InsertionPoint | insertion_point, | ||
| const Assignments & | assignments, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| AssignmentBlock & sdfg::builder::StructuredSDFGBuilder::add_assignments_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const Assignments & | assignments, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block | ( | Sequence & | parent, |
| const data_flow::DataFlowGraph & | data_flow_graph, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow_graph | copies the contents of this into the new block |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| data_flow::DataFlowGraph & | data_flow_graph, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block_at | ( | Sequence & | parent, |
| InsertionPoint | insertion_point, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Block & sdfg::builder::StructuredSDFGBuilder::add_block_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| data_flow::DataFlowGraph & | data_flow_graph, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Break & sdfg::builder::StructuredSDFGBuilder::add_break | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| Sequence & sdfg::builder::StructuredSDFGBuilder::add_case | ( | IfElse & | scope, |
| const sdfg::symbolic::Condition | cond, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_computational_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::AccessNode & | src, | ||
| data_flow::CodeNode & | dst, | ||
| const std::string & | dst_conn, | ||
| const data_flow::Subset & | subset, | ||
| const types::IType & | base_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_computational_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::AccessNode & | src, | ||
| data_flow::Tasklet & | dst, | ||
| const std::string & | dst_conn, | ||
| const data_flow::Subset & | subset, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_computational_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::CodeNode & | src, | ||
| const std::string & | src_conn, | ||
| data_flow::AccessNode & | dst, | ||
| const data_flow::Subset & | subset, | ||
| const types::IType & | base_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_computational_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::Tasklet & | src, | ||
| const std::string & | src_conn, | ||
| data_flow::AccessNode & | dst, | ||
| const data_flow::Subset & | subset, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::ConstantNode & sdfg::builder::StructuredSDFGBuilder::add_constant | ( | structured_control_flow::Block & | block, |
| const std::string & | data, | ||
| const types::IType & | type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Return & sdfg::builder::StructuredSDFGBuilder::add_constant_return | ( | Sequence & | parent, |
| const std::string & | data, | ||
| const types::IType & | type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Continue & sdfg::builder::StructuredSDFGBuilder::add_continue | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_dereference_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::AccessNode & | src, | ||
| data_flow::AccessNode & | dst, | ||
| bool | derefs_src, | ||
| const types::IType & | base_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| For & sdfg::builder::StructuredSDFGBuilder::add_for | ( | Sequence & | parent, |
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| For & sdfg::builder::StructuredSDFGBuilder::add_for_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| For & sdfg::builder::StructuredSDFGBuilder::add_for_at | ( | Sequence & | parent, |
| InsertionPoint | insertion_point, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| For & sdfg::builder::StructuredSDFGBuilder::add_for_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| IfElse & sdfg::builder::StructuredSDFGBuilder::add_if_else | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| IfElse & sdfg::builder::StructuredSDFGBuilder::add_if_else_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| IfElse & sdfg::builder::StructuredSDFGBuilder::add_if_else_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
|
inline |
| Map & sdfg::builder::StructuredSDFGBuilder::add_map | ( | Sequence & | parent, |
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Map & sdfg::builder::StructuredSDFGBuilder::add_map_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Map & sdfg::builder::StructuredSDFGBuilder::add_map_at | ( | Sequence & | parent, |
| InsertionPoint | insertion_point, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Map & sdfg::builder::StructuredSDFGBuilder::add_map_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::DataFlowNode & | src, | ||
| const std::string & | src_conn, | ||
| data_flow::DataFlowNode & | dst, | ||
| const std::string & | dst_conn, | ||
| const data_flow::Subset & | subset, | ||
| const types::IType & | base_type, | ||
| const DebugInfo & | debug_info ) |
| Reduce & sdfg::builder::StructuredSDFGBuilder::add_reduce | ( | Sequence & | parent, |
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const std::vector< structured_control_flow::ReductionInfo > & | reductions, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Reduce & sdfg::builder::StructuredSDFGBuilder::add_reduce_after | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const std::vector< structured_control_flow::ReductionInfo > & | reductions, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Reduce & sdfg::builder::StructuredSDFGBuilder::add_reduce_before | ( | Sequence & | parent, |
| ControlFlowNode & | child, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update, | ||
| const std::vector< structured_control_flow::ReductionInfo > & | reductions, | ||
| const ScheduleType & | schedule_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::add_reference_memlet | ( | structured_control_flow::Block & | block, |
| data_flow::AccessNode & | src, | ||
| data_flow::AccessNode & | dst, | ||
| const data_flow::Subset & | subset, | ||
| const types::IType & | base_type, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Return & sdfg::builder::StructuredSDFGBuilder::add_return | ( | Sequence & | parent, |
| const std::string & | data, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Sequence & sdfg::builder::StructuredSDFGBuilder::add_sequence | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| Sequence & sdfg::builder::StructuredSDFGBuilder::add_sequence_after | ( | Sequence & | parent, |
| ControlFlowNode & | block, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Sequence & sdfg::builder::StructuredSDFGBuilder::add_sequence_at | ( | Sequence & | parent, |
| InsertionPoint | insertion_point, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| Sequence & sdfg::builder::StructuredSDFGBuilder::add_sequence_before | ( | Sequence & | parent, |
| ControlFlowNode & | block, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| data_flow::Tasklet & sdfg::builder::StructuredSDFGBuilder::add_tasklet | ( | structured_control_flow::Block & | block, |
| const data_flow::TaskletCode | code, | ||
| const std::string & | output, | ||
| const std::vector< std::string > & | inputs, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| While & sdfg::builder::StructuredSDFGBuilder::add_while | ( | Sequence & | parent, |
| const DebugInfo & | debug_info = DebugInfo() ) |
| void sdfg::builder::StructuredSDFGBuilder::clear_access_node_legacy | ( | structured_control_flow::Block & | block, |
| const data_flow::AccessNode & | node ) |
Removes a code node and maybe some of its inputs as well.
| void sdfg::builder::StructuredSDFGBuilder::clear_code_node_legacy | ( | structured_control_flow::Block & | block, |
| const data_flow::CodeNode & | node ) |
Removes a code node and all its input and output edges.
Will remove unused access nodes at the ends of those edges. Caller must ensure that targets of output edges remain valid with their input edges removed.
| int sdfg::builder::StructuredSDFGBuilder::clear_node | ( | structured_control_flow::Block & | block, |
| const data_flow::DataFlowNode & | node ) |
Shorthand for clear_node with the node itself being the only one to ignore side-effects on.
| int sdfg::builder::StructuredSDFGBuilder::clear_node | ( | structured_control_flow::Block & | block, |
| const data_flow::DataFlowNode & | node, | ||
| const std::unordered_set< const data_flow::DataFlowNode * > & | ignore_side_effects ) |
New function to remove all unneeded edges and nodes transitively.
Checks for side effects and other output uses. WARNING: it will remove output edges that are unused, but potentially leave the produce alive, if it has other uses. Do not use, until we support nodes with unpopulated outputs or are sure that it cannot happen as a result.
| block | the dataflow graph in which to remove |
| node | the original node, where the start the removal process |
| ignore_side_effects | list of nodes, for which we can ignore side effects (for access nodes, this would be writes, for code_nodes it would depend on their side_effect flag) The original node itself must also be in that list, to ignore any of its side effects! |
| int sdfg::builder::StructuredSDFGBuilder::clear_ptr_borrow_edge | ( | Block & | block, |
| const data_flow::Memlet & | edge ) |
| Reduce & sdfg::builder::StructuredSDFGBuilder::convert_for_to_reduce | ( | Sequence & | parent, |
| For & | loop, | ||
| const std::vector< structured_control_flow::ReductionInfo > & | reductions ) |
| Map & sdfg::builder::StructuredSDFGBuilder::convert_reduce_to_map | ( | Sequence & | parent, |
| Reduce & | reduce ) |
| For & sdfg::builder::StructuredSDFGBuilder::convert_while | ( | Sequence & | parent, |
| While & | loop, | ||
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update ) |
|
inline |
| Element * sdfg::builder::StructuredSDFGBuilder::find_element_by_id | ( | const size_t & | element_id | ) | const |
|
overrideprotectedvirtual |
Implements sdfg::builder::FunctionBuilder.
| Sequence & sdfg::builder::StructuredSDFGBuilder::hoist_root | ( | ) |
| void sdfg::builder::StructuredSDFGBuilder::merge_siblings | ( | data_flow::AccessNode & | in_node | ) |
| void sdfg::builder::StructuredSDFGBuilder::merge_sinks | ( | structured_control_flow::Block & | block | ) |
Walks all sink nodes of a block's dataflow graph and merges access nodes that refer to the same container into a single sink access node, redirecting their incoming memlets.
| std::unique_ptr< StructuredSDFG > sdfg::builder::StructuredSDFGBuilder::move | ( | ) |
| void sdfg::builder::StructuredSDFGBuilder::move_child | ( | Sequence & | source, |
| size_t | source_index, | ||
| Sequence & | target ) |
| void sdfg::builder::StructuredSDFGBuilder::move_child | ( | Sequence & | source, |
| size_t | source_index, | ||
| Sequence & | target, | ||
| size_t | target_index ) |
| void sdfg::builder::StructuredSDFGBuilder::move_children | ( | Sequence & | source, |
| Sequence & | target, | ||
| size_t | target_index ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_case | ( | IfElse & | scope, |
| size_t | i, | ||
| const DebugInfo & | debug_info = DebugInfo() ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_child | ( | Sequence & | parent, |
| size_t | index ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_children | ( | Sequence & | parent | ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_from_parent | ( | ControlFlowNode & | child | ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_memlet | ( | structured_control_flow::Block & | block, |
| const data_flow::Memlet & | edge ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_node | ( | structured_control_flow::Block & | block, |
| const data_flow::DataFlowNode & | node ) |
| void sdfg::builder::StructuredSDFGBuilder::remove_schedule_property | ( | StructuredLoop & | loop, |
| const std::string & | key ) |
Remove a single property (if present) from the schedule type of a loop.
|
overridevirtual |
Reimplemented from sdfg::builder::FunctionBuilder.
| void sdfg::builder::StructuredSDFGBuilder::rename_containers | ( | const std::vector< std::pair< std::string, std::string > > & | renames | ) | const |
Applies several renames with a single tree traversal; old names must be distinct and not renamed targets.
| data_flow::Memlet & sdfg::builder::StructuredSDFGBuilder::replace_memlet_src_with_constant | ( | structured_control_flow::Block & | block, |
| data_flow::Memlet & | edge, | ||
| const std::string & | data, | ||
| const types::IType & | type ) |
Replaces the source of a computational read memlet with a new ConstantNode carrying data/type.
|
overridevirtual |
Replace symbolic expressions on the whole SDFG.
| old_expression | Expression to replace |
| new_expression | Replacement expression |
Reimplemented from sdfg::builder::FunctionBuilder.
|
overridevirtual |
Reimplemented from sdfg::builder::FunctionBuilder.
| StructuredSDFG & sdfg::builder::StructuredSDFGBuilder::subject | ( | ) | const |
| void sdfg::builder::StructuredSDFGBuilder::update_if_else_condition | ( | IfElse & | if_else, |
| size_t | branch, | ||
| const symbolic::Condition | cond ) |
| void sdfg::builder::StructuredSDFGBuilder::update_loop | ( | StructuredLoop & | loop, |
| const symbolic::Symbol | indvar, | ||
| const symbolic::Condition | condition, | ||
| const symbolic::Expression | init, | ||
| const symbolic::Expression | update ) |
| void sdfg::builder::StructuredSDFGBuilder::update_schedule_type | ( | StructuredLoop & | loop, |
| const ScheduleType & | schedule_type, | ||
| bool | keep_nest_annotations = true ) |
Replace the schedule type of a loop.
By default, nest-level annotations (see ScheduleType_NestAnnotations, e.g. no-fusion and zero-init) of the current schedule are kept unless schedule_type sets them itself, so that re-scheduling a nest root (offloading, parallelization, ...) does not lose them. Pass keep_nest_annotations = false to set schedule_type exactly, e.g. when a loop stops being the root of its nest.