![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | FpiOptions |
| Options mirroring the trailing (max_iter, tol) arguments of the MATLAB function. More... | |
| struct | RetrievalFpiLatencyResult |
| Mirrors the [Z, d, phi, pi0] return list of the MATLAB function. More... | |
| struct | RetrievalFpiResult |
| Mirrors the [pmiss, phit, pdh] return list, plus the iteration diagnostics. More... | |
| struct | RetrievalInputs |
| The [m, lambda, gamma, eta, alpha/T (station), R] the retrieval algorithms read. More... | |
| struct | RetrievalMetricsResult |
| Mirrors the [pmiss, phit, pdh] return list of the MATLAB function. More... | |
| struct | RetrievalMvaResult |
| Mirrors the [pmiss, phit, pdh] return list of the MATLAB function. More... | |
| struct | RetrievalRayintResult |
| Outcome of the expansion. More... | |
| struct | RetrievalStationPH |
| Phase-type service of every item at one retrieval station. More... | |
Enumerations | |
| enum class | RetrievalStationType { IS , PS , SIRO , FCFS , LCFSPR } |
| Scheduling of a retrieval station, mirroring the MATLAB station_type strings. More... | |
Functions | |
| template<class T> | |
| RetrievalInputs< T > | cache_retrieval_inputs (const qn::NetworkStruct< T > &sn, double lambda_override=-1.0) |
| Extract the delayed-hit retrieval-algorithm inputs from a NetworkStruct, a port of matlab/src/api/retrieval/cache_retrieval_inputs.m. | |
| template<class T> | |
| RetrievalFpiResult< T > | retrieval_fpi (const std::vector< int > &m, const std::vector< T > &lambda, const Matrix< T > &eta, const Matrix< T > &gamma, const FpiOptions &options=FpiOptions()) |
| Fixed-point heuristic for a delayed-hit (list-based) cache. | |
| bool | is_shared_station (RetrievalStationType t) |
| True for the disciplines that carry the mean-field sharing slowdown. | |
| template<class T> | |
| RetrievalFpiLatencyResult< T > | retrieval_fpi_latency (const std::vector< int > &m, const std::vector< T > &lambda, const Matrix< T > &gamma, const std::vector< RetrievalStationPH< T > > &station, const std::vector< Matrix< T > > &R, const FpiOptions &options=FpiOptions()) |
| FPI-based approximation of the delayed-hit count and the expected latency of a list-based cache with a phase-type retrieval system. | |
| template<class T> | |
| RetrievalMetricsResult< T > | retrieval_metrics (const std::vector< int > &m, const std::vector< T > &lambda, const Matrix< T > &eta, const Matrix< T > &gamma) |
| Exact miss, hit and delayed-hit metrics of a delayed-hit (list-based) cache. | |
| template<class T> | |
| RetrievalMvaResult< T > | retrieval_mva (const std::vector< int > &m, const std::vector< T > &lambda, const Matrix< T > &eta, const Matrix< T > &gamma) |
| Exact MVA-style recursion for delayed-hit (list-based) cache metrics. | |
| template<class T> | |
| T | retrieval_nc (const std::vector< int > &v, const std::vector< int > &m, const std::vector< T > &lambda, const Matrix< T > &eta, const Matrix< T > &gamma) |
| Exact normalizing constant E(v,m) of a delayed-hit (list-based) cache. | |
| template<class T> | |
| RetrievalRayintResult< T > | retrieval_rayint (const Matrix< T > &gamma, const std::vector< int > &m) |
| Discrete (saddle) form. | |
| template<class T> | |
| RetrievalRayintResult< T > | retrieval_rayint (const std::function< Matrix< T >(const std::vector< T > &)> &gfun, const std::vector< int > &m, int n, std::size_t nquad=4097) |
| Continuum (ray-integral) form. | |
|
strong |
Scheduling of a retrieval station, mirroring the MATLAB station_type strings.
| Enumerator | |
|---|---|
| IS | |
| PS | |
| SIRO | |
| FCFS | |
| LCFSPR | |
Definition at line 60 of file retrieval_fpi_latency.h.
| RetrievalInputs< T > line::retrieval::cache_retrieval_inputs | ( | const qn::NetworkStruct< T > & | sn, |
| double | lambda_override = -1.0 ) |
Extract the delayed-hit retrieval-algorithm inputs from a NetworkStruct, a port of matlab/src/api/retrieval/cache_retrieval_inputs.m.
| sn | the model struct with a retrieval-system cache |
| lambda_override | the closed-sublayer read rate; <0 selects the Source throughput (open model) |
Definition at line 66 of file cache_retrieval_inputs.h.
References line::qn::CacheParam< T >::accost, line::cache::cache_gamma_lp(), cache_retrieval_inputs(), line::lang::dist_pie(), line::lang::dist_to_map(), line::retrieval::RetrievalInputs< T >::eta, FCFS, line::retrieval::RetrievalInputs< T >::gamma, line::InputError::InputError(), line::inverse(), IS, line::qn::CacheParam< T >::itemcap, line::retrieval::RetrievalInputs< T >::lambda, LCFSPR, line::retrieval::RetrievalInputs< T >::m, line::Matrix< T >::Matrix(), line::qn::CacheParam< T >::nitems, line::qn::CacheParam< T >::pread, PS, line::retrieval::RetrievalInputs< T >::queue_nodes, line::retrieval::RetrievalInputs< T >::R, line::retrieval::RetrievalInputs< T >::read_class, line::qn::CacheParam< T >::retrieval_capacity, line::qn::CacheParam< T >::retrieval_classes, line::qn::CacheParam< T >::retrieval_queues, SIRO, line::retrieval::RetrievalInputs< T >::station, and line::UnsupportedError::UnsupportedError().
Referenced by cache_retrieval_inputs(), line::mva::solver_mva_retrieval_analyzer(), and line::nc::solver_nc_retrieval_analyzer().
|
inline |
True for the disciplines that carry the mean-field sharing slowdown.
Definition at line 63 of file retrieval_fpi_latency.h.
References IS, and is_shared_station().
Referenced by is_shared_station(), and retrieval_fpi_latency().
| RetrievalFpiResult< T > line::retrieval::retrieval_fpi | ( | const std::vector< int > & | m, |
| const std::vector< T > & | lambda, | ||
| const Matrix< T > & | eta, | ||
| const Matrix< T > & | gamma, | ||
| const FpiOptions & | options = FpiOptions() ) |
Fixed-point heuristic for a delayed-hit (list-based) cache.
| m | (h) cache list capacities |
| lambda | (n) per-item arrival rates |
| eta | (n x (r+1)) fetching demands, column 0 = IS station, columns 1..r = PS |
| gamma | (n x h) access factors |
| options | fixed-point options (tolerance, iteration cap, damping) |
Definition at line 97 of file retrieval_fpi.h.
References line::Matrix< T >::cols(), line::retrieval::RetrievalFpiResult< T >::converged, line::Matrix< T >::data(), line::retrieval::RetrievalFpiResult< T >::diverged, line::InputError::InputError(), line::retrieval::RetrievalFpiResult< T >::iterations, line::retrieval::RetrievalFpiResult< T >::pdh, line::retrieval::RetrievalFpiResult< T >::phit, line::retrieval::RetrievalFpiResult< T >::pmiss, retrieval_fpi(), line::Matrix< T >::rows(), and line::Matrix< T >::size().
Referenced by retrieval_fpi(), retrieval_fpi_latency(), and line::mva::solver_mva_retrieval_analyzer().
| RetrievalFpiLatencyResult< T > line::retrieval::retrieval_fpi_latency | ( | const std::vector< int > & | m, |
| const std::vector< T > & | lambda, | ||
| const Matrix< T > & | gamma, | ||
| const std::vector< RetrievalStationPH< T > > & | station, | ||
| const std::vector< Matrix< T > > & | R, | ||
| const FpiOptions & | options = FpiOptions() ) |
FPI-based approximation of the delayed-hit count and the expected latency of a list-based cache with a phase-type retrieval system.
| m | (h) cache list capacities |
| lambda | (n) per-item arrival rates |
| gamma | (n x h) access factors |
| station | (S) phase-type service and discipline of each retrieval station |
| R | (n) routing matrices, each (S+1) x (S+1), index 0 = outside |
| options | fixed-point options (tolerance, iteration cap, damping) |
Definition at line 121 of file retrieval_fpi_latency.h.
References line::Matrix< T >::cols(), line::retrieval::RetrievalFpiLatencyResult< T >::d, FCFS, line::InputError::InputError(), line::inverse(), IS, is_shared_station(), line::lu_factor(), line::lu_solve(), line::NumericError::NumericError(), line::retrieval::RetrievalFpiResult< T >::pdh, line::retrieval::RetrievalFpiLatencyResult< T >::phi, line::retrieval::RetrievalFpiLatencyResult< T >::pi0, line::retrieval::RetrievalFpiResult< T >::pmiss, retrieval_fpi(), retrieval_fpi_latency(), line::Matrix< T >::rows(), SIRO, line::Matrix< T >::size(), line::UnsupportedError::UnsupportedError(), and line::retrieval::RetrievalFpiLatencyResult< T >::Z.
Referenced by retrieval_fpi_latency(), and line::mva::solver_mva_retrieval_analyzer().
| RetrievalMetricsResult< T > line::retrieval::retrieval_metrics | ( | const std::vector< int > & | m, |
| const std::vector< T > & | lambda, | ||
| const Matrix< T > & | eta, | ||
| const Matrix< T > & | gamma ) |
Exact miss, hit and delayed-hit metrics of a delayed-hit (list-based) cache.
| m | (h) cache list capacities |
| lambda | (n) per-item arrival rates |
| eta | (n x (r+1)) fetching demands, column 0 = IS station, columns 1..r = PS |
| gamma | (n x h) access factors |
Definition at line 79 of file retrieval_metrics.h.
References line::Matrix< T >::cols(), line::InputError::InputError(), line::Matrix< T >::Matrix(), line::NumericError::NumericError(), line::retrieval::RetrievalMetricsResult< T >::pdh, line::retrieval::RetrievalMetricsResult< T >::phit, line::retrieval::RetrievalMetricsResult< T >::pmiss, retrieval_metrics(), retrieval_nc(), and line::Matrix< T >::rows().
Referenced by retrieval_metrics(), and line::nc::solver_nc_retrieval_analyzer().
| RetrievalMvaResult< T > line::retrieval::retrieval_mva | ( | const std::vector< int > & | m, |
| const std::vector< T > & | lambda, | ||
| const Matrix< T > & | eta, | ||
| const Matrix< T > & | gamma ) |
Exact MVA-style recursion for delayed-hit (list-based) cache metrics.
| m | (h) cache list capacities |
| lambda | (n) per-item arrival rates |
| eta | (n x (r+1)) fetching demands, column 0 = IS station, columns 1..r = PS |
| gamma | (n x h) access factors |
Definition at line 247 of file retrieval_mva.h.
References line::Matrix< T >::cols(), line::InputError::InputError(), retrieval_mva(), line::Matrix< T >::rows(), and line::UnsupportedError::UnsupportedError().
Referenced by retrieval_mva().
| T line::retrieval::retrieval_nc | ( | const std::vector< int > & | v, |
| const std::vector< int > & | m, | ||
| const std::vector< T > & | lambda, | ||
| const Matrix< T > & | eta, | ||
| const Matrix< T > & | gamma ) |
Exact normalizing constant E(v,m) of a delayed-hit (list-based) cache.
| v | (r) moment order at each PS station; all zeros for the plain constant |
| m | (h) cache list capacities |
| lambda | (n) per-item arrival rates |
| eta | (n x (r+1)) fetching demands, column 0 = IS station, columns 1..r = PS |
| gamma | (n x h) access factors |
Definition at line 108 of file retrieval_nc.h.
References line::Matrix< T >::cols(), line::InputError::InputError(), retrieval_nc(), and line::Matrix< T >::rows().
Referenced by retrieval_metrics(), retrieval_nc(), and line::nc::solver_nc_retrieval_analyzer().
| RetrievalRayintResult< T > line::retrieval::retrieval_rayint | ( | const Matrix< T > & | gamma, |
| const std::vector< int > & | m ) |
Discrete (saddle) form.
| gamma | access factors gamma(k,j), n x h |
| m | cache list capacities, length h |
Definition at line 404 of file retrieval_rayint.h.
References line::InputError::InputError(), retrieval_rayint(), and line::Matrix< T >::rows().
Referenced by retrieval_rayint(), retrieval_rayint(), and line::nc::solver_nc_retrieval_analyzer().
| RetrievalRayintResult< T > line::retrieval::retrieval_rayint | ( | const std::function< Matrix< T >(const std::vector< T > &)> & | gfun, |
| const std::vector< int > & | m, | ||
| int | n, | ||
| std::size_t | nquad = 4097 ) |
Continuum (ray-integral) form.
| gfun | access-factor profile on v in [0,1], returning v.size() x h |
| m | cache list capacities, length h |
| n | number of items |
| nquad | composite Simpson nodes (forced odd, at least 5) |
Definition at line 423 of file retrieval_rayint.h.
References retrieval_rayint().