Enum Class Type

java.lang.Object
java.lang.Enum<Type>
io.github.douira.glsl_transformer.util.Type
All Implemented Interfaces:
TokenAssociatedEnum, Serializable, Comparable<Type>, Constable

public enum Type extends Enum<Type> implements TokenAssociatedEnum
The shape is an array of up to three integers describing how big this tensor is in each dimension. The first dimension contains the number of bits of each value and the following dimensions describe the actual dimensions of the tensor.
  • Enum Constant Details

    • BOOL

      public static final Type BOOL
    • BVEC2

      public static final Type BVEC2
    • BVEC3

      public static final Type BVEC3
    • BVEC4

      public static final Type BVEC4
    • INT8

      public static final Type INT8
    • I8VEC2

      public static final Type I8VEC2
    • I8VEC3

      public static final Type I8VEC3
    • I8VEC4

      public static final Type I8VEC4
    • UINT8

      public static final Type UINT8
    • UI8VEC2

      public static final Type UI8VEC2
    • UI8VEC3

      public static final Type UI8VEC3
    • UI8VEC4

      public static final Type UI8VEC4
    • INT16

      public static final Type INT16
    • I16VEC2

      public static final Type I16VEC2
    • I16VEC3

      public static final Type I16VEC3
    • I16VEC4

      public static final Type I16VEC4
    • UINT16

      public static final Type UINT16
    • UI16VEC2

      public static final Type UI16VEC2
    • UI16VEC3

      public static final Type UI16VEC3
    • UI16VEC4

      public static final Type UI16VEC4
    • INT32

      public static final Type INT32
    • I32VEC2

      public static final Type I32VEC2
    • I32VEC3

      public static final Type I32VEC3
    • I32VEC4

      public static final Type I32VEC4
    • UINT32

      public static final Type UINT32
    • UI32VEC2

      public static final Type UI32VEC2
    • UI32VEC3

      public static final Type UI32VEC3
    • UI32VEC4

      public static final Type UI32VEC4
    • INT64

      public static final Type INT64
    • I64VEC2

      public static final Type I64VEC2
    • I64VEC3

      public static final Type I64VEC3
    • I64VEC4

      public static final Type I64VEC4
    • UINT64

      public static final Type UINT64
    • UI64VEC2

      public static final Type UI64VEC2
    • UI64VEC3

      public static final Type UI64VEC3
    • UI64VEC4

      public static final Type UI64VEC4
    • FLOAT16

      public static final Type FLOAT16
    • F16VEC2

      public static final Type F16VEC2
    • F16VEC3

      public static final Type F16VEC3
    • F16VEC4

      public static final Type F16VEC4
    • F16MAT2X2

      public static final Type F16MAT2X2
    • F16MAT2X3

      public static final Type F16MAT2X3
    • F16MAT2X4

      public static final Type F16MAT2X4
    • F16MAT3X2

      public static final Type F16MAT3X2
    • F16MAT3X3

      public static final Type F16MAT3X3
    • F16MAT3X4

      public static final Type F16MAT3X4
    • F16MAT4X2

      public static final Type F16MAT4X2
    • F16MAT4X3

      public static final Type F16MAT4X3
    • F16MAT4X4

      public static final Type F16MAT4X4
    • FLOAT32

      public static final Type FLOAT32
    • F32VEC2

      public static final Type F32VEC2
    • F32VEC3

      public static final Type F32VEC3
    • F32VEC4

      public static final Type F32VEC4
    • F32MAT2X2

      public static final Type F32MAT2X2
    • F32MAT2X3

      public static final Type F32MAT2X3
    • F32MAT2X4

      public static final Type F32MAT2X4
    • F32MAT3X2

      public static final Type F32MAT3X2
    • F32MAT3X3

      public static final Type F32MAT3X3
    • F32MAT3X4

      public static final Type F32MAT3X4
    • F32MAT4X2

      public static final Type F32MAT4X2
    • F32MAT4X3

      public static final Type F32MAT4X3
    • F32MAT4X4

      public static final Type F32MAT4X4
    • FLOAT64

      public static final Type FLOAT64
    • F64VEC2

      public static final Type F64VEC2
    • F64VEC3

      public static final Type F64VEC3
    • F64VEC4

      public static final Type F64VEC4
    • F64MAT2X2

      public static final Type F64MAT2X2
    • F64MAT2X3

      public static final Type F64MAT2X3
    • F64MAT2X4

      public static final Type F64MAT2X4
    • F64MAT3X2

      public static final Type F64MAT3X2
    • F64MAT3X3

      public static final Type F64MAT3X3
    • F64MAT3X4

      public static final Type F64MAT3X4
    • F64MAT4X2

      public static final Type F64MAT4X2
    • F64MAT4X3

      public static final Type F64MAT4X3
    • F64MAT4X4

      public static final Type F64MAT4X4
  • Method Details

    • values

      public static Type[] 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

      public static Type valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getTokenType

      public int getTokenType()
      Returns the token type in the parser.
      Specified by:
      getTokenType in interface TokenAssociatedEnum
      Returns:
      The token type in the parser
    • getNumberType

      public Type.NumberType getNumberType()
      Returns the number type.
      Returns:
      The number type
    • getDimensions

      public int[] getDimensions()
      Returns the size of each dimension. (also called the shape)
      Returns:
      The size of each dimension
    • getBitDepth

      public int getBitDepth()
      Returns the bit depth.
      Returns:
      The bit depth
    • getCompactName

      public String getCompactName()
      Returns the compact name of the type. Some types, notably some that are added by extensions, do not have compact name.
      Returns:
      The type's compact name, or null if the type does not have a compact name.
    • getMostCompactName

      public String getMostCompactName()
    • getExplicitName

      public String getExplicitName()
      Returns the explicit name of the type. This name uses an explicit arithmetic type name that may not be compatible if the extension for these type names is not available.
      Returns:
      The type's most explicit name.
    • getImplicitCasts

      public EnumSet<Type> getImplicitCasts()
      Returns the set of types that this type can be converted to without a constructor or swizzling.
      Returns:
      the set of types that this type can be implicitly converted to.
    • fromToken

      public static Type fromToken(Token token)
    • ofTokenType

      public static Type ofTokenType(int tokenType)
      Returns the type for the given token type.
      Parameters:
      tokenType - The token type in the parser
      Returns:
      The type for the given token type index
    • ofLiteralTokenType

      public static Type ofLiteralTokenType(int literalTokenType)
      Returns the type for the given literal token type.
      Parameters:
      literalTokenType - The literal token type
      Returns:
      The type for the given literal token type