Commit 37b3cdd9 authored by Pierre Kraemer's avatar Pierre Kraemer

debug TraversorCell : quickTraversor disable forceDartMarker

parent 9b573352
...@@ -447,7 +447,7 @@ public: ...@@ -447,7 +447,7 @@ public:
void enableQuickTraversal() ; void enableQuickTraversal() ;
template <unsigned int ORBIT> template <unsigned int ORBIT>
void updateQuickTraversal() ; void updateQuickTraversal(const FunctorSelect& good = allDarts) ;
template <unsigned int ORBIT> template <unsigned int ORBIT>
AttributeMultiVector<Dart>* getQuickTraversal() ; AttributeMultiVector<Dart>* getQuickTraversal() ;
......
...@@ -435,14 +435,14 @@ inline void GenericMap::enableQuickTraversal() ...@@ -435,14 +435,14 @@ inline void GenericMap::enableQuickTraversal()
} }
template <unsigned int ORBIT> template <unsigned int ORBIT>
inline void GenericMap::updateQuickTraversal() inline void GenericMap::updateQuickTraversal(const FunctorSelect& good)
{ {
assert(m_quickTraversal[ORBIT] != NULL || !"updateQuickTraversal on a disabled orbit") ; assert(m_quickTraversal[ORBIT] != NULL || !"updateQuickTraversal on a disabled orbit") ;
CellMarker<ORBIT> cm(*this) ; CellMarker<ORBIT> cm(*this) ;
for(Dart d = begin(); d != end(); next(d)) for(Dart d = begin(); d != end(); next(d))
{ {
if(!cm.isMarked(d)) if(good(d) && !cm.isMarked(d))
{ {
cm.mark(d) ; cm.mark(d) ;
(*m_quickTraversal[ORBIT])[getEmbedding<ORBIT>(d)] = d ; (*m_quickTraversal[ORBIT])[getEmbedding<ORBIT>(d)] = d ;
......
...@@ -29,30 +29,32 @@ template <typename MAP, unsigned int ORBIT> ...@@ -29,30 +29,32 @@ template <typename MAP, unsigned int ORBIT>
TraversorCell<MAP, ORBIT>::TraversorCell(MAP& map, const FunctorSelect& good, bool forceDartMarker, unsigned int thread) : TraversorCell<MAP, ORBIT>::TraversorCell(MAP& map, const FunctorSelect& good, bool forceDartMarker, unsigned int thread) :
m(map), dmark(NULL), cmark(NULL), current(NIL), firstTraversal(true), m_good(good) m(map), dmark(NULL), cmark(NULL), current(NIL), firstTraversal(true), m_good(good)
{ {
quickTraversal = map.template getQuickTraversal<ORBIT>() ; if(forceDartMarker)
if(quickTraversal != NULL) dmark = new DartMarker(map, thread) ;
{
cont = &(m.template getAttributeContainer<ORBIT>()) ;
}
else else
{ {
if(!forceDartMarker && map.template isOrbitEmbedded<ORBIT>()) quickTraversal = map.template getQuickTraversal<ORBIT>() ;
cmark = new CellMarker<ORBIT>(map, thread) ; if(quickTraversal != NULL)
{
cont = &(m.template getAttributeContainer<ORBIT>()) ;
}
else else
dmark = new DartMarker(map, thread) ; {
if(map.template isOrbitEmbedded<ORBIT>())
cmark = new CellMarker<ORBIT>(map, thread) ;
else
dmark = new DartMarker(map, thread) ;
}
} }
} }
template <typename MAP, unsigned int ORBIT> template <typename MAP, unsigned int ORBIT>
TraversorCell<MAP, ORBIT>::~TraversorCell() TraversorCell<MAP, ORBIT>::~TraversorCell()
{ {
if(quickTraversal == NULL) if(dmark)
{ delete dmark ;
if(dmark) else if(cmark)
delete dmark ; delete cmark ;
else
delete cmark ;
}
} }
template <typename MAP, unsigned int ORBIT> template <typename MAP, unsigned int ORBIT>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment