Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes bugs reported in #38 and #59. The fixes are:
Wrong entry in result: The final entry in the array was wrong when
~num_additional_domains:1
. Caused by pool size 2 being omitted while accounting for offsets, fixed in e03ed86Rejecting array size less than pool size: add a fast path in parallel scan #39 also tries to fix this by calling a sequential scan when pool size is greater than length of the input array. As @nilsbecker pointed out, this may not be the most efficient way for long running operations. What's done here is instead assuming the scan is going to be run on
n
domains, wheren
is the size of the array. So, the pool size is minimum of number of domains available and length of array. So each operation runs on a domain of its own when number of domains is greater than array length. (fixed in c8bdc24).Also adds @jmid's test in #59.