46 |
|
} |
47 |
|
|
48 |
|
static class Evens implements Ops.IntToLong { |
49 |
< |
public long op(int i) { |
49 |
> |
public long op(int i) { |
50 |
|
return ((long)(i << 1)); |
51 |
|
} |
52 |
|
} |
256 |
|
System.out.printf("Seq index time : %7.3f\n", de); |
257 |
|
} |
258 |
|
|
259 |
< |
static void seqRemoveAll(ParallelLongArray pa, |
259 |
> |
static void seqRemoveAll(ParallelLongArray pa, |
260 |
|
Ops.LongPredicate selector) { |
261 |
|
long[] a = pa.getArray(); |
262 |
|
int n = pa.size(); |
269 |
|
pa.setLimit(k); |
270 |
|
} |
271 |
|
|
272 |
< |
static ArrayList<Long> seqSelectAll(ParallelLongArray pa, |
272 |
> |
static ArrayList<Long> seqSelectAll(ParallelLongArray pa, |
273 |
|
Ops.LongPredicate selector) { |
274 |
|
ArrayList<Long> al = new ArrayList<Long>(); |
275 |
|
long[] a = pa.getArray(); |
285 |
|
static long[] seqUnique(long[] a) { |
286 |
|
int n = a.length; |
287 |
|
HashSet<Long> m = new HashSet<Long>(n); |
288 |
< |
for (int i = 0; i < n; ++i) |
288 |
> |
for (int i = 0; i < n; ++i) |
289 |
|
m.add(Long.valueOf(a[i])); |
290 |
|
int ul = m.size(); |
291 |
|
long[] u = new long[ul]; |
294 |
|
u[k++] = e; |
295 |
|
return u; |
296 |
|
} |
297 |
< |
|
297 |
> |
|
298 |
|
static void checkSorted (ParallelLongArray pa) { |
299 |
|
int n = pa.size(); |
300 |
|
for (int i = 0; i < n - 1; i++) { |
303 |
|
} |
304 |
|
} |
305 |
|
} |
306 |
< |
|
306 |
> |
|
307 |
|
|
308 |
|
} |