ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/ScalarLongSort.java
(Generate patch)

Comparing jsr166/src/test/loops/ScalarLongSort.java (file contents):
Revision 1.5 by jsr166, Mon Sep 20 20:42:37 2010 UTC vs.
Revision 1.7 by jsr166, Mon Nov 29 20:58:07 2010 UTC

# Line 30 | Line 30 | class ScalarLongSort {
30              System.out.println("Usage: java ScalarLongSort threads n reps");
31              return;
32          }
33 <        ForkJoinPool pool = procs == 0? new ForkJoinPool() :
33 >        ForkJoinPool pool = (procs == 0) ? new ForkJoinPool() :
34              new ForkJoinPool(procs);
35  
36          long[] a = new long[n];
# Line 88 | Line 88 | class ScalarLongSort {
88              this.a = a; this.w = w; this.origin = origin; this.n = n;
89          }
90  
91 <        public void compute()  {
91 >        public void compute() {
92              int l = origin;
93              if (n <= THRESHOLD)
94                  Arrays.sort(a, l, l+n);
# Line 206 | Line 206 | class ScalarLongSort {
206  
207      }
208  
209 <    static void checkSorted (long[] a)  {
209 >    static void checkSorted (long[] a) {
210          int n = a.length;
211          for (int i = 0; i < n - 1; i++) {
212              if (a[i] > a[i+1]) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines