[apps/graph] Limited number of cached functions

The caches used for function values memoization are now stored in
ContinuousFunctionStore : there are now only a fixed number, instead of
one per function. This effectively enables caching only for the first
few functions on screen, while reducing the memory usage.

Change-Id: I2ade091717f73a14a756fe527c773db8e8627be7
This commit is contained in:
Gabriel Ozouf
2020-06-09 16:19:23 +02:00
committed by Émilie Feral
parent 95fef86ec0
commit 42fcf557b8
8 changed files with 43 additions and 24 deletions

View File

@@ -11,7 +11,11 @@ class ContinuousFunction;
class ContinuousFunctionCache {
public:
static void PrepareCache(void * f, void * c, float tMin, float tStep);
/* The size of the cache is chosen to optimize the display of cartesian
* function */
static constexpr int k_numberOfAvailableCaches = 2;
static void PrepareCache(void * f, void * ctx, void * cch, float tMin, float tStep);
float step() const { return m_tStep; }
bool filled() const { return m_filled; }