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

#include <sdfg/data_flow/pointer_metadata.h>

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

Public Member Functions

virtual ~PointerAccessMeta ()=default
virtual bool no_capture () const =0
 Despite this being a leak of the pointer, the user will only use it for blocking accesses to the underlying data and not capture a reference to the data in any way.
virtual bool may_contain_reads () const =0
 The pointer may be used to read from the backing data.
virtual bool may_contain_writes () const =0
 The pointe may be used to write to the backing data.
virtual bool invalidated_after () const =0
virtual MemoryAccessPatternType access_read_pattern () const =0
 Describes which elements are accessed (for example a function may only access the range of [ptr, ptr+8] bytes and not touch or care about what comes after) Pointer access metadata only applies to the elements that are part of the pattern.
virtual MemoryAccessPatternType access_write_pattern () const =0
PointerAccessType 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 PointerAccessType clone () const =0
virtual void serialize_to_json (nlohmann::json &entry)=0

Static Public Member Functions

static PointerAccessType create_read_only (const symbolic::Expression &size, bool no_capture, std::optional< math::tensor::TensorLayout > layout=std::nullopt, bool every_element_read=false)
static PointerAccessType create_invalidate ()
static PointerAccessType create_full_write_only (const symbolic::Expression &size, bool no_capture, std::optional< math::tensor::TensorLayout > layout=std::nullopt)
static PointerAccessType create_generic (MemoryAccessPatternType read_pattern, MemoryAccessPatternType write_pattern, bool no_capture)

Protected Member Functions

 PointerAccessMeta ()=default

Constructor & Destructor Documentation

◆ PointerAccessMeta()

sdfg::data_flow::PointerAccessMeta::PointerAccessMeta ( )
protecteddefault

◆ ~PointerAccessMeta()

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

Member Function Documentation

◆ access_read_pattern()

virtual MemoryAccessPatternType sdfg::data_flow::PointerAccessMeta::access_read_pattern ( ) const
pure virtual

Describes which elements are accessed (for example a function may only access the range of [ptr, ptr+8] bytes and not touch or care about what comes after) Pointer access metadata only applies to the elements that are part of the pattern.

A structured operand carries its real shape/strides through a TensorLayoutPattern; a flat convex span through a ConvexAccessPattern.

Implemented in sdfg::data_flow::PointerFullWriteOnly, sdfg::data_flow::PointerGenericAccess, sdfg::data_flow::PointerInvalidate, and sdfg::data_flow::PointerReadOnly.

◆ access_write_pattern()

virtual MemoryAccessPatternType sdfg::data_flow::PointerAccessMeta::access_write_pattern ( ) const
pure virtual

◆ clone()

◆ create_full_write_only()

PointerAccessType sdfg::data_flow::PointerAccessMeta::create_full_write_only ( const symbolic::Expression & size,
bool no_capture,
std::optional< math::tensor::TensorLayout > layout = std::nullopt )
static

◆ create_generic()

PointerAccessType sdfg::data_flow::PointerAccessMeta::create_generic ( MemoryAccessPatternType read_pattern,
MemoryAccessPatternType write_pattern,
bool no_capture )
static

◆ create_invalidate()

PointerAccessType sdfg::data_flow::PointerAccessMeta::create_invalidate ( )
static

◆ create_read_only()

PointerAccessType sdfg::data_flow::PointerAccessMeta::create_read_only ( const symbolic::Expression & size,
bool no_capture,
std::optional< math::tensor::TensorLayout > layout = std::nullopt,
bool every_element_read = false )
static

◆ invalidated_after()

virtual bool sdfg::data_flow::PointerAccessMeta::invalidated_after ( ) const
pure virtual

◆ may_contain_reads()

virtual bool sdfg::data_flow::PointerAccessMeta::may_contain_reads ( ) const
pure virtual

◆ may_contain_writes()

virtual bool sdfg::data_flow::PointerAccessMeta::may_contain_writes ( ) const
pure virtual

◆ no_capture()

virtual bool sdfg::data_flow::PointerAccessMeta::no_capture ( ) const
pure virtual

Despite this being a leak of the pointer, the user will only use it for blocking accesses to the underlying data and not capture a reference to the data in any way.

Like a Rust temporary borrow for the duration of the LibNode and no more.

Implemented in sdfg::data_flow::PointerFullWriteOnly, sdfg::data_flow::PointerGenericAccess, sdfg::data_flow::PointerInvalidate, and sdfg::data_flow::PointerReadOnly.

◆ ref()

PointerAccessType sdfg::data_flow::PointerAccessMeta::ref ( ) const

◆ replace() [1/2]

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

◆ replace() [2/2]

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

◆ serialize_to_json()

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

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