Skip to content

Commit

Permalink
fixed bugs in OMPThreadPool constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
xvallspl committed Apr 20, 2016
1 parent 46b2503 commit ee75770
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/thread/inc/OMPThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@

class OMPThreadPool: public TPool<OMPThreadPool> {
public:
explicit OMPThreadPool() = default;
explicit OMPThreadPool(){
omp_set_dynamic(0); // Explicitly disable dynamic teams
omp_set_num_threads(omp_get_max_threads());
}

explicit OMPThreadPool(size_t nThreads){
omp_set_dynamic(0); // Explicitly disable dynamic teams
omp_set_num_threads(4);
omp_set_dynamic(0);
omp_set_num_threads(nThreads);
}

~OMPThreadPool() {
Expand Down

0 comments on commit ee75770

Please sign in to comment.