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

Comparing jsr166/src/extra166y/AbstractParallelAnyArray.java (file contents):
Revision 1.12 by jsr166, Fri Jan 18 04:23:27 2013 UTC vs.
Revision 1.16 by jsr166, Tue Jun 18 19:18:28 2013 UTC

# Line 132 | Line 132 | public abstract class AbstractParallelAn
132       */
133      Object[] ogetArray() { return null; }
134      double[] dgetArray() { return null; }
135 <    long[]  lgetArray() { return null; }
135 >    long[]   lgetArray() { return null; }
136      abstract Object oget(int index);
137      abstract double dget(int index);
138      abstract long lget(int index);
# Line 145 | Line 145 | public abstract class AbstractParallelAn
145       * oget, dget, etc. But most are overridden in most concrete
146       * classes to avoid per-element dispatching.
147       */
148 +
149      void leafApply(int lo, int hi, Procedure procedure) {
150          for (int i = lo; i < hi; ++i)
151              if (isSelected(i))
# Line 274 | Line 275 | public abstract class AbstractParallelAn
275      /**
276       * Shared support for select/map all -- probe filter, map, and
277       * type to start selection driver, or do parallel mapping, or
278 <     * just copy,
278 >     * just copy.
279       */
280      final Object[] allObjects(Class elementType) {
281          if (hasFilter()) {
# Line 513 | Line 514 | public abstract class AbstractParallelAn
514              return new ORPap<T>(ex, origin, fence, array, selector);
515          }
516  
517 <        public <U> ParallelArrayWithMapping<T, U> withMapping
517 >        public <U> ParallelArrayWithMapping<T,U> withMapping
518              (Op<? super T, ? extends U> op) {
519              return new OUOMPap<T,U>(ex, origin, fence, array, op);
520          }
# Line 1169 | Line 1170 | public abstract class AbstractParallelAn
1170                   compoundIndexedSelector(this.selector, selector));
1171          }
1172  
1173 <        public <U> ParallelArrayWithMapping<T, U> withMapping
1173 >        public <U> ParallelArrayWithMapping<T,U> withMapping
1174              (Op<? super T, ? extends U> op) {
1175              return new OFOMPap<T,U>(ex, origin, fence, array, selector, op);
1176          }
# Line 1710 | Line 1711 | public abstract class AbstractParallelAn
1711                   compoundIndexedSelector(this.selector, selector));
1712          }
1713  
1714 <        public <U> ParallelArrayWithMapping<T, U> withMapping
1714 >        public <U> ParallelArrayWithMapping<T,U> withMapping
1715              (Op<? super T, ? extends U> op) {
1716              return new OROMPap<T,U>(ex, origin, fence, array, selector, op);
1717          }
# Line 2324 | Line 2325 | public abstract class AbstractParallelAn
2325              super(ex, origin, fence, array, op);
2326          }
2327  
2328 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2328 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2329              (Op<? super U, ? extends V> op) {
2330              return new OUOMPap<T,V>(ex, origin, fence, array,
2331                                      CommonOps.compoundOp(this.op, op));
# Line 2518 | Line 2519 | public abstract class AbstractParallelAn
2519          boolean hasFilter() { return true; }
2520          boolean isSelected(int i) { return selector.op(this.array[i]); }
2521  
2522 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2522 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2523              (Op<? super U, ? extends V> op) {
2524              return new OFOMPap<T,V>
2525                  (ex, origin, fence, array, selector,
# Line 2773 | Line 2774 | public abstract class AbstractParallelAn
2774          boolean hasFilter() { return true; }
2775          boolean isSelected(int i) { return selector.op(i, this.array[i]); }
2776  
2777 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2777 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2778              (Op<? super U, ? extends V> op) {
2779              return new OROMPap<T,V>
2780                  (ex, origin, fence, array, selector,
# Line 3115 | Line 3116 | public abstract class AbstractParallelAn
3116              super(ex, origin, fence, array, op);
3117          }
3118  
3119 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3119 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3120              (Op<? super U, ? extends V> op) {
3121              return new OUOCPap<T,V>(ex, origin, fence, array,
3122                                      compoundIndexedOp(this.op, op));
# Line 3309 | Line 3310 | public abstract class AbstractParallelAn
3310          boolean hasFilter() { return true; }
3311          boolean isSelected(int i) { return selector.op(this.array[i]); }
3312  
3313 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3313 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3314              (Op<? super U, ? extends V> op) {
3315              return new OFOCPap<T,V>(ex, origin, fence, array, selector,
3316                                      compoundIndexedOp(this.op, op));
# Line 3552 | Line 3553 | public abstract class AbstractParallelAn
3553          boolean hasFilter() { return true; }
3554          boolean isSelected(int i) { return selector.op(i, this.array[i]); }
3555  
3556 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3556 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3557              (Op<? super U, ? extends V> op) {
3558              return new OROCPap<T,V>(ex, origin, fence, array, selector,
3559                                      compoundIndexedOp(this.op, op));
# Line 3892 | Line 3893 | public abstract class AbstractParallelAn
3893                                    CommonOps.compoundOp(this.op, op));
3894          }
3895  
3896 <        public <U> ParallelArrayWithMapping<T, U> withMapping
3896 >        public <U> ParallelArrayWithMapping<T,U> withMapping
3897              (DoubleToObject<? extends U> op) {
3898              return new OUOMPap<T,U>(ex, origin, fence, array,
3899                                      CommonOps.compoundOp(this.op, op));
# Line 4080 | Line 4081 | public abstract class AbstractParallelAn
4081                                    CommonOps.compoundOp(this.op, op));
4082          }
4083  
4084 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4084 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4085              (DoubleToObject<? extends U> op) {
4086              return new OFOMPap<T,U>(ex, origin, fence, array, selector,
4087                                      CommonOps.compoundOp(this.op, op));
# Line 4316 | Line 4317 | public abstract class AbstractParallelAn
4317                                    CommonOps.compoundOp(this.op, op));
4318          }
4319  
4320 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4320 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4321              (DoubleToObject<? extends U> op) {
4322              return new OROMPap<T,U>(ex, origin, fence, array, selector,
4323                                      CommonOps.compoundOp(this.op, op));
# Line 4641 | Line 4642 | public abstract class AbstractParallelAn
4642                                    compoundIndexedOp(this.op, op));
4643          }
4644  
4645 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4645 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4646              (DoubleToObject<? extends U> op) {
4647              return new OUOCPap<T,U>(ex, origin, fence, array,
4648                                      compoundIndexedOp(this.op, op));
# Line 4828 | Line 4829 | public abstract class AbstractParallelAn
4829                                    compoundIndexedOp(this.op, op));
4830          }
4831  
4832 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4832 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4833              (DoubleToObject<? extends U> op) {
4834              return new OFOCPap<T,U>(ex, origin, fence, array, selector,
4835                                      compoundIndexedOp(this.op, op));
# Line 5066 | Line 5067 | public abstract class AbstractParallelAn
5067                                    compoundIndexedOp(this.op, op));
5068          }
5069  
5070 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5070 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5071              (DoubleToObject<? extends U> op) {
5072              return new OROCPap<T,U>(ex, origin, fence, array, selector,
5073                                      compoundIndexedOp(this.op, op));
# Line 5387 | Line 5388 | public abstract class AbstractParallelAn
5388                                    CommonOps.compoundOp(this.op, op));
5389          }
5390  
5391 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5391 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5392              (LongToObject<? extends U> op) {
5393              return new OUOMPap<T,U>(ex, origin, fence, array,
5394                                      CommonOps.compoundOp(this.op, op));
# Line 5576 | Line 5577 | public abstract class AbstractParallelAn
5577                                    CommonOps.compoundOp(this.op, op));
5578          }
5579  
5580 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5580 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5581              (LongToObject<? extends U> op) {
5582              return new OFOMPap<T,U>(ex, origin, fence, array, selector,
5583                                      CommonOps.compoundOp(this.op, op));
# Line 5816 | Line 5817 | public abstract class AbstractParallelAn
5817                                    CommonOps.compoundOp(this.op, op));
5818          }
5819  
5820 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5820 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5821              (LongToObject<? extends U> op) {
5822              return new OROMPap<T,U>(ex, origin, fence, array, selector,
5823                                      CommonOps.compoundOp(this.op, op));
# Line 6142 | Line 6143 | public abstract class AbstractParallelAn
6143                                    compoundIndexedOp(this.op, op));
6144          }
6145  
6146 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6146 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6147              (LongToObject<? extends U> op) {
6148              return new OUOCPap<T,U>(ex, origin, fence, array,
6149                                      compoundIndexedOp(this.op, op));
# Line 6327 | Line 6328 | public abstract class AbstractParallelAn
6328                                    compoundIndexedOp(this.op, op));
6329          }
6330  
6331 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6331 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6332              (LongToObject<? extends U> op) {
6333              return new OFOCPap<T,U>(ex, origin, fence, array,
6334                                      selector,
# Line 6569 | Line 6570 | public abstract class AbstractParallelAn
6570                                    compoundIndexedOp(this.op, op));
6571          }
6572  
6573 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6573 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6574              (LongToObject<? extends U> op) {
6575              return new OROCPap<T,U>(ex, origin, fence, array,
6576                                      selector,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines