11 #ifndef BOGUS_UTILS_THREADS_HPP
12 #define BOGUS_UTILS_THREADS_HPP
14 #include "../Block/Constants.hpp"
16 #ifndef BOGUS_DONT_PARALLELIZE
22 #ifdef BOGUS_DONT_PARALLELIZE
25 int nThreads()
const {
return 1 ; }
32 : m_prevMaxThreads( omp_get_max_threads() )
33 , m_newMaxThreads( maxThreads == 0 ? m_prevMaxThreads : maxThreads )
35 omp_set_num_threads( m_newMaxThreads ) ;
39 omp_set_num_threads( m_prevMaxThreads ) ;
43 int nThreads()
const {
return m_newMaxThreads ; }
46 const int m_prevMaxThreads ;
47 const int m_newMaxThreads ;
Definition: Threads.hpp:23