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.9 by dl, Fri Aug 19 11:25:04 2011 UTC vs.
Revision 1.14 by jsr166, Mon Aug 10 03:13:33 2015 UTC

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 import java.util.concurrent.*;
7   import java.util.*;
8 + import java.util.concurrent.*;
9  
10   class ScalarLongSort {
11      static final long NPS = (1000L * 1000 * 1000);
# Line 13 | Line 13 | class ScalarLongSort {
13      static int THRESHOLD = -1;
14      static final boolean warmup = true;
15  
16 <    public static void main (String[] args) throws Exception {
16 >    public static void main(String[] args) throws Exception {
17          int procs = 0;
18          int n = 1 << 22;
19          int reps = 20;
# Line 78 | Line 78 | class ScalarLongSort {
78          }
79          System.out.println(pool);
80  
81
81          pool.shutdown();
82      }
83  
# Line 148 | Line 147 | class ScalarLongSort {
147           * and finding index of right closest to split point.
148           * Uses left-spine decomposition to generate all
149           * merge tasks before bottomming out at base case.
151         *
150           */
151          public final void compute() {
152              Merger rights = null;
# Line 176 | Line 174 | class ScalarLongSort {
174              merge(nleft, nright);
175              if (rights != null)
176                  collectRights(rights);
179
177          }
178  
179          final void merge(int nleft, int nright) {
# Line 209 | 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]) {
# Line 247 | Line 244 | class ScalarLongSort {
244              }
245          }
246      }
250
251
247   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines