5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import jsr166y.*; |
10 |
|
import static extra166y.Ops.*; |
11 |
|
import java.util.*; |
12 |
|
import java.util.concurrent.atomic.*; |
12 |
– |
import java.lang.reflect.Array; |
13 |
– |
|
13 |
|
|
14 |
|
/** |
15 |
|
* A prefix view of ParallelLongArray that causes operations to apply |
29 |
|
* @param op the op |
30 |
|
* @return this (to simplify use in expressions) |
31 |
|
*/ |
32 |
< |
public ParallelLongArrayWithFilter replaceWithMapping(LongOp op) { |
32 |
> |
public ParallelLongArrayWithFilter replaceWithMapping(LongOp op) { |
33 |
|
ex.invoke(new PAS.FJLTransform |
34 |
|
(this, origin, fence, null, op)); |
35 |
|
return this; |
37 |
|
|
38 |
|
/** |
39 |
|
* Replaces elements with the results of applying the given |
40 |
< |
* op to their indices |
40 |
> |
* op to their indices. |
41 |
|
* @param op the op |
42 |
|
* @return this (to simplify use in expressions) |
43 |
|
*/ |
47 |
|
return this; |
48 |
|
} |
49 |
|
|
50 |
< |
/** |
51 |
< |
* Replaces elements with the results of applying the given |
52 |
< |
* mapping to each index and current element value |
53 |
< |
* @param op the op |
50 |
> |
/** |
51 |
> |
* Replaces elements with the results of applying the given |
52 |
> |
* mapping to each index and current element value. |
53 |
> |
* @param op the op |
54 |
|
* @return this (to simplify use in expressions) |
55 |
< |
*/ |
56 |
< |
public ParallelLongArrayWithFilter replaceWithMappedIndex(IntAndLongToLong op) { |
55 |
> |
*/ |
56 |
> |
public ParallelLongArrayWithFilter replaceWithMappedIndex(IntAndLongToLong op) { |
57 |
|
ex.invoke(new PAS.FJLBinaryIndexMap |
58 |
|
(this, origin, fence, null, op)); |
59 |
|
return this; |
84 |
|
|
85 |
|
/** |
86 |
|
* Replaces elements with results of applying |
87 |
< |
* <tt>op(thisElement, otherElement)</tt> |
87 |
> |
* {@code op(thisElement, otherElement)}. |
88 |
|
* @param other the other array |
89 |
|
* @param combiner the combiner |
90 |
|
* @return this (to simplify use in expressions) |
99 |
|
|
100 |
|
/** |
101 |
|
* Replaces elements with results of applying |
102 |
< |
* <tt>op(thisElement, otherElement)</tt> |
102 |
> |
* {@code op(thisElement, otherElement)}. |
103 |
|
* @param other the other array |
104 |
|
* @param combiner the combiner |
105 |
|
* @return this (to simplify use in expressions) |
131 |
|
/** |
132 |
|
* Returns an operation prefix that causes a method to operate |
133 |
|
* only on elements for which the current selector (if |
134 |
< |
* present) and the given selector returns true |
134 |
> |
* present) and the given selector returns true. |
135 |
|
* @param selector the selector |
136 |
|
* @return operation prefix |
137 |
|
*/ |
140 |
|
/** |
141 |
|
* Returns an operation prefix that causes a method to operate |
142 |
|
* only on elements for which the current selector (if |
143 |
< |
* present) and the given binary selector returns true |
143 |
> |
* present) and the given binary selector returns true. |
144 |
|
* @param selector the selector |
145 |
|
* @return operation prefix |
146 |
|
*/ |
153 |
|
/** |
154 |
|
* Returns an operation prefix that causes a method to operate |
155 |
|
* only on elements for which the current selector (if |
156 |
< |
* present) and the given indexed selector returns true |
156 |
> |
* present) and the given indexed selector returns true. |
157 |
|
* @param selector the selector |
158 |
|
* @return operation prefix |
159 |
|
*/ |