ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/CCBoxedLongSort.java
(Generate patch)

Comparing jsr166/src/test/loops/CCBoxedLongSort.java (file contents):
Revision 1.2 by jsr166, Sat May 5 17:09:23 2012 UTC vs.
Revision 1.3 by dl, Thu Aug 16 12:26:27 2012 UTC

# Line 100 | Line 100 | class CCBoxedLongSort {
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          }
# Line 132 | Line 132 | class CCBoxedLongSort {
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;
# Line 161 | Line 161 | class CCBoxedLongSort {
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;
# Line 239 | Line 239 | class CCBoxedLongSort {
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;
# Line 267 | Line 267 | class CCBoxedLongSort {
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines