206 |
|
* } |
207 |
|
* public E getRawResult() { return result.get(); } |
208 |
|
* public void compute() { // similar to ForEach version 3 |
209 |
< |
* int l = lo, h = hi; |
209 |
> |
* int l = lo, h = hi; |
210 |
|
* while (result.get() == null && h >= l) { |
211 |
|
* if (h - l >= 2) { |
212 |
|
* int mid = (l + h) >>> 1; |
336 |
|
* this.next = next; |
337 |
|
* } |
338 |
|
* public void compute() { |
339 |
< |
* int l = lo, h = hi; |
339 |
> |
* int l = lo, h = hi; |
340 |
|
* while (h - l >= 2) { |
341 |
|
* int mid = (l + h) >>> 1; |
342 |
|
* addToPendingCount(1); |
347 |
|
* result = mapper.apply(array[l]); |
348 |
|
* // process completions by reducing along and advancing subtask links |
349 |
|
* for (CountedCompleter<?> c = firstComplete(); c != null; c = c.nextComplete()) { |
350 |
< |
* for (MapReducer t = (MapReducer)c, s = t.forks; s != null; s = t.forks = s.next) |
350 |
> |
* for (MapReducer t = (MapReducer)c, s = t.forks; s != null; s = t.forks = s.next) |
351 |
|
* t.result = reducer.apply(t.result, s.result); |
352 |
|
* } |
353 |
|
* } |