Enum Class ElementType
- All Implemented Interfaces:
Serializable, Comparable<ElementType>, Constable
The data type of individual tensor elements, corresponding to
ONNXTensorElementDataType in the ONNX Runtime C API.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription16-bit brain floating point (bfloat16).Boolean.128-bit complex number (real + imaginary double).64-bit complex number (real + imaginary float).64-bit floating point.32-bit floating point.16-bit floating point (IEEE 754).8-bit floating point E4M3FN.8-bit floating point E4M3FNUZ.8-bit floating point E5M2.8-bit floating point E5M2FNUZ.Signed 16-bit integer.Signed 32-bit integer.4-bit signed integer.Signed 64-bit integer.Signed 8-bit integer.String.Unsigned 16-bit integer.Unsigned 32-bit integer.4-bit unsigned integer.Unsigned 64-bit integer.Unsigned 8-bit integer.Undefined type. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> javaType()Returns the Java type associated with this element type, ornullfor types without a direct Java primitive mapping.static ElementTypeof(int value) Returns the ElementType corresponding to the given ORT integer code.intvalue()Returns the ORT integer code.static ElementTypeReturns the enum constant of this class with the specified name.static ElementType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNDEFINED
Undefined type. -
FLOAT
32-bit floating point. -
UINT8
Unsigned 8-bit integer. -
INT8
Signed 8-bit integer. -
UINT16
Unsigned 16-bit integer. -
INT16
Signed 16-bit integer. -
INT32
Signed 32-bit integer. -
INT64
Signed 64-bit integer. -
STRING
String. -
BOOL
Boolean. -
FLOAT16
16-bit floating point (IEEE 754). -
DOUBLE
64-bit floating point. -
UINT32
Unsigned 32-bit integer. -
UINT64
Unsigned 64-bit integer. -
COMPLEX64
64-bit complex number (real + imaginary float). -
COMPLEX128
128-bit complex number (real + imaginary double). -
BFLOAT16
16-bit brain floating point (bfloat16). -
FLOAT8E4M3FN
8-bit floating point E4M3FN. -
FLOAT8E4M3FNUZ
8-bit floating point E4M3FNUZ. -
FLOAT8E5M2
8-bit floating point E5M2. -
FLOAT8E5M2FNUZ
8-bit floating point E5M2FNUZ. -
UINT4
4-bit unsigned integer. -
INT4
4-bit signed integer.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
value
public int value()Returns the ORT integer code.- Returns:
- the ORT integer code.
-
of
Returns the ElementType corresponding to the given ORT integer code.- Parameters:
value- the ORT integer code.- Returns:
- the ElementType.
-
javaType
Returns the Java type associated with this element type, ornullfor types without a direct Java primitive mapping.- Returns:
- the Java class, or null.
-