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

Comparing jsr166/src/test/extra166y/LongCombineDemo.java (file contents):
Revision 1.1 by dl, Sun Nov 1 22:00:35 2009 UTC vs.
Revision 1.2 by jsr166, Mon Nov 16 04:16:43 2009 UTC

# Line 46 | Line 46 | class LongCombineDemo {
46      }
47  
48      static class Evens implements Ops.IntToLong {
49 <        public long op(int i) {
49 >        public long op(int i) {
50              return ((long)(i << 1));
51          }
52      }
# Line 256 | Line 256 | class LongCombineDemo {
256          System.out.printf("Seq index time :      %7.3f\n", de);
257      }
258  
259 <    static void seqRemoveAll(ParallelLongArray pa,
259 >    static void seqRemoveAll(ParallelLongArray pa,
260                               Ops.LongPredicate selector) {
261          long[] a = pa.getArray();
262          int n = pa.size();
# Line 269 | Line 269 | class LongCombineDemo {
269          pa.setLimit(k);
270      }
271  
272 <    static ArrayList<Long> seqSelectAll(ParallelLongArray pa,
272 >    static ArrayList<Long> seqSelectAll(ParallelLongArray pa,
273                                          Ops.LongPredicate selector) {
274          ArrayList<Long> al = new ArrayList<Long>();
275          long[] a = pa.getArray();
# Line 285 | Line 285 | class LongCombineDemo {
285      static long[] seqUnique(long[] a) {
286          int n = a.length;
287          HashSet<Long> m = new HashSet<Long>(n);
288 <        for (int i = 0; i < n; ++i)
288 >        for (int i = 0; i < n; ++i)
289              m.add(Long.valueOf(a[i]));
290          int ul = m.size();
291          long[] u = new long[ul];
# Line 294 | Line 294 | class LongCombineDemo {
294              u[k++] = e;
295          return u;
296      }
297 <    
297 >
298      static void checkSorted (ParallelLongArray pa)  {
299          int n = pa.size();
300          for (int i = 0; i < n - 1; i++) {
# Line 303 | Line 303 | class LongCombineDemo {
303              }
304          }
305      }
306 <    
306 >
307  
308   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines