legate::mapping::DimOrdering#
-
class DimOrdering#
A descriptor for dimension ordering.
Public Types
-
enum class Kind : std::uint8_t#
An enum class for kinds of dimension ordering.
Values:
-
enumerator C#
Indicates the instance have C layout (i.e., the last dimension is the leading dimension in the instance)
-
enumerator FORTRAN#
Indicates the instance have Fortran layout (i.e., the first dimension is the leading dimension instance)
-
enumerator CUSTOM#
Indicates the order of dimensions of the instance is manually specified.
-
enumerator C#
Public Functions
-
void set_c_order()#
Sets the dimension ordering to C.
-
void set_fortran_order()#
Sets the dimension ordering to Fortran.
-
void set_custom_order(std::vector<std::int32_t> dims)#
Sets a custom dimension ordering.
- Parameters:
dims – A vector that stores the order of dimensions.
-
std::vector<std::int32_t> dimensions() const#
Dimension list. Used only when the
kind
isCUSTOM
.
Public Static Functions
-
static DimOrdering c_order()#
Creates a C ordering object.
- Returns:
A
DimOrdering
object
-
static DimOrdering fortran_order()#
Creates a Fortran ordering object.
- Returns:
A
DimOrdering
object
-
static DimOrdering custom_order(std::vector<std::int32_t> dims)#
Creates a custom ordering object.
Dimension indices in the vector should be listed from the most rapidly changing one to the least rapidly changing one. For 3D stores, a custom order
{0, 1, 2}
is equivalent to Fortran order and{2, 1, 0}
is equivalent to C order.- Parameters:
dims – A vector that stores the order of dimensions.
- Returns:
A
DimOrdering
object
-
enum class Kind : std::uint8_t#