![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Isolated-cache input construction for the decomposition methods. More...
#include <cstddef>#include <vector>#include "line/api/cache/cache_gamma_lp.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::da::CacheParam< T > |
| The fields of sn.nodeparam{cache} that da_cache_isolate reads. More... | |
| struct | line::da::CacheIsolateResult< T > |
| Return value of da_cache_isolate, mirroring [gamma,lambda_cache,Rcost]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::da |
Functions | |
| template<class T> | |
| CacheIsolateResult< T > | line::da::da_cache_isolate (const CacheParam< T > &ch, const std::vector< T > &lambda) |
| Isolated-cache input construction for the decomposition methods. | |
Isolated-cache input construction for the decomposition methods.
Templated port of matlab/src/api/da/da_cache_isolate.m. The decomposition driver replaces a cache node embedded in a queueing network by the same cache in isolation, driven by the current per-class arrival rates. This routine builds that isolated model: it spreads each class rate lambda(v) over the items through the class read distribution pread{v}, attaches the access-cost (routing) matrices Rcost, and returns the access factors gamma that every cache algorithm of the family consumes.
The MATLAB source reads the cache parameters off sn.nodeparam of the cache node; the port takes only the four fields it actually uses, in CacheParam, so nothing of the NetworkStruct layer is needed here.
A note on lambda_cache: the reference fills every list position l = 1..h+1 of item k with the same lambda(v) pread{v}(k). That is deliberate - the request rate for an item does not depend on which list currently holds it - and is reproduced verbatim, because cache_gamma_lp reads lambda(v,i,t) as "rate at which v requests item i while it sits at node t".
Only products and sums (here and in cache_gamma_lp), so this is a finite field computation: instantiated at exact arithmetic the access factors of a rational cache model are exact rationals. No transcendental gate.
Definition in file da_cache_isolate.h.