--- jsr166/src/test/extra166y/MapReduceDemo.java 2009/11/01 22:00:35 1.1 +++ jsr166/src/test/extra166y/MapReduceDemo.java 2009/11/16 04:16:43 1.2 @@ -22,16 +22,16 @@ public class MapReduceDemo { U base) { int n = array.length; U x = base; - for (int i = 0; i < n; ++i) + for (int i = 0; i < n; ++i) x = reducer.op(x, mapper.op(array[i])); return x; } - + // sample functions static final class GetNext implements Ops.Op { - public Long op(Rand x) { + public Long op(Rand x) { return x.next(); } } @@ -51,7 +51,7 @@ public class MapReduceDemo { int n = 1 << 18; int reps = 1 << 8; Rand[] array = new Rand[n]; - for (int i = 0; i < n; ++i) + for (int i = 0; i < n; ++i) array[i] = new Rand(i+1); ForkJoinPool fjp = new ForkJoinPool(1); ParallelArray pa = ParallelArray.createUsingHandoff(array, fjp); @@ -130,8 +130,8 @@ public class MapReduceDemo { } public long next() { long x = seed; - x ^= x << 13; - x ^= x >>> 7; + x ^= x << 13; + x ^= x >>> 7; x ^= (x << 17); seed = x; return x;