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.13 by jsr166, Mon Jan 28 17:47:08 2013 UTC vs.
Revision 1.18 by jsr166, Sun Jan 18 20:17:32 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package extra166y;
8 +
9   import jsr166y.*;
10   import static extra166y.Ops.*;
11   import java.util.*;
# Line 132 | Line 133 | public abstract class AbstractParallelAn
133       */
134      Object[] ogetArray() { return null; }
135      double[] dgetArray() { return null; }
136 <    long[]  lgetArray() { return null; }
136 >    long[]   lgetArray() { return null; }
137      abstract Object oget(int index);
138      abstract double dget(int index);
139      abstract long lget(int index);
# Line 275 | Line 276 | public abstract class AbstractParallelAn
276      /**
277       * Shared support for select/map all -- probe filter, map, and
278       * type to start selection driver, or do parallel mapping, or
279 <     * just copy,
279 >     * just copy.
280       */
281      final Object[] allObjects(Class elementType) {
282          if (hasFilter()) {
# Line 514 | Line 515 | public abstract class AbstractParallelAn
515              return new ORPap<T>(ex, origin, fence, array, selector);
516          }
517  
518 <        public <U> ParallelArrayWithMapping<T, U> withMapping
518 >        public <U> ParallelArrayWithMapping<T,U> withMapping
519              (Op<? super T, ? extends U> op) {
520              return new OUOMPap<T,U>(ex, origin, fence, array, op);
521          }
# Line 1170 | Line 1171 | public abstract class AbstractParallelAn
1171                   compoundIndexedSelector(this.selector, selector));
1172          }
1173  
1174 <        public <U> ParallelArrayWithMapping<T, U> withMapping
1174 >        public <U> ParallelArrayWithMapping<T,U> withMapping
1175              (Op<? super T, ? extends U> op) {
1176              return new OFOMPap<T,U>(ex, origin, fence, array, selector, op);
1177          }
# Line 1711 | Line 1712 | public abstract class AbstractParallelAn
1712                   compoundIndexedSelector(this.selector, selector));
1713          }
1714  
1715 <        public <U> ParallelArrayWithMapping<T, U> withMapping
1715 >        public <U> ParallelArrayWithMapping<T,U> withMapping
1716              (Op<? super T, ? extends U> op) {
1717              return new OROMPap<T,U>(ex, origin, fence, array, selector, op);
1718          }
# Line 2325 | Line 2326 | public abstract class AbstractParallelAn
2326              super(ex, origin, fence, array, op);
2327          }
2328  
2329 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2329 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2330              (Op<? super U, ? extends V> op) {
2331              return new OUOMPap<T,V>(ex, origin, fence, array,
2332                                      CommonOps.compoundOp(this.op, op));
# Line 2519 | Line 2520 | public abstract class AbstractParallelAn
2520          boolean hasFilter() { return true; }
2521          boolean isSelected(int i) { return selector.op(this.array[i]); }
2522  
2523 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2523 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2524              (Op<? super U, ? extends V> op) {
2525              return new OFOMPap<T,V>
2526                  (ex, origin, fence, array, selector,
# Line 2774 | Line 2775 | public abstract class AbstractParallelAn
2775          boolean hasFilter() { return true; }
2776          boolean isSelected(int i) { return selector.op(i, this.array[i]); }
2777  
2778 <        public <V> ParallelArrayWithMapping<T, V> withMapping
2778 >        public <V> ParallelArrayWithMapping<T,V> withMapping
2779              (Op<? super U, ? extends V> op) {
2780              return new OROMPap<T,V>
2781                  (ex, origin, fence, array, selector,
# Line 3116 | Line 3117 | public abstract class AbstractParallelAn
3117              super(ex, origin, fence, array, op);
3118          }
3119  
3120 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3120 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3121              (Op<? super U, ? extends V> op) {
3122              return new OUOCPap<T,V>(ex, origin, fence, array,
3123                                      compoundIndexedOp(this.op, op));
# Line 3310 | Line 3311 | public abstract class AbstractParallelAn
3311          boolean hasFilter() { return true; }
3312          boolean isSelected(int i) { return selector.op(this.array[i]); }
3313  
3314 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3314 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3315              (Op<? super U, ? extends V> op) {
3316              return new OFOCPap<T,V>(ex, origin, fence, array, selector,
3317                                      compoundIndexedOp(this.op, op));
# Line 3553 | Line 3554 | public abstract class AbstractParallelAn
3554          boolean hasFilter() { return true; }
3555          boolean isSelected(int i) { return selector.op(i, this.array[i]); }
3556  
3557 <        public <V> ParallelArrayWithMapping<T, V> withMapping
3557 >        public <V> ParallelArrayWithMapping<T,V> withMapping
3558              (Op<? super U, ? extends V> op) {
3559              return new OROCPap<T,V>(ex, origin, fence, array, selector,
3560                                      compoundIndexedOp(this.op, op));
# Line 3893 | Line 3894 | public abstract class AbstractParallelAn
3894                                    CommonOps.compoundOp(this.op, op));
3895          }
3896  
3897 <        public <U> ParallelArrayWithMapping<T, U> withMapping
3897 >        public <U> ParallelArrayWithMapping<T,U> withMapping
3898              (DoubleToObject<? extends U> op) {
3899              return new OUOMPap<T,U>(ex, origin, fence, array,
3900                                      CommonOps.compoundOp(this.op, op));
# Line 4081 | Line 4082 | public abstract class AbstractParallelAn
4082                                    CommonOps.compoundOp(this.op, op));
4083          }
4084  
4085 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4085 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4086              (DoubleToObject<? extends U> op) {
4087              return new OFOMPap<T,U>(ex, origin, fence, array, selector,
4088                                      CommonOps.compoundOp(this.op, op));
# Line 4317 | Line 4318 | public abstract class AbstractParallelAn
4318                                    CommonOps.compoundOp(this.op, op));
4319          }
4320  
4321 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4321 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4322              (DoubleToObject<? extends U> op) {
4323              return new OROMPap<T,U>(ex, origin, fence, array, selector,
4324                                      CommonOps.compoundOp(this.op, op));
# Line 4642 | Line 4643 | public abstract class AbstractParallelAn
4643                                    compoundIndexedOp(this.op, op));
4644          }
4645  
4646 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4646 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4647              (DoubleToObject<? extends U> op) {
4648              return new OUOCPap<T,U>(ex, origin, fence, array,
4649                                      compoundIndexedOp(this.op, op));
# Line 4829 | Line 4830 | public abstract class AbstractParallelAn
4830                                    compoundIndexedOp(this.op, op));
4831          }
4832  
4833 <        public <U> ParallelArrayWithMapping<T, U> withMapping
4833 >        public <U> ParallelArrayWithMapping<T,U> withMapping
4834              (DoubleToObject<? extends U> op) {
4835              return new OFOCPap<T,U>(ex, origin, fence, array, selector,
4836                                      compoundIndexedOp(this.op, op));
# Line 5067 | Line 5068 | public abstract class AbstractParallelAn
5068                                    compoundIndexedOp(this.op, op));
5069          }
5070  
5071 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5071 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5072              (DoubleToObject<? extends U> op) {
5073              return new OROCPap<T,U>(ex, origin, fence, array, selector,
5074                                      compoundIndexedOp(this.op, op));
# Line 5388 | Line 5389 | public abstract class AbstractParallelAn
5389                                    CommonOps.compoundOp(this.op, op));
5390          }
5391  
5392 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5392 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5393              (LongToObject<? extends U> op) {
5394              return new OUOMPap<T,U>(ex, origin, fence, array,
5395                                      CommonOps.compoundOp(this.op, op));
# Line 5577 | Line 5578 | public abstract class AbstractParallelAn
5578                                    CommonOps.compoundOp(this.op, op));
5579          }
5580  
5581 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5581 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5582              (LongToObject<? extends U> op) {
5583              return new OFOMPap<T,U>(ex, origin, fence, array, selector,
5584                                      CommonOps.compoundOp(this.op, op));
# Line 5817 | Line 5818 | public abstract class AbstractParallelAn
5818                                    CommonOps.compoundOp(this.op, op));
5819          }
5820  
5821 <        public <U> ParallelArrayWithMapping<T, U> withMapping
5821 >        public <U> ParallelArrayWithMapping<T,U> withMapping
5822              (LongToObject<? extends U> op) {
5823              return new OROMPap<T,U>(ex, origin, fence, array, selector,
5824                                      CommonOps.compoundOp(this.op, op));
# Line 6143 | Line 6144 | public abstract class AbstractParallelAn
6144                                    compoundIndexedOp(this.op, op));
6145          }
6146  
6147 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6147 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6148              (LongToObject<? extends U> op) {
6149              return new OUOCPap<T,U>(ex, origin, fence, array,
6150                                      compoundIndexedOp(this.op, op));
# Line 6328 | Line 6329 | public abstract class AbstractParallelAn
6329                                    compoundIndexedOp(this.op, op));
6330          }
6331  
6332 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6332 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6333              (LongToObject<? extends U> op) {
6334              return new OFOCPap<T,U>(ex, origin, fence, array,
6335                                      selector,
# Line 6570 | Line 6571 | public abstract class AbstractParallelAn
6571                                    compoundIndexedOp(this.op, op));
6572          }
6573  
6574 <        public <U> ParallelArrayWithMapping<T, U> withMapping
6574 >        public <U> ParallelArrayWithMapping<T,U> withMapping
6575              (LongToObject<? extends U> op) {
6576              return new OROCPap<T,U>(ex, origin, fence, array,
6577                                      selector,
# Line 6820 | Line 6821 | public abstract class AbstractParallelAn
6821          int cursor;
6822          FilteredAsDoubleIterator() {
6823              cursor = origin;
6824 <            advance() ;
6824 >            advance();
6825          }
6826          private void advance() {
6827              while (cursor < fence) {
# Line 6873 | Line 6874 | public abstract class AbstractParallelAn
6874          int cursor;
6875          FilteredAsLongIterator() {
6876              cursor = origin;
6877 <            advance() ;
6877 >            advance();
6878          }
6879          private void advance() {
6880              while (cursor < fence) {
# Line 6926 | Line 6927 | public abstract class AbstractParallelAn
6927          int cursor;
6928          FilteredIterator() {
6929              cursor = origin;
6930 <            advance() ;
6930 >            advance();
6931          }
6932          private void advance() {
6933              while (cursor < fence) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines