I have an array with many elements. Each element is operated on, and then transformed. The end result is a new array of a different size. I am trying to use parallel_reduce. When the join function is called, is it guaranteed that that which is being joined that it is a tree structure? that a left leaf is being joined to a right leaf to form a new leaf? I'm worried about a leaf with, say elements 0-10000 (in a 5000 blocked_range grain size) transformed into a new array being joined with another leaf that has, say elements 110,000-120,000 (again, transformed into that new array) ?
Would a parallel_scan perhaps be more useful?
Bodies that are Being Joined
For more complete information about compiler optimizations, see our Optimization Notice.



