Enum Class Layout
- All Implemented Interfaces:
Serializable, Comparable<Layout>, Constable
The memory layout of a Tensor. The codes map to the
ST_Layout values
exposed by the smile_torch native API. Note that the native API
currently distinguishes only strided, sparse COO, and sparse CSR layouts; the
compressed-block sparse variants (BSC, BSR, CSC) are mapped to the sparse CSR
code.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
Strided
Dense tensor. -
SparseCOO
Sparse tensor in COO format. -
SparseBSC
Sparse tensor in BSC format. -
SparseBSR
Sparse tensor in BSR format. -
SparseCSC
Sparse tensor in CSC format. -
SparseCSR
Sparse tensor in CSR format.
-
-
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
-
code
public int code()Returns the nativeST_Layoutcode.- Returns:
- the native
ST_Layoutcode.
-