From 4e75a238a2774759b868616de565fb0e10efb178 Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Sun, 25 Apr 2010 10:32:55 +0000 Subject: [PATCH] dg : implicit dg ok :-) --- Solver/function.cpp | 6 +++--- Solver/function.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Solver/function.cpp b/Solver/function.cpp index 57beb24cbb..aadd3c0699 100644 --- a/Solver/function.cpp +++ b/Solver/function.cpp @@ -66,7 +66,7 @@ dataCacheDouble::dataCacheDouble(dataCacheMap *m, function *f): _dependencies[i] = &m->getSecondaryCache(iCache)->get(f,this); } for (int i = 0; i < f->_functionReplaces.size(); i++) { - functionReplaceCaches.push_back (new functionReplaceCache(m, f->_functionReplaces[i])); + functionReplaceCaches.push_back (new functionReplaceCache(m, f->_functionReplaces[i], this)); } } @@ -504,7 +504,7 @@ void functionReplace::compute(){ }; -functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep) { +functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep, dataCacheDouble *from) { map = m->newChild(); for (int i = 0; i < m->_secondaryCaches.size(); i ++) { map->addSecondaryCache (m->getSecondaryCache(i+1)->newChild()); @@ -514,7 +514,7 @@ functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep } for (int i = 0; i < rep->_toCompute.size(); i++) { dataCacheMap *m2 = map->getSecondaryCache(rep->_toCompute[i].iMap); - toCompute.push_back (&m2->get(rep->_toCompute[i].f)); + toCompute.push_back (&m2->get(rep->_toCompute[i].f, from)); } } functionReplaceCache::~functionReplaceCache() { diff --git a/Solver/function.h b/Solver/function.h index 7c4d318f64..91188faf2c 100644 --- a/Solver/function.h +++ b/Solver/function.h @@ -81,6 +81,7 @@ class function { // then the size of the matrix is automatically adjusted class dataCacheDouble { friend class dataCacheMap; + public: // pointers to all of the dataCache depending on me std::set<dataCacheDouble*> _dependOnMe; std::set<dataCacheDouble*> _iDependOn; @@ -238,7 +239,7 @@ class functionReplaceCache { dataCacheMap *map; std::vector <dataCacheDouble*> toReplace; std::vector <dataCacheDouble*> toCompute; - functionReplaceCache(dataCacheMap *m, functionReplace *rep); + functionReplaceCache(dataCacheMap *m, functionReplace *rep, dataCacheDouble *from); ~functionReplaceCache(); }; -- GitLab