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.4 by jsr166, Wed Dec 31 07:54:13 2014 UTC vs.
Revision 1.5 by jsr166, Sat Sep 19 18:36:55 2015 UTC

# Line 80 | Line 80 | class ArrayPrefixHelpers {
80          T in, out;
81          final int lo, hi, origin, fence, threshold;
82  
83        /** Root task constructor */
84        public CumulateTask(CumulateTask<T> parent,
85                            BinaryOperator<T> function,
86                            T[] array, int lo, int hi) {
87            super(parent);
88            this.function = function; this.array = array;
89            this.lo = this.origin = lo; this.hi = this.fence = hi;
90            int p;
91            this.threshold =
92                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
93                <= MIN_PARTITION ? MIN_PARTITION : p;
94        }
95
96        /** Subtask constructor */
83          CumulateTask(CumulateTask<T> parent, BinaryOperator<T> function,
84                       T[] array, int origin, int fence, int threshold,
85                       int lo, int hi) {
# Line 232 | Line 218 | class ArrayPrefixHelpers {
218          long in, out;
219          final int lo, hi, origin, fence, threshold;
220  
235        /** Root task constructor */
236        public LongCumulateTask(LongCumulateTask parent,
237                                LongBinaryOperator function,
238                                long[] array, int lo, int hi) {
239            super(parent);
240            this.function = function; this.array = array;
241            this.lo = this.origin = lo; this.hi = this.fence = hi;
242            int p;
243            this.threshold =
244                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
245                <= MIN_PARTITION ? MIN_PARTITION : p;
246        }
247
248        /** Subtask constructor */
221          LongCumulateTask(LongCumulateTask parent, LongBinaryOperator function,
222                           long[] array, int origin, int fence, int threshold,
223                           int lo, int hi) {
# Line 382 | Line 354 | class ArrayPrefixHelpers {
354          double in, out;
355          final int lo, hi, origin, fence, threshold;
356  
385        /** Root task constructor */
386        public DoubleCumulateTask(DoubleCumulateTask parent,
387                                DoubleBinaryOperator function,
388                                double[] array, int lo, int hi) {
389            super(parent);
390            this.function = function; this.array = array;
391            this.lo = this.origin = lo; this.hi = this.fence = hi;
392            int p;
393            this.threshold =
394                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
395                <= MIN_PARTITION ? MIN_PARTITION : p;
396        }
397
398        /** Subtask constructor */
357          DoubleCumulateTask(DoubleCumulateTask parent, DoubleBinaryOperator function,
358 <                         double[] array, int origin, int fence, int threshold,
359 <                         int lo, int hi) {
358 >                           double[] array, int origin, int fence, int threshold,
359 >                           int lo, int hi) {
360              super(parent);
361              this.function = function; this.array = array;
362              this.origin = origin; this.fence = fence;
# Line 532 | Line 490 | class ArrayPrefixHelpers {
490          int in, out;
491          final int lo, hi, origin, fence, threshold;
492  
535        /** Root task constructor */
536        public IntCumulateTask(IntCumulateTask parent,
537                                IntBinaryOperator function,
538                                int[] array, int lo, int hi) {
539            super(parent);
540            this.function = function; this.array = array;
541            this.lo = this.origin = lo; this.hi = this.fence = hi;
542            int p;
543            this.threshold =
544                (p = (hi - lo) / (ForkJoinPool.getCommonPoolParallelism() << 3))
545                <= MIN_PARTITION ? MIN_PARTITION : p;
546        }
547
548        /** Subtask constructor */
493          IntCumulateTask(IntCumulateTask parent, IntBinaryOperator function,
494 <                         int[] array, int origin, int fence, int threshold,
495 <                         int lo, int hi) {
494 >                        int[] array, int origin, int fence, int threshold,
495 >                        int lo, int hi) {
496              super(parent);
497              this.function = function; this.array = array;
498              this.origin = origin; this.fence = fence;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines