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.

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.

Kind kind() const#

Dimension ordering type.

std::vector<std::int32_t> dimensions() const#

Dimension list. Used only when the kind is CUSTOM.

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.

Parameters:

dims – A vector that stores the order of dimensions.

Returns:

A DimOrdering object