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):
_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() {
......
......@@ -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();
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment