--- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java 2019-07-10 11:13:35.501139400 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java 2019-07-10 11:13:34.837368900 -0700 @@ -510,7 +510,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,byte) - * @see VectorSpecies#checkValue(VectorSpecies,byte) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static ByteVector broadcast(VectorSpecies species, long e) { ByteSpecies vsp = (ByteSpecies) species; @@ -1405,7 +1405,6 @@ } /** - /** * {@inheritDoc} * @see #div(byte,VectorMask) */ @@ -1685,7 +1684,7 @@ * @return the bitwise complement {@code ~} of this vector * @see #and(Vector) * @see VectorOperators#NOT - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ @ForceInline public final ByteVector not() { @@ -1825,7 +1824,7 @@ * comparison operator * @see ByteVector#compare(VectorOperators.Comparison,Vector) * @see #eq(byte) - * @see #lessThan(byte) + * @see #lt(byte) */ public abstract VectorMask compare(Comparison op, byte e); @@ -2681,7 +2680,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2883,7 +2883,7 @@ * @return a vector loaded from a byte buffer * @throws IndexOutOfBoundsException * if {@code offset+N*1 < 0} - * or {@code offset+N**1 >= bb.limit()} + * or {@code offset+N*1 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2921,7 +2921,7 @@ * @return a vector loaded from a byte buffer * @throws IndexOutOfBoundsException * if {@code offset+N*1 < 0} - * or {@code offset+N**1 >= bb.limit()} + * or {@code offset+N*1 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java 2019-07-10 11:13:40.227908600 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/DoubleVector.java 2019-07-10 11:13:39.607661300 -0700 @@ -511,7 +511,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,double) - * @see VectorSpecies#checkValue(VectorSpecies,double) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static DoubleVector broadcast(VectorSpecies species, long e) { DoubleSpecies vsp = (DoubleSpecies) species; @@ -1347,7 +1347,6 @@ } /** - /** * {@inheritDoc} * @see #div(double,VectorMask) *

Because the underlying scalar operator is an IEEE @@ -1718,7 +1717,7 @@ * comparison operator * @see DoubleVector#compare(VectorOperators.Comparison,Vector) * @see #eq(double) - * @see #lessThan(double) + * @see #lt(double) */ public abstract VectorMask compare(Comparison op, double e); @@ -2553,7 +2552,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2789,7 +2789,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*8 < 0} - * or {@code offset+N**8 >= bb.limit()} + * or {@code offset+N*8 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2835,7 +2835,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*8 < 0} - * or {@code offset+N**8 >= bb.limit()} + * or {@code offset+N*8 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java 2019-07-10 11:13:45.016781600 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/FloatVector.java 2019-07-10 11:13:44.410910500 -0700 @@ -511,7 +511,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,float) - * @see VectorSpecies#checkValue(VectorSpecies,float) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static FloatVector broadcast(VectorSpecies species, long e) { FloatSpecies vsp = (FloatSpecies) species; @@ -1347,7 +1347,6 @@ } /** - /** * {@inheritDoc} * @see #div(float,VectorMask) *

Because the underlying scalar operator is an IEEE @@ -1718,7 +1717,7 @@ * comparison operator * @see FloatVector#compare(VectorOperators.Comparison,Vector) * @see #eq(float) - * @see #lessThan(float) + * @see #lt(float) */ public abstract VectorMask compare(Comparison op, float e); @@ -2557,7 +2556,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2790,7 +2790,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*4 < 0} - * or {@code offset+N**4 >= bb.limit()} + * or {@code offset+N*4 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2836,7 +2836,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*4 < 0} - * or {@code offset+N**4 >= bb.limit()} + * or {@code offset+N*4 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java 2019-07-10 11:13:49.869478100 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java 2019-07-10 11:13:49.241077300 -0700 @@ -511,7 +511,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,int) - * @see VectorSpecies#checkValue(VectorSpecies,int) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static IntVector broadcast(VectorSpecies species, long e) { IntSpecies vsp = (IntSpecies) species; @@ -1405,7 +1405,6 @@ } /** - /** * {@inheritDoc} * @see #div(int,VectorMask) */ @@ -1685,7 +1684,7 @@ * @return the bitwise complement {@code ~} of this vector * @see #and(Vector) * @see VectorOperators#NOT - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ @ForceInline public final IntVector not() { @@ -1825,7 +1824,7 @@ * comparison operator * @see IntVector#compare(VectorOperators.Comparison,Vector) * @see #eq(int) - * @see #lessThan(int) + * @see #lt(int) */ public abstract VectorMask compare(Comparison op, int e); @@ -2681,7 +2680,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2914,7 +2914,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*4 < 0} - * or {@code offset+N**4 >= bb.limit()} + * or {@code offset+N*4 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2960,7 +2960,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*4 < 0} - * or {@code offset+N**4 >= bb.limit()} + * or {@code offset+N*4 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java 2019-07-10 11:13:54.593241100 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/LongVector.java 2019-07-10 11:13:53.990278800 -0700 @@ -1324,7 +1324,6 @@ } /** - /** * {@inheritDoc} * @see #div(long,VectorMask) */ @@ -1604,7 +1603,7 @@ * @return the bitwise complement {@code ~} of this vector * @see #and(Vector) * @see VectorOperators#NOT - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ @ForceInline public final LongVector not() { @@ -1744,7 +1743,7 @@ * comparison operator * @see LongVector#compare(VectorOperators.Comparison,Vector) * @see #eq(long) - * @see #lessThan(long) + * @see #lt(long) */ public abstract VectorMask compare(Comparison op, long e); @@ -2550,7 +2549,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2786,7 +2786,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*8 < 0} - * or {@code offset+N**8 >= bb.limit()} + * or {@code offset+N*8 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2832,7 +2832,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*8 < 0} - * or {@code offset+N**8 >= bb.limit()} + * or {@code offset+N*8 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java 2019-07-10 11:13:59.205859400 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java 2019-07-10 11:13:58.603404600 -0700 @@ -511,7 +511,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,short) - * @see VectorSpecies#checkValue(VectorSpecies,short) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static ShortVector broadcast(VectorSpecies species, long e) { ShortSpecies vsp = (ShortSpecies) species; @@ -1406,7 +1406,6 @@ } /** - /** * {@inheritDoc} * @see #div(short,VectorMask) */ @@ -1686,7 +1685,7 @@ * @return the bitwise complement {@code ~} of this vector * @see #and(Vector) * @see VectorOperators#NOT - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ @ForceInline public final ShortVector not() { @@ -1826,7 +1825,7 @@ * comparison operator * @see ShortVector#compare(VectorOperators.Comparison,Vector) * @see #eq(short) - * @see #lessThan(short) + * @see #lt(short) */ public abstract VectorMask compare(Comparison op, short e); @@ -2682,7 +2681,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -2892,7 +2892,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*2 < 0} - * or {@code offset+N**2 >= bb.limit()} + * or {@code offset+N*2 >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -2938,7 +2938,7 @@ * is not {@link ByteOrder#LITTLE_ENDIAN} * @throws IndexOutOfBoundsException * if {@code offset+N*2 < 0} - * or {@code offset+N**2 >= bb.limit()} + * or {@code offset+N*2 >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java 2019-07-10 11:14:03.810403600 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java 2019-07-10 11:14:03.161868800 -0700 @@ -138,7 +138,7 @@ * of that shape. Thus, the {@linkplain #bitSize() size in bits} of * of a vector is determined by appealing to its vector shape. * - *

Some Java platforms given special support to only one shape, + *

Some Java platforms give special support to only one shape, * while others support several. A typical platform is not likely * to support all the shapes described by this API. For this reason, * most vector operations work on a single input shape and @@ -175,7 +175,7 @@ * {@linkplain #elementSize() bit-size of each lane} * must always match the bit-size of the vector's shape. * - * Thus, {@link plain #reinterpretShape(VectorSpecies,int) reinterpreting} a + * Thus, {@linkplain #reinterpretShape(VectorSpecies,int) reinterpreting} a * vector via a cast may double its length if and only if it either * halves the lane size, or else changes the shape. Likewise, * reinterpreting a vector may double the lane size if and only if it @@ -203,14 +203,12 @@ * It is recommended that Species instances be held in {@code static final} * fields for optimal creation and usage of Vector values by the runtime compiler. * - *

The various typed vector classes expose static constants - * corresponding to their supported species, and static methods on these - * types generally take a species as a parameter. For example, the + *

As an example of static constants defined by the typed vector classes, * constant {@link FloatVector#SPECIES_256 FloatVector.SPECIES_256} * is the unique species whose lanes are {@code float}s and whose * vector size is 256 bits. Again, the constant - * {@link ShortVector#SPECIES_PREFERRED} is the species which - * best supports processing of {@code short} vector lanes on + * {@link FloatVector#SPECIES_PREFERRED} is the species which + * best supports processing of {@code float} vector lanes on * the currently running Java platform. * *

As another example, a broadcast scalar value of @@ -307,7 +305,7 @@ * a lane-wise n-ary operation takes {@code N} input vectors {@code v[j]}, * distributing an n-ary scalar operator across the lanes, * and produces a result vector of the same type and shape. - * Except for a few ternary operations, this API has no support + * Except for a few ternary operations, this API has no support for * lane-wise n-ary operations. * * For each lane of all of the input vectors {@code v[j]}, @@ -352,7 +350,7 @@ * *

The following pseudocode illustrates the behavior of this * operation category in the specific example of a conversion from - * {@code int} to {@code double}: + * {@code int} to {@code double}, retaining lower lanes to maintain shape-invariance: * *

{@code
  * IntVector a = ...;
@@ -425,7 +423,7 @@
  *
  * 
  • * A very special case of a masked lane-wise binary operation is a - * {@linkplain blend(Vector,VectorMask) blend}, which operates + * {@linkplain #blend(Vector,VectorMask) blend}, which operates * lane-wise on two input vectors {@code a} and {@code b}, selecting lane * values from one input or the other depending on a mask {@code m}. * In lanes where {@code m} is set, the corresponding value from @@ -483,7 +481,7 @@ * into the same lane structure as the first input. * * For example, to multiply all lanes of a {@code double} vector by - * a scalar value{@code 1.1}, the expression {@code v.mul(1.1)} is + * a scalar value {@code 1.1}, the expression {@code v.mul(1.1)} is * easier to work with than an equivalent expression with an explicit * broadcast operation, such as {@code v.mul(v.broadcast(1.1))} * or {@code v.mul(DoubleVector.broadcast(v.species(), 1.1))}. @@ -696,7 +694,7 @@ * changes. The earliest byte is invariantly earliest across all lane * structure changes, but only if little-endian convention are used. * The root cause of this is that bytes in scalars are numbered from - * the least significant (rightmost) to the omst significant + * the least significant (rightmost) to the most significant * (leftmost), and almost never vice-versa. If we habitually numbered * sign bits as zero (as on some computers) then this API would reach * for big-endian fictions to create unified addressing of vector @@ -734,7 +732,7 @@ * The first lane is loaded from {@code fa[i]} and the last lane * is initialized loaded from {@code fa[i+VL-1]}, where {@code VL} * is the length of the vector as derived from the species {@code fsp}. - * Then, {@link FloatVector#add(Vector) fv=FloatVector.add(fv2)} + * Then, {@link FloatVector#add(Vector) fv=fv.add(fv2)} * will produce another float vector of that species {@code fsp}, * given a vector {@code fv2} of the same species {@code fsp}. * Next, {@link FloatVector#compare(VectorOperators.Comparison,float) @@ -1158,7 +1156,7 @@ /** * Operates on the lane values of this vector. * - * This is a lane-wise binary operation which applies + * This is a lane-wise unary operation which applies * the selected operation to each lane. * *

    FIXME: Write about the unary operators here. @@ -1171,9 +1169,9 @@ to the input vector * @throws UnsupportedOperationException if this vector does * not support the requested operation - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) * @see #lanewise(VectorOperators.Binary,Vector) - * @see #lanewise(VectorOperators.Ternary,Vector) + * @see #lanewise(VectorOperators.Ternary,Vector,Vector) */ public abstract Vector lanewise(VectorOperators.Unary op); @@ -1181,7 +1179,7 @@ * Operates on the lane values of this vector, * with selection of lane elements controlled by a mask. * - * This is a lane-wise binary operation which applies + * This is a lane-wise unary operation which applies * the selected operation to each lane. * * @apiNote @@ -1193,7 +1191,7 @@ * to the input vector * @throws UnsupportedOperationException if this vector does * not support the requested operation - * @see #lanewise(VectorOperators.Unary,Vector) + * @see #lanewise(VectorOperators.Unary) */ public abstract Vector lanewise(VectorOperators.Unary op, VectorMask m); @@ -1223,8 +1221,8 @@ * @throws UnsupportedOperationException if this vector does * not support the requested operation * @see #lanewise(VectorOperators.Binary,Vector,VectorMask) - * @see #lanewise(VectorOperators.Unary,Vector) - * @see #lanewise(VectorOperators.Ternary,Vector) + * @see #lanewise(VectorOperators.Unary) + * @see #lanewise(VectorOperators.Ternary,Vector, Vector) */ public abstract Vector lanewise(VectorOperators.Binary op, Vector v); @@ -1343,7 +1341,7 @@ * to the three input vectors * @throws UnsupportedOperationException if this vector does * not support the requested operation - * @see #lanewise(VectorOperators.Unary,Vector) + * @see #lanewise(VectorOperators.Unary) * @see #lanewise(VectorOperators.Binary,Vector) * @see #lanewise(VectorOperators.Ternary,Vector,Vector,VectorMask) */ @@ -1673,20 +1671,20 @@ * to each input lane. * * This method is also equivalent to the expression - * {@link #lanewise(VectorOperators.Unary,Vector) + * {@link #lanewise(VectorOperators.Unary) * lanewise}{@code (}{@link VectorOperators#NEG - * MIN}{@code)}. + * NEG}{@code)}. * * @apiNote * This method has no masked variant, but the corresponding * masked operation can be obtained from the - * {@linkplain #lanewise(VectorOperators.Unary,Vector,VectorMask) + * {@linkplain #lanewise(VectorOperators.Unary,VectorMask) * lanewise method}. * * @return the negation of this vector * @see VectorOperators#NEG - * @see #lanewise(VectorOperators.Unary,Vector) - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ public abstract Vector neg(); @@ -1698,20 +1696,20 @@ * to each input lane. * * This method is also equivalent to the expression - * {@link #lanewise(VectorOperators.Unary,Vector) + * {@link #lanewise(VectorOperators.Unary) * lanewise}{@code (}{@link VectorOperators#ABS - * MIN}{@code)}. + * ABS}{@code)}. * - *

    + * @apiNote * This method has no masked variant, but the corresponding * masked operation can be obtained from the - * {@linkplain #lanewise(VectorOperators.Unary,Vector,VectorMask) + * {@linkplain #lanewise(VectorOperators.Unary,VectorMask) * lanewise method}. * * @return the absolute value of this vector * @see VectorOperators#ABS - * @see #lanewise(VectorOperators.Unary,Vector) - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ public abstract Vector abs(); @@ -1729,7 +1727,7 @@ * lanewise}{@code (}{@link VectorOperators#MIN * MIN}{@code , v)}. * - *

    + * @apiNote * This is not a full-service named operation like * {@link #add(Vector) add()}. A masked version of * version of this operation is not directly available @@ -1842,13 +1840,13 @@ * of the vector's native {@code ETYPE}. * (In the case of floating point types, the value * {@code NEGATIVE_INFINITY} is used, and will appear - * after casting as {@code Long.MAX_VALUE}. + * after casting as {@code Long.MIN_VALUE}. *

  • * If the operation is {@code MIN}, - * then the identity value is the {@code MIN_VALUE} + * then the identity value is the {@code MAX_VALUE} * of the vector's native {@code ETYPE}. * (In the case of floating point types, the value - * {@code NEGATIVE_INFINITY} is used, and will appear + * {@code POSITIVE_INFINITY} is used, and will appear * after casting as {@code Long.MAX_VALUE}. * * @@ -1929,8 +1927,8 @@ * @return the mask result of testing lane-wise if this vector * compares to the input, according to the selected * comparison operator - * @see #equals(Vector) - * @see #lessThan(Vector) + * @see #eq(Vector) + * @see #lt(Vector) * @see VectorOperators.Comparison * @see #compare(VectorOperators.Comparison, Vector, VectorMask) */ @@ -2172,7 +2170,7 @@ * @apiNote * * This method may be regarded as the inverse of - * {@code #unslice(int,Vector,int) unslice()}, + * {@link #unslice(int,Vector,int) unslice()}, * in that the sliced value could be unsliced back into its * original position in the two input vectors, without * disturbing unrelated elements, as in the following @@ -2474,7 +2472,7 @@ * * @param s the shuffle controlling lane index selection * @return the rearrangement of the lane elements of this vector - * @throw IndexOutOfBoundsException if there are any exceptional + * @throws IndexOutOfBoundsException if there are any exceptional * source indexes in the shuffle * @see #rearrange(VectorShuffle,VectorMask) * @see #rearrange(VectorShuffle,Vector) @@ -2498,13 +2496,15 @@ *

    This method returns the value of this pseudocode: *

    {@code
          * Vector r = this.rearrange(s.wrapIndexes());
    -     * return broadcast(0).blend(r, s.laneIsValid());
    +     * VectorMask valid = s.laneIsValid();
    +     * if (m.andNot(valid).anyTrue()) throw ...;
    +     * return broadcast(0).blend(r, m);
          * }
    * * @param s the shuffle controlling lane index selection * @param m the mask controlling application of the shuffle * @return the rearrangement of the lane elements of this vector - * @throw IndexOutOfBoundsException if there are any exceptional + * @throws IndexOutOfBoundsException if there are any exceptional * source indexes in the shuffle where the mask is set * @see #rearrange(VectorShuffle) * @see #rearrange(VectorShuffle,Vector) @@ -2769,8 +2769,8 @@ * * @return a {@code ByteVector} with the same shape and information content * @see Vector#reinterpretShape(VectorSpecies,int) - * @see ByteVector#toIntArray - * @see ByteVector#toFloatArray + * @see IntVector#intoByteArray(byte[], int) + * @see FloatVector#intoByteArray(byte[], int) * @see VectorSpecies#withLanes(Class) */ public abstract ByteVector reinterpretAsBytes(); @@ -3045,8 +3045,8 @@ * @see VectorOperators#I2L * @see VectorOperators.Conversion#ofCast(Class,Class) * @see VectorSpecies#partLimit(VectorSpecies,boolean) - * @see #viewAsFloatingLanes(VectorSpecies,int) - * @see #viewAsIntegralLanes(VectorSpecies,int) + * @see #viewAsFloatingLanes() + * @see #viewAsIntegralLanes() * @see #convertShape(VectorOperators.Conversion,VectorSpecies,int) * @see #reinterpretShape(VectorSpecies,int) */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMask.java 2019-07-10 11:14:08.693550500 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMask.java 2019-07-10 11:14:08.054139900 -0700 @@ -163,7 +163,7 @@ * {@code boolean} value * @throws IllegalArgumentException * if {@code bits.length != species.length()} - * @see #fromLong(VectorSpecies, boolean...) + * @see #fromLong(VectorSpecies, long) * @see #fromArray(VectorSpecies, boolean[], int) * @see Vector#maskFromValues(boolean...) */ @@ -178,7 +178,7 @@ * Loads a mask from a {@code boolean} array starting at an offset. *

    * For each mask lane, where {@code N} is the mask lane index, - * if the array element at index {@code ix + N} is {@code true} then the + * if the array element at index {@code offset + N} is {@code true} then the * mask lane at index {@code N} is set, otherwise it is unset. * * @param species vector species for the desired mask @@ -187,7 +187,7 @@ * @return the mask loaded from the {@code boolean} array * @throws IndexOutOfBoundsException if {@code offset < 0}, or * {@code offset > bits.length - species.length()} - * @see #fromLong(VectorSpecies, boolean...) + * @see #fromLong(VectorSpecies, long) * @see #fromValues(VectorSpecies, boolean...) */ @ForceInline @@ -207,7 +207,7 @@ /** * Returns a mask where each lane is set or unset according to * the bits in the given bitmask, starting with the least - * significant bit, and continuing up through the sign bit. + * significant bit, and continuing up to the sign bit. *

    * For each mask lane, where {@code N} is the mask lane index, * if the expression {@code (bits>>min(63,N))&1} is non-zero, @@ -224,7 +224,6 @@ * the bits in the given integer value * @see #fromValues(VectorSpecies, boolean...) * @see #fromArray(VectorSpecies, boolean[], int) - * @see Vector#maskFromBits(long) */ @ForceInline public static VectorMask fromLong(VectorSpecies species, long bits) { @@ -280,7 +279,7 @@ * mask lane is set then the {@code N}th bit is set to one in the * resulting {@code long} value, otherwise the {@code N}th bit is set * to zero. - * The mask must no more than 64 lanes. + * The mask must have no more than 64 lanes. * * @return the lane elements of this mask packed into a {@code long} * value. --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorOperators.java 2019-07-10 11:14:13.541350000 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorOperators.java 2019-07-10 11:14:12.744476300 -0700 @@ -317,6 +317,7 @@ } /*package-private*/ + @ForceInline static int opCode(Operator op, int requireKind, int forbidKind) { return ((OperatorImpl)op).opCode(requireKind, forbidKind); } @@ -452,7 +453,7 @@ // Ternary operations - /** Produce {@code a^((a^b)&c), bitwise c?b:a)}. Integral only. */ + /** Produce {@code a^((a^b)&c), or bitwise (c?b:a)}. Integral only. */ public static final /*float*/ Ternary BITWISE_BLEND = ternary("BITWISE_BLEND", "a^((a^b)&c)", -1 /*VectorIntrinsics.VECTOR_OP_BITWISE_BLEND*/, VO_NOFP); /** Produce {@code fma(a,b,c)}. Floating only. */ public static final /*float*/ Ternary FMA = ternary("FMA", "fma", VectorIntrinsics.VECTOR_OP_FMA, VO_ONLYFP); --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShuffle.java 2019-07-10 11:14:18.285796800 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorShuffle.java 2019-07-10 11:14:17.620442200 -0700 @@ -154,7 +154,7 @@ * The various lane source indexes are unmodified, except that any * index that fails to validate against a changed {@code VLENGTH} * is partially wrapped to an exceptional index, whether it was - * originally normal or exception. + * originally normal or exceptional. * * @param species the species of desired shuffle * @param the boxed element type of the species @@ -263,11 +263,9 @@ * * @param species shuffle species * @param sourceIndexes the source indexes which the shuffle will draw from - * @param offset the offset into the array * @return a shuffle where each lane's source index is set to the given * {@code int} value, partially wrapped if exceptional - * @throws IndexOutOfBoundsException if {@code offset < 0}, or - * {@code offset > sourceIndexes.length - VLENGTH} + * @throws IndexOutOfBoundsException if {@code sourceIndexes.length != VLENGTH} * @see VectorSpecies#shuffleFromValues(int...) */ @ForceInline @@ -283,7 +281,7 @@ * an {@code int} array starting at an offset. * *

    For each shuffle lane, where {@code N} is the shuffle lane - * index, the array element at index {@code i + N} is validated + * index, the array element at index {@code offset + N} is validated * against the species {@code VLENGTH}, and (if invalid) * is partially wrapped to an exceptional index in the * range {@code [-VLENGTH..-1]}. @@ -324,13 +322,13 @@ *

    {@code
          *   int[] a = new int[species.length()];
          *   for (int i = 0; i < a.length; i++) {
    -     *       a[i] = f.applyAsInt(i);
    +     *       a[i] = fn.applyAsInt(i);
          *   }
          *   return VectorShuffle.fromArray(a, 0);
          * }
    * * @param species shuffle species - * @param f the lane index mapping function + * @param fn the lane index mapping function * @return a shuffle of mapped indexes * @see VectorSpecies#shuffleFromOp(IntUnaryOperator) */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorSpecies.java 2019-07-10 11:14:22.855241500 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorSpecies.java 2019-07-10 11:14:22.231690300 -0700 @@ -243,7 +243,7 @@ * @return an indication of the size change, as a signed ratio or zero * * @see Vector#reinterpretShape(VectorSpecies,int) - * @see Vector#convertShape(VectorOperations.Conversion,VectorSpecies,int) + * @see Vector#convertShape(VectorOperators.Conversion,VectorSpecies,int) */ public abstract int partLimit(VectorSpecies outputSpecies, boolean lanewise); @@ -325,7 +325,7 @@ /** * Finds the species preferred by the current platform - * for a given vector element type and the preferred shape. + * for a given vector element type. * This is the same value as * {@code VectorSpecies.of(etype, VectorShape.preferredShape())}. * @@ -337,7 +337,7 @@ * will have the same underlying shape. *
  • All vectors created from preferred species will have a * common bit-size and information capacity. - *
  • {@linkplain Vector#reinterpret(VectorSpecies) Reinterpretation casts}. + *
  • {@linkplain Vector#reinterpretShape(VectorSpecies, int) Reinterpretation casts} * between vectors of preferred species will neither truncate * lanes nor fill them with default values. *
  • For any particular element type, some platform might possibly @@ -358,7 +358,7 @@ * @throws IllegalArgumentException if no such species exists for the * element type * or if the given type is not a valid {@code ETYPE} - * @see Vector#reinterpretShape(VectorSpecies) + * @see Vector#reinterpretShape(VectorSpecies,int) * @see VectorShape#preferredShape() * @see VectorSpecies#ofLargestShape(Class) */ @@ -367,8 +367,8 @@ } /** - * Returns the bit-size the given vector element type ({@code - * ETYPE}). The element type must be a valid {@code ETYPE}, not a + * Returns the bit-size the given vector element type ({@code ETYPE}). + * The element type must be a valid {@code ETYPE}, not a * wrapper type or other object type. * * The element type argument must be a mirror for a valid vector @@ -566,11 +566,9 @@ * range {@code [-VLENGTH..-1]}. * * @param sourceIndexes the source indexes which the shuffle will draw from - * @param offset the offset into the array * @return a shuffle where each lane's source index is set to the given * {@code int} value, partially wrapped if exceptional - * @throws IndexOutOfBoundsException if {@code offset < 0}, or - * {@code offset > sourceIndexes.length - VLENGTH} + * @throws IndexOutOfBoundsException if {@code sourceIndexes.length != VLENGTH} * @see VectorShuffle#fromValues(VectorSpecies,int...) */ public abstract VectorShuffle shuffleFromValues(int... sourceIndexes); @@ -614,14 +612,14 @@ *

    This method behaves as if a shuffle is created from an array of * mapped indexes as follows: *

    {@code
    -     *   int[] a = new int[species.length()];
    +     *   int[] a = new int[VLENGTH];
          *   for (int i = 0; i < a.length; i++) {
    -     *       a[i] = f.applyAsInt(i);
    +     *       a[i] = fn.applyAsInt(i);
          *   }
          *   return VectorShuffle.fromArray(this, a, 0);
          * }
    * - * @param f the lane index mapping function + * @param fn the lane index mapping function * @return a shuffle of mapped indexes * @see VectorShuffle#fromOp(VectorSpecies,IntUnaryOperator) */ --- old/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template 2019-07-10 11:14:27.572065400 -0700 +++ new/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template 2019-07-10 11:14:26.969776800 -0700 @@ -524,7 +524,7 @@ * if the given {@code long} value cannot * be represented by the vector's {@code ETYPE} * @see #broadcast(VectorSpecies,$type$) - * @see VectorSpecies#checkValue(VectorSpecies,$type$) + * @see VectorSpecies#checkValue(VectorSpecies,long) */ public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> species, long e) { $Type$Species vsp = ($Type$Species) species; @@ -1522,7 +1522,6 @@ } /** - /** * {@inheritDoc} * @see #div($type$,VectorMask) #if[FP] @@ -1894,7 +1893,7 @@ * @return the bitwise complement {@code ~} of this vector * @see #and(Vector) * @see VectorOperators#NOT - * @see #lanewise(VectorOperators.Unary,Vector,VectorMask) + * @see #lanewise(VectorOperators.Unary,VectorMask) */ @ForceInline public final $abstractvectortype$ not() { @@ -2058,7 +2057,7 @@ * comparison operator * @see $abstractvectortype$#compare(VectorOperators.Comparison,Vector) * @see #eq($type$) - * @see #lessThan($type$) + * @see #lt($type$) */ public abstract VectorMask<$Boxtype$> compare(Comparison op, $type$ e); @@ -3106,7 +3105,8 @@ * @throws IndexOutOfBoundsException * if {@code offset+N*ESIZE < 0} * or {@code offset+(N+1)*ESIZE > a.length} - * for any lane {@code N} in the vector + * for any lane {@code N} in the vector where + * the mask is set */ @ForceInline public static @@ -3364,7 +3364,7 @@ #end[!byte] * @throws IndexOutOfBoundsException * if {@code offset+N*$sizeInBytes$ < 0} - * or {@code offset+N**$sizeInBytes$ >= bb.limit()} + * or {@code offset+N*$sizeInBytes$ >= bb.limit()} * for any lane {@code N} in the vector */ @ForceInline @@ -3414,7 +3414,7 @@ #end[!byte] * @throws IndexOutOfBoundsException * if {@code offset+N*$sizeInBytes$ < 0} - * or {@code offset+N**$sizeInBytes$ >= bb.limit()} + * or {@code offset+N*$sizeInBytes$ >= bb.limit()} * for any lane {@code N} in the vector * where the mask is set */