LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::qn::CacheParam< T > Struct Template Reference

#include <line/lang/qn/network_struct.h>

Collaboration diagram for line::qn::CacheParam< T >:

Classes

struct  Popularity
 The popularity LAW each class declared, beside the pmf it expands to. More...

Public Attributes

std::size_t nitems = 0
std::vector< int > itemcap
std::vector< std::size_t > classitem
 Item read by each per-item class of a cache network (MATLAB Cache.setItemReadClasses, sn.nodeparam{i}.classitem), 1-based, 0 where the class is not one.
std::vector< int > itemsize
 Per-item storage cost (size) and per-list cap on the total cost of the resident items (ton21cache Sec.
std::vector< int > costcap
bool costcapglobal = false
std::vector< std::vector< T > > pread
 (u) x (n), empty row = NaN
std::vector< Popularitypreadkind
 per class, parallel to pread
lang::ReplacementStrategy replacestrat = lang::ReplacementStrategy::RR
std::vector< std::size_t > hitclass
std::vector< std::size_t > missclass
std::vector< std::vector< Matrix< T > > > accost
 (u) x (n) of (h+1)x(h+1), or empty
qlru = num_traits<T>::from_int(1)
 Delayed-hit retrieval system (Cache.setRetrievalSystem).
int retrieval_capacity = 0
std::map< std::size_t, std::vector< std::size_t > > retrieval_queues
 read class(0-based)->nodes
std::vector< std::vector< std::size_t > > retrieval_classes
 (nitems x nclasses), 1-based
std::vector< T > initstate
 The DECLARED initial contents of the cache, as the reference dumps the node's state row: the per-class job counts, then the list contents, then the retrieval bitmap.
long max_pending_retrieval = -1
 Truncation level of block B: how many secondary requests may be merged onto the in-flight fetches of this cache at once.

Detailed Description

template<class T>
struct line::qn::CacheParam< T >

Definition at line 477 of file network_struct.h.

Member Data Documentation

◆ accost

◆ classitem

template<class T>
std::vector<std::size_t> line::qn::CacheParam< T >::classitem

Item read by each per-item class of a cache network (MATLAB Cache.setItemReadClasses, sn.nodeparam{i}.classitem), 1-based, 0 where the class is not one.

Stored rather than inferred from a one-hot pread, which is ambiguous against a genuine single-item popularity.

Definition at line 486 of file network_struct.h.

Referenced by line::io::build_network_from_json(), line::io::network_to_json(), line::qn::Network< double >::set_item_read_classes(), and line::qn::Network< double >::set_miss_cache().

◆ costcap

template<class T>
std::vector<int> line::qn::CacheParam< T >::costcap

◆ costcapglobal

template<class T>
bool line::qn::CacheParam< T >::costcapglobal = false

◆ hitclass

◆ initstate

template<class T>
std::vector<T> line::qn::CacheParam< T >::initstate

The DECLARED initial contents of the cache, as the reference dumps the node's state row: the per-class job counts, then the list contents, then the retrieval bitmap.

Empty means the cache starts empty, which is what initDefault builds; a warm cache is not derivable from anything else.

Definition at line 534 of file network_struct.h.

Referenced by line::io::build_network_from_json(), and line::io::network_to_json().

◆ itemcap

◆ itemsize

template<class T>
std::vector<int> line::qn::CacheParam< T >::itemsize

Per-item storage cost (size) and per-list cap on the total cost of the resident items (ton21cache Sec.

IX). BOTH EMPTY = unconstrained, the classic model. costcapglobal records that the caps came from a single cache-wide value.

Definition at line 493 of file network_struct.h.

Referenced by line::io::build_network_from_json(), line::io::network_to_json(), and line::nc::solver_nc_cache_analyzer().

◆ max_pending_retrieval

template<class T>
long line::qn::CacheParam< T >::max_pending_retrieval = -1

Truncation level of block B: how many secondary requests may be merged onto the in-flight fetches of this cache at once.

-1 is UNBOUNDED, which is what a sample path needs and what State.afterEventCache calls the isSimulation branch; a non-negative value is the enumeration bound an exact solver generates its local state space under.

Definition at line 542 of file network_struct.h.

Referenced by line::qn::after_event_cache(), and line::qn::from_marginal_node().

◆ missclass

◆ nitems

◆ pread

◆ preadkind

◆ qlru

template<class T>
T line::qn::CacheParam< T >::qlru = num_traits<T>::from_int(1)

Delayed-hit retrieval system (Cache.setRetrievalSystem).

Zero capacity = none. retrieval_queues[r] are the 1-based retrieval-station node indices a read of class r (0-based key) circulates on a miss; retrieval_classes is (nitems x nclasses), item i of read class r -> the per-item retrieval class (1-based), 0 where none. Built by set_retrieval_system. q-LRU admission probability; 1 admits every miss (plain LRU).

Definition at line 524 of file network_struct.h.

Referenced by line::qn::after_event_cache(), line::io::build_network_from_json(), and line::io::network_to_json().

◆ replacestrat

◆ retrieval_capacity

◆ retrieval_classes

◆ retrieval_queues

template<class T>
std::map<std::size_t, std::vector<std::size_t> > line::qn::CacheParam< T >::retrieval_queues

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