< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template
Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level
rev 54660 : Javadoc changes
@@ -131,30 +131,30 @@
* Bytes are composed into primitive lane elements according to the
* native byte order of the underlying platform
* <p>
* This method behaves as if it returns the result of calling the
* byte buffer, offset, and mask accepting
- * {@link #fromByteBuffer(VectorSpecies<$Boxtype$>, ByteBuffer, int, VectorMask) method} as follows:
+ * {@link #fromByteBuffer(VectorSpecies, ByteBuffer, int, VectorMask) method} as follows:
* <pre>{@code
- * return this.fromByteBuffer(ByteBuffer.wrap(a), i, this.maskAllTrue());
+ * return fromByteBuffer(species, ByteBuffer.wrap(a), offset, VectorMask.allTrue());
* }</pre>
*
* @param species species of desired vector
* @param a the byte array
- * @param ix the offset into the array
+ * @param offset the offset into the array
* @return a vector loaded from a byte array
* @throws IndexOutOfBoundsException if {@code i < 0} or
- * {@code i > a.length - (this.length() * this.elementSize() / Byte.SIZE)}
+ * {@code offset > a.length - (species.length() * species.elementSize() / Byte.SIZE)}
*/
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int ix) {
+ public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int offset) {
Objects.requireNonNull(a);
- ix = VectorIntrinsics.checkIndex(ix, a.length, species.bitSize() / Byte.SIZE);
+ offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
- a, ((long) ix) + Unsafe.ARRAY_BYTE_BASE_OFFSET,
- a, ix, species,
+ a, ((long) offset) + Unsafe.ARRAY_BYTE_BASE_OFFSET,
+ a, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = ByteBuffer.wrap(c, idx, a.length - idx).order(ByteOrder.nativeOrder());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
return (($Type$Species)s).op(i -> tb.get());
});
@@ -167,128 +167,125 @@
* Bytes are composed into primitive lane elements according to the
* native byte order of the underlying platform.
* <p>
* This method behaves as if it returns the result of calling the
* byte buffer, offset, and mask accepting
- * {@link #fromByteBuffer(VectorSpecies<$Boxtype$>, ByteBuffer, int, VectorMask) method} as follows:
+ * {@link #fromByteBuffer(VectorSpecies, ByteBuffer, int, VectorMask) method} as follows:
* <pre>{@code
- * return this.fromByteBuffer(ByteBuffer.wrap(a), i, m);
+ * return fromByteBuffer(species, ByteBuffer.wrap(a), offset, m);
* }</pre>
*
* @param species species of desired vector
* @param a the byte array
- * @param ix the offset into the array
+ * @param offset the offset into the array
* @param m the mask
* @return a vector loaded from a byte array
- * @throws IndexOutOfBoundsException if {@code i < 0} or
- * {@code i > a.length - (this.length() * this.elementSize() / Byte.SIZE)}
- * @throws IndexOutOfBoundsException if the offset is {@code < 0},
- * or {@code > a.length},
+ * @throws IndexOutOfBoundsException if {@code offset < 0} or
* for any vector lane index {@code N} where the mask at lane {@code N}
* is set
- * {@code i >= a.length - (N * this.elementSize() / Byte.SIZE)}
+ * {@code offset >= a.length - (N * species.elementSize() / Byte.SIZE)}
*/
@ForceInline
- public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int ix, VectorMask<$Boxtype$> m) {
- return zero(species).blend(fromByteArray(species, a, ix), m);
+ public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int offset, VectorMask<$Boxtype$> m) {
+ return zero(species).blend(fromByteArray(species, a, offset), m);
}
/**
* Loads a vector from an array starting at offset.
* <p>
* For each vector lane, where {@code N} is the vector lane index, the
- * array element at index {@code i + N} is placed into the
+ * array element at index {@code offset + N} is placed into the
* resulting vector at lane index {@code N}.
*
* @param species species of desired vector
* @param a the array
- * @param i the offset into the array
+ * @param offset the offset into the array
* @return the vector loaded from an array
- * @throws IndexOutOfBoundsException if {@code i < 0}, or
- * {@code i > a.length - this.length()}
+ * @throws IndexOutOfBoundsException if {@code offset < 0}, or
+ * {@code offset > a.length - species.length()}
*/
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i){
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int offset){
Objects.requireNonNull(a);
- i = VectorIntrinsics.checkIndex(i, a.length, species.length());
+ offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
- a, (((long) i) << ARRAY_SHIFT) + Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
- a, i, species,
+ a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
+ a, offset, species,
(c, idx, s) -> (($Type$Species)s).op(n -> c[idx + n]));
}
/**
* Loads a vector from an array starting at offset and using a mask.
* <p>
* For each vector lane, where {@code N} is the vector lane index,
* if the mask lane at index {@code N} is set then the array element at
- * index {@code i + N} is placed into the resulting vector at lane index
+ * index {@code offset + N} is placed into the resulting vector at lane index
* {@code N}, otherwise the default element value is placed into the
* resulting vector at lane index {@code N}.
*
* @param species species of desired vector
* @param a the array
- * @param i the offset into the array
+ * @param offset the offset into the array
* @param m the mask
* @return the vector loaded from an array
- * @throws IndexOutOfBoundsException if {@code i < 0}, or
+ * @throws IndexOutOfBoundsException if {@code offset < 0}, or
* for any vector lane index {@code N} where the mask at lane {@code N}
- * is set {@code i > a.length - N}
+ * is set {@code offset > a.length - N}
*/
@ForceInline
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i, VectorMask<$Boxtype$> m) {
- return zero(species).blend(fromArray(species, a, i), m);
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int offset, VectorMask<$Boxtype$> m) {
+ return zero(species).blend(fromArray(species, a, offset), m);
}
/**
* Loads a vector from an array using indexes obtained from an index
* map.
* <p>
* For each vector lane, where {@code N} is the vector lane index, the
- * array element at index {@code i + indexMap[j + N]} is placed into the
+ * array element at index {@code a_offset + indexMap[i_offset + N]} is placed into the
* resulting vector at lane index {@code N}.
*
* @param species species of desired vector
* @param a the array
- * @param i the offset into the array, may be negative if relative
+ * @param a_offset the offset into the array, may be negative if relative
* indexes in the index map compensate to produce a value within the
* array bounds
* @param indexMap the index map
- * @param j the offset into the index map
+ * @param i_offset the offset into the index map
* @return the vector loaded from an array
- * @throws IndexOutOfBoundsException if {@code j < 0}, or
- * {@code j > indexMap.length - this.length()},
+ * @throws IndexOutOfBoundsException if {@code i_offset < 0}, or
+ * {@code i_offset > indexMap.length - species.length()},
* or for any vector lane index {@code N} the result of
- * {@code i + indexMap[j + N]} is {@code < 0} or {@code >= a.length}
+ * {@code a_offset + indexMap[i_offset + N]} is {@code < 0} or {@code >= a.length}
*/
#if[byteOrShort]
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i, int[] indexMap, int j) {
- return (($Type$Species)species).op(n -> a[i + indexMap[j + n]]);
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int a_offset, int[] indexMap, int i_offset) {
+ return (($Type$Species)species).op(n -> a[a_offset + indexMap[i_offset + n]]);
}
#else[byteOrShort]
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i, int[] indexMap, int j) {
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int a_offset, int[] indexMap, int i_offset) {
Objects.requireNonNull(a);
Objects.requireNonNull(indexMap);
#if[longOrDouble]
if (species.length() == 1) {
- return $abstractvectortype$.fromArray(species, a, i + indexMap[j]);
+ return $abstractvectortype$.fromArray(species, a, a_offset + indexMap[i_offset]);
}
#end[longOrDouble]
- // Index vector: vix[0:n] = k -> i + indexMap[j + k]
- IntVector vix = IntVector.fromArray(IntVector.species(species.indexShape()), indexMap, j).add(i);
+ // Index vector: vix[0:n] = k -> a_offset + indexMap[i_offset + k]
+ IntVector vix = IntVector.fromArray(IntVector.species(species.indexShape()), indexMap, i_offset).add(a_offset);
vix = VectorIntrinsics.checkIndex(vix, a.length);
return VectorIntrinsics.loadWithMap((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
IntVector.species(species.indexShape()).boxType(), a, Unsafe.ARRAY_$TYPE$_BASE_OFFSET, vix,
- a, i, indexMap, j, species,
+ a, a_offset, indexMap, i_offset, species,
($type$[] c, int idx, int[] iMap, int idy, VectorSpecies<$Boxtype$> s) ->
(($Type$Species)s).op(n -> c[idx + iMap[idy+n]]));
}
#end[byteOrShort]
@@ -296,38 +293,38 @@
* Loads a vector from an array using indexes obtained from an index
* map and using a mask.
* <p>
* For each vector lane, where {@code N} is the vector lane index,
* if the mask lane at index {@code N} is set then the array element at
- * index {@code i + indexMap[j + N]} is placed into the resulting vector
+ * index {@code a_offset + indexMap[i_offset + N]} is placed into the resulting vector
* at lane index {@code N}.
*
* @param species species of desired vector
* @param a the array
- * @param i the offset into the array, may be negative if relative
+ * @param a_offset the offset into the array, may be negative if relative
* indexes in the index map compensate to produce a value within the
* array bounds
* @param m the mask
* @param indexMap the index map
- * @param j the offset into the index map
+ * @param i_offset the offset into the index map
* @return the vector loaded from an array
- * @throws IndexOutOfBoundsException if {@code j < 0}, or
- * {@code j > indexMap.length - this.length()},
+ * @throws IndexOutOfBoundsException if {@code i_offset < 0}, or
+ * {@code i_offset > indexMap.length - species.length()},
* or for any vector lane index {@code N} where the mask at lane
- * {@code N} is set the result of {@code i + indexMap[j + N]} is
+ * {@code N} is set the result of {@code a_offset + indexMap[i_offset + N]} is
* {@code < 0} or {@code >= a.length}
*/
#if[byteOrShort]
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i, VectorMask<$Boxtype$> m, int[] indexMap, int j) {
- return (($Type$Species)species).op(m, n -> a[i + indexMap[j + n]]);
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int a_offset, VectorMask<$Boxtype$> m, int[] indexMap, int i_offset) {
+ return (($Type$Species)species).op(m, n -> a[a_offset + indexMap[i_offset + n]]);
}
#else[byteOrShort]
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int i, VectorMask<$Boxtype$> m, int[] indexMap, int j) {
+ public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int a_offset, VectorMask<$Boxtype$> m, int[] indexMap, int i_offset) {
// @@@ This can result in out of bounds errors for unset mask lanes
- return zero(species).blend(fromArray(species, a, i, indexMap, j), m);
+ return zero(species).blend(fromArray(species, a, a_offset, indexMap, i_offset), m);
}
#end[byteOrShort]
/**
@@ -337,35 +334,35 @@
* Bytes are composed into primitive lane elements according to the
* native byte order of the underlying platform.
* <p>
* This method behaves as if it returns the result of calling the
* byte buffer, offset, and mask accepting
- * {@link #fromByteBuffer(VectorSpecies<$Boxtype$>, ByteBuffer, int, VectorMask)} method} as follows:
+ * {@link #fromByteBuffer(VectorSpecies, ByteBuffer, int, VectorMask)} method} as follows:
* <pre>{@code
- * return this.fromByteBuffer(b, i, this.maskAllTrue())
+ * return fromByteBuffer(b, offset, VectorMask.allTrue())
* }</pre>
*
* @param species species of desired vector
* @param bb the byte buffer
- * @param ix the offset into the byte buffer
+ * @param offset the offset into the byte buffer
* @return a vector loaded from a byte buffer
* @throws IndexOutOfBoundsException if the offset is {@code < 0},
* or {@code > b.limit()},
* or if there are fewer than
- * {@code this.length() * this.elementSize() / Byte.SIZE} bytes
+ * {@code species.length() * species.elementSize() / Byte.SIZE} bytes
* remaining in the byte buffer from the given offset
*/
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> species, ByteBuffer bb, int ix) {
+ public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> species, ByteBuffer bb, int offset) {
if (bb.order() != ByteOrder.nativeOrder()) {
throw new IllegalArgumentException();
}
- ix = VectorIntrinsics.checkIndex(ix, bb.limit(), species.bitSize() / Byte.SIZE);
+ offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
- U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + ix,
- bb, ix, species,
+ U.getReference(bb, BYTE_BUFFER_HB), U.getLong(bb, BUFFER_ADDRESS) + offset,
+ bb, offset, species,
(c, idx, s) -> {
ByteBuffer bbc = c.duplicate().position(idx).order(ByteOrder.nativeOrder());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
return (($Type$Species)s).op(i -> tb.get());
});
@@ -379,108 +376,108 @@
* {@link java.nio.Buffer buffer} for the primitive element type,
* according to the native byte order of the underlying platform, and
* the returned vector is loaded with a mask from a primitive array
* obtained from the primitive buffer.
* The following pseudocode expresses the behaviour, where
- * {@coce EBuffer} is the primitive buffer type, {@code e} is the
- * primitive element type, and {@code ESpecies<S>} is the primitive
+ * {@code EBuffer} is the primitive buffer type, {@code e} is the
+ * primitive element type, and {@code ESpecies} is the primitive
* species for {@code e}:
* <pre>{@code
* EBuffer eb = b.duplicate().
- * order(ByteOrder.nativeOrder()).position(i).
+ * order(ByteOrder.nativeOrder()).position(offset).
* asEBuffer();
- * e[] es = new e[this.length()];
+ * e[] es = new e[species.length()];
* for (int n = 0; n < t.length; n++) {
* if (m.isSet(n))
* es[n] = eb.get(n);
* }
- * Vector<E> r = ((ESpecies<S>)this).fromArray(es, 0, m);
+ * EVector r = EVector.fromArray(es, 0, m);
* }</pre>
*
* @param species species of desired vector
* @param bb the byte buffer
- * @param ix the offset into the byte buffer
+ * @param offset the offset into the byte buffer
* @param m the mask
* @return a vector loaded from a byte buffer
* @throws IndexOutOfBoundsException if the offset is {@code < 0},
* or {@code > b.limit()},
* for any vector lane index {@code N} where the mask at lane {@code N}
* is set
- * {@code i >= b.limit() - (N * this.elementSize() / Byte.SIZE)}
+ * {@code offset >= b.limit() - (N * species.elementSize() / Byte.SIZE)}
*/
@ForceInline
- public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> species, ByteBuffer bb, int ix, VectorMask<$Boxtype$> m) {
- return zero(species).blend(fromByteBuffer(species, bb, ix), m);
+ public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> species, ByteBuffer bb, int offset, VectorMask<$Boxtype$> m) {
+ return zero(species).blend(fromByteBuffer(species, bb, offset), m);
}
/**
* Returns a vector where all lane elements are set to the primitive
* value {@code e}.
*
- * @param s species of the desired vector
+ * @param species species of the desired vector
* @param e the value
* @return a vector of vector where all lane elements are set to
* the primitive value {@code e}
*/
#if[FP]
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> s, $type$ e) {
+ public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
- (Class<$abstractvectortype$>) s.boxType(), $type$.class, s.length(),
- $Type$.$type$To$Bitstype$Bits(e), s,
+ (Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
+ $Type$.$type$To$Bitstype$Bits(e), species,
((bits, sp) -> (($Type$Species)sp).op(i -> $Type$.$bitstype$BitsTo$Type$(($bitstype$)bits))));
}
#else[FP]
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> s, $type$ e) {
+ public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
- (Class<$abstractvectortype$>) s.boxType(), $type$.class, s.length(),
- e, s,
+ (Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
+ e, species,
((bits, sp) -> (($Type$Species)sp).op(i -> ($type$)bits)));
}
#end[FP]
/**
- * Returns a vector where each lane element is set to a given
- * primitive value.
+ * Returns a vector where each lane element is set to given
+ * primitive values.
* <p>
* For each vector lane, where {@code N} is the vector lane index, the
* the primitive value at index {@code N} is placed into the resulting
* vector at lane index {@code N}.
*
- * @param s species of the desired vector
+ * @param species species of the desired vector
* @param es the given primitive values
- * @return a vector where each lane element is set to a given primitive
- * value
- * @throws IndexOutOfBoundsException if {@code es.length < this.length()}
+ * @return a vector where each lane element is set to given primitive
+ * values
+ * @throws IndexOutOfBoundsException if {@code es.length < species.length()}
*/
@ForceInline
@SuppressWarnings("unchecked")
- public static $abstractvectortype$ scalars(VectorSpecies<$Boxtype$> s, $type$... es) {
+ public static $abstractvectortype$ scalars(VectorSpecies<$Boxtype$> species, $type$... es) {
Objects.requireNonNull(es);
- int ix = VectorIntrinsics.checkIndex(0, es.length, s.length());
- return VectorIntrinsics.load((Class<$abstractvectortype$>) s.boxType(), $type$.class, s.length(),
+ int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
+ return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
es, Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
- es, ix, s,
+ es, ix, species,
(c, idx, sp) -> (($Type$Species)sp).op(n -> c[idx + n]));
}
/**
* Returns a vector where the first lane element is set to the primtive
* value {@code e}, all other lane elements are set to the default
* value.
*
- * @param s species of the desired vector
+ * @param species species of the desired vector
* @param e the value
* @return a vector where the first lane element is set to the primitive
* value {@code e}
*/
@ForceInline
- public static final $abstractvectortype$ single(VectorSpecies<$Boxtype$> s, $type$ e) {
- return zero(s).with(0, e);
+ public static final $abstractvectortype$ single(VectorSpecies<$Boxtype$> species, $type$ e) {
+ return zero(species).with(0, e);
}
/**
* Returns a vector where each lane element is set to a randomly
* generated primitive value.
@@ -490,29 +487,29 @@
* ($type$){@link ThreadLocalRandom#nextInt()}
#else[byteOrShort]
* {@link ThreadLocalRandom#next$Type$()}
#end[byteOrShort]
*
- * @param s species of the desired vector
+ * @param species species of the desired vector
* @return a vector where each lane elements is set to a randomly
* generated primitive value
*/
#if[intOrLong]
- public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> s) {
+ public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> species) {
ThreadLocalRandom r = ThreadLocalRandom.current();
- return (($Type$Species)s).op(i -> r.next$Type$());
+ return (($Type$Species)species).op(i -> r.next$Type$());
}
#else[intOrLong]
#if[FP]
- public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> s) {
+ public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> species) {
ThreadLocalRandom r = ThreadLocalRandom.current();
- return (($Type$Species)s).op(i -> r.next$Type$());
+ return (($Type$Species)species).op(i -> r.next$Type$());
}
#else[FP]
- public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> s) {
+ public static $abstractvectortype$ random(VectorSpecies<$Boxtype$> species) {
ThreadLocalRandom r = ThreadLocalRandom.current();
- return (($Type$Species)s).op(i -> ($type$) r.nextInt());
+ return (($Type$Species)species).op(i -> ($type$) r.nextInt());
}
#end[FP]
#end[intOrLong]
// Ops
@@ -521,12 +518,12 @@
public abstract $abstractvectortype$ add(Vector<$Boxtype$> v);
/**
* Adds this vector to the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive addition operation
- * ({@code +}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive addition operation
+ * ({@code +}) to each lane.
*
* @param s the input scalar
* @return the result of adding this vector to the broadcast of an input
* scalar
*/
@@ -537,12 +534,12 @@
/**
* Adds this vector to broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive addition operation
- * ({@code +}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive addition operation
+ * ({@code +}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the result of adding this vector to the broadcast of an input
* scalar
@@ -553,12 +550,12 @@
public abstract $abstractvectortype$ sub(Vector<$Boxtype$> v);
/**
* Subtracts the broadcast of an input scalar from this vector.
* <p>
- * This is a vector binary operation where the primitive subtraction
- * operation ({@code -}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive subtraction
+ * operation ({@code -}) to each lane.
*
* @param s the input scalar
* @return the result of subtracting the broadcast of an input
* scalar from this vector
*/
@@ -569,12 +566,12 @@
/**
* Subtracts the broadcast of an input scalar from this vector, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive subtraction
- * operation ({@code -}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive subtraction
+ * operation ({@code -}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the result of subtracting the broadcast of an input
* scalar from this vector
@@ -585,12 +582,12 @@
public abstract $abstractvectortype$ mul(Vector<$Boxtype$> v);
/**
* Multiplies this vector with the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive multiplication
- * operation ({@code *}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive multiplication
+ * operation ({@code *}) to each lane.
*
* @param s the input scalar
* @return the result of multiplying this vector with the broadcast of an
* input scalar
*/
@@ -601,12 +598,12 @@
/**
* Multiplies this vector with the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive multiplication
- * operation ({@code *}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive multiplication
+ * operation ({@code *}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the result of multiplying this vector with the broadcast of an
* input scalar
@@ -632,12 +629,12 @@
public abstract $abstractvectortype$ min(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m);
/**
* Returns the minimum of this vector and the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the operation
- * {@code (a, b) -> Math.min(a, b)} is applied to lane elements.
+ * This is a lane-wise binary operation which applies the operation
+ * {@code (a, b) -> Math.min(a, b)} to each lane.
*
* @param s the input scalar
* @return the minimum of this vector and the broadcast of an input scalar
*/
public abstract $abstractvectortype$ min($type$ s);
@@ -649,12 +646,12 @@
public abstract $abstractvectortype$ max(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m);
/**
* Returns the maximum of this vector and the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the operation
- * {@code (a, b) -> Math.max(a, b)} is applied to lane elements.
+ * This is a lane-wise binary operation which applies the operation
+ * {@code (a, b) -> Math.max(a, b)} to each lane.
*
* @param s the input scalar
* @return the maximum of this vector and the broadcast of an input scalar
*/
public abstract $abstractvectortype$ max($type$ s);
@@ -663,12 +660,12 @@
public abstract VectorMask<$Boxtype$> equal(Vector<$Boxtype$> v);
/**
* Tests if this vector is equal to the broadcast of an input scalar.
* <p>
- * This is a vector binary test operation where the primitive equals
- * operation ({@code ==}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive equals
+ * operation ({@code ==}) each lane.
*
* @param s the input scalar
* @return the result mask of testing if this vector is equal to the
* broadcast of an input scalar
*/
@@ -678,12 +675,12 @@
public abstract VectorMask<$Boxtype$> notEqual(Vector<$Boxtype$> v);
/**
* Tests if this vector is not equal to the broadcast of an input scalar.
* <p>
- * This is a vector binary test operation where the primitive not equals
- * operation ({@code !=}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive not equals
+ * operation ({@code !=}) to each lane.
*
* @param s the input scalar
* @return the result mask of testing if this vector is not equal to the
* broadcast of an input scalar
*/
@@ -693,12 +690,12 @@
public abstract VectorMask<$Boxtype$> lessThan(Vector<$Boxtype$> v);
/**
* Tests if this vector is less than the broadcast of an input scalar.
* <p>
- * This is a vector binary test operation where the primitive less than
- * operation ({@code <}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive less than
+ * operation ({@code <}) to each lane.
*
* @param s the input scalar
* @return the mask result of testing if this vector is less than the
* broadcast of an input scalar
*/
@@ -708,12 +705,12 @@
public abstract VectorMask<$Boxtype$> lessThanEq(Vector<$Boxtype$> v);
/**
* Tests if this vector is less or equal to the broadcast of an input scalar.
* <p>
- * This is a vector binary test operation where the primitive less than
- * or equal to operation ({@code <=}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive less than
+ * or equal to operation ({@code <=}) to each lane.
*
* @param s the input scalar
* @return the mask result of testing if this vector is less than or equal
* to the broadcast of an input scalar
*/
@@ -723,12 +720,12 @@
public abstract VectorMask<$Boxtype$> greaterThan(Vector<$Boxtype$> v);
/**
* Tests if this vector is greater than the broadcast of an input scalar.
* <p>
- * This is a vector binary test operation where the primitive greater than
- * operation ({@code >}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive greater than
+ * operation ({@code >}) to each lane.
*
* @param s the input scalar
* @return the mask result of testing if this vector is greater than the
* broadcast of an input scalar
*/
@@ -739,12 +736,12 @@
/**
* Tests if this vector is greater than or equal to the broadcast of an
* input scalar.
* <p>
- * This is a vector binary test operation where the primitive greater than
- * or equal to operation ({@code >=}) is applied to lane elements.
+ * This is a lane-wise binary test operation which applies the primitive greater than
+ * or equal to operation ({@code >=}) to each lane.
*
* @param s the input scalar
* @return the mask result of testing if this vector is greater than or
* equal to the broadcast of an input scalar
*/
@@ -794,23 +791,23 @@
#if[FP]
/**
* Divides this vector by an input vector.
* <p>
- * This is a vector binary operation where the primitive division
- * operation ({@code /}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive division
+ * operation ({@code /}) to each lane.
*
* @param v the input vector
* @return the result of dividing this vector by the input vector
*/
public abstract $abstractvectortype$ div(Vector<$Boxtype$> v);
/**
* Divides this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive division
- * operation ({@code /}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive division
+ * operation ({@code /}) to each lane.
*
* @param s the input scalar
* @return the result of dividing this vector by the broadcast of an input
* scalar
*/
@@ -818,12 +815,12 @@
/**
* Divides this vector by an input vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive division
- * operation ({@code /}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive division
+ * operation ({@code /}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of dividing this vector by the input vector
*/
@@ -831,12 +828,12 @@
/**
* Divides this vector by the broadcast of an input scalar, selecting lane
* elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive division
- * operation ({@code /}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive division
+ * operation ({@code /}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the result of dividing this vector by the broadcast of an input
* scalar
@@ -844,23 +841,23 @@
public abstract $abstractvectortype$ div($type$ s, VectorMask<$Boxtype$> m);
/**
* Calculates the square root of this vector.
* <p>
- * This is a vector unary operation where the {@link Math#sqrt} operation
- * is applied to lane elements.
+ * This is a lane-wise unary operation which applies the {@link Math#sqrt} operation
+ * to each lane.
*
* @return the square root of this vector
*/
public abstract $abstractvectortype$ sqrt();
/**
* Calculates the square root of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is a vector unary operation where the {@link Math#sqrt} operation
- * is applied to lane elements.
+ * This is a lane-wise unary operation which applies the {@link Math#sqrt} operation
+ * to each lane.
*
* @param m the mask controlling lane selection
* @return the square root of this vector
*/
public $abstractvectortype$ sqrt(VectorMask<$Boxtype$> m) {
@@ -868,12 +865,12 @@
}
/**
* Calculates the trigonometric tangent of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#tan} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#tan} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#tan}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#tan}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -899,12 +896,12 @@
}
/**
* Calculates the hyperbolic tangent of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#tanh} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#tanh} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#tanh}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#tanh}
* specifications. The computed result will be within 2.5 ulps of the
* exact result.
@@ -930,12 +927,12 @@
}
/**
* Calculates the trigonometric sine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#sin} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#sin} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#sin}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#sin}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -961,12 +958,12 @@
}
/**
* Calculates the hyperbolic sine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#sinh} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#sinh} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#sinh}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#sinh}
* specifications. The computed result will be within 2.5 ulps of the
* exact result.
@@ -992,12 +989,12 @@
}
/**
* Calculates the trigonometric cosine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#cos} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#cos} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#cos}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#cos}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1023,12 +1020,12 @@
}
/**
* Calculates the hyperbolic cosine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#cosh} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#cosh} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#cosh}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#cosh}
* specifications. The computed result will be within 2.5 ulps of the
* exact result.
@@ -1054,12 +1051,12 @@
}
/**
* Calculates the arc sine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#asin} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#asin} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#asin}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#asin}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1085,12 +1082,12 @@
}
/**
* Calculates the arc cosine of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#acos} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#acos} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#acos}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#acos}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1116,12 +1113,12 @@
}
/**
* Calculates the arc tangent of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#atan} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#atan} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#atan}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#atan}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1147,12 +1144,12 @@
}
/**
* Calculates the arc tangent of this vector divided by an input vector.
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#atan2} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#atan2} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#atan2}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#atan2}
* specifications. The computed result will be within 2 ulps of the
* exact result.
@@ -1166,12 +1163,12 @@
/**
* Calculates the arc tangent of this vector divided by the broadcast of an
* an input scalar.
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#atan2} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#atan2} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#atan2}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#atan2}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1210,12 +1207,12 @@
public abstract $abstractvectortype$ atan2($type$ s, VectorMask<$Boxtype$> m);
/**
* Calculates the cube root of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#cbrt} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#cbrt} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#cbrt}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#cbrt}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1241,12 +1238,12 @@
}
/**
* Calculates the natural logarithm of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#log} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#log} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#log}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#log}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1272,12 +1269,12 @@
}
/**
* Calculates the base 10 logarithm of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#log10} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#log10} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#log10}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#log10}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1304,12 +1301,12 @@
/**
* Calculates the natural logarithm of the sum of this vector and the
* broadcast of {@code 1}.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#log1p} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#log1p} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#log1p}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#log1p}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1337,12 +1334,12 @@
}
/**
* Calculates this vector raised to the power of an input vector.
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#pow} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#pow} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#pow}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#pow}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1356,12 +1353,12 @@
/**
* Calculates this vector raised to the power of the broadcast of an input
* scalar.
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#pow} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#pow} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#pow}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#pow}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1403,12 +1400,12 @@
/**
* Calculates the broadcast of Euler's number {@code e} raised to the power
* of this vector.
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#exp} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#exp} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#exp}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#exp}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1439,15 +1436,15 @@
* Calculates the broadcast of Euler's number {@code e} raised to the power
* of this vector minus the broadcast of {@code -1}.
* More specifically as if the following (ignoring any differences in
* numerical accuracy):
* <pre>{@code
- * this.exp().sub(this.species().broadcast(1))
+ * this.exp().sub(EVector.broadcast(this.species(), 1))
* }</pre>
* <p>
- * This is a vector unary operation with same semantic definition as
- * {@link Math#expm1} operation applied to lane elements.
+ * This is a lane-wise unary operation with same semantic definition as
+ * {@link Math#expm1} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#expm1}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#expm1}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1464,11 +1461,11 @@
* of this vector minus the broadcast of {@code -1}, selecting lane elements
* controlled by a mask
* More specifically as if the following (ignoring any differences in
* numerical accuracy):
* <pre>{@code
- * this.exp(m).sub(this.species().broadcast(1), m)
+ * this.exp(m).sub(EVector.broadcast(this.species(), 1), m)
* }</pre>
* <p>
* Semantics for rounding, monotonicity, and special cases are
* described in {@link $abstractvectortype$#expm1}
*
@@ -1487,12 +1484,12 @@
* numerical accuracy):
* <pre>{@code
* this.mul(v1).add(v2)
* }</pre>
* <p>
- * This is a vector ternary operation where the {@link Math#fma} operation
- * is applied to lane elements.
+ * This is a lane-wise ternary operation which applies the {@link Math#fma} operation
+ * to each lane.
*
* @param v1 the first input vector
* @param v2 the second input vector
* @return the product of this vector and the first input vector summed with
* the second input vector
@@ -1502,15 +1499,15 @@
/**
* Calculates the product of this vector and the broadcast of a first input
* scalar summed with the broadcast of a second input scalar.
* More specifically as if the following:
* <pre>{@code
- * this.fma(this.species().broadcast(s1), this.species().broadcast(s2))
+ * this.fma(EVector.broadcast(this.species(), s1), EVector.broadcast(this.species(), s2))
* }</pre>
* <p>
- * This is a vector ternary operation where the {@link Math#fma} operation
- * is applied to lane elements.
+ * This is a lane-wise ternary operation which applies the {@link Math#fma} operation
+ * to each lane.
*
* @param s1 the first input scalar
* @param s2 the second input scalar
* @return the product of this vector and the broadcast of a first input
* scalar summed with the broadcast of a second input scalar
@@ -1524,12 +1521,12 @@
* numerical accuracy):
* <pre>{@code
* this.mul(v1, m).add(v2, m)
* }</pre>
* <p>
- * This is a vector ternary operation where the {@link Math#fma} operation
- * is applied to lane elements.
+ * This is a lane-wise ternary operation which applies the {@link Math#fma} operation
+ * to each lane.
*
* @param v1 the first input vector
* @param v2 the second input vector
* @param m the mask controlling lane selection
* @return the product of this vector and the first input vector summed with
@@ -1543,15 +1540,15 @@
* Calculates the product of this vector and the broadcast of a first input
* scalar summed with the broadcast of a second input scalar, selecting lane
* elements controlled by a mask
* More specifically as if the following:
* <pre>{@code
- * this.fma(this.species().broadcast(s1), this.species().broadcast(s2), m)
+ * this.fma(EVector.broadcast(this.species(), s1), EVector.broadcast(this.species(), s2), m)
* }</pre>
* <p>
- * This is a vector ternary operation where the {@link Math#fma} operation
- * is applied to lane elements.
+ * This is a lane-wise ternary operation which applies the {@link Math#fma} operation
+ * to each lane.
*
* @param s1 the first input scalar
* @param s2 the second input scalar
* @param m the mask controlling lane selection
* @return the product of this vector and the broadcast of a first input
@@ -1566,12 +1563,12 @@
* numerical accuracy):
* <pre>{@code
* this.mul(this).add(v.mul(v)).sqrt()
* }</pre>
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#hypot} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#hypot} operation applied to each lane.
* The implementation is not required to return same
* results as {@link Math#hypot}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#hypot}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1588,15 +1585,15 @@
* Calculates square root of the sum of the squares of this vector and the
* broadcast of an input scalar.
* More specifically as if the following (ignoring any differences in
* numerical accuracy):
* <pre>{@code
- * this.mul(this).add(this.species().broadcast(v * v)).sqrt()
+ * this.mul(this).add(EVector.broadcast(this.species(), s * s)).sqrt()
* }</pre>
* <p>
- * This is a vector binary operation with same semantic definition as
- * {@link Math#hypot} operation applied to lane elements.
+ * This is a lane-wise binary operation with same semantic definition as
+ * {@link Math#hypot} operation applied to each.
* The implementation is not required to return same
* results as {@link Math#hypot}, but adheres to rounding, monotonicity,
* and special case semantics as defined in the {@link Math#hypot}
* specifications. The computed result will be within 1 ulp of the
* exact result.
@@ -1633,11 +1630,11 @@
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* More specifically as if the following (ignoring any differences in
* numerical accuracy):
* <pre>{@code
- * this.mul(this, m).add(this.species().broadcast(v * v), m).sqrt(m)
+ * this.mul(this, m).add(EVector.broadcast(this.species(), s * s), m).sqrt(m)
* }</pre>
* <p>
* Semantics for rounding, monotonicity, and special cases are
* described in {@link $abstractvectortype$#hypot}
*
@@ -1652,23 +1649,23 @@
#if[BITWISE]
/**
* Bitwise ANDs this vector with an input vector.
* <p>
- * This is a vector binary operation where the primitive bitwise AND
- * operation ({@code &}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise AND
+ * operation ({@code &}) to each lane.
*
* @param v the input vector
* @return the bitwise AND of this vector with the input vector
*/
public abstract $abstractvectortype$ and(Vector<$Boxtype$> v);
/**
* Bitwise ANDs this vector with the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive bitwise AND
- * operation ({@code &}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise AND
+ * operation ({@code &}) to each lane.
*
* @param s the input scalar
* @return the bitwise AND of this vector with the broadcast of an input
* scalar
*/
@@ -1676,12 +1673,12 @@
/**
* Bitwise ANDs this vector with an input vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise AND
- * operation ({@code &}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise AND
+ * operation ({@code &}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the bitwise AND of this vector with the input vector
*/
@@ -1689,12 +1686,12 @@
/**
* Bitwise ANDs this vector with the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise AND
- * operation ({@code &}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise AND
+ * operation ({@code &}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the bitwise AND of this vector with the broadcast of an input
* scalar
@@ -1702,23 +1699,23 @@
public abstract $abstractvectortype$ and($type$ s, VectorMask<$Boxtype$> m);
/**
* Bitwise ORs this vector with an input vector.
* <p>
- * This is a vector binary operation where the primitive bitwise OR
- * operation ({@code |}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise OR
+ * operation ({@code |}) to each lane.
*
* @param v the input vector
* @return the bitwise OR of this vector with the input vector
*/
public abstract $abstractvectortype$ or(Vector<$Boxtype$> v);
/**
* Bitwise ORs this vector with the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive bitwise OR
- * operation ({@code |}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise OR
+ * operation ({@code |}) to each lane.
*
* @param s the input scalar
* @return the bitwise OR of this vector with the broadcast of an input
* scalar
*/
@@ -1726,12 +1723,12 @@
/**
* Bitwise ORs this vector with an input vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise OR
- * operation ({@code |}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise OR
+ * operation ({@code |}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the bitwise OR of this vector with the input vector
*/
@@ -1739,12 +1736,12 @@
/**
* Bitwise ORs this vector with the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise OR
- * operation ({@code |}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise OR
+ * operation ({@code |}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the bitwise OR of this vector with the broadcast of an input
* scalar
@@ -1752,23 +1749,23 @@
public abstract $abstractvectortype$ or($type$ s, VectorMask<$Boxtype$> m);
/**
* Bitwise XORs this vector with an input vector.
* <p>
- * This is a vector binary operation where the primitive bitwise XOR
- * operation ({@code ^}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise XOR
+ * operation ({@code ^}) to each lane.
*
* @param v the input vector
* @return the bitwise XOR of this vector with the input vector
*/
public abstract $abstractvectortype$ xor(Vector<$Boxtype$> v);
/**
* Bitwise XORs this vector with the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive bitwise XOR
- * operation ({@code ^}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise XOR
+ * operation ({@code ^}) to each lane.
*
* @param s the input scalar
* @return the bitwise XOR of this vector with the broadcast of an input
* scalar
*/
@@ -1776,12 +1773,12 @@
/**
* Bitwise XORs this vector with an input vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise XOR
- * operation ({@code ^}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise XOR
+ * operation ({@code ^}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the bitwise XOR of this vector with the input vector
*/
@@ -1789,12 +1786,12 @@
/**
* Bitwise XORs this vector with the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive bitwise XOR
- * operation ({@code ^}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive bitwise XOR
+ * operation ({@code ^}) to each lane.
*
* @param s the input scalar
* @param m the mask controlling lane selection
* @return the bitwise XOR of this vector with the broadcast of an input
* scalar
@@ -1802,34 +1799,34 @@
public abstract $abstractvectortype$ xor($type$ s, VectorMask<$Boxtype$> m);
/**
* Bitwise NOTs this vector.
* <p>
- * This is a vector unary operation where the primitive bitwise NOT
- * operation ({@code ~}) is applied to lane elements.
+ * This is a lane-wise unary operation which applies the primitive bitwise NOT
+ * operation ({@code ~}) to each lane.
*
* @return the bitwise NOT of this vector
*/
public abstract $abstractvectortype$ not();
/**
* Bitwise NOTs this vector, selecting lane elements controlled by a mask.
* <p>
- * This is a vector unary operation where the primitive bitwise NOT
- * operation ({@code ~}) is applied to lane elements.
+ * This is a lane-wise unary operation which applies the primitive bitwise NOT
+ * operation ({@code ~}) to each lane.
*
* @param m the mask controlling lane selection
* @return the bitwise NOT of this vector
*/
public abstract $abstractvectortype$ not(VectorMask<$Boxtype$> m);
#if[byte]
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements to left shift the
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane to left shift the
* element by shift value as specified by the input scalar. Only the 3
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -1840,12 +1837,12 @@
#end[byte]
#if[short]
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements to left shift the
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane to left shift the
* element by shift value as specified by the input scalar. Only the 4
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -1856,12 +1853,12 @@
#end[short]
#if[intOrLong]
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane.
*
* @param s the input scalar; the number of the bits to left shift
* @return the result of logically left shifting left this vector by the
* broadcast of an input scalar
*/
@@ -1871,12 +1868,12 @@
#if[byte]
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements to left shift the
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane to left shift the
* element by shift value as specified by the input scalar. Only the 3
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -1889,12 +1886,12 @@
#if[short]
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements to left shift the
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane to left shift the
* element by shift value as specified by the input scalar. Only the 4
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -1907,12 +1904,12 @@
#if[intOrLong]
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane.
*
* @param s the input scalar; the number of the bits to left shift
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the
* broadcast of an input scalar
@@ -1922,12 +1919,12 @@
#if[intOrLong]
/**
* Logically left shifts this vector by an input vector.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane.
*
* @param v the input vector
* @return the result of logically left shifting this vector by the input
* vector
*/
@@ -1935,12 +1932,12 @@
/**
* Logically left shifts this vector by an input vector, selecting lane
* elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive logical left shift
- * operation ({@code <<}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically left shifting this vector by the input
* vector
@@ -1955,12 +1952,12 @@
#if[byte]
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements to logically right shift the
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane to logically right shift the
* element by shift value as specified by the input scalar. Only the 3
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -1972,12 +1969,12 @@
#if[short]
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements to logically right shift the
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane to logically right shift the
* element by shift value as specified by the input scalar. Only the 4
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -1989,12 +1986,12 @@
#if[intOrLong]
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
*/
@@ -2005,12 +2002,12 @@
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements to logically right shift the
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>}) to each lane to logically right shift the
* element by shift value as specified by the input scalar. Only the 3
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -2024,12 +2021,12 @@
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements to logically right shift the
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane to logically right shift the
* element by shift value as specified by the input scalar. Only the 4
* lowest-order bits of shift value are used. It is as if the shift value
* were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -2043,12 +2040,12 @@
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* broadcast of an input scalar
@@ -2059,12 +2056,12 @@
#if[intOrLong]
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane.
*
* @param v the input vector
* @return the result of logically right shifting this vector by the
* input vector
*/
@@ -2072,12 +2069,12 @@
/**
* Logically right shifts (or unsigned right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive logical right shift
- * operation ({@code >>>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of logically right shifting this vector by the
* input vector
@@ -2090,12 +2087,12 @@
#if[byte]
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements to arithmetically
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane to arithmetically
* right shift the element by shift value as specified by the input scalar.
* Only the 3 lowest-order bits of shift value are used. It is as if the shift
* value were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -2107,12 +2104,12 @@
#if[short]
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements to arithmetically
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane to arithmetically
* right shift the element by shift value as specified by the input scalar.
* Only the 4 lowest-order bits of shift value are used. It is as if the shift
* value were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -2124,12 +2121,12 @@
#if[intOrLong]
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
*/
@@ -2140,12 +2137,12 @@
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements to arithmetically
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane to arithmetically
* right shift the element by shift value as specified by the input scalar.
* Only the 3 lowest-order bits of shift value are used. It is as if the shift
* value were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0x7.
* The shift distance actually used is therefore always in the range 0 to 7, inclusive.
*
@@ -2159,12 +2156,12 @@
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements to arithmetically
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane to arithmetically
* right shift the element by shift value as specified by the input scalar.
* Only the 4 lowest-order bits of shift value are used. It is as if the shift
* value were subjected to a bitwise logical AND operator ({@code &}) with the mask value 0xF.
* The shift distance actually used is therefore always in the range 0 to 15, inclusive.
*
@@ -2178,12 +2175,12 @@
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane.
*
* @param s the input scalar; the number of the bits to right shift
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* broadcast of an input scalar
@@ -2194,12 +2191,12 @@
#if[intOrLong]
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane.
*
* @param v the input vector
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
@@ -2207,12 +2204,12 @@
/**
* Arithmetically right shifts (or signed right shifts) this vector by an
* input vector, selecting lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the primitive arithmetic right
- * shift operation ({@code >>}) is applied to lane elements.
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane.
*
* @param v the input vector
* @param m the mask controlling lane selection
* @return the result of arithmetically right shifting this vector by the
* input vector
@@ -2222,12 +2219,12 @@
}
/**
* Rotates left this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the operation
- * {@link $Wideboxtype$#rotateLeft} is applied to lane elements and where
+ * This is a lane-wise binary operation which applies the operation
+ * {@link $Wideboxtype$#rotateLeft} to each lane and where
* lane elements of this vector apply to the first argument, and lane
* elements of the broadcast vector apply to the second argument (the
* rotation distance).
*
* @param s the input scalar; the number of the bits to rotate left
@@ -2241,12 +2238,12 @@
/**
* Rotates left this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the operation
- * {@link $Wideboxtype$#rotateLeft} is applied to lane elements and where
+ * This is a lane-wise binary operation which applies the operation
+ * {@link $Wideboxtype$#rotateLeft} to each lane and where
* lane elements of this vector apply to the first argument, and lane
* elements of the broadcast vector apply to the second argument (the
* rotation distance).
*
* @param s the input scalar; the number of the bits to rotate left
@@ -2260,12 +2257,12 @@
}
/**
* Rotates right this vector by the broadcast of an input scalar.
* <p>
- * This is a vector binary operation where the operation
- * {@link $Wideboxtype$#rotateRight} is applied to lane elements and where
+ * This is a lane-wise binary operation which applies the operation
+ * {@link $Wideboxtype$#rotateRight} to each lane and where
* lane elements of this vector apply to the first argument, and lane
* elements of the broadcast vector apply to the second argument (the
* rotation distance).
*
* @param s the input scalar; the number of the bits to rotate right
@@ -2279,12 +2276,12 @@
/**
* Rotates right this vector by the broadcast of an input scalar, selecting
* lane elements controlled by a mask.
* <p>
- * This is a vector binary operation where the operation
- * {@link $Wideboxtype$#rotateRight} is applied to lane elements and where
+ * This is a lane-wise binary operation which applies the operation
+ * {@link $Wideboxtype$#rotateRight} to each lane and where
* lane elements of this vector apply to the first argument, and lane
* elements of the broadcast vector apply to the second argument (the
* rotation distance).
*
* @param s the input scalar; the number of the bits to rotate right
@@ -2315,12 +2312,12 @@
// Type specific horizontal reductions
/**
* Adds all lane elements of this vector.
* <p>
#if[FP]
- * This is a vector reduction operation where the addition
- * operation ({@code +}) is applied to lane elements,
+ * This is a cross-lane reduction operation which applies the addition
+ * operation ({@code +}) to lane elements,
* and the identity value is {@code 0.0}.
*
* <p>The value of a floating-point sum is a function both of the input values as well
* as the order of addition operations. The order of addition operations of this method
* is intentionally not defined to allow for JVM to generate optimal machine
@@ -2328,12 +2325,12 @@
* instruction to add all values in the vector, or if there is some other efficient machine
* code sequence, then the JVM has the option of generating this machine code. Otherwise,
* the default implementation of adding vectors sequentially from left to right is used.
* For this reason, the output of this method may vary for the same input values.
#else[FP]
- * This is an associative vector reduction operation where the addition
- * operation ({@code +}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the addition
+ * operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
#end[FP]
*
* @return the addition of all the lane elements of this vector
*/
@@ -2342,12 +2339,12 @@
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
#if[FP]
- * This is a vector reduction operation where the addition
- * operation ({@code +}) is applied to lane elements,
+ * This is a cross-lane reduction operation which applies the addition
+ * operation ({@code +}) to lane elements,
* and the identity value is {@code 0.0}.
*
* <p>The value of a floating-point sum is a function both of the input values as well
* as the order of addition operations. The order of addition operations of this method
* is intentionally not defined to allow for JVM to generate optimal machine
@@ -2355,12 +2352,12 @@
* instruction to add all values in the vector, or if there is some other efficient machine
* code sequence, then the JVM has the option of generating this machine code. Otherwise,
* the default implementation of adding vectors sequentially from left to right is used.
* For this reason, the output of this method may vary on the same input values.
#else[FP]
- * This is an associative vector reduction operation where the addition
- * operation ({@code +}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the addition
+ * operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
#end[FP]
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
@@ -2369,24 +2366,24 @@
/**
* Multiplies all lane elements of this vector.
* <p>
#if[FP]
- * This is a vector reduction operation where the
- * multiplication operation ({@code *}) is applied to lane elements,
+ * This is a cross-lane reduction operation which applies the
+ * multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1.0}.
*
* <p>The order of multiplication operations of this method
* is intentionally not defined to allow for JVM to generate optimal machine
* code for the underlying platform at runtime. If the platform supports a vector
* instruction to multiply all values in the vector, or if there is some other efficient machine
* code sequence, then the JVM has the option of generating this machine code. Otherwise,
* the default implementation of multiplying vectors sequentially from left to right is used.
* For this reason, the output of this method may vary on the same input values.
#else[FP]
- * This is an associative vector reduction operation where the
- * multiplication operation ({@code *}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the
+ * multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
#end[FP]
*
* @return the multiplication of all the lane elements of this vector
*/
@@ -2395,24 +2392,24 @@
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
#if[FP]
- * This is a vector reduction operation where the
- * multiplication operation ({@code *}) is applied to lane elements,
+ * This is a cross-lane reduction operation which applies the
+ * multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1.0}.
*
* <p>The order of multiplication operations of this method
* is intentionally not defined to allow for JVM to generate optimal machine
* code for the underlying platform at runtime. If the platform supports a vector
* instruction to multiply all values in the vector, or if there is some other efficient machine
* code sequence, then the JVM has the option of generating this machine code. Otherwise,
* the default implementation of multiplying vectors sequentially from left to right is used.
* For this reason, the output of this method may vary on the same input values.
#else[FP]
- * This is an associative vector reduction operation where the
- * multiplication operation ({@code *}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the
+ * multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
#end[FP]
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
@@ -2420,12 +2417,12 @@
public abstract $type$ mulAll(VectorMask<$Boxtype$> m);
/**
* Returns the minimum lane element of this vector.
* <p>
- * This is an associative vector reduction operation where the operation
- * {@code (a, b) -> Math.min(a, b)} is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the operation
+ * {@code (a, b) -> Math.min(a, b)} to lane elements,
* and the identity value is
#if[FP]
* {@link $Boxtype$#POSITIVE_INFINITY}.
#else[FP]
* {@link $Boxtype$#MAX_VALUE}.
@@ -2437,12 +2434,12 @@
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is an associative vector reduction operation where the operation
- * {@code (a, b) -> Math.min(a, b)} is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the operation
+ * {@code (a, b) -> Math.min(a, b)} to lane elements,
* and the identity value is
#if[FP]
* {@link $Boxtype$#POSITIVE_INFINITY}.
#else[FP]
* {@link $Boxtype$#MAX_VALUE}.
@@ -2454,12 +2451,12 @@
public abstract $type$ minAll(VectorMask<$Boxtype$> m);
/**
* Returns the maximum lane element of this vector.
* <p>
- * This is an associative vector reduction operation where the operation
- * {@code (a, b) -> Math.max(a, b)} is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the operation
+ * {@code (a, b) -> Math.max(a, b)} to lane elements,
* and the identity value is
#if[FP]
* {@link $Boxtype$#NEGATIVE_INFINITY}.
#else[FP]
* {@link $Boxtype$#MIN_VALUE}.
@@ -2471,12 +2468,12 @@
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is an associative vector reduction operation where the operation
- * {@code (a, b) -> Math.max(a, b)} is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the operation
+ * {@code (a, b) -> Math.max(a, b)} to lane elements,
* and the identity value is
#if[FP]
* {@link $Boxtype$#NEGATIVE_INFINITY}.
#else[FP]
* {@link $Boxtype$#MIN_VALUE}.
@@ -2489,72 +2486,72 @@
#if[BITWISE]
/**
* Logically ORs all lane elements of this vector.
* <p>
- * This is an associative vector reduction operation where the logical OR
- * operation ({@code |}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical OR
+ * operation ({@code |}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical OR all the lane elements of this vector
*/
public abstract $type$ orAll();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is an associative vector reduction operation where the logical OR
- * operation ({@code |}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical OR
+ * operation ({@code |}) to lane elements,
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical OR all the lane elements of this vector
*/
public abstract $type$ orAll(VectorMask<$Boxtype$> m);
/**
* Logically ANDs all lane elements of this vector.
* <p>
- * This is an associative vector reduction operation where the logical AND
- * operation ({@code |}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical AND
+ * operation ({@code |}) to lane elements,
* and the identity value is {@code -1}.
*
* @return the logical AND all the lane elements of this vector
*/
public abstract $type$ andAll();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is an associative vector reduction operation where the logical AND
- * operation ({@code |}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical AND
+ * operation ({@code |}) to lane elements,
* and the identity value is {@code -1}.
*
* @param m the mask controlling lane selection
* @return the logical AND all the lane elements of this vector
*/
public abstract $type$ andAll(VectorMask<$Boxtype$> m);
/**
* Logically XORs all lane elements of this vector.
* <p>
- * This is an associative vector reduction operation where the logical XOR
- * operation ({@code ^}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical XOR
+ * operation ({@code ^}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the logical XOR all the lane elements of this vector
*/
public abstract $type$ xorAll();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
- * This is an associative vector reduction operation where the logical XOR
- * operation ({@code ^}) is applied to lane elements,
+ * This is an associative cross-lane reduction operation which applies the logical XOR
+ * operation ({@code ^}) to lane elements,
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the logical XOR all the lane elements of this vector
*/
@@ -2569,11 +2566,11 @@
* @param i the lane index
* @return the lane element at lane index {@code i}
* @throws IllegalArgumentException if the index is is out of range
* ({@code < 0 || >= length()})
*/
- public abstract $type$ get(int i);
+ public abstract $type$ lane(int i);
/**
* Replaces the lane element of this vector at lane index {@code i} with
* value {@code e}.
* <p>
@@ -2616,90 +2613,90 @@
/**
* Stores this vector into an array starting at offset.
* <p>
* For each vector lane, where {@code N} is the vector lane index,
* the lane element at index {@code N} is stored into the array at index
- * {@code i + N}.
+ * {@code offset + 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($type$[] a, int i);
+ public abstract void intoArray($type$[] a, int offset);
/**
* Stores this vector into an array starting at offset and using a mask.
* <p>
* For each vector lane, where {@code N} is the vector lane index,
* if the mask lane at index {@code N} is set then the lane element at
- * index {@code N} is stored into the array index {@code i + N}.
+ * index {@code N} is stored into the array index {@code offset + N}.
*
* @param a the array
- * @param i the offset into the array
+ * @param offset the offset into the array
* @param m the mask
- * @throws IndexOutOfBoundsException if {@code i < 0}, or
+ * @throws IndexOutOfBoundsException if {@code offset < 0}, or
* for any vector lane index {@code N} where the mask at lane {@code N}
- * is set {@code i >= a.length - N}
+ * is set {@code offset >= a.length - N}
*/
- public abstract void intoArray($type$[] a, int i, VectorMask<$Boxtype$> m);
+ public abstract void intoArray($type$[] a, int offset, VectorMask<$Boxtype$> m);
/**
* Stores this vector into an array using indexes obtained from an index
* map.
* <p>
* For each vector lane, where {@code N} is the vector lane index, the
* lane element at index {@code N} is stored into the array at index
- * {@code i + indexMap[j + N]}.
+ * {@code a_offset + indexMap[i_offset + N]}.
*
* @param a the array
- * @param i the offset into the array, may be negative if relative
+ * @param a_offset the offset into the array, may be negative if relative
* indexes in the index map compensate to produce a value within the
* array bounds
* @param indexMap the index map
- * @param j the offset into the index map
- * @throws IndexOutOfBoundsException if {@code j < 0}, or
- * {@code j > indexMap.length - this.length()},
+ * @param i_offset the offset into the index map
+ * @throws IndexOutOfBoundsException if {@code i_offset < 0}, or
+ * {@code i_offset > indexMap.length - this.length()},
* or for any vector lane index {@code N} the result of
- * {@code i + indexMap[j + N]} is {@code < 0} or {@code >= a.length}
+ * {@code a_offset + indexMap[i_offset + N]} is {@code < 0} or {@code >= a.length}
*/
#if[byteOrShort]
- public void intoArray($type$[] a, int i, int[] indexMap, int j) {
- forEach((n, e) -> a[i + indexMap[j + n]] = e);
+ public void intoArray($type$[] a, int a_offset, int[] indexMap, int i_offset) {
+ forEach((n, e) -> a[a_offset + indexMap[i_offset + n]] = e);
}
#else[byteOrShort]
- public abstract void intoArray($type$[] a, int i, int[] indexMap, int j);
+ public abstract void intoArray($type$[] a, int a_offset, int[] indexMap, int i_offset);
#end[byteOrShort]
/**
* Stores this vector into an array using indexes obtained from an index
* map and using a mask.
* <p>
* For each vector lane, where {@code N} is the vector lane index,
* if the mask lane at index {@code N} is set then the lane element at
* index {@code N} is stored into the array at index
- * {@code i + indexMap[j + N]}.
+ * {@code a_offset + indexMap[i_offset + N]}.
*
* @param a the array
- * @param i the offset into the array, may be negative if relative
+ * @param a_offset the offset into the array, may be negative if relative
* indexes in the index map compensate to produce a value within the
* array bounds
* @param m the mask
* @param indexMap the index map
- * @param j the offset into the index map
+ * @param i_offset the offset into the index map
* @throws IndexOutOfBoundsException if {@code j < 0}, or
- * {@code j > indexMap.length - this.length()},
+ * {@code i_offset > indexMap.length - this.length()},
* or for any vector lane index {@code N} where the mask at lane
- * {@code N} is set the result of {@code i + indexMap[j + N]} is
+ * {@code N} is set the result of {@code a_offset + indexMap[i_offset + N]} is
* {@code < 0} or {@code >= a.length}
*/
#if[byteOrShort]
- public void intoArray($type$[] a, int i, VectorMask<$Boxtype$> m, int[] indexMap, int j) {
- forEach(m, (n, e) -> a[i + indexMap[j + n]] = e);
+ public void intoArray($type$[] a, int a_offset, VectorMask<$Boxtype$> m, int[] indexMap, int i_offset) {
+ forEach(m, (n, e) -> a[a_offset + indexMap[i_offset + n]] = e);
}
#else[byteOrShort]
- public abstract void intoArray($type$[] a, int i, VectorMask<$Boxtype$> m, int[] indexMap, int j);
+ public abstract void intoArray($type$[] a, int a_offset, VectorMask<$Boxtype$> m, int[] indexMap, int i_offset);
#end[byteOrShort]
// Species
@Override
public abstract VectorSpecies<$Boxtype$> species();
< prev index next >