--- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMask.java 2019-04-19 11:40:06.545519500 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMask.java 2019-04-19 11:40:06.055395200 -0700 @@ -31,7 +31,7 @@ /** * A {@code VectorMask} represents an ordered immutable sequence of {@code boolean} - * values. A VectorMask can be used with a mask accepting vector operation to + * values. Some vector operations accept masks to * control the selection and operation of lane elements of input vectors. *

* The number of values in the sequence is referred to as the VectorMask @@ -46,34 +46,33 @@ * otherwise a lane is said to be unset if the lane element is * {@code false}. *

- * VectorMask declares a limited set of unary, binary and reductive mask - * operations. + * VectorMask declares a limited set of unary, binary and reduction operations. *

@@ -132,19 +146,19 @@ * * @param species mask species * @param bits the {@code boolean} array - * @param ix the offset into the array + * @param offset the offset into the array * @return the mask loaded from a {@code boolean} array - * @throws IndexOutOfBoundsException if {@code ix < 0}, or - * {@code ix > bits.length - species.length()} + * @throws IndexOutOfBoundsException if {@code offset < 0}, or + * {@code offset > bits.length - species.length()} */ @ForceInline @SuppressWarnings("unchecked") - public static VectorMask fromArray(VectorSpecies species, boolean[] bits, int ix) { + public static VectorMask fromArray(VectorSpecies species, boolean[] bits, int offset) { Objects.requireNonNull(bits); - ix = VectorIntrinsics.checkIndex(ix, bits.length, species.length()); + offset = VectorIntrinsics.checkIndex(offset, bits.length, species.length()); return VectorIntrinsics.load((Class>) species.maskType(), species.elementType(), species.length(), - bits, (long) ix + Unsafe.ARRAY_BOOLEAN_BASE_OFFSET, - bits, ix, species, + bits, (long) offset + Unsafe.ARRAY_BOOLEAN_BASE_OFFSET, + bits, offset, species, (boolean[] c, int idx, VectorSpecies s) -> ((AbstractSpecies)s).opm(n -> c[idx + n])); } @@ -233,11 +247,11 @@ * {@code i + N}. * * @param a the array - * @param i the offset into the array - * @throws IndexOutOfBoundsException if {@code i < 0}, or - * {@code i > a.length - this.length()} + * @param offset the offset into the array + * @throws IndexOutOfBoundsException if {@code offset < 0}, or + * {@code offset > a.length - this.length()} */ - public abstract void intoArray(boolean[] a, int i); + public abstract void intoArray(boolean[] a, int offset); /** * Returns {@code true} if any of the mask lanes are set. @@ -265,8 +279,8 @@ /** * Logically ands this mask with an input mask. *

- * This is a mask binary operation where the logical and operation - * ({@code &&} is applied to lane elements. + * This is a lane-wise binary operation which applies the logical and operation + * ({@code &&}) to each lane. * * @param o the input mask * @return the result of logically and'ing this mask with an input mask @@ -276,8 +290,8 @@ /** * Logically ors this mask with an input mask. *

- * This is a mask binary operation where the logical or operation - * ({@code ||} is applied to lane elements. + * This is a lane-wise binary operation which applies the logical or operation + * ({@code ||}) to each lane. * * @param o the input mask * @return the result of logically or'ing this mask with an input mask @@ -287,8 +301,8 @@ /** * Logically negates this mask. *

- * This is a mask unary operation where the logical not operation - * ({@code !} is applied to lane elements. + * This is a lane-wise unary operation which applies the logical not operation + * ({@code !}) to each lane. * * @return the result of logically negating this mask. */ @@ -313,15 +327,15 @@ * * @return true if the lane at index {@code i} is set, otherwise false */ - public abstract boolean getElement(int i); + public abstract boolean lane(int i); /** * Tests if the lane at index {@code i} is set * @param i the lane index * @return true if the lane at index {@code i} is set, otherwise false - * @see #getElement + * @see #lane */ public boolean isSet(int i) { - return getElement(i); + return lane(i); } }