5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import jsr166y.*; |
10 |
|
import static extra166y.Ops.*; |
11 |
|
import java.util.*; |
12 |
|
import java.util.concurrent.atomic.*; |
12 |
– |
import java.lang.reflect.Array; |
13 |
|
|
14 |
|
/** |
15 |
|
* An array of longs supporting parallel operations. This class |
420 |
|
* 2, 3}, and the reducer operation adds numbers, then after |
421 |
|
* invocation of this method, the contents would be {@code 0, 1, |
422 |
|
* 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value |
423 |
< |
* would be 6 (that is, {@code 1+2+3}). |
423 |
> |
* would be 6 (that is, {@code 1+2+3}). |
424 |
|
* @param reducer the reducer |
425 |
|
* @param base the result for an empty array |
426 |
|
* @return the total reduction |