22 |
|
if (args.length > 0) { |
23 |
|
try { |
24 |
|
klass = Class.forName(args[0]); |
25 |
< |
} catch(ClassNotFoundException e) { |
25 |
> |
} catch (ClassNotFoundException e) { |
26 |
|
throw new RuntimeException("Class " + args[0] + " not found."); |
27 |
|
} |
28 |
|
} |
118 |
|
} |
119 |
|
|
120 |
|
static void oneRun(Class klass, int n, int items) throws Exception { |
121 |
< |
Deque<Integer> q = (Deque<Integer>)klass.newInstance(); |
121 |
> |
Deque<Integer> q = (Deque<Integer>) klass.newInstance(); |
122 |
|
LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); |
123 |
|
CyclicBarrier barrier = new CyclicBarrier(n + 1, timer); |
124 |
|
totalItems = new AtomicInteger(n * items); |