44 |
|
} |
45 |
|
|
46 |
|
static class Evens implements Ops.IntToLong { |
47 |
< |
public long op(int i) { |
47 |
> |
public long op(int i) { |
48 |
|
return ((long)(i << 1)); |
49 |
|
} |
50 |
|
} |
249 |
|
System.out.printf("Seq index time : %7.3f\n", de); |
250 |
|
} |
251 |
|
|
252 |
< |
static void seqRemoveAll(ParallelLongArray pa, |
252 |
> |
static void seqRemoveAll(ParallelLongArray pa, |
253 |
|
Ops.LongPredicate selector) { |
254 |
|
long[] a = pa.getArray(); |
255 |
|
int n = pa.size(); |
262 |
|
pa.setLimit(k); |
263 |
|
} |
264 |
|
|
265 |
< |
static ArrayList<Long> seqSelectAll(ParallelLongArray pa, |
265 |
> |
static ArrayList<Long> seqSelectAll(ParallelLongArray pa, |
266 |
|
Ops.LongPredicate selector) { |
267 |
|
ArrayList<Long> al = new ArrayList<Long>(); |
268 |
|
long[] a = pa.getArray(); |
278 |
|
static long[] seqUnique(long[] a) { |
279 |
|
int n = a.length; |
280 |
|
HashSet<Long> m = new HashSet<Long>(n); |
281 |
< |
for (int i = 0; i < n; ++i) |
281 |
> |
for (int i = 0; i < n; ++i) |
282 |
|
m.add(Long.valueOf(a[i])); |
283 |
|
int ul = m.size(); |
284 |
|
long[] u = new long[ul]; |
287 |
|
u[k++] = e; |
288 |
|
return u; |
289 |
|
} |
290 |
< |
|
290 |
> |
|
291 |
|
static void checkSorted (ParallelLongArray pa) { |
292 |
|
int n = pa.size(); |
293 |
|
for (int i = 0; i < n - 1; i++) { |
296 |
|
} |
297 |
|
} |
298 |
|
} |
299 |
< |
|
299 |
> |
|
300 |
|
|
301 |
|
} |