145 |
|
* oget, dget, etc. But most are overridden in most concrete |
146 |
|
* classes to avoid per-element dispatching. |
147 |
|
*/ |
148 |
+ |
|
149 |
|
void leafApply(int lo, int hi, Procedure procedure) { |
150 |
|
for (int i = lo; i < hi; ++i) |
151 |
|
if (isSelected(i)) |
404 |
|
int otherOffset, BinaryLongOp combiner) {} |
405 |
|
|
406 |
|
// Base of object ref array classes |
407 |
< |
static abstract class OPap<T> extends AbstractParallelAnyArray { |
407 |
> |
abstract static class OPap<T> extends AbstractParallelAnyArray { |
408 |
|
T[] array; |
409 |
|
OPap(ForkJoinPool ex, int origin, int fence, T[] array) { |
410 |
|
super(ex, origin, fence); |
434 |
|
} |
435 |
|
|
436 |
|
// Base of double array classes |
437 |
< |
static abstract class DPap extends AbstractParallelAnyArray { |
437 |
> |
abstract static class DPap extends AbstractParallelAnyArray { |
438 |
|
double[] array; |
439 |
|
DPap(ForkJoinPool ex, int origin, int fence, double[] array) { |
440 |
|
super(ex, origin, fence); |
464 |
|
} |
465 |
|
|
466 |
|
// Base of long array classes |
467 |
< |
static abstract class LPap extends AbstractParallelAnyArray { |
467 |
> |
abstract static class LPap extends AbstractParallelAnyArray { |
468 |
|
long[] array; |
469 |
|
LPap(ForkJoinPool ex, int origin, int fence, long[] array) { |
470 |
|
super(ex, origin, fence); |
2229 |
|
|
2230 |
|
// Object-mapped |
2231 |
|
|
2232 |
< |
static abstract class OOMPap<T,U> extends ParallelArrayWithMapping<T,U> { |
2232 |
> |
abstract static class OOMPap<T,U> extends ParallelArrayWithMapping<T,U> { |
2233 |
|
final Op<? super T, ? extends U> op; |
2234 |
|
OOMPap(ForkJoinPool ex, int origin, int fence, |
2235 |
|
T[] array, |
2259 |
|
} |
2260 |
|
} |
2261 |
|
|
2262 |
< |
static abstract class DOMPap<U> extends ParallelDoubleArrayWithMapping<U> { |
2262 |
> |
abstract static class DOMPap<U> extends ParallelDoubleArrayWithMapping<U> { |
2263 |
|
final DoubleToObject<? extends U> op; |
2264 |
|
DOMPap(ForkJoinPool ex, int origin, int fence, |
2265 |
|
double[] array, DoubleToObject<? extends U> op) { |
2288 |
|
} |
2289 |
|
} |
2290 |
|
|
2291 |
< |
static abstract class LOMPap<U> extends ParallelLongArrayWithMapping<U> { |
2291 |
> |
abstract static class LOMPap<U> extends ParallelLongArrayWithMapping<U> { |
2292 |
|
final LongToObject<? extends U> op; |
2293 |
|
LOMPap(ForkJoinPool ex, int origin, int fence, |
2294 |
|
long[] array, LongToObject<? extends U> op) { |
3014 |
|
|
3015 |
|
// Object-combined |
3016 |
|
|
3017 |
< |
static abstract class OOCPap<T,U> extends ParallelArrayWithMapping<T,U> { |
3017 |
> |
abstract static class OOCPap<T,U> extends ParallelArrayWithMapping<T,U> { |
3018 |
|
final IntAndObjectToObject<? super T, ? extends U> op; |
3019 |
|
OOCPap(ForkJoinPool ex, int origin, int fence, |
3020 |
|
T[] array, |
3046 |
|
} |
3047 |
|
} |
3048 |
|
|
3049 |
< |
static abstract class DOCPap<U> extends ParallelDoubleArrayWithMapping<U> { |
3049 |
> |
abstract static class DOCPap<U> extends ParallelDoubleArrayWithMapping<U> { |
3050 |
|
final IntAndDoubleToObject<? extends U> op; |
3051 |
|
DOCPap(ForkJoinPool ex, int origin, int fence, |
3052 |
|
double[] array, IntAndDoubleToObject<? extends U> op) { |
3077 |
|
} |
3078 |
|
} |
3079 |
|
|
3080 |
< |
static abstract class LOCPap<U> extends ParallelLongArrayWithMapping<U> { |
3080 |
> |
abstract static class LOCPap<U> extends ParallelLongArrayWithMapping<U> { |
3081 |
|
final IntAndLongToObject<? extends U> op; |
3082 |
|
LOCPap(ForkJoinPool ex, int origin, int fence, |
3083 |
|
long[] array, IntAndLongToObject<? extends U> op) { |
3785 |
|
|
3786 |
|
// Double-mapped |
3787 |
|
|
3788 |
< |
static abstract class ODMPap<T> extends ParallelArrayWithDoubleMapping<T> { |
3788 |
> |
abstract static class ODMPap<T> extends ParallelArrayWithDoubleMapping<T> { |
3789 |
|
final ObjectToDouble<? super T> op; |
3790 |
|
ODMPap(ForkJoinPool ex, int origin, int fence, |
3791 |
|
T[] array, ObjectToDouble<? super T> op) { |
3815 |
|
|
3816 |
|
} |
3817 |
|
|
3818 |
< |
static abstract class DDMPap extends ParallelDoubleArrayWithDoubleMapping { |
3818 |
> |
abstract static class DDMPap extends ParallelDoubleArrayWithDoubleMapping { |
3819 |
|
final DoubleOp op; |
3820 |
|
DDMPap |
3821 |
|
(ForkJoinPool ex, int origin, int fence, |
3845 |
|
} |
3846 |
|
} |
3847 |
|
|
3848 |
< |
static abstract class LDMPap extends ParallelLongArrayWithDoubleMapping { |
3848 |
> |
abstract static class LDMPap extends ParallelLongArrayWithDoubleMapping { |
3849 |
|
final LongToDouble op; |
3850 |
|
LDMPap(ForkJoinPool ex, int origin, int fence, |
3851 |
|
long[] array, LongToDouble op) { |
4531 |
|
} |
4532 |
|
|
4533 |
|
// double-combined |
4534 |
< |
static abstract class ODCPap<T> extends ParallelArrayWithDoubleMapping<T> { |
4534 |
> |
abstract static class ODCPap<T> extends ParallelArrayWithDoubleMapping<T> { |
4535 |
|
final IntAndObjectToDouble<? super T> op; |
4536 |
|
ODCPap(ForkJoinPool ex, int origin, int fence, |
4537 |
|
T[] array, IntAndObjectToDouble<? super T> op) { |
4563 |
|
|
4564 |
|
} |
4565 |
|
|
4566 |
< |
static abstract class DDCPap extends ParallelDoubleArrayWithDoubleMapping { |
4566 |
> |
abstract static class DDCPap extends ParallelDoubleArrayWithDoubleMapping { |
4567 |
|
final IntAndDoubleToDouble op; |
4568 |
|
DDCPap(ForkJoinPool ex, int origin, int fence, |
4569 |
|
double[] array, IntAndDoubleToDouble op) { |
4594 |
|
} |
4595 |
|
} |
4596 |
|
|
4597 |
< |
static abstract class LDCPap extends ParallelLongArrayWithDoubleMapping { |
4597 |
> |
abstract static class LDCPap extends ParallelLongArrayWithDoubleMapping { |
4598 |
|
final IntAndLongToDouble op; |
4599 |
|
LDCPap(ForkJoinPool ex, int origin, int fence, |
4600 |
|
long[] array, IntAndLongToDouble op) { |
5282 |
|
} |
5283 |
|
|
5284 |
|
// long-combined |
5285 |
< |
static abstract class OLMPap<T> extends ParallelArrayWithLongMapping<T> { |
5285 |
> |
abstract static class OLMPap<T> extends ParallelArrayWithLongMapping<T> { |
5286 |
|
final ObjectToLong<? super T> op; |
5287 |
|
OLMPap(ForkJoinPool ex, int origin, int fence, |
5288 |
|
T[] array, final ObjectToLong<? super T> op) { |
5311 |
|
} |
5312 |
|
} |
5313 |
|
|
5314 |
< |
static abstract class DLMPap extends ParallelDoubleArrayWithLongMapping { |
5314 |
> |
abstract static class DLMPap extends ParallelDoubleArrayWithLongMapping { |
5315 |
|
final DoubleToLong op; |
5316 |
|
DLMPap(ForkJoinPool ex, int origin, int fence, |
5317 |
|
double[] array, DoubleToLong op) { |
5341 |
|
|
5342 |
|
} |
5343 |
|
|
5344 |
< |
static abstract class LLMPap extends ParallelLongArrayWithLongMapping { |
5344 |
> |
abstract static class LLMPap extends ParallelLongArrayWithLongMapping { |
5345 |
|
final LongOp op; |
5346 |
|
LLMPap(ForkJoinPool ex, int origin, int fence, |
5347 |
|
long[] array, LongOp op) { |
6033 |
|
} |
6034 |
|
|
6035 |
|
// long-combined |
6036 |
< |
static abstract class OLCPap<T> extends ParallelArrayWithLongMapping<T> { |
6036 |
> |
abstract static class OLCPap<T> extends ParallelArrayWithLongMapping<T> { |
6037 |
|
final IntAndObjectToLong<? super T> op; |
6038 |
|
OLCPap(ForkJoinPool ex, int origin, int fence, |
6039 |
|
T[] array, IntAndObjectToLong<? super T> op) { |
6064 |
|
} |
6065 |
|
} |
6066 |
|
|
6067 |
< |
static abstract class DLCPap extends ParallelDoubleArrayWithLongMapping { |
6067 |
> |
abstract static class DLCPap extends ParallelDoubleArrayWithLongMapping { |
6068 |
|
final IntAndDoubleToLong op; |
6069 |
|
DLCPap(ForkJoinPool ex, int origin, int fence, |
6070 |
|
double[] array, IntAndDoubleToLong op) { |
6095 |
|
} |
6096 |
|
} |
6097 |
|
|
6098 |
< |
static abstract class LLCPap extends ParallelLongArrayWithLongMapping { |
6098 |
> |
abstract static class LLCPap extends ParallelLongArrayWithLongMapping { |
6099 |
|
final IntAndLongToLong op; |
6100 |
|
LLCPap(ForkJoinPool ex, int origin, int fence, |
6101 |
|
long[] array, IntAndLongToLong op) { |