--- jsr166/src/main/java/util/ArrayPrefixHelpers.java 2013/01/20 04:25:11 1.2 +++ jsr166/src/main/java/util/ArrayPrefixHelpers.java 2019/08/30 18:05:39 1.11 @@ -5,12 +5,13 @@ */ package java.util; -import java.util.concurrent.ForkJoinPool; + import java.util.concurrent.CountedCompleter; +import java.util.concurrent.ForkJoinPool; import java.util.function.BinaryOperator; +import java.util.function.DoubleBinaryOperator; import java.util.function.IntBinaryOperator; import java.util.function.LongBinaryOperator; -import java.util.function.DoubleBinaryOperator; /** * ForkJoin tasks to perform Arrays.parallelPrefix operations. @@ -19,7 +20,7 @@ import java.util.function.DoubleBinaryOp * @since 1.8 */ class ArrayPrefixHelpers { - private ArrayPrefixHelpers() {}; // non-instantiable + private ArrayPrefixHelpers() {} // non-instantiable /* * Parallel prefix (aka cumulate, scan) task classes @@ -117,7 +118,7 @@ class ArrayPrefixHelpers { int mid = (l + h) >>> 1; f = rt = t.right = new CumulateTask(t, fn, a, org, fnc, th, mid, h); - t = lt = t.left = + t = lt = t.left = new CumulateTask(t, fn, a, org, fnc, th, l, mid); } else { // possibly refork @@ -221,6 +222,7 @@ class ArrayPrefixHelpers { } } } + // OPENJDK @java.io.Serial private static final long serialVersionUID = 5293554502939613543L; } @@ -269,7 +271,7 @@ class ArrayPrefixHelpers { int mid = (l + h) >>> 1; f = rt = t.right = new LongCumulateTask(t, fn, a, org, fnc, th, mid, h); - t = lt = t.left = + t = lt = t.left = new LongCumulateTask(t, fn, a, org, fnc, th, l, mid); } else { // possibly refork @@ -371,6 +373,7 @@ class ArrayPrefixHelpers { } } } + // OPENJDK @java.io.Serial private static final long serialVersionUID = -5074099945909284273L; } @@ -383,8 +386,8 @@ class ArrayPrefixHelpers { /** Root task constructor */ public DoubleCumulateTask(DoubleCumulateTask parent, - DoubleBinaryOperator function, - double[] array, int lo, int hi) { + DoubleBinaryOperator function, + double[] array, int lo, int hi) { super(parent); this.function = function; this.array = array; this.lo = this.origin = lo; this.hi = this.fence = hi; @@ -396,8 +399,8 @@ class ArrayPrefixHelpers { /** Subtask constructor */ DoubleCumulateTask(DoubleCumulateTask parent, DoubleBinaryOperator function, - double[] array, int origin, int fence, int threshold, - int lo, int hi) { + double[] array, int origin, int fence, int threshold, + int lo, int hi) { super(parent); this.function = function; this.array = array; this.origin = origin; this.fence = fence; @@ -419,7 +422,7 @@ class ArrayPrefixHelpers { int mid = (l + h) >>> 1; f = rt = t.right = new DoubleCumulateTask(t, fn, a, org, fnc, th, mid, h); - t = lt = t.left = + t = lt = t.left = new DoubleCumulateTask(t, fn, a, org, fnc, th, l, mid); } else { // possibly refork @@ -521,6 +524,7 @@ class ArrayPrefixHelpers { } } } + // OPENJDK @java.io.Serial private static final long serialVersionUID = -586947823794232033L; } @@ -533,8 +537,8 @@ class ArrayPrefixHelpers { /** Root task constructor */ public IntCumulateTask(IntCumulateTask parent, - IntBinaryOperator function, - int[] array, int lo, int hi) { + IntBinaryOperator function, + int[] array, int lo, int hi) { super(parent); this.function = function; this.array = array; this.lo = this.origin = lo; this.hi = this.fence = hi; @@ -546,8 +550,8 @@ class ArrayPrefixHelpers { /** Subtask constructor */ IntCumulateTask(IntCumulateTask parent, IntBinaryOperator function, - int[] array, int origin, int fence, int threshold, - int lo, int hi) { + int[] array, int origin, int fence, int threshold, + int lo, int hi) { super(parent); this.function = function; this.array = array; this.origin = origin; this.fence = fence; @@ -569,7 +573,7 @@ class ArrayPrefixHelpers { int mid = (l + h) >>> 1; f = rt = t.right = new IntCumulateTask(t, fn, a, org, fnc, th, mid, h); - t = lt = t.left = + t = lt = t.left = new IntCumulateTask(t, fn, a, org, fnc, th, l, mid); } else { // possibly refork @@ -671,7 +675,7 @@ class ArrayPrefixHelpers { } } } + // OPENJDK @java.io.Serial private static final long serialVersionUID = 3731755594596840961L; } - }