Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix _nThreads lower bound to 0 (#83)
Fix problem with negative NTHREADS values When a negative value is passed to NTHREADS, the value is read as int and afterwards assigned to an unsigned int. During the assignment, the negative value wraps around and becomes a ridiculously high number. This can cause problems with TBB due to std::bad_alloc. Now, the value is clipped to the nonnegative range before it is further used.
- Loading branch information