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

Meaning the underlying memory will be deallocated and use of the pointer after this is no longer valid. More...

#include <sdfg/data_flow/pointer_metadata.h>

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

Public Member Functions

bool no_capture () const override
 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.
bool may_contain_reads () const override
 The pointer may be used to read from the backing data.
bool may_contain_writes () const override
 The pointe may be used to write to the backing data.
bool invalidated_after () const override
MemoryAccessPatternType access_read_pattern () const override
 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.
MemoryAccessPatternType access_write_pattern () const override
void replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
void replace (const symbolic::ExpressionMapping &replacements) override
PointerAccessType clone () const override
void serialize_to_json (nlohmann::json &entry) override
Public Member Functions inherited from sdfg::data_flow::PointerAccessMeta
virtual ~PointerAccessMeta ()=default
PointerAccessType ref () const

Additional Inherited Members

Static Public Member Functions inherited from sdfg::data_flow::PointerAccessMeta
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 inherited from sdfg::data_flow::PointerAccessMeta
 PointerAccessMeta ()=default

Detailed Description

Meaning the underlying memory will be deallocated and use of the pointer after this is no longer valid.

Does not represent a leak of the pointer. Read-accesses to the pointer itself after this, but before an overwrite represent accessing most-likely invalid data Memory accesses using this invalid pointer are catastrophic failures.

Member Function Documentation

◆ access_read_pattern()

MemoryAccessPatternType sdfg::data_flow::PointerInvalidate::access_read_pattern ( ) const
inlineoverridevirtual

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.

Implements sdfg::data_flow::PointerAccessMeta.

◆ access_write_pattern()

MemoryAccessPatternType sdfg::data_flow::PointerInvalidate::access_write_pattern ( ) const
inlineoverridevirtual

◆ clone()

PointerAccessType sdfg::data_flow::PointerInvalidate::clone ( ) const
overridevirtual

◆ invalidated_after()

bool sdfg::data_flow::PointerInvalidate::invalidated_after ( ) const
inlineoverridevirtual

◆ may_contain_reads()

bool sdfg::data_flow::PointerInvalidate::may_contain_reads ( ) const
inlineoverridevirtual

The pointer may be used to read from the backing data.

Implements sdfg::data_flow::PointerAccessMeta.

◆ may_contain_writes()

bool sdfg::data_flow::PointerInvalidate::may_contain_writes ( ) const
inlineoverridevirtual

The pointe may be used to write to the backing data.

Implements sdfg::data_flow::PointerAccessMeta.

◆ no_capture()

bool sdfg::data_flow::PointerInvalidate::no_capture ( ) const
inlineoverridevirtual

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.

Implements sdfg::data_flow::PointerAccessMeta.

◆ replace() [1/2]

void sdfg::data_flow::PointerInvalidate::replace ( const symbolic::Expression old_expression,
const symbolic::Expression new_expression )
inlineoverridevirtual

◆ replace() [2/2]

void sdfg::data_flow::PointerInvalidate::replace ( const symbolic::ExpressionMapping & replacements)
inlineoverridevirtual

◆ serialize_to_json()

void sdfg::data_flow::PointerInvalidate::serialize_to_json ( nlohmann::json & entry)
overridevirtual

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