< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ShortVector.java
Print this page
rev 55891 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
*** 110,120 ****
* @return a zero vector of given species
*/
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector zero(VectorSpecies<Short> species) {
! return VectorIntrinsics.broadcastCoerced((Class<ShortVector>) species.boxType(), short.class, species.length(),
0, species,
((bits, s) -> ((ShortSpecies)s).op(i -> (short)bits)));
}
/**
--- 110,120 ----
* @return a zero vector of given species
*/
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector zero(VectorSpecies<Short> species) {
! return VectorIntrinsics.broadcastCoerced((Class<ShortVector>) species.vectorType(), short.class, species.length(),
0, species,
((bits, s) -> ((ShortSpecies)s).op(i -> (short)bits)));
}
/**
*** 140,150 ****
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector fromByteArray(VectorSpecies<Short> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<ShortVector>) species.boxType(), short.class, species.length(),
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());
ShortBuffer tb = bbc.asShortBuffer();
--- 140,150 ----
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector fromByteArray(VectorSpecies<Short> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<ShortVector>) species.vectorType(), short.class, species.length(),
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());
ShortBuffer tb = bbc.asShortBuffer();
*** 198,208 ****
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector fromArray(VectorSpecies<Short> species, short[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<ShortVector>) species.boxType(), short.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_SHORT_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> ((ShortSpecies)s).op(n -> c[idx + n]));
}
--- 198,208 ----
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector fromArray(VectorSpecies<Short> species, short[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<ShortVector>) species.vectorType(), short.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_SHORT_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> ((ShortSpecies)s).op(n -> c[idx + n]));
}
*** 311,321 ****
public static ShortVector fromByteBuffer(VectorSpecies<Short> species, ByteBuffer bb, int offset) {
if (bb.order() != ByteOrder.nativeOrder()) {
throw new IllegalArgumentException();
}
offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<ShortVector>) species.boxType(), short.class, species.length(),
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());
ShortBuffer tb = bbc.asShortBuffer();
--- 311,321 ----
public static ShortVector fromByteBuffer(VectorSpecies<Short> species, ByteBuffer bb, int offset) {
if (bb.order() != ByteOrder.nativeOrder()) {
throw new IllegalArgumentException();
}
offset = VectorIntrinsics.checkIndex(offset, bb.limit(), species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<ShortVector>) species.vectorType(), short.class, species.length(),
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());
ShortBuffer tb = bbc.asShortBuffer();
*** 367,385 ****
/**
* Returns a vector where all lane elements are set to the primitive
* value {@code e}.
*
* @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}
*/
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector broadcast(VectorSpecies<Short> species, short e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<ShortVector>) species.boxType(), short.class, species.length(),
e, species,
((bits, sp) -> ((ShortSpecies)sp).op(i -> (short)bits)));
}
/**
--- 367,385 ----
/**
* Returns a vector where all lane elements are set to the primitive
* value {@code e}.
*
* @param species species of the desired vector
! * @param e the value to be broadcasted
* @return a vector of vector where all lane elements are set to
* the primitive value {@code e}
*/
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector broadcast(VectorSpecies<Short> species, short e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<ShortVector>) species.vectorType(), short.class, species.length(),
e, species,
((bits, sp) -> ((ShortSpecies)sp).op(i -> (short)bits)));
}
/**
*** 399,409 ****
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector scalars(VectorSpecies<Short> species, short... es) {
Objects.requireNonNull(es);
int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
! return VectorIntrinsics.load((Class<ShortVector>) species.boxType(), short.class, species.length(),
es, Unsafe.ARRAY_SHORT_BASE_OFFSET,
es, ix, species,
(c, idx, sp) -> ((ShortSpecies)sp).op(n -> c[idx + n]));
}
--- 399,409 ----
@ForceInline
@SuppressWarnings("unchecked")
public static ShortVector scalars(VectorSpecies<Short> species, short... es) {
Objects.requireNonNull(es);
int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
! return VectorIntrinsics.load((Class<ShortVector>) species.vectorType(), short.class, species.length(),
es, Unsafe.ARRAY_SHORT_BASE_OFFSET,
es, ix, species,
(c, idx, sp) -> ((ShortSpecies)sp).op(n -> c[idx + n]));
}
*** 777,805 ****
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector rotateEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector rotateER(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector shiftEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector shiftER(int i);
/**
* Bitwise ANDs this vector with an input vector.
--- 777,805 ----
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector rotateLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector rotateLanesRight(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector shiftLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract ShortVector shiftLanesRight(int i);
/**
* Bitwise ANDs this vector with an input vector.
*** 975,1052 ****
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
* 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.
*
* @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
*/
! public abstract ShortVector shiftL(int s);
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
* 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.
*
* @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 left this vector by the
* broadcast of an input scalar
*/
! public abstract ShortVector shiftL(int s, VectorMask<Short> m);
// logical, or unsigned, shift right
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* 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.
*
* @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
*/
! public abstract ShortVector shiftR(int s);
/**
* 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 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.
*
* @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
*/
! public abstract ShortVector shiftR(int s, VectorMask<Short> m);
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
--- 975,1123 ----
/**
* Logically left shifts this vector by the broadcast of an input scalar.
* <p>
* 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.
*
* @param s the input scalar; the number of the bits to left shift
! * @return the result of logically left shifting this vector by the
* broadcast of an input scalar
*/
! public abstract ShortVector shiftLeft(int s);
/**
* Logically left shifts this vector by the broadcast of an input scalar,
* selecting lane elements controlled by a mask.
* <p>
* 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.
*
* @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
*/
! public abstract ShortVector shiftLeft(int s, VectorMask<Short> m);
+ /**
+ * Logically left shifts this vector by an input vector.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @param v the input vector
+ * @return the result of logically left shifting this vector by the input
+ * vector
+ */
+ public abstract ShortVector shiftLeft(Vector<Short> v);
+
+ /**
+ * Logically left shifts this vector by an input vector, selecting lane
+ * elements controlled by a mask.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive logical left shift
+ * operation ({@code <<}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @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
+ */
+ public ShortVector shiftLeft(Vector<Short> v, VectorMask<Short> m) {
+ return blend(shiftLeft(v), m);
+ }
// logical, or unsigned, shift right
/**
* Logically right shifts (or unsigned right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* 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.
*
* @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
*/
! public abstract ShortVector shiftRight(int s);
/**
* 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 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.
*
* @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
*/
! public abstract ShortVector shiftRight(int s, VectorMask<Short> m);
+ /**
+ * Logically right shifts (or unsigned right shifts) this vector by an
+ * input vector.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @param v the input vector
+ * @return the result of logically right shifting this vector by the
+ * input vector
+ */
+ public abstract ShortVector shiftRight(Vector<Short> v);
+
+ /**
+ * Logically right shifts (or unsigned right shifts) this vector by an
+ * input vector, selecting lane elements controlled by a mask.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive logical right shift
+ * operation ({@code >>>}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @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
+ */
+ public ShortVector shiftRight(Vector<Short> v, VectorMask<Short> m) {
+ return blend(shiftRight(v), m);
+ }
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
*** 1059,1069 ****
*
* @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
*/
! public abstract ShortVector aShiftR(int s);
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
--- 1130,1140 ----
*
* @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
*/
! public abstract ShortVector shiftArithmeticRight(int s);
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar, selecting lane elements controlled by a
* mask.
*** 1078,1089 ****
* @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
*/
! public abstract ShortVector aShiftR(int s, VectorMask<Short> m);
/**
* {@inheritDoc}
*/
@Override
--- 1149,1272 ----
* @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
*/
! public abstract ShortVector shiftArithmeticRight(int s, VectorMask<Short> m);
+ /**
+ * Arithmetically right shifts (or signed right shifts) this vector by an
+ * input vector.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @param v the input vector
+ * @return the result of arithmetically right shifting this vector by the
+ * input vector
+ */
+ public abstract ShortVector shiftArithmeticRight(Vector<Short> v);
+
+ /**
+ * Arithmetically right shifts (or signed right shifts) this vector by an
+ * input vector, selecting lane elements controlled by a mask.
+ * <p>
+ * This is a lane-wise binary operation which applies the primitive arithmetic right
+ * shift operation ({@code >>}) to each lane. For each lane of this vector, the
+ * shift value is the corresponding lane of input vector.
+ * 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.
+ *
+ * @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
+ */
+ public ShortVector shiftArithmeticRight(Vector<Short> v, VectorMask<Short> m) {
+ return blend(shiftArithmeticRight(v), m);
+ }
+
+ /**
+ * Rotates left this vector by the broadcast of an input scalar.
+ * <p>
+ * This is a lane-wise binary operation which produces the result of rotating left the two's
+ * complement binary representation of each lane of first operand (this vector) by input scalar.
+ * Rotation by any multiple of 16 is a no-op, so only the 4 lowest-order bits of input value are used.
+ * It is as if the input value were subjected to a bitwise logical
+ * AND operator ({@code &}) with the mask value 0xF.
+ *
+ * @param s the input scalar; the number of the bits to rotate left
+ * @return the result of rotating left this vector by the broadcast of an
+ * input scalar
+ */
+ @ForceInline
+ public final ShortVector rotateLeft(int s) {
+ return shiftLeft(s).or(shiftRight(-s));
+ }
+
+ /**
+ * Rotates left this vector by the broadcast of an input scalar, selecting
+ * lane elements controlled by a mask.
+ * <p>
+ * This is a lane-wise binary operation which produces the result of rotating left the two's
+ * complement binary representation of each lane of first operand (this vector) by input scalar.
+ * Rotation by any multiple of 16 is a no-op, so only the 4 lowest-order bits of input value are used.
+ * It is as if the input value were subjected to a bitwise logical
+ * AND operator ({@code &}) with the mask value 0xF.
+ *
+ * @param s the input scalar; the number of the bits to rotate left
+ * @param m the mask controlling lane selection
+ * @return the result of rotating left this vector by the broadcast of an
+ * input scalar
+ */
+ @ForceInline
+ public final ShortVector rotateLeft(int s, VectorMask<Short> m) {
+ return shiftLeft(s, m).or(shiftRight(-s, m), m);
+ }
+
+ /**
+ * Rotates right this vector by the broadcast of an input scalar.
+ * <p>
+ * This is a lane-wise binary operation which produces the result of rotating right the two's
+ * complement binary representation of each lane of first operand (this vector) by input scalar.
+ * Rotation by any multiple of 16 is a no-op, so only the 4 lowest-order bits of input value are used.
+ * It is as if the input value were subjected to a bitwise logical
+ * AND operator ({@code &}) with the mask value 0xF.
+ *
+ * @param s the input scalar; the number of the bits to rotate right
+ * @return the result of rotating right this vector by the broadcast of an
+ * input scalar
+ */
+ @ForceInline
+ public final ShortVector rotateRight(int s) {
+ return shiftRight(s).or(shiftLeft(-s));
+ }
+
+ /**
+ * Rotates right this vector by the broadcast of an input scalar, selecting
+ * lane elements controlled by a mask.
+ * <p>
+ * This is a lane-wise binary operation which produces the result of rotating right the two's
+ * complement binary representation of each lane of first operand (this vector) by input scalar.
+ * Rotation by any multiple of 16 is a no-op, so only the 4 lowest-order bits of input value are used.
+ * It is as if the input value were subjected to a bitwise logical
+ * AND operator ({@code &}) with the mask value 0xF.
+ *
+ * @param s the input scalar; the number of the bits to rotate right
+ * @param m the mask controlling lane selection
+ * @return the result of rotating right this vector by the broadcast of an
+ * input scalar
+ */
+ @ForceInline
+ public final ShortVector rotateRight(int s, VectorMask<Short> m) {
+ return shiftRight(s, m).or(shiftLeft(-s, m), m);
+ }
/**
* {@inheritDoc}
*/
@Override
*** 1116,1126 ****
* operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the addition of all the lane elements of this vector
*/
! public abstract short addAll();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1299,1309 ----
* operation ({@code +}) to lane elements,
* and the identity value is {@code 0}.
*
* @return the addition of all the lane elements of this vector
*/
! public abstract short addLanes();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1129,1150 ****
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract short addAll(VectorMask<Short> m);
/**
* Multiplies all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the
* multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract short mulAll();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1312,1333 ----
* and the identity value is {@code 0}.
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract short addLanes(VectorMask<Short> m);
/**
* Multiplies all lane elements of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the
* multiplication operation ({@code *}) to lane elements,
* and the identity value is {@code 1}.
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract short mulLanes();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1153,1163 ****
* and the identity value is {@code 1}.
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract short mulAll(VectorMask<Short> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 1336,1346 ----
* and the identity value is {@code 1}.
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract short mulLanes(VectorMask<Short> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 1165,1175 ****
* and the identity value is
* {@link Short#MAX_VALUE}.
*
* @return the minimum lane element of this vector
*/
! public abstract short minAll();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1348,1358 ----
* and the identity value is
* {@link Short#MAX_VALUE}.
*
* @return the minimum lane element of this vector
*/
! public abstract short minLanes();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1179,1189 ****
* {@link Short#MAX_VALUE}.
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract short minAll(VectorMask<Short> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 1362,1372 ----
* {@link Short#MAX_VALUE}.
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract short minLanes(VectorMask<Short> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 1191,1201 ****
* and the identity value is
* {@link Short#MIN_VALUE}.
*
* @return the maximum lane element of this vector
*/
! public abstract short maxAll();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1374,1384 ----
* and the identity value is
* {@link Short#MIN_VALUE}.
*
* @return the maximum lane element of this vector
*/
! public abstract short maxLanes();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1205,1226 ****
* {@link Short#MIN_VALUE}.
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract short maxAll(VectorMask<Short> m);
/**
* Logically ORs all lane elements of this vector.
* <p>
* 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 short orAll();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1388,1409 ----
* {@link Short#MIN_VALUE}.
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract short maxLanes(VectorMask<Short> m);
/**
* Logically ORs all lane elements of this vector.
* <p>
* 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 short orLanes();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1229,1250 ****
* 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 short orAll(VectorMask<Short> m);
/**
* Logically ANDs all lane elements of this vector.
* <p>
* 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 short andAll();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1412,1433 ----
* 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 short orLanes(VectorMask<Short> m);
/**
* Logically ANDs all lane elements of this vector.
* <p>
* 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 short andLanes();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1253,1274 ****
* 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 short andAll(VectorMask<Short> m);
/**
* Logically XORs all lane elements of this vector.
* <p>
* 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 short xorAll();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 1436,1457 ----
* 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 short andLanes(VectorMask<Short> m);
/**
* Logically XORs all lane elements of this vector.
* <p>
* 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 short xorLanes();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 1277,1287 ****
* 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
*/
! public abstract short xorAll(VectorMask<Short> m);
// Type specific accessors
/**
* Gets the lane element at lane index {@code i}
--- 1460,1470 ----
* 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
*/
! public abstract short xorLanes(VectorMask<Short> m);
// Type specific accessors
/**
* Gets the lane element at lane index {@code i}
*** 1424,1440 ****
*/
static final class ShortSpecies extends AbstractSpecies<Short> {
final Function<short[], ShortVector> vectorFactory;
private ShortSpecies(VectorShape shape,
! Class<?> boxType,
Class<?> maskType,
Function<short[], ShortVector> vectorFactory,
Function<boolean[], VectorMask<Short>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<Short>> shuffleFromArrayFactory,
fShuffleFromArray<Short> shuffleFromOpFactory) {
! super(shape, short.class, Short.SIZE, boxType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
--- 1607,1623 ----
*/
static final class ShortSpecies extends AbstractSpecies<Short> {
final Function<short[], ShortVector> vectorFactory;
private ShortSpecies(VectorShape shape,
! Class<?> vectorType,
Class<?> maskType,
Function<short[], ShortVector> vectorFactory,
Function<boolean[], VectorMask<Short>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<Short>> shuffleFromArrayFactory,
fShuffleFromArray<Short> shuffleFromOpFactory) {
! super(shape, short.class, Short.SIZE, vectorType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
< prev index next >