3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
|
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
– |
/** |
7 |
– |
* Misc utilities in JSR166 performance tests |
8 |
– |
*/ |
6 |
|
|
7 |
|
import java.util.concurrent.*; |
8 |
|
import java.util.concurrent.atomic.*; |
9 |
|
|
10 |
+ |
/** |
11 |
+ |
* Misc utilities in JSR166 performance tests |
12 |
+ |
*/ |
13 |
|
class LoopHelpers { |
14 |
|
|
15 |
|
static final SimpleRandom staticRNG = new SimpleRandom(); |
63 |
|
return x * 134775813 + 1; |
64 |
|
} |
65 |
|
|
66 |
– |
|
66 |
|
/** |
67 |
|
* Yet another random number generator |
68 |
|
*/ |
117 |
|
} |
118 |
|
} |
119 |
|
|
121 |
– |
|
120 |
|
/** Multiplication-free RNG from Marsaglia "Xorshift RNGs" paper */ |
121 |
|
public static final class MarsagliaRandom { |
122 |
|
static final AtomicInteger seq = new AtomicInteger(3122688); |