< prev index next >

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

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

@@ -36,22 +36,22 @@
 import jdk.internal.vm.annotation.ForceInline;
 import static jdk.incubator.vector.VectorIntrinsics.*;
 
 @SuppressWarnings("cast")
 final class Int256Vector extends IntVector {
-    private static final Species<Integer> SPECIES = IntVector.SPECIES_256;
+    private static final VectorSpecies<Integer> SPECIES = IntVector.SPECIES_256;
 
     static final Int256Vector ZERO = new Int256Vector();
 
     static final int LENGTH = SPECIES.length();
 
     // Index vector species
     private static final IntVector.IntSpecies INDEX_SPECIES;
 
     static {
         int bitSize = Vector.bitSizeForVectorLength(int.class, LENGTH);
-        INDEX_SPECIES = (IntVector.IntSpecies) IntVector.species(Shape.forBitSize(bitSize));
+        INDEX_SPECIES = (IntVector.IntSpecies) IntVector.species(VectorShape.forBitSize(bitSize));
     }
 
     private final int[] vec; // Don't access directly, use getElements() instead.
 
     private int[] getElements() {

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

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

@@ -130,11 +130,11 @@
         }
         return new Int256Vector(res);
     }
 
     @Override
-    Int256Vector tOp(Vector<Integer> o1, Vector<Integer> o2, Mask<Integer> o3, FTriOp f) {
+    Int256Vector tOp(Vector<Integer> o1, Vector<Integer> o2, VectorMask<Integer> o3, FTriOp f) {
         int[] res = new int[length()];
         int[] vec1 = getElements();
         int[] vec2 = ((Int256Vector)o1).getElements();
         int[] vec3 = ((Int256Vector)o2).getElements();
         boolean[] mbits = ((Int256Mask)o3).getBits();

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

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

@@ -297,11 +297,11 @@
         }
     }
 
     @Override
     @ForceInline
-    public IntVector reshape(Species<Integer> s) {
+    public IntVector reshape(VectorSpecies<Integer> s) {
         Objects.requireNonNull(s);
         if (s.bitSize() == 64 && (s.boxType() == Int64Vector.class)) {
             return VectorIntrinsics.reinterpret(
                 Int256Vector.class,
                 int.class, LENGTH,

@@ -360,11 +360,11 @@
         return add((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector add(int o, Mask<Integer> m) {
+    public IntVector add(int o, VectorMask<Integer> m) {
         return add((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -372,11 +372,11 @@
         return sub((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector sub(int o, Mask<Integer> m) {
+    public IntVector sub(int o, VectorMask<Integer> m) {
         return sub((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -384,11 +384,11 @@
         return mul((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector mul(int o, Mask<Integer> m) {
+    public IntVector mul(int o, VectorMask<Integer> m) {
         return mul((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -402,47 +402,47 @@
         return max((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> equal(int o) {
+    public VectorMask<Integer> equal(int o) {
         return equal((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> notEqual(int o) {
+    public VectorMask<Integer> notEqual(int o) {
         return notEqual((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> lessThan(int o) {
+    public VectorMask<Integer> lessThan(int o) {
         return lessThan((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> lessThanEq(int o) {
+    public VectorMask<Integer> lessThanEq(int o) {
         return lessThanEq((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> greaterThan(int o) {
+    public VectorMask<Integer> greaterThan(int o) {
         return greaterThan((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public Mask<Integer> greaterThanEq(int o) {
+    public VectorMask<Integer> greaterThanEq(int o) {
         return greaterThanEq((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector blend(int o, Mask<Integer> m) {
+    public IntVector blend(int o, VectorMask<Integer> m) {
         return blend((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
 
     @Override

@@ -451,11 +451,11 @@
         return and((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector and(int o, Mask<Integer> m) {
+    public IntVector and(int o, VectorMask<Integer> m) {
         return and((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -463,11 +463,11 @@
         return or((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector or(int o, Mask<Integer> m) {
+    public IntVector or(int o, VectorMask<Integer> m) {
         return or((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

@@ -475,11 +475,11 @@
         return xor((Int256Vector)IntVector.broadcast(SPECIES, o));
     }
 
     @Override
     @ForceInline
-    public IntVector xor(int o, Mask<Integer> m) {
+    public IntVector xor(int o, VectorMask<Integer> m) {
         return xor((Int256Vector)IntVector.broadcast(SPECIES, o), m);
     }
 
     @Override
     @ForceInline

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

@@ -504,11 +504,11 @@
             v1 -> v1.uOp((i, a) -> (int) Math.abs(a)));
     }
 
     @ForceInline
     @Override
-    public Int256Vector abs(Mask<Integer> m) {
+    public Int256Vector abs(VectorMask<Integer> m) {
         return blend(abs(), m);
     }
 
 
     @Override

@@ -520,11 +520,11 @@
             v1 -> v1.uOp((i, a) -> (int) ~a));
     }
 
     @ForceInline
     @Override
-    public Int256Vector not(Mask<Integer> m) {
+    public Int256Vector not(VectorMask<Integer> m) {
         return blend(not(), m);
     }
     // Binary operations
 
     @Override

@@ -538,11 +538,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (int)(a + b)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector add(Vector<Integer> v, Mask<Integer> m) {
+    public Int256Vector add(Vector<Integer> v, VectorMask<Integer> m) {
         return blend(add(v), m);
     }
 
     @Override
     @ForceInline

@@ -555,11 +555,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (int)(a - b)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector sub(Vector<Integer> v, Mask<Integer> m) {
+    public Int256Vector sub(Vector<Integer> v, VectorMask<Integer> m) {
         return blend(sub(v), m);
     }
 
     @Override
     @ForceInline

@@ -572,11 +572,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (int)(a * b)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector mul(Vector<Integer> v, Mask<Integer> m) {
+    public Int256Vector mul(Vector<Integer> v, VectorMask<Integer> m) {
         return blend(mul(v), m);
     }
 
     @Override
     @ForceInline

@@ -589,11 +589,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (int) Math.min(a, b)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector min(Vector<Integer> v, Mask<Integer> m) {
+    public Int256Vector min(Vector<Integer> v, VectorMask<Integer> m) {
         return blend(min(v), m);
     }
 
     @Override
     @ForceInline

@@ -606,11 +606,11 @@
             (v1, v2) -> v1.bOp(v2, (i, a, b) -> (int) Math.max(a, b)));
         }
 
     @Override
     @ForceInline
-    public Int256Vector max(Vector<Integer> v, Mask<Integer> m) {
+    public Int256Vector max(Vector<Integer> v, VectorMask<Integer> m) {
         return blend(max(v), m);
     }
 
     @Override
     @ForceInline

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

@@ -672,11 +672,11 @@
             (v, i) -> v.uOp((__, a) -> (int) (a << i)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector shiftL(int s, Mask<Integer> m) {
+    public Int256Vector shiftL(int s, VectorMask<Integer> m) {
         return blend(shiftL(s), m);
     }
 
     @Override
     @ForceInline

@@ -687,11 +687,11 @@
             (v, i) -> v.uOp((__, a) -> (int) (a >>> i)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector shiftR(int s, Mask<Integer> m) {
+    public Int256Vector shiftR(int s, VectorMask<Integer> m) {
         return blend(shiftR(s), m);
     }
 
     @Override
     @ForceInline

@@ -702,11 +702,11 @@
             (v, i) -> v.uOp((__, a) -> (int) (a >> i)));
     }
 
     @Override
     @ForceInline
-    public Int256Vector aShiftR(int s, Mask<Integer> m) {
+    public Int256Vector aShiftR(int s, VectorMask<Integer> m) {
         return blend(aShiftR(s), m);
     }
 
     @Override
     @ForceInline

@@ -766,11 +766,11 @@
             v -> (long) v.rOp((int) -1, (i, a, b) -> (int) (a & b)));
     }
 
     @Override
     @ForceInline
-    public int andAll(Mask<Integer> m) {
+    public int andAll(VectorMask<Integer> m) {
         return blend((Int256Vector)IntVector.broadcast(SPECIES, (int) -1), m).andAll();
     }
 
     @Override
     @ForceInline

@@ -808,11 +808,11 @@
             v -> (long) v.rOp((int) 0, (i, a, b) -> (int) (a | b)));
     }
 
     @Override
     @ForceInline
-    public int orAll(Mask<Integer> m) {
+    public int orAll(VectorMask<Integer> m) {
         return blend((Int256Vector)IntVector.broadcast(SPECIES, (int) 0), m).orAll();
     }
 
     @Override
     @ForceInline

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

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

@@ -908,11 +908,11 @@
                                (arr, idx, v, indexMap, idy) -> v.forEach((i, e) -> arr[idx+indexMap[idy+i]] = e));
     }
 
      @Override
      @ForceInline
-     public final void intoArray(int[] a, int ax, Mask<Integer> m, int[] b, int iy) {
+     public final void intoArray(int[] a, int ax, VectorMask<Integer> m, int[] b, int iy) {
          // @@@ This can result in out of bounds errors for unset mask lanes
          IntVector oldVal = IntVector.fromArray(SPECIES, a, ax, b, iy);
          IntVector newVal = oldVal.blend(this, m);
          newVal.intoArray(a, ax, b, iy);
      }

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

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

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

@@ -1152,17 +1152,17 @@
     }
 
     @Override
     @ForceInline
     public Int256Vector rearrange(Vector<Integer> v,
-                                  Shuffle<Integer> s, Mask<Integer> m) {
+                                  VectorShuffle<Integer> s, VectorMask<Integer> m) {
         return this.rearrange(s).blend(v.rearrange(s), m);
     }
 
     @Override
     @ForceInline
-    public Int256Vector rearrange(Shuffle<Integer> o1) {
+    public Int256Vector rearrange(VectorShuffle<Integer> o1) {
         Objects.requireNonNull(o1);
         Int256Shuffle s =  (Int256Shuffle)o1;
 
         return VectorIntrinsics.rearrangeOp(
             Int256Vector.class, Int256Shuffle.class, int.class, LENGTH,

@@ -1173,11 +1173,11 @@
             }));
     }
 
     @Override
     @ForceInline
-    public Int256Vector blend(Vector<Integer> o1, Mask<Integer> o2) {
+    public Int256Vector blend(Vector<Integer> o1, VectorMask<Integer> o2) {
         Objects.requireNonNull(o1);
         Objects.requireNonNull(o2);
         Int256Vector v = (Int256Vector)o1;
         Int256Mask   m = (Int256Mask)o2;
 

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

@@ -1287,27 +1287,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 Byte256Vector.Byte256Mask(maskArray);
+                return (VectorMask <E>) new Byte256Vector.Byte256Mask(maskArray);
             } else if (stype == short.class) {
-                return (Mask <E>) new Short256Vector.Short256Mask(maskArray);
+                return (VectorMask <E>) new Short256Vector.Short256Mask(maskArray);
             } else if (stype == int.class) {
-                return (Mask <E>) new Int256Vector.Int256Mask(maskArray);
+                return (VectorMask <E>) new Int256Vector.Int256Mask(maskArray);
             } else if (stype == long.class) {
-                return (Mask <E>) new Long256Vector.Long256Mask(maskArray);
+                return (VectorMask <E>) new Long256Vector.Long256Mask(maskArray);
             } else if (stype == float.class) {
-                return (Mask <E>) new Float256Vector.Float256Mask(maskArray);
+                return (VectorMask <E>) new Float256Vector.Float256Mask(maskArray);
             } else if (stype == double.class) {
-                return (Mask <E>) new Double256Vector.Double256Mask(maskArray);
+                return (VectorMask <E>) new Double256Vector.Double256Mask(maskArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 

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

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

@@ -1381,11 +1381,11 @@
         public Int256Shuffle(IntUnaryOperator f) {
             super(f);
         }
 
         @Override
-        public Species<Integer> species() {
+        public VectorSpecies<Integer> species() {
             return SPECIES;
         }
 
         @Override
         public IntVector toVector() {

@@ -1397,45 +1397,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 Byte256Vector.Byte256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Byte256Vector.Byte256Shuffle(shuffleArray);
             } else if (stype == short.class) {
-                return (Shuffle<F>) new Short256Vector.Short256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Short256Vector.Short256Shuffle(shuffleArray);
             } else if (stype == int.class) {
-                return (Shuffle<F>) new Int256Vector.Int256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Int256Vector.Int256Shuffle(shuffleArray);
             } else if (stype == long.class) {
-                return (Shuffle<F>) new Long256Vector.Long256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Long256Vector.Long256Shuffle(shuffleArray);
             } else if (stype == float.class) {
-                return (Shuffle<F>) new Float256Vector.Float256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Float256Vector.Float256Shuffle(shuffleArray);
             } else if (stype == double.class) {
-                return (Shuffle<F>) new Double256Vector.Double256Shuffle(shuffleArray);
+                return (VectorShuffle<F>) new Double256Vector.Double256Shuffle(shuffleArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 
         @Override
-        public Int256Shuffle rearrange(Vector.Shuffle<Integer> o) {
+        public Int256Shuffle rearrange(VectorShuffle<Integer> o) {
             Int256Shuffle s = (Int256Shuffle) o;
             byte[] r = new byte[reorder.length];
             for (int i = 0; i < reorder.length; i++) {
                 r[i] = reorder[s.reorder[i]];
             }
             return new Int256Shuffle(r);
         }
     }
 
-    // Species
+    // VectorSpecies
 
     @Override
-    public Species<Integer> species() {
+    public VectorSpecies<Integer> species() {
         return SPECIES;
     }
 }
< prev index next >