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
+, ?:, etc. —
expression operators
max, sin, etc. —
methods in standard classes like Math, 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 x is 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
float and the Java operation or
method only accepts and returns double values, then the scalar operation
on each lane is adapted to cast operands and the result, specifically widening
float operands to double operands and narrowing the double
result to a float.
ADD and MUL used with cross-lane reduction
operations, such as FloatVector#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.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | VectorOperators.
Type for all reassociating
lane-wise
binary operators,
usable in expressions like |
| private static class | |
| public static interface | VectorOperators.
Type for all
lane-wise
binary (two-argument) operators,
usable in expressions like |
| private static class | |
| public static interface | VectorOperators.
Type for all binary
lane-wise
boolean comparisons on lane values,
usable in expressions like |
| private static class | |
| public static interface | VectorOperators.
the boxed element type for the conversion
domain type (the input lane type) E, the boxed element type for the conversion
range type (the output lane type) F>Type for all
lane-wise
conversions on lane values,
usable in expressions like |
| pack-priv static class | |
| pack-priv static class | |
| public static interface | VectorOperators.
Root type for all operator tokens, providing queries for common properties such as arity, argument and return types, symbolic name, and operator name. |
| private abstract static class | |
| public static interface | VectorOperators.
Type for all
lane-wise
ternary (three-argument) operators,
usable in expressions like |
| private static class | |
| public static interface | VectorOperators.
Type for all unary
lane-wise
boolean tests on lane values,
usable in expressions like |
| private static class | |
| public static interface | VectorOperators.
Type for all
lane-wise
unary (one-argument) operators,
usable in expressions like |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final VectorOperators. | ABS
Produce |
| public static final VectorOperators. | ACOS
Produce |
| public static final VectorOperators. | ADD
Produce |
| public static final VectorOperators. | AND
Produce |
| public static final VectorOperators. | AND_NOT
Produce |
| public static final VectorOperators. | ASHR
Produce |
| public static final VectorOperators. | ASIN
Produce |
| public static final VectorOperators. | ATAN
Produce |
| public static final VectorOperators. | ATAN2
Produce |
| public static final VectorOperators. | B2D
Convert |
| public static final VectorOperators. | B2F
Convert |
| public static final VectorOperators. | B2I
Convert |
| public static final VectorOperators. | B2L
Convert |
| public static final VectorOperators. | B2S
Convert |
| public static final VectorOperators. | BIT_COUNT
Produce |
| public static final VectorOperators. | BITWISE_BLEND
Produce |
| public static final VectorOperators. | CBRT
Produce |
| private static final HashMap | |
| public static final VectorOperators. | COMPRESS_BITS
Produce |
| private static final HashMap | |
| public static final VectorOperators. | COS
Produce |
| public static final VectorOperators. | COSH
Produce |
| public static final VectorOperators. | D2B
Convert |
| public static final VectorOperators. | D2F
Convert |
| public static final VectorOperators. | D2I
Convert |
| public static final VectorOperators. | D2L
Convert |
| public static final VectorOperators. | D2S
Convert |
| public static final VectorOperators. | DIV
Produce |
| public static final VectorOperators. | EQ
Compare |
| public static final VectorOperators. | EXP
Produce |
| public static final VectorOperators. | EXPAND_BITS
Produce |
| public static final VectorOperators. | EXPM1
Produce |
| public static final VectorOperators. | F2B
Convert |
| public static final VectorOperators. | F2D
Convert |
| public static final VectorOperators. | F2I
Convert |
| public static final VectorOperators. | F2L
Convert |
| public static final VectorOperators. | F2S
Convert |
| public static final VectorOperators. | FIRST_NONZERO
Produce |
| public static final VectorOperators. | FMA
Produce |
| public static final VectorOperators. | GE
Compare |
| public static final VectorOperators. | GT
Compare |
| public static final VectorOperators. | HYPOT
Produce |
| public static final VectorOperators. | I2B
Convert |
| public static final VectorOperators. | I2D
Convert |
| public static final VectorOperators. | I2F
Convert |
| public static final VectorOperators. | I2L
Convert |
| public static final VectorOperators. | I2S
Convert |
| public static final VectorOperators. | IS_DEFAULT
Test |
| public static final VectorOperators. | IS_FINITE
Test |
| public static final VectorOperators. | IS_INFINITE
Test |
| public static final VectorOperators. | IS_NAN
Test |
| public static final VectorOperators. | IS_NEGATIVE
Test |
| public static final VectorOperators. | L2B
Convert |
| public static final VectorOperators. | L2D
Convert |
| public static final VectorOperators. | L2F
Convert |
| public static final VectorOperators. | L2I
Convert |
| public static final VectorOperators. | L2S
Convert |
| public static final VectorOperators. | LE
Compare |
| public static final VectorOperators. | LEADING_ZEROS_COUNT
Produce |
| public static final VectorOperators. | LOG
Produce |
| public static final VectorOperators. | LOG10
Produce |
| public static final VectorOperators. | LOG1P
Produce |
| public static final VectorOperators. | LSHL
Produce |
| public static final VectorOperators. | LSHR
Produce |
| public static final VectorOperators. | LT
Compare |
| public static final VectorOperators. | MAX
Produce |
| public static final VectorOperators. | MIN
Produce |
| public static final VectorOperators. | MUL
Produce |
| public static final VectorOperators. | NE
Compare |
| public static final VectorOperators. | NEG
Produce |
| public static final VectorOperators. | NOT
Produce |
| private static final HashMap | |
| public static final VectorOperators. | OR
Produce |
| pack-priv static final VectorOperators. | OR_UNCHECKED
Version of OR which works on float and double too. |
| public static final VectorOperators. | POW
Produce |
| public static final VectorOperators. | REINTERPRET_D2L
Reinterpret bits of |
| public static final VectorOperators. | REINTERPRET_F2I
Reinterpret bits of |
| public static final VectorOperators. | REINTERPRET_I2F
Reinterpret bits of |
| public static final VectorOperators. | REINTERPRET_L2D
Reinterpret bits of |
| public static final VectorOperators. | REVERSE
Produce |
| public static final VectorOperators. | REVERSE_BYTES
Produce |
| public static final VectorOperators. | ROL
Produce |
| public static final VectorOperators. | ROR
Produce |
| public static final VectorOperators. | S2B
Convert |
| public static final VectorOperators. | S2D
Convert |
| public static final VectorOperators. | S2F
Convert |
| public static final VectorOperators. | S2I
Convert |
| public static final VectorOperators. | S2L
Convert |
| public static final VectorOperators. | SADD
Produce saturating |
| public static final VectorOperators. | SIN
Produce |
| public static final VectorOperators. | SINH
Produce |
| public static final VectorOperators. | SQRT
Produce |
| public static final VectorOperators. | SSUB
Produce saturating |
| public static final VectorOperators. | SUADD
Produce saturating unsigned |
| public static final VectorOperators. | SUB
Produce |
| public static final VectorOperators. | SUSUB
Produce saturating unsigned |
| public static final VectorOperators. | TAN
Produce |
| public static final VectorOperators. | TANH
Produce |
| public static final VectorOperators. | TRAILING_ZEROS_COUNT
Produce |
| public static final VectorOperators. | UGE
Unsigned compare |
| public static final VectorOperators. | UGT
Unsigned compare |
| public static final VectorOperators. | ULE
Unsigned compare |
| public static final VectorOperators. | ULT
Unsigned compare |
| public static final VectorOperators. | UMAX
Produce unsigned |
| public static final VectorOperators. | UMIN
Produce unsigned |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| public static final VectorOperators. | XOR
Produce |
| public static final VectorOperators. | ZERO_EXTEND_B2I
Zero-extend |
| public static final VectorOperators. | ZERO_EXTEND_B2L
Zero-extend |
| public static final VectorOperators. | ZERO_EXTEND_B2S
Zero-extend |
| public static final VectorOperators. | ZERO_EXTEND_I2L
Zero-extend |
| public static final VectorOperators. | ZERO_EXTEND_S2I
Zero-extend |
| public static final VectorOperators. | ZERO_EXTEND_S2L
Zero-extend |
| public static final VectorOperators. | ZOMO
Produce |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static VectorOperators. | |
| private static VectorOperators. | |
| private static boolean | |
| private static VectorOperators. | |
| private static <E, F> VectorOperators. | |
| pack-priv static int | |
| private static int | |
| pack-priv static boolean | |
| private static VectorOperators. | |
| private static VectorOperators. | |
| private static VectorOperators. |