LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
cache_miss_spm.h File Reference

Saddle-point approximation of the cache miss rates. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/cache/cache_erec.h"
#include "line/api/cache/cache_miss.h"
#include "line/api/cache/cache_spm.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for cache_miss_spm.h:

Go to the source code of this file.

Classes

struct  line::cache::CacheMissSpmResult< T >
 Return value of cache_miss_spm, mirroring [M,MU,MI,pi0,lE]. More...

Namespaces

namespace  line
namespace  line::cache

Functions

template<class T>
CacheMissSpmResult< T > line::cache::cache_miss_spm (const Matrix< T > &gamma, const std::vector< int > &m, const Matrix< T > &lambda)
 Saddle-point approximation of the cache miss rates.

Detailed Description

Saddle-point approximation of the cache miss rates.

Templated port of matlab/src/api/cache/cache_miss_spm.m, cross-checked against jar/src/main/java/jline/api/cache/Cache_miss_rayint.java.

Identical structure to cache_miss, with every exact constant replaced by the cache_spm approximation of its logarithm:

M = exp(lE(gamma, m + e_1) - lE(gamma, m)), pi0(k) = exp(lE(gamma without item k, m) - lE(gamma, m)), MU(v) = sum_k lambda(v,k) pi0(k), MI(k) = (sum_v lambda(v,k)) pi0(k).

Items with an all-zero access-factor row are never cached and are skipped, contributing pi0 = 0 and MI = 0 exactly as in the reference.

ARITHMETIC: transcendental, inherited from cache_spm.

REFERENCE DEFECT (MATLAB): the "recompute xi" fallback taken when a pi0(k) falls outside [0,1] re-invokes cache_spm without the warm start, but the warm start never had any effect in the first place – cache_spm forwards it to cache_xi_iter's third argument, which that function declares as tmax and never reads. The two branches are therefore the same computation, so this port evaluates lE1(k) once. This changes no value; it only removes a duplicated call.

Definition in file cache_miss_spm.h.