* 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 + * 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. - * - * @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. - *

- * 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 + * 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. - *

- * 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); + public abstract \$abstractvectortype\$ shiftLeft(int s); -#if[byte] /** * Logically left shifts this vector by the broadcast of an input scalar, * selecting lane elements controlled by a mask. *

* 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 + * 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. - * - * @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. - *

- * 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 + * 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. - *

- * 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 + * @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, VectorMask<\$Boxtype\$> m); + public abstract \$abstractvectortype\$ shiftLeft(int s, VectorMask<\$Boxtype\$> m); -#if[intOrLong] /** * Logically left shifts this vector by an input vector. *

* This is a lane-wise binary operation which applies the primitive logical left shift - * operation ({@code <<}) to each lane. + * 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\$ shiftL(Vector<\$Boxtype\$> v); + public abstract \$abstractvectortype\$ shiftLeft(Vector<\$Boxtype\$> v); /** * Logically left shifts this vector by an input vector, selecting lane * elements controlled by a mask. *

* This is a lane-wise binary operation which applies the primitive logical left shift - * operation ({@code <<}) to each lane. + * 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\$ shiftL(Vector<\$Boxtype\$> v, VectorMask<\$Boxtype\$> m) { - return bOp(v, m, (i, a, b) -> (\$type\$) (a << b)); + public \$abstractvectortype\$ shiftLeft(Vector<\$Boxtype\$> v, VectorMask<\$Boxtype\$> m) { + return blend(shiftLeft(v), m); } -#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. *

* 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 + * 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. - * - * @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. - *

- * 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 + * 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. - *

- * 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); + public abstract \$abstractvectortype\$ shiftRight(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 @@ -2090,85 +2034,76 @@ *

* 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 + * 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. - * - * @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. - *

- * 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 + * 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. - *

- * 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); + public abstract \$abstractvectortype\$ shiftRight(int s, VectorMask<\$Boxtype\$> m); -#if[intOrLong] /** * Logically right shifts (or unsigned right shifts) this vector by an * input vector. *

* This is a lane-wise binary operation which applies the primitive logical right shift - * operation ({@code >>>}) to each lane. + * 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\$ shiftR(Vector<\$Boxtype\$> v); + 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. *

* This is a lane-wise binary operation which applies the primitive logical right shift - * operation ({@code >>>}) to each lane. + * 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\$ shiftR(Vector<\$Boxtype\$> v, VectorMask<\$Boxtype\$> m) { - return bOp(v, m, (i, a, b) -> (\$type\$) (a >>> b)); + public \$abstractvectortype\$ shiftRight(Vector<\$Boxtype\$> v, VectorMask<\$Boxtype\$> m) { + return blend(shiftRight(v), m); } -#end[intOrLong] -#if[byte] /** * Arithmetically right shifts (or signed right shifts) this vector by the * broadcast of an input scalar. @@ -2176,48 +2111,23 @@ * 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. - * - * @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. - *

- * 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. - *

- * 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); + public abstract \$abstractvectortype\$ shiftArithmeticRight(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 @@ -2226,109 +2136,134 @@ * 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. - * - * @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. - *

- * 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. - *

- * 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); + public abstract \$abstractvectortype\$ shiftArithmeticRight(int s, VectorMask<\$Boxtype\$> m); -#if[intOrLong] /** * Arithmetically right shifts (or signed right shifts) this vector by an * input vector. *

* This is a lane-wise binary operation which applies the primitive arithmetic right - * shift operation ({@code >>}) to each lane. + * 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\$ aShiftR(Vector<\$Boxtype\$> v); + 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. *

* This is a lane-wise binary operation which applies the primitive arithmetic right - * shift operation ({@code >>}) to each lane. + * 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\$ aShiftR(Vector<\$Boxtype\$> v, VectorMask<\$Boxtype\$> m) { - return bOp(v, m, (i, a, b) -> (\$type\$) (a >> b)); + 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. *

+#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 0x15. +#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\$ rotateL(int s) { - return shiftL(s).or(shiftR(-s)); + 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. *

+#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 0x15. +#end[short] * * @param s the input scalar; the number of the bits to rotate left * @param m the mask controlling lane selection @@ -2336,37 +2271,69 @@ * input scalar */ @ForceInline - public final \$abstractvectortype\$ rotateL(int s, VectorMask<\$Boxtype\$> m) { - return shiftL(s, m).or(shiftR(-s, m), m); + 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. *

+#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 0x15. +#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\$ rotateR(int s) { - return shiftR(s).or(shiftL(-s)); + 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. *