java.lang.Object
jdk.incubator.vector.VectorOperators
This class consists solely of static constants
 that describe lane-wise vector operations, plus nested interfaces
 which classify them.
 The static constants serve as tokens denoting specifically
 requested lane operations in vector expressions, such
 as the token 
ADD in
 w = v0.lanewise(ADD, v1).
 The documentation for each individual operator token is very brief, giving a symbolic Java expression for the operation that the token requests. Those symbolic expressions use the following conventional elements:
- a,- b,- c— names of lane values
- Java operators like +,?:, etc. — expression operators
- Java method names like max,sin, etc. — methods in standard classes likeMath,Double, etc. Unqualified method names should be read as if in the context of a static import, and with resolution of overloading.
- bits(x)— a function call which produces the underlying bits of the value- x. If- xis a floating point value, this is either- doubleToLongBits(x)or- floatToIntBits(x). Otherwise, the value is just- x.
- ESIZE— the size in bytes of the operand type
- EMASK— the bit mask of the operand type, where- EMASK=(1<<(ESIZE*8))-1
- intVal,- byteVal, etc. — the operand of a conversion, with the indicated type
Operations on floating point vectors
- Lane-wise vector operations that apply to floating point vectors
 follow the accuracy and monotonicity specifications of the equivalent
 Java operation or method mentioned in its documentation unless specified otherwise.
 If the vector element type is floatand the Java operation or method only accepts and returnsdoublevalues, then the scalar operation on each lane is adapted to cast operands and the result, specifically wideningfloatoperands todoubleoperands and narrowing thedoubleresult to afloat.
- Certain associative operations that apply to floating point
 vectors are not truly associative on the floating point lane values.
 Specifically, ADDandMULused with cross-lane reduction operations, such asFloatVector.reduceLanes(Associative). The result of such an operation is a function both of the input values (vector and mask) as well as the order of the scalar operations applied to combine lane values. In such cases the order is intentionally not defined. This allows the JVM to generate optimal machine code for the underlying platform at runtime. If the platform supports a vector instruction to add or multiply all values in the vector, or if there is some other efficient machine code sequence, then the JVM has the option of generating this machine code. Otherwise, the default implementation is applied, which adds vector elements sequentially from beginning to end. For this reason, the result of such an operation may vary for the same input values.
 Note that a particular operator token may apply to several
 different lane types.  Thus, these tokens behave like overloaded
 operators or methods, not like type-specific method handles or
 lambdas.  Also unlike method handles or lambdas, these operators do
 not possess operational semantics; they have no apply or
 invoke method.  They are used only to request lane
 operations from vector objects, and cannot (by themselves) perform
 operations on individual lane values.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceType for all reassociating lane-wise binary operators, usable in expressions likee = v0.reduceLanes(ADD).static interfacestatic interfacestatic interfacestatic interfaceRoot type for all operator tokens, providing queries for common properties such as arity, argument and return types, symbolic name, and operator name.static interfacestatic interfacestatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final VectorOperators.UnaryProduceabs(a).static final VectorOperators.UnaryProduceacos(a).static final VectorOperators.AssociativeProducea+b.static final VectorOperators.AssociativeProducea&b.static final VectorOperators.BinaryProducea&~b.static final VectorOperators.BinaryProducea>>(n&(ESIZE*8-1)).static final VectorOperators.UnaryProduceasin(a).static final VectorOperators.UnaryProduceatan(a).static final VectorOperators.BinaryProduceatan2(a,b).static final VectorOperators.Conversion<Byte, Double> ConvertbyteValto(double)byteVal.static final VectorOperators.Conversion<Byte, Float> ConvertbyteValto(float)byteVal.static final VectorOperators.Conversion<Byte, Integer> ConvertbyteValto(int)byteVal.static final VectorOperators.Conversion<Byte, Long> ConvertbyteValto(long)byteVal.static final VectorOperators.Conversion<Byte, Short> ConvertbyteValto(short)byteVal.static final VectorOperators.UnaryProducebitCount(a)static final VectorOperators.TernaryProducea^((a^b)&c).static final VectorOperators.UnaryProducecbrt(a).static final VectorOperators.BinaryProducecompress(a,n).static final VectorOperators.UnaryProducecos(a).static final VectorOperators.UnaryProducecosh(a).static final VectorOperators.Conversion<Double, Byte> ConvertdoubleValto(byte)doubleVal.static final VectorOperators.Conversion<Double, Float> ConvertdoubleValto(float)doubleVal.static final VectorOperators.Conversion<Double, Integer> ConvertdoubleValto(int)doubleVal.static final VectorOperators.Conversion<Double, Long> ConvertdoubleValto(long)doubleVal.static final VectorOperators.Conversion<Double, Short> ConvertdoubleValto(short)doubleVal.static final VectorOperators.BinaryProducea/b.static final VectorOperators.ComparisonComparea==b.static final VectorOperators.UnaryProduceexp(a).static final VectorOperators.BinaryProduceexpand(a,n).static final VectorOperators.UnaryProduceexpm1(a).static final VectorOperators.Conversion<Float, Byte> ConvertfloatValto(byte)floatVal.static final VectorOperators.Conversion<Float, Double> ConvertfloatValto(double)floatVal.static final VectorOperators.Conversion<Float, Integer> ConvertfloatValto(int)floatVal.static final VectorOperators.Conversion<Float, Long> ConvertfloatValto(long)floatVal.static final VectorOperators.Conversion<Float, Short> ConvertfloatValto(short)floatVal.static final VectorOperators.AssociativeProducebits(a)!=0?a:b.static final VectorOperators.TernaryProducefma(a,b,c).static final VectorOperators.ComparisonComparea>=b.static final VectorOperators.ComparisonComparea>b.static final VectorOperators.BinaryProducehypot(a,b).static final VectorOperators.Conversion<Integer, Byte> ConvertintValto(byte)intVal.static final VectorOperators.Conversion<Integer, Double> ConvertintValto(double)intVal.static final VectorOperators.Conversion<Integer, Float> ConvertintValto(float)intVal.static final VectorOperators.Conversion<Integer, Long> ConvertintValto(long)intVal.static final VectorOperators.Conversion<Integer, Short> ConvertintValto(short)intVal.static final VectorOperators.TestTestbits(a)==0.static final VectorOperators.TestTestisFinite(a).static final VectorOperators.TestTestisInfinite(a).static final VectorOperators.TestTestisNaN(a).static final VectorOperators.TestTestbits(a)<0.static final VectorOperators.Conversion<Long, Byte> ConvertlongValto(byte)longVal.static final VectorOperators.Conversion<Long, Double> ConvertlongValto(double)longVal.static final VectorOperators.Conversion<Long, Float> ConvertlongValto(float)longVal.static final VectorOperators.Conversion<Long, Integer> ConvertlongValto(int)longVal.static final VectorOperators.Conversion<Long, Short> ConvertlongValto(short)longVal.static final VectorOperators.ComparisonComparea<=b.static final VectorOperators.UnaryProducenumberOfLeadingZeros(a)static final VectorOperators.UnaryProducelog(a).static final VectorOperators.UnaryProducelog10(a).static final VectorOperators.UnaryProducelog1p(a).static final VectorOperators.BinaryProducea<<(n&(ESIZE*8-1)).static final VectorOperators.BinaryProduce(a&EMASK)>>>(n&(ESIZE*8-1)).static final VectorOperators.ComparisonComparea<b.static final VectorOperators.AssociativeProducemax(a,b).static final VectorOperators.AssociativeProducemin(a,b).static final VectorOperators.AssociativeProducea*b.static final VectorOperators.ComparisonComparea!=b.static final VectorOperators.UnaryProduce-a.static final VectorOperators.UnaryProduce~a.static final VectorOperators.AssociativeProducea|b.static final VectorOperators.BinaryProducepow(a,b).static final VectorOperators.Conversion<Double, Long> Reinterpret bits ofdoubleValaslong.static final VectorOperators.Conversion<Float, Integer> Reinterpret bits offloatValasint.static final VectorOperators.Conversion<Integer, Float> Reinterpret bits ofintValasfloat.static final VectorOperators.Conversion<Long, Double> Reinterpret bits oflongValasdouble.static final VectorOperators.UnaryProducereverse(a)static final VectorOperators.UnaryProducereverseBytes(a)static final VectorOperators.BinaryProducerotateLeft(a,n).static final VectorOperators.BinaryProducerotateRight(a,n).static final VectorOperators.Conversion<Short, Byte> ConvertshortValto(byte)shortVal.static final VectorOperators.Conversion<Short, Double> ConvertshortValto(double)shortVal.static final VectorOperators.Conversion<Short, Float> ConvertshortValto(float)shortVal.static final VectorOperators.Conversion<Short, Integer> ConvertshortValto(int)shortVal.static final VectorOperators.Conversion<Short, Long> ConvertshortValto(long)shortVal.static final VectorOperators.UnaryProducesin(a).static final VectorOperators.UnaryProducesinh(a).static final VectorOperators.UnaryProducesqrt(a).static final VectorOperators.BinaryProducea-b.static final VectorOperators.UnaryProducetan(a).static final VectorOperators.UnaryProducetanh(a).static final VectorOperators.UnaryProducenumberOfTrailingZeros(a)static final VectorOperators.ComparisonUnsigned comparea>=b.static final VectorOperators.ComparisonUnsigned comparea>b.static final VectorOperators.ComparisonUnsigned comparea<=b.static final VectorOperators.ComparisonUnsigned comparea<b.static final VectorOperators.AssociativeProducea^b.static final VectorOperators.Conversion<Byte, Integer> Zero-extendbyteValtoint.static final VectorOperators.Conversion<Byte, Long> Zero-extendbyteValtolong.static final VectorOperators.Conversion<Byte, Short> Zero-extendbyteValtoshort.static final VectorOperators.Conversion<Integer, Long> Zero-extendintValtolong.static final VectorOperators.Conversion<Short, Integer> Zero-extendshortValtoint.static final VectorOperators.Conversion<Short, Long> Zero-extendshortValtolong.static final VectorOperators.UnaryProducea==0?0:-1(zero or minus one).
- 
Method Summary
- 
Field Details- 
NOTProduce~a. Integral only.
- 
ZOMOProducea==0?0:-1(zero or minus one). Integral only.
- 
ABSProduceabs(a).
- 
NEGProduce-a.
- 
BIT_COUNTProducebitCount(a)- Since:
- 19
 
- 
TRAILING_ZEROS_COUNTProducenumberOfTrailingZeros(a)- Since:
- 19
 
- 
LEADING_ZEROS_COUNTProducenumberOfLeadingZeros(a)- Since:
- 19
 
- 
REVERSEProducereverse(a)- Since:
- 19
 
- 
REVERSE_BYTESProducereverseBytes(a)- Since:
- 19
 
- 
SINProducesin(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
COSProducecos(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
TANProducetan(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
ASINProduceasin(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
ACOSProduceacos(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
ATANProduceatan(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
EXPProduceexp(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
LOGProducelog(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
LOG10Producelog10(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
SQRTProducesqrt(a). Floating only. See section "Operations on floating point vectors" above
- 
CBRTProducecbrt(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
SINHProducesinh(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
COSHProducecosh(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
TANHProducetanh(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
EXPM1Produceexpm1(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
LOG1PProducelog1p(a). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
ADDProducea+b.
- 
SUBProducea-b.
- 
MULProducea*b.
- 
DIVProducea/b. Floating only.
- 
MINProducemin(a,b).
- 
MAXProducemax(a,b).
- 
FIRST_NONZEROProducebits(a)!=0?a:b.
- 
ANDProducea&b. Integral only.
- 
AND_NOTProducea&~b. Integral only.
- 
ORProducea|b. Integral only.
- 
XORProducea^b. Integral only.
- 
LSHLProducea<<(n&(ESIZE*8-1)). Integral only.
- 
ASHRProducea>>(n&(ESIZE*8-1)). Integral only.
- 
LSHRProduce(a&EMASK)>>>(n&(ESIZE*8-1)). Integral only.
- 
ROLProducerotateLeft(a,n). Integral only.
- 
RORProducerotateRight(a,n). Integral only.
- 
COMPRESS_BITSProducecompress(a,n). Integral,intandlong, only.- Since:
- 19
 
- 
EXPAND_BITSProduceexpand(a,n). Integral,intandlong, only.- Since:
- 19
 
- 
ATAN2Produceatan2(a,b). See Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
POWProducepow(a,b). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
HYPOTProducehypot(a,b). Floating only. Not guaranteed to be semi-monotonic. See section "Operations on floating point vectors" above
- 
BITWISE_BLENDProducea^((a^b)&c). (Bitwise(c(i)?b(i):a(i)).) Integral only.
- 
FMAProducefma(a,b,c). Floating only.
- 
IS_DEFAULTTestbits(a)==0. (Not true of-0.0.)
- 
IS_NEGATIVETestbits(a)<0. (True of-0.0.)
- 
IS_FINITETestisFinite(a). Floating only.
- 
IS_NANTestisNaN(a). Floating only.
- 
IS_INFINITETestisInfinite(a). Floating only.
- 
EQComparea==b.
- 
NEComparea!=b.
- 
LTComparea<b.
- 
LEComparea<=b.
- 
GTComparea>b.
- 
GEComparea>=b.
- 
UNSIGNED_LTUnsigned comparea<b. Integral only.- See Also:
 
- 
UNSIGNED_LEUnsigned comparea<=b. Integral only.- See Also:
 
- 
UNSIGNED_GTUnsigned comparea>b. Integral only.- See Also:
 
- 
UNSIGNED_GEUnsigned comparea>=b. Integral only.- See Also:
 
- 
B2DConvertbyteValto(double)byteVal.
- 
B2FConvertbyteValto(float)byteVal.
- 
B2IConvertbyteValto(int)byteVal.
- 
B2LConvertbyteValto(long)byteVal.
- 
B2SConvertbyteValto(short)byteVal.
- 
D2BConvertdoubleValto(byte)doubleVal.
- 
D2FConvertdoubleValto(float)doubleVal.
- 
D2IConvertdoubleValto(int)doubleVal.
- 
D2LConvertdoubleValto(long)doubleVal.
- 
D2SConvertdoubleValto(short)doubleVal.
- 
F2BConvertfloatValto(byte)floatVal.
- 
F2DConvertfloatValto(double)floatVal.
- 
F2IConvertfloatValto(int)floatVal.
- 
F2LConvertfloatValto(long)floatVal.
- 
F2SConvertfloatValto(short)floatVal.
- 
I2BConvertintValto(byte)intVal.
- 
I2DConvertintValto(double)intVal.
- 
I2FConvertintValto(float)intVal.
- 
I2LConvertintValto(long)intVal.
- 
I2SConvertintValto(short)intVal.
- 
L2BConvertlongValto(byte)longVal.
- 
L2DConvertlongValto(double)longVal.
- 
L2FConvertlongValto(float)longVal.
- 
L2IConvertlongValto(int)longVal.
- 
L2SConvertlongValto(short)longVal.
- 
S2BConvertshortValto(byte)shortVal.
- 
S2DConvertshortValto(double)shortVal.
- 
S2FConvertshortValto(float)shortVal.
- 
S2IConvertshortValto(int)shortVal.
- 
S2LConvertshortValto(long)shortVal.
- 
REINTERPRET_D2L
- 
REINTERPRET_F2I
- 
REINTERPRET_I2F
- 
REINTERPRET_L2D
- 
ZERO_EXTEND_B2IZero-extendbyteValtoint.
- 
ZERO_EXTEND_B2LZero-extendbyteValtolong.
- 
ZERO_EXTEND_B2SZero-extendbyteValtoshort.
- 
ZERO_EXTEND_I2LZero-extendintValtolong.
- 
ZERO_EXTEND_S2IZero-extendshortValtoint.
- 
ZERO_EXTEND_S2LZero-extendshortValtolong.
 
-