< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template
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
*** 113,127 ****
*/
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ zero(VectorSpecies<$Boxtype$> species) {
#if[FP]
! return VectorIntrinsics.broadcastCoerced((Class<$Type$Vector>) species.boxType(), $type$.class, species.length(),
$Type$.$type$To$Bitstype$Bits(0.0f), species,
((bits, s) -> (($Type$Species)s).op(i -> $Type$.$bitstype$BitsTo$Type$(($bitstype$)bits))));
#else[FP]
! return VectorIntrinsics.broadcastCoerced((Class<$Type$Vector>) species.boxType(), $type$.class, species.length(),
0, species,
((bits, s) -> (($Type$Species)s).op(i -> ($type$)bits)));
#end[FP]
}
--- 113,127 ----
*/
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ zero(VectorSpecies<$Boxtype$> species) {
#if[FP]
! return VectorIntrinsics.broadcastCoerced((Class<$Type$Vector>) species.vectorType(), $type$.class, species.length(),
$Type$.$type$To$Bitstype$Bits(0.0f), species,
((bits, s) -> (($Type$Species)s).op(i -> $Type$.$bitstype$BitsTo$Type$(($bitstype$)bits))));
#else[FP]
! return VectorIntrinsics.broadcastCoerced((Class<$Type$Vector>) species.vectorType(), $type$.class, species.length(),
0, species,
((bits, s) -> (($Type$Species)s).op(i -> ($type$)bits)));
#end[FP]
}
*** 148,158 ****
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.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());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
--- 148,158 ----
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ fromByteArray(VectorSpecies<$Boxtype$> species, byte[] a, int offset) {
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.bitSize() / Byte.SIZE);
! return VectorIntrinsics.load((Class<$abstractvectortype$>) species.vectorType(), $type$.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());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
*** 206,216 ****
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> (($Type$Species)s).op(n -> c[idx + n]));
}
--- 206,216 ----
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ fromArray(VectorSpecies<$Boxtype$> species, $type$[] a, int offset){
Objects.requireNonNull(a);
offset = VectorIntrinsics.checkIndex(offset, a.length, species.length());
! return VectorIntrinsics.load((Class<$abstractvectortype$>) species.vectorType(), $type$.class, species.length(),
a, (((long) offset) << ARRAY_SHIFT) + Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
a, offset, species,
(c, idx, s) -> (($Type$Species)s).op(n -> c[idx + n]));
}
*** 279,290 ****
// 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, 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]]));
}
--- 279,290 ----
// 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.vectorType(), $type$.class, species.length(),
! IntVector.species(species.indexShape()).vectorType(), a, Unsafe.ARRAY_$TYPE$_BASE_OFFSET, vix,
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]]));
}
*** 356,366 ****
public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> 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<$abstractvectortype$>) species.boxType(), $type$.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());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
--- 356,366 ----
public static $abstractvectortype$ fromByteBuffer(VectorSpecies<$Boxtype$> 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<$abstractvectortype$>) species.vectorType(), $type$.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());
$Type$Buffer tb = bbc{#if[byte]?;:.as$Type$Buffer();}
*** 412,440 ****
/**
* 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}
*/
#if[FP]
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
! (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$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<$abstractvectortype$>) species.boxType(), $type$.class, species.length(),
e, species,
((bits, sp) -> (($Type$Species)sp).op(i -> ($type$)bits)));
}
#end[FP]
--- 412,440 ----
/**
* 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}
*/
#if[FP]
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ broadcast(VectorSpecies<$Boxtype$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<$abstractvectortype$>) species.vectorType(), $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$> species, $type$ e) {
return VectorIntrinsics.broadcastCoerced(
! (Class<$abstractvectortype$>) species.vectorType(), $type$.class, species.length(),
e, species,
((bits, sp) -> (($Type$Species)sp).op(i -> ($type$)bits)));
}
#end[FP]
*** 455,465 ****
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ scalars(VectorSpecies<$Boxtype$> species, $type$... es) {
Objects.requireNonNull(es);
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, species,
(c, idx, sp) -> (($Type$Species)sp).op(n -> c[idx + n]));
}
--- 455,465 ----
@ForceInline
@SuppressWarnings("unchecked")
public static $abstractvectortype$ scalars(VectorSpecies<$Boxtype$> species, $type$... es) {
Objects.requireNonNull(es);
int ix = VectorIntrinsics.checkIndex(0, es.length, species.length());
! return VectorIntrinsics.load((Class<$abstractvectortype$>) species.vectorType(), $type$.class, species.length(),
es, Unsafe.ARRAY_$TYPE$_BASE_OFFSET,
es, ix, species,
(c, idx, sp) -> (($Type$Species)sp).op(n -> c[idx + n]));
}
*** 851,879 ****
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ rotateEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ rotateER(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ shiftEL(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ shiftER(int i);
#if[FP]
/**
* Divides this vector by an input vector.
* <p>
--- 851,879 ----
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ rotateLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ rotateLanesRight(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ shiftLanesLeft(int i);
/**
* {@inheritDoc}
*/
@Override
! public abstract $abstractvectortype$ shiftLanesRight(int i);
#if[FP]
/**
* Divides this vector by an input vector.
* <p>
*** 1901,2385 ****
* @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 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
- */
#end[byte]
#if[short]
! /**
! * 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
- */
#end[short]
- #if[intOrLong]
- /**
- * 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.
*
* @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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ shiftL(int s);
- #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 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
- */
#end[byte]
#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 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
- */
#end[short]
- #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 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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ shiftL(int s, VectorMask<$Boxtype$> m);
- #if[intOrLong]
/**
* 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.
*
* @param v the input vector
* @return the result of logically left shifting this vector by the input
* vector
*/
! public abstract $abstractvectortype$ shiftL(Vector<$Boxtype$> 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.
*
* @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 $abstractvectortype$ shiftL(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m) {
! return bOp(v, m, (i, a, b) -> ($type$) (a << b));
}
- #end[intOrLong]
// logical, or unsigned, shift right
- #if[byte]
/**
* 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
- */
#end[byte]
#if[short]
! /**
! * 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
- */
#end[short]
- #if[intOrLong]
- /**
- * 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.
*
* @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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ shiftR(int s);
- #if[byte]
/**
* 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
- */
#end[byte]
#if[short]
! /**
! * 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
- */
#end[short]
- #if[intOrLong]
- /**
- * 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.
*
* @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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ shiftR(int s, VectorMask<$Boxtype$> m);
- #if[intOrLong]
/**
* 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.
*
* @param v the input vector
* @return the result of logically right shifting this vector by the
* input vector
*/
! public abstract $abstractvectortype$ shiftR(Vector<$Boxtype$> 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.
*
* @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 $abstractvectortype$ shiftR(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m) {
! return bOp(v, m, (i, a, b) -> ($type$) (a >>> b));
}
- #end[intOrLong]
- #if[byte]
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* 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.
- *
- * @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
- */
#end[byte]
#if[short]
- /**
- * Arithmetically right shifts (or signed right shifts) this vector by the
- * broadcast of an input scalar.
- * <p>
- * 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.
- *
- * @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
- */
#end[short]
- #if[intOrLong]
- /**
- * Arithmetically right shifts (or signed right shifts) this vector by the
- * broadcast of an input scalar.
- * <p>
- * 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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ aShiftR(int s);
- #if[byte]
/**
* 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 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.
- *
- * @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
- */
#end[byte]
#if[short]
- /**
- * 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 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.
- *
- * @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
- */
#end[short]
- #if[intOrLong]
- /**
- * 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 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
*/
! #end[intOrLong]
! public abstract $abstractvectortype$ aShiftR(int s, VectorMask<$Boxtype$> m);
- #if[intOrLong]
/**
* 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.
*
* @param v the input vector
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public abstract $abstractvectortype$ aShiftR(Vector<$Boxtype$> 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.
*
* @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 $abstractvectortype$ aShiftR(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m) {
! return bOp(v, m, (i, a, b) -> ($type$) (a >> b));
}
/**
* Rotates left this vector by the broadcast of an input scalar.
* <p>
* 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
* @return the result of rotating left this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final $abstractvectortype$ rotateL(int s) {
! return shiftL(s).or(shiftR(-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 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
* @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 $abstractvectortype$ rotateL(int s, VectorMask<$Boxtype$> m) {
! return shiftL(s, m).or(shiftR(-s, m), m);
}
/**
* Rotates right this vector by the broadcast of an input scalar.
* <p>
* 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
* @return the result of rotating right this vector by the broadcast of an
* input scalar
*/
@ForceInline
! public final $abstractvectortype$ rotateR(int s) {
! return shiftR(s).or(shiftL(-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 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
* @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 $abstractvectortype$ rotateR(int s, VectorMask<$Boxtype$> m) {
! return shiftR(s, m).or(shiftL(-s, m), m);
}
- #end[intOrLong]
#end[BITWISE]
/**
* {@inheritDoc}
*/
--- 1901,2351 ----
* @param m the mask controlling lane selection
* @return the bitwise NOT of this vector
*/
public abstract $abstractvectortype$ not(VectorMask<$Boxtype$> m);
/**
* 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.
! #if[byte]
! * 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.
#end[byte]
#if[short]
! * 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.
#end[short]
*
* @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 $abstractvectortype$ 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.
! #if[byte]
! * 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.
#end[byte]
#if[short]
! * 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.
#end[short]
*
* @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 $abstractvectortype$ shiftLeft(int s, VectorMask<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @param v the input vector
* @return the result of logically left shifting this vector by the input
* vector
*/
! public abstract $abstractvectortype$ shiftLeft(Vector<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @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 $abstractvectortype$ shiftLeft(Vector<$Boxtype$> v, VectorMask<$Boxtype$> 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.
! #if[byte]
! * 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.
#end[byte]
#if[short]
! * 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.
#end[short]
*
* @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 $abstractvectortype$ 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.
! #if[byte]
! * 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.
#end[byte]
#if[short]
! * 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.
#end[short]
*
* @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 $abstractvectortype$ shiftRight(int s, VectorMask<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @param v the input vector
* @return the result of logically right shifting this vector by the
* input vector
*/
! public abstract $abstractvectortype$ shiftRight(Vector<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @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 $abstractvectortype$ shiftRight(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m) {
! return blend(shiftRight(v), m);
}
/**
* Arithmetically right shifts (or signed right shifts) this vector by the
* broadcast of an input scalar.
* <p>
* 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.
+ #if[byte]
* 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.
#end[byte]
#if[short]
* 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.
#end[short]
*
* @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 $abstractvectortype$ 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.
* <p>
* 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.
+ #if[byte]
* 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.
#end[byte]
#if[short]
* 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.
#end[short]
*
* @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 $abstractvectortype$ shiftArithmeticRight(int s, VectorMask<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @param v the input vector
* @return the result of arithmetically right shifting this vector by the
* input vector
*/
! public abstract $abstractvectortype$ shiftArithmeticRight(Vector<$Boxtype$> 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.
! #if[byte]
! * 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.
! #end[byte]
! #if[short]
! * 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.
! #end[short]
*
* @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 $abstractvectortype$ shiftArithmeticRight(Vector<$Boxtype$> v, VectorMask<$Boxtype$> m) {
! return blend(shiftArithmeticRight(v), m);
}
/**
* Rotates left this vector by the broadcast of an input scalar.
* <p>
+ #if[intOrLong]
* 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).
+ #end[intOrLong]
+ #if[byte]
+ * 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.
+ #end[byte]
+ #if[short]
+ * 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.
+ #end[short]
*
* @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 $abstractvectortype$ 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>
+ #if[intOrLong]
* 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).
+ #end[intOrLong]
+ #if[byte]
+ * 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.
+ #end[byte]
+ #if[short]
+ * 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.
+ #end[short]
*
* @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 $abstractvectortype$ rotateLeft(int s, VectorMask<$Boxtype$> m) {
! return shiftLeft(s, m).or(shiftRight(-s, m), m);
}
/**
* Rotates right this vector by the broadcast of an input scalar.
* <p>
+ #if[intOrLong]
* 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).
+ #end[intOrLong]
+ #if[byte]
+ * 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.
+ #end[byte]
+ #if[short]
+ * 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.
+ #end[short]
*
* @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 $abstractvectortype$ 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>
+ #if[intOrLong]
* 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).
+ #end[intOrLong]
+ #if[byte]
+ * 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.
+ #end[byte]
+ #if[short]
+ * 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.
+ #end[short]
*
* @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 $abstractvectortype$ rotateRight(int s, VectorMask<$Boxtype$> m) {
! return shiftRight(s, m).or(shiftLeft(-s, m), m);
}
#end[BITWISE]
/**
* {@inheritDoc}
*/
*** 2428,2438 ****
* and the identity value is {@code 0}.
#end[FP]
*
* @return the addition of all the lane elements of this vector
*/
! public abstract $type$ addAll();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 2394,2404 ----
* and the identity value is {@code 0}.
#end[FP]
*
* @return the addition of all the lane elements of this vector
*/
! public abstract $type$ addLanes();
/**
* Adds all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2456,2466 ****
#end[FP]
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract $type$ addAll(VectorMask<$Boxtype$> m);
/**
* Multiplies all lane elements of this vector.
* <p>
#if[FP]
--- 2422,2432 ----
#end[FP]
*
* @param m the mask controlling lane selection
* @return the addition of the selected lane elements of this vector
*/
! public abstract $type$ addLanes(VectorMask<$Boxtype$> m);
/**
* Multiplies all lane elements of this vector.
* <p>
#if[FP]
*** 2481,2491 ****
* and the identity value is {@code 1}.
#end[FP]
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract $type$ mulAll();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 2447,2457 ----
* and the identity value is {@code 1}.
#end[FP]
*
* @return the multiplication of all the lane elements of this vector
*/
! public abstract $type$ mulLanes();
/**
* Multiplies all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2508,2518 ****
#end[FP]
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract $type$ mulAll(VectorMask<$Boxtype$> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 2474,2484 ----
#end[FP]
*
* @param m the mask controlling lane selection
* @return the multiplication of all the lane elements of this vector
*/
! public abstract $type$ mulLanes(VectorMask<$Boxtype$> m);
/**
* Returns the minimum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 2524,2534 ****
* {@link $Boxtype$#MAX_VALUE}.
#end[FP]
*
* @return the minimum lane element of this vector
*/
! public abstract $type$ minAll();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 2490,2500 ----
* {@link $Boxtype$#MAX_VALUE}.
#end[FP]
*
* @return the minimum lane element of this vector
*/
! public abstract $type$ minLanes();
/**
* Returns the minimum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2542,2552 ****
#end[FP]
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract $type$ minAll(VectorMask<$Boxtype$> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
--- 2508,2518 ----
#end[FP]
*
* @param m the mask controlling lane selection
* @return the minimum lane element of this vector
*/
! public abstract $type$ minLanes(VectorMask<$Boxtype$> m);
/**
* Returns the maximum lane element of this vector.
* <p>
* This is an associative cross-lane reduction operation which applies the operation
*** 2558,2568 ****
* {@link $Boxtype$#MIN_VALUE}.
#end[FP]
*
* @return the maximum lane element of this vector
*/
! public abstract $type$ maxAll();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
--- 2524,2534 ----
* {@link $Boxtype$#MIN_VALUE}.
#end[FP]
*
* @return the maximum lane element of this vector
*/
! public abstract $type$ maxLanes();
/**
* Returns the maximum lane element of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2576,2586 ****
#end[FP]
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract $type$ maxAll(VectorMask<$Boxtype$> m);
#if[BITWISE]
/**
* Logically ORs all lane elements of this vector.
* <p>
--- 2542,2552 ----
#end[FP]
*
* @param m the mask controlling lane selection
* @return the maximum lane element of this vector
*/
! public abstract $type$ maxLanes(VectorMask<$Boxtype$> m);
#if[BITWISE]
/**
* Logically ORs all lane elements of this vector.
* <p>
*** 2588,2598 ****
* 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>
--- 2554,2564 ----
* 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$ orLanes();
/**
* Logically ORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2601,2622 ****
* 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 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>
--- 2567,2588 ----
* 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$ orLanes(VectorMask<$Boxtype$> 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 $type$ andLanes();
/**
* Logically ANDs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2625,2646 ****
* 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 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>
--- 2591,2612 ----
* 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$ andLanes(VectorMask<$Boxtype$> 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 $type$ xorLanes();
/**
* Logically XORs all lane elements of this vector, selecting lane elements
* controlled by a mask.
* <p>
*** 2649,2659 ****
* 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 $type$ xorAll(VectorMask<$Boxtype$> m);
#end[BITWISE]
// Type specific accessors
/**
--- 2615,2625 ----
* 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 $type$ xorLanes(VectorMask<$Boxtype$> m);
#end[BITWISE]
// Type specific accessors
/**
*** 2805,2821 ****
*/
static final class $Type$Species extends AbstractSpecies<$Boxtype$> {
final Function<$type$[], $Type$Vector> vectorFactory;
private $Type$Species(VectorShape shape,
! Class<?> boxType,
Class<?> maskType,
Function<$type$[], $Type$Vector> vectorFactory,
Function<boolean[], VectorMask<$Boxtype$>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<$Boxtype$>> shuffleFromArrayFactory,
fShuffleFromArray<$Boxtype$> shuffleFromOpFactory) {
! super(shape, $type$.class, $Boxtype$.SIZE, boxType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
--- 2771,2787 ----
*/
static final class $Type$Species extends AbstractSpecies<$Boxtype$> {
final Function<$type$[], $Type$Vector> vectorFactory;
private $Type$Species(VectorShape shape,
! Class<?> vectorType,
Class<?> maskType,
Function<$type$[], $Type$Vector> vectorFactory,
Function<boolean[], VectorMask<$Boxtype$>> maskFactory,
Function<IntUnaryOperator, VectorShuffle<$Boxtype$>> shuffleFromArrayFactory,
fShuffleFromArray<$Boxtype$> shuffleFromOpFactory) {
! super(shape, $type$.class, $Boxtype$.SIZE, vectorType, maskType, maskFactory,
shuffleFromArrayFactory, shuffleFromOpFactory);
this.vectorFactory = vectorFactory;
}
interface FOp {
< prev index next >