< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.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

*** 109,119 **** * @return a zero vector of given species */ @ForceInline @SuppressWarnings("unchecked") public static ByteVector zero(VectorSpecies<Byte> species) { ! return VectorIntrinsics.broadcastCoerced((Class<ByteVector>) species.boxType(), byte.class, species.length(), 0, species, ((bits, s) -> ((ByteSpecies)s).op(i -> (byte)bits))); } /** --- 109,119 ---- * @return a zero vector of given species */ @ForceInline @SuppressWarnings("unchecked") public static ByteVector zero(VectorSpecies<Byte> species) { ! return VectorIntrinsics.broadcastCoerced((Class<ByteVector>) species.vectorType(), byte.class, species.length(), 0, species, ((bits, s) -> ((ByteSpecies)s).op(i -> (byte)bits))); } /**
*** 139,149 **** @ForceInline @SuppressWarnings("unchecked") public static ByteVector fromByteArray(VectorSpecies<Byte> species, byte[] a, int offset) { Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE); ! return VectorIntrinsics.load((Class<ByteVector>) species.boxType(), byte.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()); ByteBuffer tb = bbc; --- 139,149 ---- @ForceInline @SuppressWarnings("unchecked") public static ByteVector fromByteArray(VectorSpecies<Byte> species, byte[] a, int offset) { Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE); ! return VectorIntrinsics.load((Class<ByteVector>) species.vectorType(), byte.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()); ByteBuffer tb = bbc;
*** 197,207 **** @ForceInline @SuppressWarnings("unchecked") public static ByteVector fromArray(VectorSpecies<Byte> species, byte[] a, int offset){ Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.length()); ! return VectorIntrinsics.load((Class<ByteVector>) species.boxType(), byte.class, species.length(), a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_BYTE_BASE_OFFSET, a, offset, species, (c, idx, s) -> ((ByteSpecies)s).op(n -> c[idx + n])); } --- 197,207 ---- @ForceInline @SuppressWarnings("unchecked") public static ByteVector fromArray(VectorSpecies<Byte> species, byte[] a, int offset){ Objects.requireNonNull(a); offset = VectorIntrinsics.checkIndex(offset, a.length, species.length()); ! return VectorIntrinsics.load((Class<ByteVector>) species.vectorType(), byte.class, species.length(), a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_BYTE_BASE_OFFSET, a, offset, species, (c, idx, s) -> ((ByteSpecies)s).op(n -> c[idx + n])); }
*** 310,320 **** public static ByteVector fromByteBuffer(VectorSpecies<Byte> 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<ByteVector>) species.boxType(), byte.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()); ByteBuffer tb = bbc; --- 310,320 ---- public static ByteVector fromByteBuffer(VectorSpecies<Byte> 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<ByteVector>) species.vectorType(), byte.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()); ByteBuffer tb = bbc;
*** 366,384 **** /** * 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 ByteVector broadcast(VectorSpecies<Byte> species, byte e) { return VectorIntrinsics.broadcastCoerced( ! (Class<ByteVector>) species.boxType(), byte.class, species.length(), e, species, ((bits, sp) -> ((ByteSpecies)sp).op(i -> (byte)bits))); } /** --- 366,384 ---- /** * 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 ByteVector broadcast(VectorSpecies<Byte> species, byte e) { return VectorIntrinsics.broadcastCoerced( ! (Class<ByteVector>) species.vectorType(), byte.class, species.length(), e, species, ((bits, sp) -> ((ByteSpecies)sp).op(i -> (byte)bits))); } /**
*** 398,408 **** @ForceInline @SuppressWarnings("unchecked") public static ByteVector scalars(VectorSpecies<Byte> species, byte... es) { Objects.requireNonNull(es); int ix = VectorIntrinsics.checkIndex(0, es.length, species.length()); ! return VectorIntrinsics.load((Class<ByteVector>) species.boxType(), byte.class, species.length(), es, Unsafe.ARRAY_BYTE_BASE_OFFSET, es, ix, species, (c, idx, sp) -> ((ByteSpecies)sp).op(n -> c[idx + n])); } --- 398,408 ---- @ForceInline @SuppressWarnings("unchecked") public static ByteVector scalars(VectorSpecies<Byte> species, byte... es) { Objects.requireNonNull(es); int ix = VectorIntrinsics.checkIndex(0, es.length, species.length()); ! return VectorIntrinsics.load((Class<ByteVector>) species.vectorType(), byte.class, species.length(), es, Unsafe.ARRAY_BYTE_BASE_OFFSET, es, ix, species, (c, idx, sp) -> ((ByteSpecies)sp).op(n -> c[idx + n])); }
*** 776,804 **** /** * {@inheritDoc} */ @Override ! public abstract ByteVector rotateEL(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector rotateER(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector shiftEL(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector shiftER(int i); /** * Bitwise ANDs this vector with an input vector. --- 776,804 ---- /** * {@inheritDoc} */ @Override ! public abstract ByteVector rotateLanesLeft(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector rotateLanesRight(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector shiftLanesLeft(int i); /** * {@inheritDoc} */ @Override ! public abstract ByteVector shiftLanesRight(int i); /** * Bitwise ANDs this vector with an input vector.
*** 974,1051 **** /** * 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 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. * * @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 ByteVector 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 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. * * @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 ByteVector shiftL(int s, VectorMask<Byte> 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 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. * * @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 ByteVector 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 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. * * @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 ByteVector shiftR(int s, VectorMask<Byte> m); /** * Arithmetically right shifts (or signed right shifts) this vector by the * broadcast of an input scalar. * <p> --- 974,1122 ---- /** * 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 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. * * @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 ByteVector 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 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. * * @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 ByteVector shiftLeft(int s, VectorMask<Byte> 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 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. + * + * @param v the input vector + * @return the result of logically left shifting this vector by the input + * vector + */ + public abstract ByteVector shiftLeft(Vector<Byte> 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 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. + * + * @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 ByteVector shiftLeft(Vector<Byte> v, VectorMask<Byte> 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 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. * * @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 ByteVector 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 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. * * @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 ByteVector shiftRight(int s, VectorMask<Byte> 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 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. ! * ! * @param v the input vector ! * @return the result of logically right shifting this vector by the ! * input vector ! */ ! public abstract ByteVector shiftRight(Vector<Byte> 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 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. + * + * @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 ByteVector shiftRight(Vector<Byte> v, VectorMask<Byte> m) { + return blend(shiftRight(v), m); + } /** * Arithmetically right shifts (or signed right shifts) this vector by the * broadcast of an input scalar. * <p>
*** 1058,1068 **** * * @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 ByteVector 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. --- 1129,1139 ---- * * @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 ByteVector 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.
*** 1077,1088 **** * @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 ByteVector aShiftR(int s, VectorMask<Byte> m); /** * {@inheritDoc} */ @Override --- 1148,1271 ---- * @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 ByteVector shiftArithmeticRight(int s, VectorMask<Byte> 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 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. ! * ! * @param v the input vector ! * @return the result of arithmetically right shifting this vector by the ! * input vector ! */ ! public abstract ByteVector shiftArithmeticRight(Vector<Byte> 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 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. ! * ! * @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 ByteVector shiftArithmeticRight(Vector<Byte> v, VectorMask<Byte> 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 8 is a no-op, so only the 3 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 0x7. ! * ! * @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 ByteVector 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 8 is a no-op, so only the 3 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 0x7. ! * ! * @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 ByteVector rotateLeft(int s, VectorMask<Byte> 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 8 is a no-op, so only the 3 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 0x7. + * + * @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 ByteVector 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 8 is a no-op, so only the 3 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 0x7. + * + * @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 ByteVector rotateRight(int s, VectorMask<Byte> m) { + return shiftRight(s, m).or(shiftLeft(-s, m), m); + } /** * {@inheritDoc} */ @Override
*** 1115,1125 **** * 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 byte addAll(); /** * Adds all lane elements of this vector, selecting lane elements * controlled by a mask. * <p> --- 1298,1308 ---- * 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 byte addLanes(); /** * Adds all lane elements of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1128,1149 **** * 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 byte addAll(VectorMask<Byte> 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 byte mulAll(); /** * Multiplies all lane elements of this vector, selecting lane elements * controlled by a mask. * <p> --- 1311,1332 ---- * 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 byte addLanes(VectorMask<Byte> 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 byte mulLanes(); /** * Multiplies all lane elements of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1152,1162 **** * 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 byte mulAll(VectorMask<Byte> m); /** * Returns the minimum lane element of this vector. * <p> * This is an associative cross-lane reduction operation which applies the operation --- 1335,1345 ---- * 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 byte mulLanes(VectorMask<Byte> m); /** * Returns the minimum lane element of this vector. * <p> * This is an associative cross-lane reduction operation which applies the operation
*** 1164,1174 **** * and the identity value is * {@link Byte#MAX_VALUE}. * * @return the minimum lane element of this vector */ ! public abstract byte minAll(); /** * Returns the minimum lane element of this vector, selecting lane elements * controlled by a mask. * <p> --- 1347,1357 ---- * and the identity value is * {@link Byte#MAX_VALUE}. * * @return the minimum lane element of this vector */ ! public abstract byte minLanes(); /** * Returns the minimum lane element of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1178,1188 **** * {@link Byte#MAX_VALUE}. * * @param m the mask controlling lane selection * @return the minimum lane element of this vector */ ! public abstract byte minAll(VectorMask<Byte> m); /** * Returns the maximum lane element of this vector. * <p> * This is an associative cross-lane reduction operation which applies the operation --- 1361,1371 ---- * {@link Byte#MAX_VALUE}. * * @param m the mask controlling lane selection * @return the minimum lane element of this vector */ ! public abstract byte minLanes(VectorMask<Byte> m); /** * Returns the maximum lane element of this vector. * <p> * This is an associative cross-lane reduction operation which applies the operation
*** 1190,1200 **** * and the identity value is * {@link Byte#MIN_VALUE}. * * @return the maximum lane element of this vector */ ! public abstract byte maxAll(); /** * Returns the maximum lane element of this vector, selecting lane elements * controlled by a mask. * <p> --- 1373,1383 ---- * and the identity value is * {@link Byte#MIN_VALUE}. * * @return the maximum lane element of this vector */ ! public abstract byte maxLanes(); /** * Returns the maximum lane element of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1204,1225 **** * {@link Byte#MIN_VALUE}. * * @param m the mask controlling lane selection * @return the maximum lane element of this vector */ ! public abstract byte maxAll(VectorMask<Byte> 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 byte orAll(); /** * Logically ORs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p> --- 1387,1408 ---- * {@link Byte#MIN_VALUE}. * * @param m the mask controlling lane selection * @return the maximum lane element of this vector */ ! public abstract byte maxLanes(VectorMask<Byte> 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 byte orLanes(); /** * Logically ORs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1228,1249 **** * 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 byte orAll(VectorMask<Byte> 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 byte andAll(); /** * Logically ANDs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p> --- 1411,1432 ---- * 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 byte orLanes(VectorMask<Byte> 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 byte andLanes(); /** * Logically ANDs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1252,1273 **** * 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 byte andAll(VectorMask<Byte> 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 byte xorAll(); /** * Logically XORs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p> --- 1435,1456 ---- * 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 byte andLanes(VectorMask<Byte> 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 byte xorLanes(); /** * Logically XORs all lane elements of this vector, selecting lane elements * controlled by a mask. * <p>
*** 1276,1286 **** * 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 byte xorAll(VectorMask<Byte> m); // Type specific accessors /** * Gets the lane element at lane index {@code i} --- 1459,1469 ---- * 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 byte xorLanes(VectorMask<Byte> m); // Type specific accessors /** * Gets the lane element at lane index {@code i}
*** 1423,1439 **** */ static final class ByteSpecies extends AbstractSpecies<Byte> { final Function<byte[], ByteVector> vectorFactory; private ByteSpecies(VectorShape shape, ! Class<?> boxType, Class<?> maskType, Function<byte[], ByteVector> vectorFactory, Function<boolean[], VectorMask<Byte>> maskFactory, Function<IntUnaryOperator, VectorShuffle<Byte>> shuffleFromArrayFactory, fShuffleFromArray<Byte> shuffleFromOpFactory) { ! super(shape, byte.class, Byte.SIZE, boxType, maskType, maskFactory, shuffleFromArrayFactory, shuffleFromOpFactory); this.vectorFactory = vectorFactory; } interface FOp { --- 1606,1622 ---- */ static final class ByteSpecies extends AbstractSpecies<Byte> { final Function<byte[], ByteVector> vectorFactory; private ByteSpecies(VectorShape shape, ! Class<?> vectorType, Class<?> maskType, Function<byte[], ByteVector> vectorFactory, Function<boolean[], VectorMask<Byte>> maskFactory, Function<IntUnaryOperator, VectorShuffle<Byte>> shuffleFromArrayFactory, fShuffleFromArray<Byte> shuffleFromOpFactory) { ! super(shape, byte.class, Byte.SIZE, vectorType, maskType, maskFactory, shuffleFromArrayFactory, shuffleFromOpFactory); this.vectorFactory = vectorFactory; } interface FOp {
< prev index next >