TeDDy 4.1.0
Decision diagram library.
All Classes Namespaces Functions Typedefs Concepts
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
teddy::apply_cache< Data, Degree > Class Template Reference

Cache for the apply opertaion. More...

#include <hash_tables.hpp>

Classes

struct  cache_entry
 

Public Types

using node_t = node< Data, Degree >
 

Public Member Functions

 apply_cache (int64 capacity)
 
 apply_cache (apply_cache &&other) noexcept
 
 apply_cache (apply_cache const &)=delete
 
auto operator= (apply_cache const &)=delete
 
auto operator= (apply_cache &&)=delete
 
auto find (int32 opId, node_t *lhs, node_t *rhs) -> node_t *
 Looks up result of an operation.
 
auto put (int32 opId, node_t *result, node_t *lhs, node_t *rhs) -> void
 Puts the result into the cache possibly overwriting old value.
 
auto grow_capacity (int64 aproxCapacity) -> void
 Increases the capacity so that it is close to aproxCapacity Never lowers the capacity!
 
auto remove_unused () -> void
 Removes entries pointing to unused nodes.
 
auto clear () -> void
 Clears all entries.
 

Detailed Description

template<class Data, class Degree>
class teddy::apply_cache< Data, Degree >

Cache for the apply opertaion.


Class Documentation

◆ teddy::apply_cache::cache_entry

struct teddy::apply_cache::cache_entry
template<class Data, class Degree>
struct teddy::apply_cache< Data, Degree >::cache_entry
Class Members
int32 opId_
node_t * lhs_
node_t * rhs_
node_t * result_

Member Function Documentation

◆ find()

template<class Data , class Degree >
auto teddy::apply_cache< Data, Degree >::find ( int32  opId,
node_t lhs,
node_t rhs 
) -> node_t*

Looks up result of an operation.

Parameters
opIdid of the operation
lhsfirst operand
rhssecond operand
Returns
result of the previous operation or nullptr

◆ put()

template<class Data , class Degree >
auto teddy::apply_cache< Data, Degree >::put ( int32  opId,
node_t result,
node_t lhs,
node_t rhs 
) -> void

Puts the result into the cache possibly overwriting old value.

Parameters
opIdid of the operation
resultresult
lhsfirst operand
rhssecond operand
Returns
result of the previous operation or nullptr

◆ grow_capacity()

template<class Data , class Degree >
auto teddy::apply_cache< Data, Degree >::grow_capacity ( int64  aproxCapacity) -> void

Increases the capacity so that it is close to aproxCapacity Never lowers the capacity!

Parameters
aproxCapacitynew capacity

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