-
#include "tensorstore/contiguous_layout.h"
- enum class tensorstore::ContiguousLayoutOrder;
Specifies a C-order or Fortran-order contiguous array layout.
- enumerator right = 0;¶
- enumerator c = 0;¶
- enumerator row_major = 0;¶
- enumerator left = 1;¶
- enumerator fortran = 1;¶
- enumerator column_major = 1;¶
Related Functions¶
-
std::ostream& tensorstore::operator<<(std::ostream& os,
ContiguousLayoutOrder order); Prints to an
std::ostream
.
-
void tensorstore::ComputeStrides(ContiguousLayoutOrder order,
ptrdiff_t element_stride,
span<const Index> shape,
span<Index> strides); Computes strides for the specified
ContiguousLayoutOrder
.
-
I tensorstore::GetContiguousOffset(span<const I> shape,
span<const I> indices); Computes the offset of a given index vector in C or Fortran order.
-
void tensorstore::GetContiguousIndices(I offset,
span<const I> shape,
span<I> indices); Computes the indices corresponding to a given linear offset for the specified
shape
andOrder
.
Related Constants¶
-
constexpr const ContiguousLayoutOrder tensorstore::c_order =
ContiguousLayoutOrder::c; -
constexpr const ContiguousLayoutOrder tensorstore::row_major_order =
ContiguousLayoutOrder::row_major; -
constexpr const ContiguousLayoutOrder tensorstore::fortran_order =
ContiguousLayoutOrder::fortran; -
constexpr const ContiguousLayoutOrder
tensorstore::column_major_order =
ContiguousLayoutOrder::column_major;