|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Edge in the dataflow graph representing data movement. More...
#include <sdfg/data_flow/memlet.h>
Public Member Functions | |
| Memlet (const Memlet &memlet)=delete | |
| Memlet & | operator= (const Memlet &)=delete |
| ElementType | type_id () const override |
| Returns the type of the element. | |
| void | validate (const Function &function) const override |
| Validate the memlet. | |
| const graph::Edge | edge () const |
| Get the graph edge for this memlet. | |
| const DataFlowGraph & | get_parent () const |
| Get the parent dataflow graph (const). | |
| DataFlowGraph & | get_parent () |
| Get the parent dataflow graph (mutable). | |
| MemletType | type () const |
| Determine the type of this memlet. | |
| bool | is_src_read () const |
| Memlet actually reads src (from memory). | |
| bool | is_src_direct_read () const |
| Memlet returns the contents of src (this is [is_src_read()], excluding that the contents are only used transitively). | |
| bool | is_src_pointed_to_read () const |
| Makes a memory read with src-contents as (partial) address. | |
| bool | is_src_address_leak () const |
| Leaks the address of src or uses it in an address calculation that is returned. | |
| bool | is_src_pointed_to_address_leak (const types::IType &src_type) const |
| Leaks address of what src points to. | |
| bool | is_dst_write () const |
| makes a memory write to dst (itself). | |
| bool | is_dst_pointed_to_write () const |
| Contents of dst are used in the address calculation of a memory write. | |
| bool | is_dst_read () const |
| Contents of dst are read. | |
| bool | is_src_constant (double value) const |
| Check if the source is a constant scalar with the given value. | |
| bool | is_src_constant (int64_t value) const |
| Check if the source is a constant scalar with the given integer value. | |
| const DataFlowNode & | src () const |
| Get the source node (const). | |
| DataFlowNode & | src () |
| Get the source node (mutable). | |
| const DataFlowNode & | dst () const |
| Get the destination node (const). | |
| DataFlowNode & | dst () |
| Get the destination node (mutable). | |
| const std::string & | src_conn () const |
| Get the source connector name. | |
| const std::string & | dst_conn () const |
| Get the destination connector name. | |
| const Subset & | subset () const |
| Get the data access subset. | |
| void | set_subset (const Subset &subset) |
| Set the data access subset. | |
| const types::IType & | base_type () const |
| Get the base type of the data. | |
| void | set_base_type (const types::IType &base_type) |
| Set the base type of the data. | |
| std::unique_ptr< types::IType > | result_type (const Function &function) const |
| Compute the result type after applying subset. | |
| std::unique_ptr< Memlet > | clone (size_t element_id, const graph::Edge &edge, DataFlowGraph &parent, DataFlowNode &src, DataFlowNode &dst) const |
| Clone this memlet for graph transformations. | |
| void | replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override |
| Replace symbolic expressions in this memlet. | |
| void | replace (const symbolic::ExpressionMapping &replacements) override |
| Public Member Functions inherited from sdfg::Element | |
| Element (size_t element_id, const DebugInfo &debug_info) | |
| virtual | ~Element ()=default |
| size_t | element_id () const |
| const DebugInfo & | debug_info () const |
| void | set_debug_info (const DebugInfo &debug_info) |
| void | add_metadata (const std::string &key, const std::string &value) |
| void | remove_metadata (const std::string &key) |
| const std::string & | metadata (const std::string &key) const |
| const std::string * | metadata_if_exists (const std::string &key) const |
| const std::unordered_map< std::string, std::string > & | metadata () const |
| std::string_view | element_type () const |
| Returns the type of the element as a human-readable string. | |
Static Public Member Functions | |
| static bool | classof (const Element &element) |
Friends | |
| class | sdfg::builder::SDFGBuilder |
| class | sdfg::builder::StructuredSDFGBuilder |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::Element | |
| size_t | element_id_ |
| DebugInfo | debug_info_ |
| std::unordered_map< std::string, std::string > | metadata_ |
Edge in the dataflow graph representing data movement.
Memlets are the edges of the dataflow graph that describe how data flows between nodes. Each memlet specifies:
Memlets are validated to ensure correct connections between node types and proper type usage.
|
delete |
| const types::IType & sdfg::data_flow::Memlet::base_type | ( | ) | const |
Get the base type of the data.
|
inlinestatic |
| std::unique_ptr< Memlet > sdfg::data_flow::Memlet::clone | ( | size_t | element_id, |
| const graph::Edge & | edge, | ||
| DataFlowGraph & | parent, | ||
| DataFlowNode & | src, | ||
| DataFlowNode & | dst ) const |
Clone this memlet for graph transformations.
| element_id | New element identifier |
| edge | New graph edge |
| parent | New parent graph |
| src | New source node |
| dst | New destination node |
| DataFlowNode & sdfg::data_flow::Memlet::dst | ( | ) |
Get the destination node (mutable).
| const DataFlowNode & sdfg::data_flow::Memlet::dst | ( | ) | const |
Get the destination node (const).
| const std::string & sdfg::data_flow::Memlet::dst_conn | ( | ) | const |
Get the destination connector name.
| const graph::Edge sdfg::data_flow::Memlet::edge | ( | ) | const |
Get the graph edge for this memlet.
| DataFlowGraph & sdfg::data_flow::Memlet::get_parent | ( | ) |
Get the parent dataflow graph (mutable).
| const DataFlowGraph & sdfg::data_flow::Memlet::get_parent | ( | ) | const |
Get the parent dataflow graph (const).
| bool sdfg::data_flow::Memlet::is_dst_pointed_to_write | ( | ) | const |
Contents of dst are used in the address calculation of a memory write.
| bool sdfg::data_flow::Memlet::is_dst_read | ( | ) | const |
Contents of dst are read.
| bool sdfg::data_flow::Memlet::is_dst_write | ( | ) | const |
makes a memory write to dst (itself).
Using dst as pointer is not a write to dst
| bool sdfg::data_flow::Memlet::is_src_address_leak | ( | ) | const |
Leaks the address of src or uses it in an address calculation that is returned.
If the result is not DeadCode, somebody else could use it to change src, without using the container
| bool sdfg::data_flow::Memlet::is_src_constant | ( | double | value | ) | const |
Check if the source is a constant scalar with the given value.
| value | Value to check against |
| bool sdfg::data_flow::Memlet::is_src_constant | ( | int64_t | value | ) | const |
Check if the source is a constant scalar with the given integer value.
Parses the constant exactly as a signed 64-bit integer, avoiding the precision loss of the floating-point overload for large integers.
| value | Value to check against |
| bool sdfg::data_flow::Memlet::is_src_direct_read | ( | ) | const |
Memlet returns the contents of src (this is [is_src_read()], excluding that the contents are only used transitively).
| bool sdfg::data_flow::Memlet::is_src_pointed_to_address_leak | ( | const types::IType & | src_type | ) | const |
Leaks address of what src points to.
Only valid for when src is a pointer-like
| bool sdfg::data_flow::Memlet::is_src_pointed_to_read | ( | ) | const |
Makes a memory read with src-contents as (partial) address.
| bool sdfg::data_flow::Memlet::is_src_read | ( | ) | const |
Memlet actually reads src (from memory).
Address calculations with the src as symbol are not reads. If src is local memory,
|
delete |
|
overridevirtual |
Replace symbolic expressions in this memlet.
| old_expression | Expression to replace |
| new_expression | Replacement expression |
Replaces occurrences in the subset vector & the base type.
Implements sdfg::Element.
|
overridevirtual |
Reimplemented from sdfg::Element.
| std::unique_ptr< types::IType > sdfg::data_flow::Memlet::result_type | ( | const Function & | function | ) | const |
Compute the result type after applying subset.
| function | Function context for type inference |
| void sdfg::data_flow::Memlet::set_base_type | ( | const types::IType & | base_type | ) |
Set the base type of the data.
| base_type | New base type |
| void sdfg::data_flow::Memlet::set_subset | ( | const Subset & | subset | ) |
Set the data access subset.
| subset | New subset vector |
| DataFlowNode & sdfg::data_flow::Memlet::src | ( | ) |
Get the source node (mutable).
| const DataFlowNode & sdfg::data_flow::Memlet::src | ( | ) | const |
Get the source node (const).
| const std::string & sdfg::data_flow::Memlet::src_conn | ( | ) | const |
Get the source connector name.
| const Subset & sdfg::data_flow::Memlet::subset | ( | ) | const |
Get the data access subset.
| MemletType sdfg::data_flow::Memlet::type | ( | ) | const |
Determine the type of this memlet.
|
inlineoverridevirtual |
Returns the type of the element.
Implements sdfg::Element.
|
overridevirtual |
Validate the memlet.
| function | Function context for validation |
| InvalidSDFGException | if validation fails |
Validates that:
Implements sdfg::Element.
|
friend |
|
friend |