100 |
|
* merges and re-merges. These don't need to keep track of the |
101 |
|
* arrays, and are never themselves forked, so are mostly empty. |
102 |
|
*/ |
103 |
< |
static final class Subsorter extends CountedCompleter { |
104 |
< |
Subsorter(CountedCompleter p) { super(p); } |
103 |
> |
static final class Subsorter extends CountedCompleter<Void> { |
104 |
> |
Subsorter(CountedCompleter<?> p) { super(p); } |
105 |
|
public final void compute() { } |
106 |
|
} |
107 |
|
|
108 |
< |
static final class Comerger extends CountedCompleter { |
108 |
> |
static final class Comerger extends CountedCompleter<Void> { |
109 |
|
final Merger merger; |
110 |
|
Comerger(Merger merger) { |
111 |
|
super(null, 1); |
112 |
|
this.merger = merger; |
113 |
|
} |
114 |
|
public final void compute() { } |
115 |
< |
public final void onCompletion(CountedCompleter t) { |
115 |
> |
public final void onCompletion(CountedCompleter<?> t) { |
116 |
|
merger.compute(); |
117 |
|
} |
118 |
|
} |
119 |
|
|
120 |
< |
static final class Sorter extends CountedCompleter { |
120 |
> |
static final class Sorter extends CountedCompleter<Void> { |
121 |
|
final Long[] a; |
122 |
|
final Long[] w; |
123 |
|
final int origin; |
124 |
|
final int size; |
125 |
< |
Sorter(CountedCompleter par, Long[] a, Long[] w, int origin, int n) { |
125 |
> |
Sorter(CountedCompleter<?> par, Long[] a, Long[] w, int origin, int n) { |
126 |
|
super(par); |
127 |
|
this.a = a; this.w = w; this.origin = origin; this.size = n; |
128 |
|
} |
132 |
|
Long[] w = this.w; |
133 |
|
int l = this.origin; |
134 |
|
int n = this.size; |
135 |
< |
CountedCompleter s = this; |
135 |
> |
CountedCompleter<?> s = this; |
136 |
|
int thr = THRESHOLD; |
137 |
|
while (n > thr) { |
138 |
|
int h = n >>> 1; |
161 |
|
} |
162 |
|
} |
163 |
|
|
164 |
< |
static final class Merger extends CountedCompleter { |
164 |
> |
static final class Merger extends CountedCompleter<Void> { |
165 |
|
final Long[] a; final Long[] w; |
166 |
|
final int lo; final int ln; final int ro; final int rn; final int wo; |
167 |
< |
Merger(CountedCompleter par, |
167 |
> |
Merger(CountedCompleter<?> par, |
168 |
|
Long[] a, Long[] w, int lo, int ln, int ro, int rn, int wo) { |
169 |
|
super(par); |
170 |
|
this.a = a; this.w = w; |
239 |
|
} |
240 |
|
} |
241 |
|
|
242 |
< |
static final class RandomRepacker extends CountedCompleter { |
242 |
> |
static final class RandomRepacker extends CountedCompleter<Void> { |
243 |
|
final Long[] src; |
244 |
|
final Long[] dst; |
245 |
|
final int lo, hi, size; |
246 |
< |
RandomRepacker(CountedCompleter par, Long[] src, Long[] dst, |
246 |
> |
RandomRepacker(CountedCompleter<?> par, Long[] src, Long[] dst, |
247 |
|
int lo, int hi, int size) { |
248 |
|
super(par); |
249 |
|
this.src = src; this.dst = dst; |
267 |
|
} |
268 |
|
} |
269 |
|
|
270 |
< |
static final class OrderChecker extends CountedCompleter { |
270 |
> |
static final class OrderChecker extends CountedCompleter<Void> { |
271 |
|
final Long[] array; |
272 |
|
final int lo, hi, size; |
273 |
< |
OrderChecker(CountedCompleter par, Long[] a, int lo, int hi, int size) { |
273 |
> |
OrderChecker(CountedCompleter<?> par, Long[] a, int lo, int hi, int size) { |
274 |
|
super(par); |
275 |
|
this.array = a; |
276 |
|
this.lo = lo; this.hi = hi; this.size = size; |