-
- // Parallel computation functions
-
- void Lock() {_my_lock.lock();};
- void Unlock() {_my_lock.unlock();};
-
- int GetNbThreads(){return _NbThreads;};
- void SetNbThreads(int nbThreads){_NbThreads=nbThreads;};
-
- void InitPoolThreads(){_pool = new boost::asio::thread_pool(_NbThreads);};
- void DeletePoolThreads(){delete _pool;};
-
- void wait(){_pool->join(); DeletePoolThreads(); InitPoolThreads(); }
-
- bool IsParallel(){return _NbThreads > 0;}
-
- // Temporary folder used during parallel Computation
- boost::filesystem::path tmp_folder;
- boost::asio::thread_pool * _pool = nullptr; //thread pool for computation
-
-