Skip to content
Snippets Groups Projects
Commit 4e75a238 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dg : implicit dg ok :-)

parent 4417faea
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ dataCacheDouble::dataCacheDouble(dataCacheMap *m, function *f): ...@@ -66,7 +66,7 @@ dataCacheDouble::dataCacheDouble(dataCacheMap *m, function *f):
_dependencies[i] = &m->getSecondaryCache(iCache)->get(f,this); _dependencies[i] = &m->getSecondaryCache(iCache)->get(f,this);
} }
for (int i = 0; i < f->_functionReplaces.size(); i++) { 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(){ ...@@ -504,7 +504,7 @@ void functionReplace::compute(){
}; };
functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep) { functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep, dataCacheDouble *from) {
map = m->newChild(); map = m->newChild();
for (int i = 0; i < m->_secondaryCaches.size(); i ++) { for (int i = 0; i < m->_secondaryCaches.size(); i ++) {
map->addSecondaryCache (m->getSecondaryCache(i+1)->newChild()); map->addSecondaryCache (m->getSecondaryCache(i+1)->newChild());
...@@ -514,7 +514,7 @@ functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep ...@@ -514,7 +514,7 @@ functionReplaceCache::functionReplaceCache(dataCacheMap *m, functionReplace *rep
} }
for (int i = 0; i < rep->_toCompute.size(); i++) { for (int i = 0; i < rep->_toCompute.size(); i++) {
dataCacheMap *m2 = map->getSecondaryCache(rep->_toCompute[i].iMap); 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() { functionReplaceCache::~functionReplaceCache() {
......
...@@ -81,6 +81,7 @@ class function { ...@@ -81,6 +81,7 @@ class function {
// then the size of the matrix is automatically adjusted // then the size of the matrix is automatically adjusted
class dataCacheDouble { class dataCacheDouble {
friend class dataCacheMap; friend class dataCacheMap;
public:
// pointers to all of the dataCache depending on me // pointers to all of the dataCache depending on me
std::set<dataCacheDouble*> _dependOnMe; std::set<dataCacheDouble*> _dependOnMe;
std::set<dataCacheDouble*> _iDependOn; std::set<dataCacheDouble*> _iDependOn;
...@@ -238,7 +239,7 @@ class functionReplaceCache { ...@@ -238,7 +239,7 @@ class functionReplaceCache {
dataCacheMap *map; dataCacheMap *map;
std::vector <dataCacheDouble*> toReplace; std::vector <dataCacheDouble*> toReplace;
std::vector <dataCacheDouble*> toCompute; std::vector <dataCacheDouble*> toCompute;
functionReplaceCache(dataCacheMap *m, functionReplace *rep); functionReplaceCache(dataCacheMap *m, functionReplace *rep, dataCacheDouble *from);
~functionReplaceCache(); ~functionReplaceCache();
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment