< prev index next >

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

Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level

@@ -36,21 +36,21 @@
 import jdk.internal.vm.annotation.ForceInline;
 import static jdk.incubator.vector.VectorIntrinsics.*;
 
 @SuppressWarnings("cast")
 final class Double64Vector extends DoubleVector {
-    private static final Species<Double> SPECIES = DoubleVector.SPECIES_64;
+    private static final VectorSpecies<Double> SPECIES = DoubleVector.SPECIES_64;
 
     static final Double64Vector ZERO = new Double64Vector();
 
     static final int LENGTH = SPECIES.length();
 
     // Index vector species
     private static final IntVector.IntSpecies INDEX_SPECIES;
 
     static {
-        INDEX_SPECIES = (IntVector.IntSpecies) IntVector.species(Shape.S_64_BIT);
+        INDEX_SPECIES = (IntVector.IntSpecies) IntVector.species(VectorShape.S_64_BIT);
     }
 
     private final double[] vec; // Don't access directly, use getElements() instead.
 
     private double[] getElements() {

@@ -79,11 +79,11 @@
         }
         return new Double64Vector(res);
     }
 
     @Override
-    Double64Vector uOp(Mask<Double> o, FUnOp f) {
+    Double64Vector uOp(VectorMask<Double> o, FUnOp f) {
         double[] vec = getElements();
         double[] res = new double[length()];
         boolean[] mbits = ((Double64Mask)o).getBits();
         for (int i = 0; i < length(); i++) {
             res[i] = mbits[i] ? f.apply(i, vec[i]) : vec[i];

@@ -103,11 +103,11 @@
         }
         return new Double64Vector(res);
     }
 
     @Override
-    Double64Vector bOp(Vector<Double> o1, Mask<Double> o2, FBinOp f) {
+    Double64Vector bOp(Vector<Double> o1, VectorMask<Double> o2, FBinOp f) {
         double[] res = new double[length()];
         double[] vec1 = this.getElements();
         double[] vec2 = ((Double64Vector)o1).getElements();
         boolean[] mbits = ((Double64Mask)o2).getBits();
         for (int i = 0; i < length(); i++) {

@@ -129,11 +129,11 @@
         }
         return new Double64Vector(res);
     }
 
     @Override
-    Double64Vector tOp(Vector<Double> o1, Vector<Double> o2, Mask<Double> o3, FTriOp f) {
+    Double64Vector tOp(Vector<Double> o1, Vector<Double> o2, VectorMask<Double> o3, FTriOp f) {
         double[] res = new double[length()];
         double[] vec1 = getElements();
         double[] vec2 = ((Double64Vector)o1).getElements();
         double[] vec3 = ((Double64Vector)o2).getElements();
         boolean[] mbits = ((Double64Mask)o3).getBits();

@@ -152,11 +152,11 @@
         return v;
     }
 
     @Override
     @ForceInline
-    public <F> Vector<F> cast(Species<F> s) {
+    public <F> Vector<F> cast(VectorSpecies<F> s) {
         Objects.requireNonNull(s);
         if (s.length() != LENGTH)
             throw new IllegalArgumentException("Vector length this species length differ");
 
         return VectorIntrinsics.cast(

@@ -169,73 +169,73 @@
         );
     }
 
     @SuppressWarnings("unchecked")
     @ForceInline
-    private <F> Vector<F> castDefault(Species<F> s) {
+    private <F> Vector<F> castDefault(VectorSpecies<F> s) {
         int limit = s.length();
 
         Class<?> stype = s.elementType();
         if (stype == byte.class) {
             byte[] a = new byte[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (byte) this.get(i);
             }
-            return (Vector) ByteVector.fromArray((Species<Byte>) s, a, 0);
+            return (Vector) ByteVector.fromArray((VectorSpecies<Byte>) s, a, 0);
         } else if (stype == short.class) {
             short[] a = new short[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (short) this.get(i);
             }
-            return (Vector) ShortVector.fromArray((Species<Short>) s, a, 0);
+            return (Vector) ShortVector.fromArray((VectorSpecies<Short>) s, a, 0);
         } else if (stype == int.class) {
             int[] a = new int[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (int) this.get(i);
             }
-            return (Vector) IntVector.fromArray((Species<Integer>) s, a, 0);
+            return (Vector) IntVector.fromArray((VectorSpecies<Integer>) s, a, 0);
         } else if (stype == long.class) {
             long[] a = new long[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (long) this.get(i);
             }
-            return (Vector) LongVector.fromArray((Species<Long>) s, a, 0);
+            return (Vector) LongVector.fromArray((VectorSpecies<Long>) s, a, 0);
         } else if (stype == float.class) {
             float[] a = new float[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (float) this.get(i);
             }
-            return (Vector) FloatVector.fromArray((Species<Float>) s, a, 0);
+            return (Vector) FloatVector.fromArray((VectorSpecies<Float>) s, a, 0);
         } else if (stype == double.class) {
             double[] a = new double[limit];
             for (int i = 0; i < limit; i++) {
                 a[i] = (double) this.get(i);
             }
-            return (Vector) DoubleVector.fromArray((Species<Double>) s, a, 0);
+            return (Vector) DoubleVector.fromArray((VectorSpecies<Double>) s, a, 0);
         } else {
             throw new UnsupportedOperationException("Bad lane type for casting.");
         }
     }
 
     @Override
     @ForceInline
     @SuppressWarnings("unchecked")
-    public <F> Vector<F> reinterpret(Species<F> s) {
+    public <F> Vector<F> reinterpret(VectorSpecies<F> s) {
         Objects.requireNonNull(s);
 
         if(s.elementType().equals(double.class)) {
-            return (Vector<F>) reshape((Species<Double>)s);
+            return (Vector<F>) reshape((VectorSpecies<Double>)s);
         }
         if(s.bitSize() == bitSize()) {
             return reinterpretType(s);
         }
 
         return defaultReinterpret(s);
     }
 
     @ForceInline
-    private <F> Vector<F> reinterpretType(Species<F> s) {
+    private <F> Vector<F> reinterpretType(VectorSpecies<F> s) {
         Objects.requireNonNull(s);
 
         Class<?> stype = s.elementType();
         if (stype == byte.class) {
             return VectorIntrinsics.reinterpret(

@@ -296,11 +296,11 @@
         }
     }
 
     @Override
     @ForceInline
-    public DoubleVector reshape(Species<Double> s) {
+    public DoubleVector reshape(VectorSpecies<Double> s) {
         Objects.requireNonNull(s);
         if (s.bitSize() == 64 && (s.boxType() == Double64Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Double64Vector.class,
                 double.class, LENGTH,

@@ -359,11 +359,11 @@
         return add((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector add(double o, Mask<Double> m) {
+    public DoubleVector add(double o, VectorMask<Double> m) {
         return add((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -371,11 +371,11 @@
         return sub((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector sub(double o, Mask<Double> m) {
+    public DoubleVector sub(double o, VectorMask<Double> m) {
         return sub((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -383,11 +383,11 @@
         return mul((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector mul(double o, Mask<Double> m) {
+    public DoubleVector mul(double o, VectorMask<Double> m) {
         return mul((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -401,47 +401,47 @@
         return max((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> equal(double o) {
+    public VectorMask<Double> equal(double o) {
         return equal((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> notEqual(double o) {
+    public VectorMask<Double> notEqual(double o) {
         return notEqual((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> lessThan(double o) {
+    public VectorMask<Double> lessThan(double o) {
         return lessThan((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> lessThanEq(double o) {
+    public VectorMask<Double> lessThanEq(double o) {
         return lessThanEq((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> greaterThan(double o) {
+    public VectorMask<Double> greaterThan(double o) {
         return greaterThan((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Double> greaterThanEq(double o) {
+    public VectorMask<Double> greaterThanEq(double o) {
         return greaterThanEq((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector blend(double o, Mask<Double> m) {
+    public DoubleVector blend(double o, VectorMask<Double> m) {
         return blend((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -449,17 +449,17 @@
         return div((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector div(double o, Mask<Double> m) {
+    public DoubleVector div(double o, VectorMask<Double> m) {
         return div((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline
-    public Double64Vector div(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector div(Vector<Double> v, VectorMask<Double> m) {
         return blend(div(v), m);
     }
 
     @Override
     @ForceInline

@@ -467,11 +467,11 @@
         return atan2((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector atan2(double o, Mask<Double> m) {
+    public DoubleVector atan2(double o, VectorMask<Double> m) {
         return atan2((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -479,11 +479,11 @@
         return pow((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector pow(double o, Mask<Double> m) {
+    public DoubleVector pow(double o, VectorMask<Double> m) {
         return pow((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -491,11 +491,11 @@
         return fma((Double64Vector)DoubleVector.broadcast(SPECIES, o1), (Double64Vector)DoubleVector.broadcast(SPECIES, o2));
     }
 
     @Override
     @ForceInline
-    public DoubleVector fma(double o1, double o2, Mask<Double> m) {
+    public DoubleVector fma(double o1, double o2, VectorMask<Double> m) {
         return fma((Double64Vector)DoubleVector.broadcast(SPECIES, o1), (Double64Vector)DoubleVector.broadcast(SPECIES, o2), m);
     }
 
     @Override
     @ForceInline

@@ -503,20 +503,20 @@
         return hypot((Double64Vector)DoubleVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public DoubleVector hypot(double o, Mask<Double> m) {
+    public DoubleVector hypot(double o, VectorMask<Double> m) {
         return hypot((Double64Vector)DoubleVector.broadcast(SPECIES, o), m);
     }
 
 
     // Unary operations
 
     @ForceInline
     @Override
-    public Double64Vector neg(Mask<Double> m) {
+    public Double64Vector neg(VectorMask<Double> m) {
         return blend(neg(), m);
     }
 
     @Override
     @ForceInline

@@ -527,11 +527,11 @@
             v1 -> v1.uOp((i, a) -> (double) Math.abs(a)));
     }
 
     @ForceInline
     @Override
-    public Double64Vector abs(Mask<Double> m) {
+    public Double64Vector abs(VectorMask<Double> m) {
         return blend(abs(), m);
     }
 
     @Override
     @ForceInline

@@ -744,11 +744,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (double)(a + b)));
     }
 
     @Override
     @ForceInline
-    public Double64Vector add(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector add(Vector<Double> v, VectorMask<Double> m) {
         return blend(add(v), m);
     }
 
     @Override
     @ForceInline

@@ -761,11 +761,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (double)(a - b)));
     }
 
     @Override
     @ForceInline
-    public Double64Vector sub(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector sub(Vector<Double> v, VectorMask<Double> m) {
         return blend(sub(v), m);
     }
 
     @Override
     @ForceInline

@@ -778,11 +778,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (double)(a * b)));
     }
 
     @Override
     @ForceInline
-    public Double64Vector mul(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector mul(Vector<Double> v, VectorMask<Double> m) {
         return blend(mul(v), m);
     }
 
     @Override
     @ForceInline

@@ -795,11 +795,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (double) Math.min(a, b)));
     }
 
     @Override
     @ForceInline
-    public Double64Vector min(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector min(Vector<Double> v, VectorMask<Double> m) {
         return blend(min(v), m);
     }
 
     @Override
     @ForceInline

@@ -812,11 +812,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (double) Math.max(a, b)));
         }
 
     @Override
     @ForceInline
-    public Double64Vector max(Vector<Double> v, Mask<Double> m) {
+    public Double64Vector max(Vector<Double> v, VectorMask<Double> m) {
         return blend(max(v), m);
     }
 
 
     // Ternary operations

@@ -889,42 +889,42 @@
     }
 
 
     @Override
     @ForceInline
-    public double addAll(Mask<Double> m) {
+    public double addAll(VectorMask<Double> m) {
         return blend((Double64Vector)DoubleVector.broadcast(SPECIES, (double) 0), m).addAll();
     }
 
 
     @Override
     @ForceInline
-    public double mulAll(Mask<Double> m) {
+    public double mulAll(VectorMask<Double> m) {
         return blend((Double64Vector)DoubleVector.broadcast(SPECIES, (double) 1), m).mulAll();
     }
 
     @Override
     @ForceInline
-    public double minAll(Mask<Double> m) {
+    public double minAll(VectorMask<Double> m) {
         return blend((Double64Vector)DoubleVector.broadcast(SPECIES, Double.MAX_VALUE), m).minAll();
     }
 
     @Override
     @ForceInline
-    public double maxAll(Mask<Double> m) {
+    public double maxAll(VectorMask<Double> m) {
         return blend((Double64Vector)DoubleVector.broadcast(SPECIES, Double.MIN_VALUE), m).maxAll();
     }
 
     @Override
     @ForceInline
-    public Shuffle<Double> toShuffle() {
+    public VectorShuffle<Double> toShuffle() {
         double[] a = toArray();
         int[] sa = new int[a.length];
         for (int i = 0; i < a.length; i++) {
             sa[i] = (int) a[i];
         }
-        return DoubleVector.shuffleFromArray(SPECIES, sa, 0);
+        return VectorShuffle.fromArray(SPECIES, sa, 0);
     }
 
     // Memory operations
 
     private static final int ARRAY_SHIFT         = 31 - Integer.numberOfLeadingZeros(Unsafe.ARRAY_DOUBLE_INDEX_SCALE);

@@ -942,11 +942,11 @@
                                (arr, idx, v) -> v.forEach((i, e) -> arr[idx + i] = e));
     }
 
     @Override
     @ForceInline
-    public final void intoArray(double[] a, int ax, Mask<Double> m) {
+    public final void intoArray(double[] a, int ax, VectorMask<Double> m) {
         DoubleVector oldVal = DoubleVector.fromArray(SPECIES, a, ax);
         DoubleVector newVal = oldVal.blend(this, m);
         newVal.intoArray(a, ax);
     }
     @Override

@@ -955,11 +955,11 @@
         this.intoArray(a, ix + b[iy]);
     }
 
      @Override
      @ForceInline
-     public final void intoArray(double[] a, int ax, Mask<Double> m, int[] b, int iy) {
+     public final void intoArray(double[] a, int ax, VectorMask<Double> m, int[] b, int iy) {
          // @@@ This can result in out of bounds errors for unset mask lanes
          DoubleVector oldVal = DoubleVector.fromArray(SPECIES, a, ax, b, iy);
          DoubleVector newVal = oldVal.blend(this, m);
          newVal.intoArray(a, ax, b, iy);
      }

@@ -980,11 +980,11 @@
                                });
     }
 
     @Override
     @ForceInline
-    public final void intoByteArray(byte[] a, int ix, Mask<Double> m) {
+    public final void intoByteArray(byte[] a, int ix, VectorMask<Double> m) {
         Double64Vector oldVal = (Double64Vector) DoubleVector.fromByteArray(SPECIES, a, ix);
         Double64Vector newVal = oldVal.blend(this, m);
         newVal.intoByteArray(a, ix);
     }
 

@@ -1009,11 +1009,11 @@
                                });
     }
 
     @Override
     @ForceInline
-    public void intoByteBuffer(ByteBuffer bb, int ix, Mask<Double> m) {
+    public void intoByteBuffer(ByteBuffer bb, int ix, VectorMask<Double> m) {
         Double64Vector oldVal = (Double64Vector) DoubleVector.fromByteBuffer(SPECIES, bb, ix);
         Double64Vector newVal = oldVal.blend(this, m);
         newVal.intoByteBuffer(bb, ix);
     }
 

@@ -1134,11 +1134,11 @@
             f.apply(i, vec[i]);
         }
     }
 
     @Override
-    void forEach(Mask<Double> o, FUnCon f) {
+    void forEach(VectorMask<Double> o, FUnCon f) {
         boolean[] mbits = ((Double64Mask)o).getBits();
         forEach((i, a) -> {
             if (mbits[i]) { f.apply(i, a); }
         });
     }

@@ -1199,17 +1199,17 @@
     }
 
     @Override
     @ForceInline
     public Double64Vector rearrange(Vector<Double> v,
-                                  Shuffle<Double> s, Mask<Double> m) {
+                                  VectorShuffle<Double> s, VectorMask<Double> m) {
         return this.rearrange(s).blend(v.rearrange(s), m);
     }
 
     @Override
     @ForceInline
-    public Double64Vector rearrange(Shuffle<Double> o1) {
+    public Double64Vector rearrange(VectorShuffle<Double> o1) {
         Objects.requireNonNull(o1);
         Double64Shuffle s =  (Double64Shuffle)o1;
 
         return VectorIntrinsics.rearrangeOp(
             Double64Vector.class, Double64Shuffle.class, double.class, LENGTH,

@@ -1220,11 +1220,11 @@
             }));
     }
 
     @Override
     @ForceInline
-    public Double64Vector blend(Vector<Double> o1, Mask<Double> o2) {
+    public Double64Vector blend(Vector<Double> o1, VectorMask<Double> o2) {
         Objects.requireNonNull(o1);
         Objects.requireNonNull(o2);
         Double64Vector v = (Double64Vector)o1;
         Double64Mask   m = (Double64Mask)o2;
 

@@ -1305,22 +1305,22 @@
             }
             return new Double64Mask(res);
         }
 
         @Override
-        Double64Mask bOp(Mask<Double> o, MBinOp f) {
+        Double64Mask bOp(VectorMask<Double> o, MBinOp f) {
             boolean[] res = new boolean[species().length()];
             boolean[] bits = getBits();
             boolean[] mbits = ((Double64Mask)o).getBits();
             for (int i = 0; i < species().length(); i++) {
                 res[i] = f.apply(i, bits[i], mbits[i]);
             }
             return new Double64Mask(res);
         }
 
         @Override
-        public Species<Double> species() {
+        public VectorSpecies<Double> species() {
             return SPECIES;
         }
 
         @Override
         public Double64Vector toVector() {

@@ -1335,27 +1335,27 @@
         }
 
         @Override
         @ForceInline
         @SuppressWarnings("unchecked")
-        public <E> Mask<E> cast(Species<E> species) {
+        public <E> VectorMask<E> cast(VectorSpecies<E> species) {
             if (length() != species.length())
-                throw new IllegalArgumentException("Mask length and species length differ");
+                throw new IllegalArgumentException("VectorMask length and species length differ");
             Class<?> stype = species.elementType();
             boolean [] maskArray = toArray();
             if (stype == byte.class) {
-                return (Mask <E>) new Byte64Vector.Byte64Mask(maskArray);
+                return (VectorMask <E>) new Byte64Vector.Byte64Mask(maskArray);
             } else if (stype == short.class) {
-                return (Mask <E>) new Short64Vector.Short64Mask(maskArray);
+                return (VectorMask <E>) new Short64Vector.Short64Mask(maskArray);
             } else if (stype == int.class) {
-                return (Mask <E>) new Int64Vector.Int64Mask(maskArray);
+                return (VectorMask <E>) new Int64Vector.Int64Mask(maskArray);
             } else if (stype == long.class) {
-                return (Mask <E>) new Long64Vector.Long64Mask(maskArray);
+                return (VectorMask <E>) new Long64Vector.Long64Mask(maskArray);
             } else if (stype == float.class) {
-                return (Mask <E>) new Float64Vector.Float64Mask(maskArray);
+                return (VectorMask <E>) new Float64Vector.Float64Mask(maskArray);
             } else if (stype == double.class) {
-                return (Mask <E>) new Double64Vector.Double64Mask(maskArray);
+                return (VectorMask <E>) new Double64Vector.Double64Mask(maskArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 

@@ -1372,21 +1372,21 @@
 
         // Binary operations
 
         @Override
         @ForceInline
-        public Double64Mask and(Mask<Double> o) {
+        public Double64Mask and(VectorMask<Double> o) {
             Objects.requireNonNull(o);
             Double64Mask m = (Double64Mask)o;
             return VectorIntrinsics.binaryOp(VECTOR_OP_AND, Double64Mask.class, long.class, LENGTH,
                                              this, m,
                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a & b));
         }
 
         @Override
         @ForceInline
-        public Double64Mask or(Mask<Double> o) {
+        public Double64Mask or(VectorMask<Double> o) {
             Objects.requireNonNull(o);
             Double64Mask m = (Double64Mask)o;
             return VectorIntrinsics.binaryOp(VECTOR_OP_OR, Double64Mask.class, long.class, LENGTH,
                                              this, m,
                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a | b));

@@ -1404,11 +1404,11 @@
 
         @Override
         @ForceInline
         public boolean allTrue() {
             return VectorIntrinsics.test(BT_overflow, Double64Mask.class, long.class, LENGTH,
-                                         this, DoubleVector.maskAllTrue(species()),
+                                         this, VectorMask.maskAllTrue(species()),
                                          (m, __) -> allTrueHelper(((Double64Mask)m).getBits()));
         }
     }
 
     // Shuffle

@@ -1429,11 +1429,11 @@
         public Double64Shuffle(IntUnaryOperator f) {
             super(f);
         }
 
         @Override
-        public Species<Double> species() {
+        public VectorSpecies<Double> species() {
             return SPECIES;
         }
 
         @Override
         public DoubleVector toVector() {

@@ -1445,45 +1445,45 @@
         }
 
         @Override
         @ForceInline
         @SuppressWarnings("unchecked")
-        public <F> Shuffle<F> cast(Species<F> species) {
+        public <F> VectorShuffle<F> cast(VectorSpecies<F> species) {
             if (length() != species.length())
                 throw new IllegalArgumentException("Shuffle length and species length differ");
             Class<?> stype = species.elementType();
             int [] shuffleArray = toArray();
             if (stype == byte.class) {
-                return (Shuffle<F>) new Byte64Vector.Byte64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Byte64Vector.Byte64Shuffle(shuffleArray);
             } else if (stype == short.class) {
-                return (Shuffle<F>) new Short64Vector.Short64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Short64Vector.Short64Shuffle(shuffleArray);
             } else if (stype == int.class) {
-                return (Shuffle<F>) new Int64Vector.Int64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Int64Vector.Int64Shuffle(shuffleArray);
             } else if (stype == long.class) {
-                return (Shuffle<F>) new Long64Vector.Long64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Long64Vector.Long64Shuffle(shuffleArray);
             } else if (stype == float.class) {
-                return (Shuffle<F>) new Float64Vector.Float64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Float64Vector.Float64Shuffle(shuffleArray);
             } else if (stype == double.class) {
-                return (Shuffle<F>) new Double64Vector.Double64Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Double64Vector.Double64Shuffle(shuffleArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 
         @Override
-        public Double64Shuffle rearrange(Vector.Shuffle<Double> o) {
+        public Double64Shuffle rearrange(VectorShuffle<Double> o) {
             Double64Shuffle s = (Double64Shuffle) o;
             byte[] r = new byte[reorder.length];
             for (int i = 0; i < reorder.length; i++) {
                 r[i] = reorder[s.reorder[i]];
             }
             return new Double64Shuffle(r);
         }
     }
 
-    // Species
+    // VectorSpecies
 
     @Override
-    public Species<Double> species() {
+    public VectorSpecies<Double> species() {
         return SPECIES;
     }
 }
< prev index next >