< prev index next >

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

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

@@ -36,11 +36,11 @@
 import jdk.internal.vm.annotation.ForceInline;
 import static jdk.incubator.vector.VectorIntrinsics.*;
 
 @SuppressWarnings("cast")
 final class Short512Vector extends ShortVector {
-    private static final Species<Short> SPECIES = ShortVector.SPECIES_512;
+    private static final VectorSpecies<Short> SPECIES = ShortVector.SPECIES_512;
 
     static final Short512Vector ZERO = new Short512Vector();
 
     static final int LENGTH = SPECIES.length();
 

@@ -72,11 +72,11 @@
         }
         return new Short512Vector(res);
     }
 
     @Override
-    Short512Vector uOp(Mask<Short> o, FUnOp f) {
+    Short512Vector uOp(VectorMask<Short> o, FUnOp f) {
         short[] vec = getElements();
         short[] res = new short[length()];
         boolean[] mbits = ((Short512Mask)o).getBits();
         for (int i = 0; i < length(); i++) {
             res[i] = mbits[i] ? f.apply(i, vec[i]) : vec[i];

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

@@ -122,11 +122,11 @@
         }
         return new Short512Vector(res);
     }
 
     @Override
-    Short512Vector tOp(Vector<Short> o1, Vector<Short> o2, Mask<Short> o3, FTriOp f) {
+    Short512Vector tOp(Vector<Short> o1, Vector<Short> o2, VectorMask<Short> o3, FTriOp f) {
         short[] res = new short[length()];
         short[] vec1 = getElements();
         short[] vec2 = ((Short512Vector)o1).getElements();
         short[] vec3 = ((Short512Vector)o2).getElements();
         boolean[] mbits = ((Short512Mask)o3).getBits();

@@ -145,11 +145,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(

@@ -162,73 +162,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(short.class)) {
-            return (Vector<F>) reshape((Species<Short>)s);
+            return (Vector<F>) reshape((VectorSpecies<Short>)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(

@@ -289,11 +289,11 @@
         }
     }
 
     @Override
     @ForceInline
-    public ShortVector reshape(Species<Short> s) {
+    public ShortVector reshape(VectorSpecies<Short> s) {
         Objects.requireNonNull(s);
         if (s.bitSize() == 64 && (s.boxType() == Short64Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Short512Vector.class,
                 short.class, LENGTH,

@@ -352,11 +352,11 @@
         return add((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector add(short o, Mask<Short> m) {
+    public ShortVector add(short o, VectorMask<Short> m) {
         return add((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -364,11 +364,11 @@
         return sub((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector sub(short o, Mask<Short> m) {
+    public ShortVector sub(short o, VectorMask<Short> m) {
         return sub((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -376,11 +376,11 @@
         return mul((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector mul(short o, Mask<Short> m) {
+    public ShortVector mul(short o, VectorMask<Short> m) {
         return mul((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -394,47 +394,47 @@
         return max((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> equal(short o) {
+    public VectorMask<Short> equal(short o) {
         return equal((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> notEqual(short o) {
+    public VectorMask<Short> notEqual(short o) {
         return notEqual((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> lessThan(short o) {
+    public VectorMask<Short> lessThan(short o) {
         return lessThan((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> lessThanEq(short o) {
+    public VectorMask<Short> lessThanEq(short o) {
         return lessThanEq((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> greaterThan(short o) {
+    public VectorMask<Short> greaterThan(short o) {
         return greaterThan((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Short> greaterThanEq(short o) {
+    public VectorMask<Short> greaterThanEq(short o) {
         return greaterThanEq((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector blend(short o, Mask<Short> m) {
+    public ShortVector blend(short o, VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
 
     @Override

@@ -443,11 +443,11 @@
         return and((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector and(short o, Mask<Short> m) {
+    public ShortVector and(short o, VectorMask<Short> m) {
         return and((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -455,11 +455,11 @@
         return or((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector or(short o, Mask<Short> m) {
+    public ShortVector or(short o, VectorMask<Short> m) {
         return or((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -467,11 +467,11 @@
         return xor((Short512Vector)ShortVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public ShortVector xor(short o, Mask<Short> m) {
+    public ShortVector xor(short o, VectorMask<Short> m) {
         return xor((Short512Vector)ShortVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -481,11 +481,11 @@
 
     // Unary operations
 
     @ForceInline
     @Override
-    public Short512Vector neg(Mask<Short> m) {
+    public Short512Vector neg(VectorMask<Short> m) {
         return blend(neg(), m);
     }
 
     @Override
     @ForceInline

@@ -496,11 +496,11 @@
             v1 -> v1.uOp((i, a) -> (short) Math.abs(a)));
     }
 
     @ForceInline
     @Override
-    public Short512Vector abs(Mask<Short> m) {
+    public Short512Vector abs(VectorMask<Short> m) {
         return blend(abs(), m);
     }
 
 
     @Override

@@ -512,11 +512,11 @@
             v1 -> v1.uOp((i, a) -> (short) ~a));
     }
 
     @ForceInline
     @Override
-    public Short512Vector not(Mask<Short> m) {
+    public Short512Vector not(VectorMask<Short> m) {
         return blend(not(), m);
     }
     // Binary operations
 
     @Override

@@ -530,11 +530,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short)(a + b)));
     }
 
     @Override
     @ForceInline
-    public Short512Vector add(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector add(Vector<Short> v, VectorMask<Short> m) {
         return blend(add(v), m);
     }
 
     @Override
     @ForceInline

@@ -547,11 +547,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short)(a - b)));
     }
 
     @Override
     @ForceInline
-    public Short512Vector sub(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector sub(Vector<Short> v, VectorMask<Short> m) {
         return blend(sub(v), m);
     }
 
     @Override
     @ForceInline

@@ -564,11 +564,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short)(a * b)));
     }
 
     @Override
     @ForceInline
-    public Short512Vector mul(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector mul(Vector<Short> v, VectorMask<Short> m) {
         return blend(mul(v), m);
     }
 
     @Override
     @ForceInline

@@ -581,11 +581,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short) Math.min(a, b)));
     }
 
     @Override
     @ForceInline
-    public Short512Vector min(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector min(Vector<Short> v, VectorMask<Short> m) {
         return blend(min(v), m);
     }
 
     @Override
     @ForceInline

@@ -598,11 +598,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short) Math.max(a, b)));
         }
 
     @Override
     @ForceInline
-    public Short512Vector max(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector max(Vector<Short> v, VectorMask<Short> m) {
         return blend(max(v), m);
     }
 
     @Override
     @ForceInline

@@ -637,23 +637,23 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (short)(a ^ b)));
     }
 
     @Override
     @ForceInline
-    public Short512Vector and(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector and(Vector<Short> v, VectorMask<Short> m) {
         return blend(and(v), m);
     }
 
     @Override
     @ForceInline
-    public Short512Vector or(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector or(Vector<Short> v, VectorMask<Short> m) {
         return blend(or(v), m);
     }
 
     @Override
     @ForceInline
-    public Short512Vector xor(Vector<Short> v, Mask<Short> m) {
+    public Short512Vector xor(Vector<Short> v, VectorMask<Short> m) {
         return blend(xor(v), m);
     }
 
     @Override
     @ForceInline

@@ -664,11 +664,11 @@
             (v, i) -> v.uOp((__, a) -> (short) (a << (i & 15))));
     }
 
     @Override
     @ForceInline
-    public Short512Vector shiftL(int s, Mask<Short> m) {
+    public Short512Vector shiftL(int s, VectorMask<Short> m) {
         return blend(shiftL(s), m);
     }
 
     @Override
     @ForceInline

@@ -679,11 +679,11 @@
             (v, i) -> v.uOp((__, a) -> (short) ((a & 0xFFFF) >>> (i & 15))));
     }
 
     @Override
     @ForceInline
-    public Short512Vector shiftR(int s, Mask<Short> m) {
+    public Short512Vector shiftR(int s, VectorMask<Short> m) {
         return blend(shiftR(s), m);
     }
 
     @Override
     @ForceInline

@@ -694,11 +694,11 @@
             (v, i) -> v.uOp((__, a) -> (short) (a >> (i & 15))));
     }
 
     @Override
     @ForceInline
-    public Short512Vector aShiftR(int s, Mask<Short> m) {
+    public Short512Vector aShiftR(int s, VectorMask<Short> m) {
         return blend(aShiftR(s), m);
     }
     // Ternary operations
 
 

@@ -722,11 +722,11 @@
             v -> (long) v.rOp((short) -1, (i, a, b) -> (short) (a & b)));
     }
 
     @Override
     @ForceInline
-    public short andAll(Mask<Short> m) {
+    public short andAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, (short) -1), m).andAll();
     }
 
     @Override
     @ForceInline

@@ -764,11 +764,11 @@
             v -> (long) v.rOp((short) 0, (i, a, b) -> (short) (a | b)));
     }
 
     @Override
     @ForceInline
-    public short orAll(Mask<Short> m) {
+    public short orAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, (short) 0), m).orAll();
     }
 
     @Override
     @ForceInline

@@ -779,49 +779,49 @@
             v -> (long) v.rOp((short) 0, (i, a, b) -> (short) (a ^ b)));
     }
 
     @Override
     @ForceInline
-    public short xorAll(Mask<Short> m) {
+    public short xorAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, (short) 0), m).xorAll();
     }
 
 
     @Override
     @ForceInline
-    public short addAll(Mask<Short> m) {
+    public short addAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, (short) 0), m).addAll();
     }
 
 
     @Override
     @ForceInline
-    public short mulAll(Mask<Short> m) {
+    public short mulAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, (short) 1), m).mulAll();
     }
 
     @Override
     @ForceInline
-    public short minAll(Mask<Short> m) {
+    public short minAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, Short.MAX_VALUE), m).minAll();
     }
 
     @Override
     @ForceInline
-    public short maxAll(Mask<Short> m) {
+    public short maxAll(VectorMask<Short> m) {
         return blend((Short512Vector)ShortVector.broadcast(SPECIES, Short.MIN_VALUE), m).maxAll();
     }
 
     @Override
     @ForceInline
-    public Shuffle<Short> toShuffle() {
+    public VectorShuffle<Short> toShuffle() {
         short[] a = toArray();
         int[] sa = new int[a.length];
         for (int i = 0; i < a.length; i++) {
             sa[i] = (int) a[i];
         }
-        return ShortVector.shuffleFromArray(SPECIES, sa, 0);
+        return VectorShuffle.fromArray(SPECIES, sa, 0);
     }
 
     // Memory operations
 
     private static final int ARRAY_SHIFT         = 31 - Integer.numberOfLeadingZeros(Unsafe.ARRAY_SHORT_INDEX_SCALE);

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

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

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

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

@@ -1074,17 +1074,17 @@
     }
 
     @Override
     @ForceInline
     public Short512Vector rearrange(Vector<Short> v,
-                                  Shuffle<Short> s, Mask<Short> m) {
+                                  VectorShuffle<Short> s, VectorMask<Short> m) {
         return this.rearrange(s).blend(v.rearrange(s), m);
     }
 
     @Override
     @ForceInline
-    public Short512Vector rearrange(Shuffle<Short> o1) {
+    public Short512Vector rearrange(VectorShuffle<Short> o1) {
         Objects.requireNonNull(o1);
         Short512Shuffle s =  (Short512Shuffle)o1;
 
         return VectorIntrinsics.rearrangeOp(
             Short512Vector.class, Short512Shuffle.class, short.class, LENGTH,

@@ -1095,11 +1095,11 @@
             }));
     }
 
     @Override
     @ForceInline
-    public Short512Vector blend(Vector<Short> o1, Mask<Short> o2) {
+    public Short512Vector blend(Vector<Short> o1, VectorMask<Short> o2) {
         Objects.requireNonNull(o1);
         Objects.requireNonNull(o2);
         Short512Vector v = (Short512Vector)o1;
         Short512Mask   m = (Short512Mask)o2;
 

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

@@ -1209,27 +1209,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 Byte512Vector.Byte512Mask(maskArray);
+                return (VectorMask <E>) new Byte512Vector.Byte512Mask(maskArray);
             } else if (stype == short.class) {
-                return (Mask <E>) new Short512Vector.Short512Mask(maskArray);
+                return (VectorMask <E>) new Short512Vector.Short512Mask(maskArray);
             } else if (stype == int.class) {
-                return (Mask <E>) new Int512Vector.Int512Mask(maskArray);
+                return (VectorMask <E>) new Int512Vector.Int512Mask(maskArray);
             } else if (stype == long.class) {
-                return (Mask <E>) new Long512Vector.Long512Mask(maskArray);
+                return (VectorMask <E>) new Long512Vector.Long512Mask(maskArray);
             } else if (stype == float.class) {
-                return (Mask <E>) new Float512Vector.Float512Mask(maskArray);
+                return (VectorMask <E>) new Float512Vector.Float512Mask(maskArray);
             } else if (stype == double.class) {
-                return (Mask <E>) new Double512Vector.Double512Mask(maskArray);
+                return (VectorMask <E>) new Double512Vector.Double512Mask(maskArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 

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

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

@@ -1303,11 +1303,11 @@
         public Short512Shuffle(IntUnaryOperator f) {
             super(f);
         }
 
         @Override
-        public Species<Short> species() {
+        public VectorSpecies<Short> species() {
             return SPECIES;
         }
 
         @Override
         public ShortVector toVector() {

@@ -1319,45 +1319,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 Byte512Vector.Byte512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Byte512Vector.Byte512Shuffle(shuffleArray);
             } else if (stype == short.class) {
-                return (Shuffle<F>) new Short512Vector.Short512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Short512Vector.Short512Shuffle(shuffleArray);
             } else if (stype == int.class) {
-                return (Shuffle<F>) new Int512Vector.Int512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Int512Vector.Int512Shuffle(shuffleArray);
             } else if (stype == long.class) {
-                return (Shuffle<F>) new Long512Vector.Long512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Long512Vector.Long512Shuffle(shuffleArray);
             } else if (stype == float.class) {
-                return (Shuffle<F>) new Float512Vector.Float512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Float512Vector.Float512Shuffle(shuffleArray);
             } else if (stype == double.class) {
-                return (Shuffle<F>) new Double512Vector.Double512Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Double512Vector.Double512Shuffle(shuffleArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 
         @Override
-        public Short512Shuffle rearrange(Vector.Shuffle<Short> o) {
+        public Short512Shuffle rearrange(VectorShuffle<Short> o) {
             Short512Shuffle s = (Short512Shuffle) o;
             byte[] r = new byte[reorder.length];
             for (int i = 0; i < reorder.length; i++) {
                 r[i] = reorder[s.reorder[i]];
             }
             return new Short512Shuffle(r);
         }
     }
 
-    // Species
+    // VectorSpecies
 
     @Override
-    public Species<Short> species() {
+    public VectorSpecies<Short> species() {
         return SPECIES;
     }
 }
< prev index next >