39 |
|
System.out.println(fjpool); |
40 |
|
fjpool.shutdown(); |
41 |
|
} |
42 |
< |
|
42 |
> |
|
43 |
|
static void seqSort(Long[] a) { |
44 |
|
long last = System.nanoTime(); |
45 |
|
java.util.Arrays.sort(a); |
53 |
|
double elapsed = (double)(System.nanoTime() - last) / NPS; |
54 |
|
System.out.printf("ParallelArray.sort time: %7.3f\n", elapsed); |
55 |
|
} |
56 |
< |
|
56 |
> |
|
57 |
|
static void checkSorted (Long[] a) { |
58 |
|
int n = a.length; |
59 |
|
for (int i = 0; i < n - 1; i++) { |
62 |
|
} |
63 |
|
} |
64 |
|
} |
65 |
< |
|
65 |
> |
|
66 |
|
static final class RandomLongGenerator implements Ops.Generator<Long> { |
67 |
|
public Long op() { |
68 |
|
return new Long(ThreadLocalRandom.current().nextLong()); |