APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.incubator.vector

public final Class VectorOperators

extends Object
Class Inheritance
Imports
java.util.ArrayList, .HashMap, java.util.function.IntFunction, jdk.internal.vm.annotation.ForceInline, .Stable, jdk.internal.vm.vector.VectorSupport

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:

Operations on floating point vectors

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 and Inner Type Summary

Modifier and TypeClass and Description
public static interface
VectorOperators.Associative

Type for all reassociating lane-wise binary operators, usable in expressions like e = v0.

private static class
public static interface
VectorOperators.Binary

Type for all lane-wise binary (two-argument) operators, usable in expressions like w = v0.

private static class
public static interface
VectorOperators.Comparison

Type for all binary lane-wise boolean comparisons on lane values, usable in expressions like m = v0.

private static class
public static interface
VectorOperators.Conversion<
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 w1 = v0.

pack-priv static class
pack-priv static class
public static interface
VectorOperators.Operator

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

Type for all lane-wise ternary (three-argument) operators, usable in expressions like w = v0.

private static class
public static interface
VectorOperators.Test

Type for all unary lane-wise boolean tests on lane values, usable in expressions like m = v0.

private static class
public static interface
VectorOperators.Unary

Type for all lane-wise unary (one-argument) operators, usable in expressions like w = v0.

private static class

Field Summary

Modifier and TypeField and Description
public static final VectorOperators.Unary
ABS

Produce abs(a).

public static final VectorOperators.Unary
ACOS

Produce acos(a).

public static final VectorOperators.Associative
ADD

Produce a+b.

public static final VectorOperators.Associative
AND

Produce a&b;.

public static final VectorOperators.Binary
AND_NOT

Produce a&~b.

public static final VectorOperators.Binary
ASHR

Produce a>>(n&(ESIZE*8-1)).

public static final VectorOperators.Unary
ASIN

Produce asin(a).

public static final VectorOperators.Unary
ATAN

Produce atan(a).

public static final VectorOperators.Binary
ATAN2

Produce atan2(a,b).

public static final VectorOperators.Conversion<Byte, Double>
B2D

Convert byteVal to (double)byteVal.

public static final VectorOperators.Conversion<Byte, Float>
B2F

Convert byteVal to (float)byteVal.

public static final VectorOperators.Conversion<Byte, Integer>
B2I

Convert byteVal to (int)byteVal.

public static final VectorOperators.Conversion<Byte, Long>
B2L

Convert byteVal to (long)byteVal.

public static final VectorOperators.Conversion<Byte, Short>
B2S

Convert byteVal to (short)byteVal.

public static final VectorOperators.Unary
BIT_COUNT

Produce bitCount(a).

public static final VectorOperators.Ternary
BITWISE_BLEND

Produce a^((a^b)&c;).

public static final VectorOperators.Unary
CBRT

Produce cbrt(a).

private static final HashMap<Integer, String>
public static final VectorOperators.Binary
COMPRESS_BITS

Produce compress(a,n).

private static final HashMap<Integer, String>
public static final VectorOperators.Unary
COS

Produce cos(a).

public static final VectorOperators.Unary
COSH

Produce cosh(a).

public static final VectorOperators.Conversion<Double, Byte>
D2B

Convert doubleVal to (byte)doubleVal.

public static final VectorOperators.Conversion<Double, Float>
D2F

Convert doubleVal to (float)doubleVal.

public static final VectorOperators.Conversion<Double, Integer>
D2I

Convert doubleVal to (int)doubleVal.

public static final VectorOperators.Conversion<Double, Long>
D2L

Convert doubleVal to (long)doubleVal.

public static final VectorOperators.Conversion<Double, Short>
D2S

Convert doubleVal to (short)doubleVal.

public static final VectorOperators.Binary
DIV

Produce a/b.

public static final VectorOperators.Comparison
EQ

Compare a==b.

public static final VectorOperators.Unary
EXP

Produce exp(a).

public static final VectorOperators.Binary
EXPAND_BITS

Produce expand(a,n).

public static final VectorOperators.Unary
EXPM1

Produce expm1(a).

public static final VectorOperators.Conversion<Float, Byte>
F2B

Convert floatVal to (byte)floatVal.

public static final VectorOperators.Conversion<Float, Double>
F2D

Convert floatVal to (double)floatVal.

public static final VectorOperators.Conversion<Float, Integer>
F2I

Convert floatVal to (int)floatVal.

public static final VectorOperators.Conversion<Float, Long>
F2L

Convert floatVal to (long)floatVal.

public static final VectorOperators.Conversion<Float, Short>
F2S

Convert floatVal to (short)floatVal.

public static final VectorOperators.Associative
FIRST_NONZERO

Produce bits(a)!=0?a:b.

public static final VectorOperators.Ternary
FMA

Produce fma(a,b,c).

public static final VectorOperators.Comparison
GE

Compare a>=b.

public static final VectorOperators.Comparison
GT

Compare a>b.

public static final VectorOperators.Binary
HYPOT

Produce hypot(a,b).

public static final VectorOperators.Conversion<Integer, Byte>
I2B

Convert intVal to (byte)intVal.

public static final VectorOperators.Conversion<Integer, Double>
I2D

Convert intVal to (double)intVal.

public static final VectorOperators.Conversion<Integer, Float>
I2F

Convert intVal to (float)intVal.

public static final VectorOperators.Conversion<Integer, Long>
I2L

Convert intVal to (long)intVal.

public static final VectorOperators.Conversion<Integer, Short>
I2S

Convert intVal to (short)intVal.

public static final VectorOperators.Test
IS_DEFAULT

Test bits(a)==0.

public static final VectorOperators.Test
IS_FINITE

Test isFinite(a).

public static final VectorOperators.Test
IS_INFINITE

Test isInfinite(a).

public static final VectorOperators.Test
IS_NAN

Test isNaN(a).

public static final VectorOperators.Test
IS_NEGATIVE

Test bits(a)<0.

public static final VectorOperators.Conversion<Long, Byte>
L2B

Convert longVal to (byte)longVal.

public static final VectorOperators.Conversion<Long, Double>
L2D

Convert longVal to (double)longVal.

public static final VectorOperators.Conversion<Long, Float>
L2F

Convert longVal to (float)longVal.

public static final VectorOperators.Conversion<Long, Integer>
L2I

Convert longVal to (int)longVal.

public static final VectorOperators.Conversion<Long, Short>
L2S

Convert longVal to (short)longVal.

public static final VectorOperators.Comparison
LE

Compare a<=b.

public static final VectorOperators.Unary
LEADING_ZEROS_COUNT

Produce numberOfLeadingZeros(a).

public static final VectorOperators.Unary
LOG

Produce log(a).

public static final VectorOperators.Unary
LOG10

Produce log10(a).

public static final VectorOperators.Unary
LOG1P

Produce log1p(a).

public static final VectorOperators.Binary
LSHL

Produce a<<(n&(ESIZE*8-1)).

public static final VectorOperators.Binary
LSHR

Produce (a&EMASK;)>>>(n&(ESIZE*8-1)).

public static final VectorOperators.Comparison
LT

Compare a<b.

public static final VectorOperators.Associative
MAX

Produce max(a,b).

public static final VectorOperators.Associative
MIN

Produce min(a,b).

public static final VectorOperators.Associative
MUL

Produce a*b.

public static final VectorOperators.Comparison
NE

Compare a!=b.

public static final VectorOperators.Unary
NEG

Produce -a.

public static final VectorOperators.Unary
NOT

Produce ~a.

private static final HashMap<Integer, String>
public static final VectorOperators.Associative
OR

Produce a|b.

pack-priv static final VectorOperators.Associative
OR_UNCHECKED

Version of OR which works on float and double too.

public static final VectorOperators.Binary
POW

Produce pow(a,b).

public static final VectorOperators.Conversion<Double, Long>
REINTERPRET_D2L

Reinterpret bits of doubleVal as long.

public static final VectorOperators.Conversion<Float, Integer>
REINTERPRET_F2I

Reinterpret bits of floatVal as int.

public static final VectorOperators.Conversion<Integer, Float>
REINTERPRET_I2F

Reinterpret bits of intVal as float.

public static final VectorOperators.Conversion<Long, Double>
REINTERPRET_L2D

Reinterpret bits of longVal as double.

public static final VectorOperators.Unary
REVERSE

Produce reverse(a).

public static final VectorOperators.Unary
REVERSE_BYTES

Produce reverseBytes(a).

public static final VectorOperators.Binary
ROL

Produce rotateLeft(a,n).

public static final VectorOperators.Binary
ROR

Produce rotateRight(a,n).

public static final VectorOperators.Conversion<Short, Byte>
S2B

Convert shortVal to (byte)shortVal.

public static final VectorOperators.Conversion<Short, Double>
S2D

Convert shortVal to (double)shortVal.

public static final VectorOperators.Conversion<Short, Float>
S2F

Convert shortVal to (float)shortVal.

public static final VectorOperators.Conversion<Short, Integer>
S2I

Convert shortVal to (int)shortVal.

public static final VectorOperators.Conversion<Short, Long>
S2L

Convert shortVal to (long)shortVal.

public static final VectorOperators.Binary
SADD

Produce saturating a+b.

public static final VectorOperators.Unary
SIN

Produce sin(a).

public static final VectorOperators.Unary
SINH

Produce sinh(a).

public static final VectorOperators.Unary
SQRT

Produce sqrt(a).

public static final VectorOperators.Binary
SSUB

Produce saturating a-b.

public static final VectorOperators.Associative
SUADD

Produce saturating unsigned a+b.

public static final VectorOperators.Binary
SUB

Produce a-b.

public static final VectorOperators.Binary
SUSUB

Produce saturating unsigned a-b.

public static final VectorOperators.Unary
TAN

Produce tan(a).

public static final VectorOperators.Unary
TANH

Produce tanh(a).

public static final VectorOperators.Unary
TRAILING_ZEROS_COUNT

Produce numberOfTrailingZeros(a).

public static final VectorOperators.Comparison
UGE

Unsigned compare a>=b.

public static final VectorOperators.Comparison
UGT

Unsigned compare a>b.

public static final VectorOperators.Comparison
ULE

Unsigned compare a<=b.

public static final VectorOperators.Comparison
ULT

Unsigned compare a<b.

public static final VectorOperators.Associative
UMAX

Produce unsigned max(a,b).

public static final VectorOperators.Associative
UMIN

Produce unsigned min(a,b).

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.Associative
XOR

Produce a^b.

public static final VectorOperators.Conversion<Byte, Integer>
ZERO_EXTEND_B2I

Zero-extend byteVal to int.

public static final VectorOperators.Conversion<Byte, Long>
ZERO_EXTEND_B2L

Zero-extend byteVal to long.

public static final VectorOperators.Conversion<Byte, Short>
ZERO_EXTEND_B2S

Zero-extend byteVal to short.

public static final VectorOperators.Conversion<Integer, Long>
ZERO_EXTEND_I2L

Zero-extend intVal to long.

public static final VectorOperators.Conversion<Short, Integer>
ZERO_EXTEND_S2I

Zero-extend shortVal to int.

public static final VectorOperators.Conversion<Short, Long>
ZERO_EXTEND_S2L

Zero-extend shortVal to long.

public static final VectorOperators.Unary
ZOMO

Produce a==0?0:-1 (zero or minus one).

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static VectorOperators.Associative
assoc(String name, String opName, int opCode, int flags)

private static VectorOperators.Binary
binary(String name, String opName, int opCode, int flags)

private static boolean
private static VectorOperators.Comparison
compare(String name, String opName, int opCode, int flags)

private static <E, F> VectorOperators.ConversionImpl<E, F>
convert(String name, char kind, Class<E> dom, Class<F> ran, int opCode, int flags)

pack-priv static int
opCode(VectorOperators.Operator op, int requireKind, int forbidKind)

private static int
opInfo(int opCode, int bits)

pack-priv static boolean
private static VectorOperators.Test
predicate(String name, String opName, int opCode, int flags)

private static VectorOperators.Ternary
ternary(String name, String opName, int opCode, int flags)

private static VectorOperators.Unary
unary(String name, String opName, int opCode, int flags)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait