1 |
< |
import java.util.concurrent.*; |
1 |
> |
/* |
2 |
> |
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
> |
* Expert Group and released to the public domain, as explained at |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
> |
*/ |
6 |
> |
|
7 |
|
import java.util.*; |
8 |
< |
import java.util.concurrent.TimeUnit; |
4 |
< |
//import java.util.concurrent.*; |
8 |
> |
import java.util.concurrent.*; |
9 |
|
|
10 |
|
public final class DynamicLeftSpineFib extends RecursiveAction { |
11 |
|
|
25 |
|
return; |
26 |
|
} |
27 |
|
|
24 |
– |
|
28 |
|
for (int reps = 0; reps < 2; ++reps) { |
29 |
|
ForkJoinPool g = (procs == 0) ? new ForkJoinPool() : |
30 |
|
new ForkJoinPool(procs); |
58 |
|
System.out.println(); |
59 |
|
} |
60 |
|
|
58 |
– |
|
61 |
|
// Initialized with argument; replaced with result |
62 |
|
int number; |
63 |
|
DynamicLeftSpineFib next; |
127 |
|
} |
128 |
|
|
129 |
|
} |
128 |
– |
|