< prev index next >

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

Print this page
rev 55891 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz

@@ -161,11 +161,11 @@
             throw new IllegalArgumentException("Vector length this species length differ");
 
         return VectorIntrinsics.cast(
             Double128Vector.class,
             double.class, LENGTH,
-            s.boxType(),
+            s.vectorType(),
             s.elementType(), LENGTH,
             this, s,
             (species, vector) -> vector.castDefault(species)
         );
     }

@@ -299,48 +299,48 @@
 
     @Override
     @ForceInline
     public DoubleVector reshape(VectorSpecies<Double> s) {
         Objects.requireNonNull(s);
-        if (s.bitSize() == 64 && (s.boxType() == Double64Vector.class)) {
+        if (s.bitSize() == 64 && (s.vectorType() == Double64Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double128Vector.class,
                 double.class, LENGTH,
                 Double64Vector.class,
                 double.class, Double64Vector.LENGTH,
                 this, s,
                 (species, vector) -> (DoubleVector) vector.defaultReinterpret(species)
             );
-        } else if (s.bitSize() == 128 && (s.boxType() == Double128Vector.class)) {
+        } else if (s.bitSize() == 128 && (s.vectorType() == Double128Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double128Vector.class,
                 double.class, LENGTH,
                 Double128Vector.class,
                 double.class, Double128Vector.LENGTH,
                 this, s,
                 (species, vector) -> (DoubleVector) vector.defaultReinterpret(species)
             );
-        } else if (s.bitSize() == 256 && (s.boxType() == Double256Vector.class)) {
+        } else if (s.bitSize() == 256 && (s.vectorType() == Double256Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double128Vector.class,
                 double.class, LENGTH,
                 Double256Vector.class,
                 double.class, Double256Vector.LENGTH,
                 this, s,
                 (species, vector) -> (DoubleVector) vector.defaultReinterpret(species)
             );
-        } else if (s.bitSize() == 512 && (s.boxType() == Double512Vector.class)) {
+        } else if (s.bitSize() == 512 && (s.vectorType() == Double512Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double128Vector.class,
                 double.class, LENGTH,
                 Double512Vector.class,
                 double.class, Double512Vector.LENGTH,
                 this, s,
                 (species, vector) -> (DoubleVector) vector.defaultReinterpret(species)
             );
         } else if ((s.bitSize() > 0) && (s.bitSize() <= 2048)
-                && (s.bitSize() % 128 == 0) && (s.boxType() == DoubleMaxVector.class)) {
+                && (s.bitSize() % 128 == 0) && (s.vectorType() == DoubleMaxVector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double128Vector.class,
                 double.class, LENGTH,
                 DoubleMaxVector.class,
                 double.class, DoubleMaxVector.LENGTH,

@@ -837,11 +837,11 @@
 
     // Type specific horizontal reductions
 
     @Override
     @ForceInline
-    public double addAll() {
+    public double addLanes() {
         long bits = (long) VectorIntrinsics.reductionCoerced(
                                 VECTOR_OP_ADD, Double128Vector.class, double.class, LENGTH,
                                 this,
                                 v -> {
                                     double r = v.rOp((double) 0, (i, a, b) -> (double) (a + b));

@@ -850,11 +850,11 @@
         return Double.longBitsToDouble(bits);
     }
 
     @Override
     @ForceInline
-    public double mulAll() {
+    public double mulLanes() {
         long bits = (long) VectorIntrinsics.reductionCoerced(
                                 VECTOR_OP_MUL, Double128Vector.class, double.class, LENGTH,
                                 this,
                                 v -> {
                                     double r = v.rOp((double) 1, (i, a, b) -> (double) (a * b));

@@ -863,11 +863,11 @@
         return Double.longBitsToDouble(bits);
     }
 
     @Override
     @ForceInline
-    public double minAll() {
+    public double minLanes() {
         long bits = (long) VectorIntrinsics.reductionCoerced(
                                 VECTOR_OP_MIN, Double128Vector.class, double.class, LENGTH,
                                 this,
                                 v -> {
                                     double r = v.rOp(Double.POSITIVE_INFINITY , (i, a, b) -> (double) Math.min(a, b));

@@ -876,11 +876,11 @@
         return Double.longBitsToDouble(bits);
     }
 
     @Override
     @ForceInline
-    public double maxAll() {
+    public double maxLanes() {
         long bits = (long) VectorIntrinsics.reductionCoerced(
                                 VECTOR_OP_MAX, Double128Vector.class, double.class, LENGTH,
                                 this,
                                 v -> {
                                     double r = v.rOp(Double.NEGATIVE_INFINITY, (i, a, b) -> (double) Math.max(a, b));

@@ -890,31 +890,31 @@
     }
 
 
     @Override
     @ForceInline
-    public double addAll(VectorMask<Double> m) {
-        return DoubleVector.broadcast(SPECIES, (double) 0).blend(this, m).addAll();
+    public double addLanes(VectorMask<Double> m) {
+        return DoubleVector.broadcast(SPECIES, (double) 0).blend(this, m).addLanes();
     }
 
 
     @Override
     @ForceInline
-    public double mulAll(VectorMask<Double> m) {
-        return DoubleVector.broadcast(SPECIES, (double) 1).blend(this, m).mulAll();
+    public double mulLanes(VectorMask<Double> m) {
+        return DoubleVector.broadcast(SPECIES, (double) 1).blend(this, m).mulLanes();
     }
 
     @Override
     @ForceInline
-    public double minAll(VectorMask<Double> m) {
-        return DoubleVector.broadcast(SPECIES, Double.MAX_VALUE).blend(this, m).minAll();
+    public double minLanes(VectorMask<Double> m) {
+        return DoubleVector.broadcast(SPECIES, Double.MAX_VALUE).blend(this, m).minLanes();
     }
 
     @Override
     @ForceInline
-    public double maxAll(VectorMask<Double> m) {
-        return DoubleVector.broadcast(SPECIES, Double.MIN_VALUE).blend(this, m).maxAll();
+    public double maxLanes(VectorMask<Double> m) {
+        return DoubleVector.broadcast(SPECIES, Double.MIN_VALUE).blend(this, m).maxLanes();
     }
 
     @Override
     @ForceInline
     public VectorShuffle<Double> toShuffle() {

@@ -1165,21 +1165,21 @@
         return new Long128Vector(res);
     }
 
 
     @Override
-    public Double128Vector rotateEL(int j) {
+    public Double128Vector rotateLanesLeft(int j) {
         double[] vec = getElements();
         double[] res = new double[length()];
         for (int i = 0; i < length(); i++){
             res[(j + i) % length()] = vec[i];
         }
         return new Double128Vector(res);
     }
 
     @Override
-    public Double128Vector rotateER(int j) {
+    public Double128Vector rotateLanesRight(int j) {
         double[] vec = getElements();
         double[] res = new double[length()];
         for (int i = 0; i < length(); i++){
             int z = i - j;
             if(j < 0) {

@@ -1190,21 +1190,21 @@
         }
         return new Double128Vector(res);
     }
 
     @Override
-    public Double128Vector shiftEL(int j) {
+    public Double128Vector shiftLanesLeft(int j) {
         double[] vec = getElements();
         double[] res = new double[length()];
         for (int i = 0; i < length() - j; i++) {
             res[i] = vec[i + j];
         }
         return new Double128Vector(res);
     }
 
     @Override
-    public Double128Vector shiftER(int j) {
+    public Double128Vector shiftLanesRight(int j) {
         double[] vec = getElements();
         double[] res = new double[length()];
         for (int i = 0; i < length() - j; i++){
             res[i + j] = vec[i];
         }
< prev index next >