Commit e9902ae7 authored by Sylvain Thery's avatar Sylvain Thery

resolve MultiThread loading problems

parent c477fa1c
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "Topology/generic/dartmarker.h" #include "Topology/generic/dartmarker.h"
#include "Topology/generic/cellmarker.h" #include "Topology/generic/cellmarker.h"
#include "Algo/Geometry/centroid.h" #include "Algo/Geometry/centroid.h"
#include "Topology/generic/autoAttributeHandler.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -592,13 +592,25 @@ bool GenericMap::loadMapBin(const std::string& filename) ...@@ -592,13 +592,25 @@ bool GenericMap::loadMapBin(const std::string& filename)
fs.read(reinterpret_cast<char*>(&(m_mrNbDarts[0])), nb *sizeof(unsigned int)); fs.read(reinterpret_cast<char*>(&(m_mrNbDarts[0])), nb *sizeof(unsigned int));
} }
// retrieve m_embeddings (from m_attribs) // retrieve m_embeddings (from m_attribs)
update_m_emb_afterLoad(); update_m_emb_afterLoad();
// recursive call from real type of map (for topo relation attributes pointers) down to GenericMap (for Marker_cleaning & pointers) // recursive call from real type of map (for topo relation attributes pointers) down to GenericMap (for Marker_cleaning & pointers)
update_topo_shortcuts(); update_topo_shortcuts();
// restore nbThreads
std::vector<std::string> typeMark;
unsigned int nbatt0 = m_attribs[0].getAttributesTypes(typeMark);
m_nbThreads = 0;
for (unsigned int i = 0; i < nbatt0; ++i)
{
if (typeMark[i] == "Mark")
++m_nbThreads;
}
return true; return true;
} }
......
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