< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortMaxVector.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 ShortMaxVector extends ShortVector {
-    private static final Species<Short> SPECIES = ShortVector.SPECIES_MAX;
+    private static final VectorSpecies<Short> SPECIES = ShortVector.SPECIES_MAX;
 
     static final ShortMaxVector ZERO = new ShortMaxVector();
 
     static final int LENGTH = SPECIES.length();
 

@@ -72,11 +72,11 @@
         }
         return new ShortMaxVector(res);
     }
 
     @Override
-    ShortMaxVector uOp(Mask<Short> o, FUnOp f) {
+    ShortMaxVector uOp(VectorMask<Short> o, FUnOp f) {
         short[] vec = getElements();
         short[] res = new short[length()];
         boolean[] mbits = ((ShortMaxMask)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 ShortMaxVector(res);
     }
 
     @Override
-    ShortMaxVector bOp(Vector<Short> o1, Mask<Short> o2, FBinOp f) {
+    ShortMaxVector bOp(Vector<Short> o1, VectorMask<Short> o2, FBinOp f) {
         short[] res = new short[length()];
         short[] vec1 = this.getElements();
         short[] vec2 = ((ShortMaxVector)o1).getElements();
         boolean[] mbits = ((ShortMaxMask)o2).getBits();
         for (int i = 0; i < length(); i++) {

@@ -122,11 +122,11 @@
         }
         return new ShortMaxVector(res);
     }
 
     @Override
-    ShortMaxVector tOp(Vector<Short> o1, Vector<Short> o2, Mask<Short> o3, FTriOp f) {
+    ShortMaxVector tOp(Vector<Short> o1, Vector<Short> o2, VectorMask<Short> o3, FTriOp f) {
         short[] res = new short[length()];
         short[] vec1 = getElements();
         short[] vec2 = ((ShortMaxVector)o1).getElements();
         short[] vec3 = ((ShortMaxVector)o2).getElements();
         boolean[] mbits = ((ShortMaxMask)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(
                 ShortMaxVector.class,
                 short.class, LENGTH,

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

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

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

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

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

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

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

@@ -481,11 +481,11 @@
 
     // Unary operations
 
     @ForceInline
     @Override
-    public ShortMaxVector neg(Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector abs(Mask<Short> m) {
+    public ShortMaxVector abs(VectorMask<Short> m) {
         return blend(abs(), m);
     }
 
 
     @Override

@@ -512,11 +512,11 @@
             v1 -> v1.uOp((i, a) -> (short) ~a));
     }
 
     @ForceInline
     @Override
-    public ShortMaxVector not(Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector add(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector sub(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector mul(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector min(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector max(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector and(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector and(Vector<Short> v, VectorMask<Short> m) {
         return blend(and(v), m);
     }
 
     @Override
     @ForceInline
-    public ShortMaxVector or(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector or(Vector<Short> v, VectorMask<Short> m) {
         return blend(or(v), m);
     }
 
     @Override
     @ForceInline
-    public ShortMaxVector xor(Vector<Short> v, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector shiftL(int s, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector shiftR(int s, Mask<Short> m) {
+    public ShortMaxVector 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 ShortMaxVector aShiftR(int s, Mask<Short> m) {
+    public ShortMaxVector 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((ShortMaxVector)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((ShortMaxVector)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((ShortMaxVector)ShortVector.broadcast(SPECIES, (short) 0), m).xorAll();
     }
 
 
     @Override
     @ForceInline
-    public short addAll(Mask<Short> m) {
+    public short addAll(VectorMask<Short> m) {
         return blend((ShortMaxVector)ShortVector.broadcast(SPECIES, (short) 0), m).addAll();
     }
 
 
     @Override
     @ForceInline
-    public short mulAll(Mask<Short> m) {
+    public short mulAll(VectorMask<Short> m) {
         return blend((ShortMaxVector)ShortVector.broadcast(SPECIES, (short) 1), m).mulAll();
     }
 
     @Override
     @ForceInline
-    public short minAll(Mask<Short> m) {
+    public short minAll(VectorMask<Short> m) {
         return blend((ShortMaxVector)ShortVector.broadcast(SPECIES, Short.MAX_VALUE), m).minAll();
     }
 
     @Override
     @ForceInline
-    public short maxAll(Mask<Short> m) {
+    public short maxAll(VectorMask<Short> m) {
         return blend((ShortMaxVector)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) {
         ShortMaxVector oldVal = (ShortMaxVector) ShortVector.fromByteArray(SPECIES, a, ix);
         ShortMaxVector 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) {
         ShortMaxVector oldVal = (ShortMaxVector) ShortVector.fromByteBuffer(SPECIES, bb, ix);
         ShortMaxVector 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 = ((ShortMaxMask)o).getBits();
         forEach((i, a) -> {
             if (mbits[i]) { f.apply(i, a); }
         });
     }

@@ -1074,17 +1074,17 @@
     }
 
     @Override
     @ForceInline
     public ShortMaxVector 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 ShortMaxVector rearrange(Shuffle<Short> o1) {
+    public ShortMaxVector rearrange(VectorShuffle<Short> o1) {
         Objects.requireNonNull(o1);
         ShortMaxShuffle s =  (ShortMaxShuffle)o1;
 
         return VectorIntrinsics.rearrangeOp(
             ShortMaxVector.class, ShortMaxShuffle.class, short.class, LENGTH,

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

@@ -1179,22 +1179,22 @@
             }
             return new ShortMaxMask(res);
         }
 
         @Override
-        ShortMaxMask bOp(Mask<Short> o, MBinOp f) {
+        ShortMaxMask bOp(VectorMask<Short> o, MBinOp f) {
             boolean[] res = new boolean[species().length()];
             boolean[] bits = getBits();
             boolean[] mbits = ((ShortMaxMask)o).getBits();
             for (int i = 0; i < species().length(); i++) {
                 res[i] = f.apply(i, bits[i], mbits[i]);
             }
             return new ShortMaxMask(res);
         }
 
         @Override
-        public Species<Short> species() {
+        public VectorSpecies<Short> species() {
             return SPECIES;
         }
 
         @Override
         public ShortMaxVector 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 ByteMaxVector.ByteMaxMask(maskArray);
+                return (VectorMask <E>) new ByteMaxVector.ByteMaxMask(maskArray);
             } else if (stype == short.class) {
-                return (Mask <E>) new ShortMaxVector.ShortMaxMask(maskArray);
+                return (VectorMask <E>) new ShortMaxVector.ShortMaxMask(maskArray);
             } else if (stype == int.class) {
-                return (Mask <E>) new IntMaxVector.IntMaxMask(maskArray);
+                return (VectorMask <E>) new IntMaxVector.IntMaxMask(maskArray);
             } else if (stype == long.class) {
-                return (Mask <E>) new LongMaxVector.LongMaxMask(maskArray);
+                return (VectorMask <E>) new LongMaxVector.LongMaxMask(maskArray);
             } else if (stype == float.class) {
-                return (Mask <E>) new FloatMaxVector.FloatMaxMask(maskArray);
+                return (VectorMask <E>) new FloatMaxVector.FloatMaxMask(maskArray);
             } else if (stype == double.class) {
-                return (Mask <E>) new DoubleMaxVector.DoubleMaxMask(maskArray);
+                return (VectorMask <E>) new DoubleMaxVector.DoubleMaxMask(maskArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 

@@ -1246,21 +1246,21 @@
 
         // Binary operations
 
         @Override
         @ForceInline
-        public ShortMaxMask and(Mask<Short> o) {
+        public ShortMaxMask and(VectorMask<Short> o) {
             Objects.requireNonNull(o);
             ShortMaxMask m = (ShortMaxMask)o;
             return VectorIntrinsics.binaryOp(VECTOR_OP_AND, ShortMaxMask.class, short.class, LENGTH,
                                              this, m,
                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a & b));
         }
 
         @Override
         @ForceInline
-        public ShortMaxMask or(Mask<Short> o) {
+        public ShortMaxMask or(VectorMask<Short> o) {
             Objects.requireNonNull(o);
             ShortMaxMask m = (ShortMaxMask)o;
             return VectorIntrinsics.binaryOp(VECTOR_OP_OR, ShortMaxMask.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, ShortMaxMask.class, short.class, LENGTH,
-                                         this, ShortVector.maskAllTrue(species()),
+                                         this, VectorMask.maskAllTrue(species()),
                                          (m, __) -> allTrueHelper(((ShortMaxMask)m).getBits()));
         }
     }
 
     // Shuffle

@@ -1303,11 +1303,11 @@
         public ShortMaxShuffle(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 ByteMaxVector.ByteMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new ByteMaxVector.ByteMaxShuffle(shuffleArray);
             } else if (stype == short.class) {
-                return (Shuffle<F>) new ShortMaxVector.ShortMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new ShortMaxVector.ShortMaxShuffle(shuffleArray);
             } else if (stype == int.class) {
-                return (Shuffle<F>) new IntMaxVector.IntMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new IntMaxVector.IntMaxShuffle(shuffleArray);
             } else if (stype == long.class) {
-                return (Shuffle<F>) new LongMaxVector.LongMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new LongMaxVector.LongMaxShuffle(shuffleArray);
             } else if (stype == float.class) {
-                return (Shuffle<F>) new FloatMaxVector.FloatMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new FloatMaxVector.FloatMaxShuffle(shuffleArray);
             } else if (stype == double.class) {
-                return (Shuffle<F>) new DoubleMaxVector.DoubleMaxShuffle(shuffleArray);
+                return (VectorShuffle<F>) new DoubleMaxVector.DoubleMaxShuffle(shuffleArray);
             } else {
                 throw new UnsupportedOperationException("Bad lane type for casting.");
             }
         }
 
         @Override
-        public ShortMaxShuffle rearrange(Vector.Shuffle<Short> o) {
+        public ShortMaxShuffle rearrange(VectorShuffle<Short> o) {
             ShortMaxShuffle s = (ShortMaxShuffle) o;
             byte[] r = new byte[reorder.length];
             for (int i = 0; i < reorder.length; i++) {
                 r[i] = reorder[s.reorder[i]];
             }
             return new ShortMaxShuffle(r);
         }
     }
 
-    // Species
+    // VectorSpecies
 
     @Override
-    public Species<Short> species() {
+    public VectorSpecies<Short> species() {
         return SPECIES;
     }
 }
< prev index next >