Make the threadpool honour the int argument for number of elements to process
We have two cases, the original issue with a single thread with more than 2^31 elements and the less likely case when more threads also exceed 2^31 elements per thread. The strategy is simple, honour the contract of the map function and only pass in 2^31 elements per call by restricting the chunks to INT_MAX.
Fixes #727 (closed)
Edited by Peter W. Draper
Merge request reports
Activity
mentioned in issue #727 (closed)
added 1 commit
- d3bda985 - Don't limit auto chunk size to (int) handle > INT_MAX instead of overflowing
All looks good to me now. If you want to play outside of the running the code on a volume here is my test threadpool:
Just change
tp.num_threads
,N
andchunk
inmain()
.I think jenkins wasn't happy building this with gcc but I lost the email...
Edited by Matthieu Schallermentioned in commit 830d1f35
Please register or sign in to reply