< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Double64Vector.java

Print this page




 980     }
 981 
 982     @Override
 983     public Double64Vector shiftER(int j) {
 984         double[] vec = getElements();
 985         double[] res = new double[length()];
 986         for (int i = 0; i < length() - j; i++){
 987             res[i + j] = vec[i];
 988         }
 989         return new Double64Vector(res);
 990     }
 991 
 992     @Override
 993     @ForceInline
 994     public Double64Vector rearrange(Vector<Double, Shapes.S64Bit> v,
 995                                   Shuffle<Double, Shapes.S64Bit> s, Mask<Double, Shapes.S64Bit> m) {
 996         return this.rearrange(s).blend(v.rearrange(s), m);
 997     }
 998 
 999     @Override
1000     public Double64Vector rearrange(Shuffle<Double, Shapes.S64Bit> s) {
1001         return uOp((i, a) -> {







1002             double[] vec = this.getElements();
1003             int ei = s.getElement(i);
1004             return vec[ei];
1005         });
1006     }
1007 
1008     @Override
1009     @ForceInline
1010     public Double64Vector blend(Vector<Double, Shapes.S64Bit> o1, Mask<Double, Shapes.S64Bit> o2) {
1011         Objects.requireNonNull(o1);
1012         Objects.requireNonNull(o2);
1013         Double64Vector v = (Double64Vector)o1;
1014         Double64Mask   m = (Double64Mask)o2;
1015 
1016         return VectorIntrinsics.blend(
1017             Double64Vector.class, Double64Mask.class, double.class, LENGTH,
1018             this, v, m,
1019             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
1020     }
1021 
1022     // Accessors
1023 
1024     @Override
1025     public double get(int i) {




 980     }
 981 
 982     @Override
 983     public Double64Vector shiftER(int j) {
 984         double[] vec = getElements();
 985         double[] res = new double[length()];
 986         for (int i = 0; i < length() - j; i++){
 987             res[i + j] = vec[i];
 988         }
 989         return new Double64Vector(res);
 990     }
 991 
 992     @Override
 993     @ForceInline
 994     public Double64Vector rearrange(Vector<Double, Shapes.S64Bit> v,
 995                                   Shuffle<Double, Shapes.S64Bit> s, Mask<Double, Shapes.S64Bit> m) {
 996         return this.rearrange(s).blend(v.rearrange(s), m);
 997     }
 998 
 999     @Override
1000     @ForceInline
1001     public Double64Vector rearrange(Shuffle<Double, Shapes.S64Bit> o1) {
1002     Objects.requireNonNull(o1);
1003     Double64Shuffle s =  (Double64Shuffle)o1;
1004 
1005         return VectorIntrinsics.rearrangeOp(
1006             Double64Vector.class, Double64Shuffle.class, double.class, LENGTH,
1007             this, s,
1008             (v1, s_) -> v1.uOp((i, a) -> {
1009             double[] vec = this.getElements();
1010             int ei = s_.getElement(i);
1011             return vec[ei];
1012         }));
1013     }
1014 
1015     @Override
1016     @ForceInline
1017     public Double64Vector blend(Vector<Double, Shapes.S64Bit> o1, Mask<Double, Shapes.S64Bit> o2) {
1018         Objects.requireNonNull(o1);
1019         Objects.requireNonNull(o2);
1020         Double64Vector v = (Double64Vector)o1;
1021         Double64Mask   m = (Double64Mask)o2;
1022 
1023         return VectorIntrinsics.blend(
1024             Double64Vector.class, Double64Mask.class, double.class, LENGTH,
1025             this, v, m,
1026             (v1, v2, m_) -> v1.bOp(v2, (i, a, b) -> m_.getElement(i) ? b : a));
1027     }
1028 
1029     // Accessors
1030 
1031     @Override
1032     public double get(int i) {


< prev index next >