ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ArrayPrefixHelpers.java
(Generate patch)

Comparing jsr166/src/main/java/util/ArrayPrefixHelpers.java (file contents):
Revision 1.1 by dl, Wed Jan 16 19:01:22 2013 UTC vs.
Revision 1.4 by jsr166, Wed Dec 31 07:54:13 2014 UTC

# Line 5 | Line 5
5   */
6  
7   package java.util;
8 < import java.util.concurrent.ForkJoinPool;
8 >
9   import java.util.concurrent.CountedCompleter;
10 + import java.util.concurrent.ForkJoinPool;
11   import java.util.function.BinaryOperator;
12 + import java.util.function.DoubleBinaryOperator;
13   import java.util.function.IntBinaryOperator;
14   import java.util.function.LongBinaryOperator;
13 import java.util.function.DoubleBinaryOperator;
15  
16   /**
17   * ForkJoin tasks to perform Arrays.parallelPrefix operations.
# Line 19 | Line 20 | import java.util.function.DoubleBinaryOp
20   * @since 1.8
21   */
22   class ArrayPrefixHelpers {
23 <    private ArrayPrefixHelpers() {}; // non-instantiable
23 >    private ArrayPrefixHelpers() {} // non-instantiable
24  
25      /*
26       * Parallel prefix (aka cumulate, scan) task classes
# Line 187 | Line 188 | class ArrayPrefixHelpers {
188                          sum = t.in;
189                      t.out = sum;
190                      for (CumulateTask<T> par;;) {             // propagate
191 <                        if ((par = (CumulateTask<T>)t.getCompleter()) == null) {
191 >                        @SuppressWarnings("unchecked") CumulateTask<T> partmp
192 >                            = (CumulateTask<T>)t.getCompleter();
193 >                        if ((par = partmp) == null) {
194                              if ((state & FINISHED) != 0)      // enable join
195                                  t.quietlyComplete();
196                              break outer;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines