docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::data_flow::MemoryAccessPattern Class Referenceabstract

#include <sdfg/data_flow/pointer_metadata.h>

Inheritance diagram for sdfg::data_flow::MemoryAccessPattern:
[legend]

Public Member Functions

virtual ~MemoryAccessPattern ()=default
virtual bool empty () const =0
 There are no elements in this pattern = no accesses of this type.
virtual bool every_element_accessed () const =0
 Every element that is part of this pattern is actually accessed.
virtual const math::tensor::TensorLayout * layout () const
 The structured affine layout (shape/strides/offset, in elements) backing this pattern, or nullptr when the pattern carries no explicit layout (a flat convex span or no access).
MemoryAccessPatternType ref () const
virtual void replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression)=0
virtual void replace (const symbolic::ExpressionMapping &replacements)=0
virtual MemoryAccessPatternType clone () const =0
virtual void serialize_to_json (nlohmann::json &entry)=0

Constructor & Destructor Documentation

◆ ~MemoryAccessPattern()

virtual sdfg::data_flow::MemoryAccessPattern::~MemoryAccessPattern ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual MemoryAccessPatternType sdfg::data_flow::MemoryAccessPattern::clone ( ) const
pure virtual

◆ empty()

virtual bool sdfg::data_flow::MemoryAccessPattern::empty ( ) const
pure virtual

There are no elements in this pattern = no accesses of this type.

Implemented in sdfg::data_flow::ConvexAccessPattern, sdfg::data_flow::NoAccessPattern, and sdfg::data_flow::TensorLayoutPattern.

◆ every_element_accessed()

virtual bool sdfg::data_flow::MemoryAccessPattern::every_element_accessed ( ) const
pure virtual

Every element that is part of this pattern is actually accessed.

If false, this is just an approximation that may contain elements in between the bounds that are not guaranteed to be accessed Ex. indicating write of a[0] and a[9] as ConvexPattern(10) is approximate. Writes a[0], a[1], .. [9] would be every element being accessed. Bounds should never be violated regardless. We may in the future

Implemented in sdfg::data_flow::ConvexAccessPattern, sdfg::data_flow::NoAccessPattern, and sdfg::data_flow::TensorLayoutPattern.

◆ layout()

virtual const math::tensor::TensorLayout * sdfg::data_flow::MemoryAccessPattern::layout ( ) const
inlinevirtual

The structured affine layout (shape/strides/offset, in elements) backing this pattern, or nullptr when the pattern carries no explicit layout (a flat convex span or no access).

Only TensorLayoutPattern provides one.

Reimplemented in sdfg::data_flow::TensorLayoutPattern.

◆ ref()

MemoryAccessPatternType sdfg::data_flow::MemoryAccessPattern::ref ( ) const

◆ replace() [1/2]

virtual void sdfg::data_flow::MemoryAccessPattern::replace ( const symbolic::Expression old_expression,
const symbolic::Expression new_expression )
pure virtual

◆ replace() [2/2]

virtual void sdfg::data_flow::MemoryAccessPattern::replace ( const symbolic::ExpressionMapping & replacements)
pure virtual

◆ serialize_to_json()

virtual void sdfg::data_flow::MemoryAccessPattern::serialize_to_json ( nlohmann::json & entry)
pure virtual

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