Global Constants
-
constexpr layout DEFAULT_LAYOUT
The default layout for tensors (either row- or column-major).
This value is controlled by the macro MARRAY_DEFAULT_LAYOUT.
-
constexpr index_base BASE_ZERO
Specifies that indices should start at 0.
-
constexpr index_base BASE_ONE
Specifies that indices should start at 1.
-
constexpr c_cxx_t C
Specifies row-major layout and base-0 indices.
Convertible to either layout or index_base. Same as CXX.
-
constexpr c_cxx_t CXX
Specifies row-major layout and base-0 indices.
Convertible to either layout or index_base. Same as C.
-
constexpr fortran_t FORTRAN
Specifies column-major layout and base-1 indices.
Convertible to either layout or index_base. Same as MATLAB.
-
constexpr fortran_t MATLAB
Specifies column-major layout and base-1 indices.
Convertible to either layout or index_base. Same as FORTRAN.
-
constexpr index_base DEFAULT_BASE
The default base for indices (either 0 or 1).
This value is controlled by the macro MARRAY_DEFAULT_BASE.
-
constexpr all_t all
Token used to select all indices along a dimension.
-
constexpr bcast_t bcast
Token used to create a new dimension along which the tensor will be replicated.
This can be used to broadcast data into a destination tensor of larger dimensionality, e.g.:
marray<3> A{3,5,8}; marray<4> B{3,6,5,8}; B = A[all][bcast][all][all]; //now B[i][j][k][l] == A[i][k][l] for all j
-
constexpr uninitialized_t uninitialized
A token which indicates not to initialize allocated memory.
This special value is used to construct an array which does not default- or value-initialize its elements (useful for avoiding redundant memory operations for scalar types).
-
constexpr int DYNAMIC
Special value which indicates that the number of dimensions is not known at compile time.