MLIR-AIE 1.4.6.dev
xilinx::AIE::BoundedMemo< Key, Value, Hash > Class Template Reference

A memo that keeps its capacity most recently used results, each key stored once. More...

#include "aie/Dialect/AIE/Transforms/AIEBoundedMemo.h"

Inheritance diagram for xilinx::AIE::BoundedMemo< Key, Value, Hash >:

Public Member Functions

 BoundedMemo (size_t capacity)
const Value * find (const Key &key)
 The result recorded for key, now the most recently used, or null.
void record (Key key, Value value)
 Records value for key, replacing any result it had, and forgets the least recently used result past capacity.
void clear ()

Detailed Description

template<typename Key, typename Value, typename Hash = VectorKeyHash>
class xilinx::AIE::BoundedMemo< Key, Value, Hash >

A memo that keeps its capacity most recently used results, each key stored once.

Definition at line 30 of file AIEBoundedMemo.h.

Constructor & Destructor Documentation

◆ BoundedMemo()

template<typename Key, typename Value, typename Hash = VectorKeyHash>
xilinx::AIE::BoundedMemo< Key, Value, Hash >::BoundedMemo ( size_t capacity)
inlineexplicit

Definition at line 32 of file AIEBoundedMemo.h.

Member Function Documentation

◆ clear()

template<typename Key, typename Value, typename Hash = VectorKeyHash>
void xilinx::AIE::BoundedMemo< Key, Value, Hash >::clear ( )
inline

Definition at line 62 of file AIEBoundedMemo.h.

◆ find()

template<typename Key, typename Value, typename Hash = VectorKeyHash>
const Value * xilinx::AIE::BoundedMemo< Key, Value, Hash >::find ( const Key & key)
inline

The result recorded for key, now the most recently used, or null.

Valid until the next record().

Definition at line 36 of file AIEBoundedMemo.h.

Referenced by xilinx::AIE::LockPlan::assign().

◆ record()

template<typename Key, typename Value, typename Hash = VectorKeyHash>
void xilinx::AIE::BoundedMemo< Key, Value, Hash >::record ( Key key,
Value value )
inline

Records value for key, replacing any result it had, and forgets the least recently used result past capacity.

Definition at line 46 of file AIEBoundedMemo.h.

Referenced by xilinx::AIE::LockPlan::assign().


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