Skip to content

Aliases

Names for the common tensors and views: matrices, vectors and their strided views.

Aliases

DynShape

template <std::size_t Rank>
using strata::DynShape = detail::dyn_shape<std::make_index_sequence<Rank>>::type

A shape of Rank axes, all dynamic: DynShape<2> is Shape<Dyn, Dyn>.

Matrix

template <typename T, Extent N, Extent M, order_like O = ColumnMajor, typename Memory = Aligned<>>
using strata::Matrix = Tensor<T, Shape<N, M>, O, Memory>

A matrix of N rows and M columns: Matrix<float, 3, 4>.

Template parameters

Name Description
T The element type.
N The number of rows, or Dyn.
M The number of columns, or Dyn.
O The order of the axes in memory, column-major by default.
Memory Where the elements come from, as for Tensor.
template <typename T, Extent N, Extent M, order_like O = ColumnMajor>
using strata::pmr::Matrix = strata::Matrix<T, N, M, O, std::pmr::polymorphic_allocator<T>>

A Matrix with a polymorphic allocator, as the std::pmr containers.

SquareMatrix

template <typename T, Extent N, order_like O = ColumnMajor, typename Memory = Aligned<>>
using strata::SquareMatrix = Matrix<T, N, N, O, Memory>

A square matrix of N rows and N columns.

ColVector

template <typename T, Extent N, typename Memory = Aligned<>>
using strata::ColVector = Tensor<T, Shape<N, 1>, ColumnMajor, Memory>

A column vector of N elements, shaped N x 1.

RowVector

template <typename T, Extent M, typename Memory = Aligned<>>
using strata::RowVector = Tensor<T, Shape<1, M>, ColumnMajor, Memory>

A row vector of M elements, shaped 1 x M.

Vector

template <typename T, Extent N, typename Memory = Aligned<>>
using strata::Vector = Tensor<T, Shape<N>, ColumnMajor, Memory>

A vector of N elements: a tensor of one axis.

template <typename T, Extent N>
using strata::pmr::Vector = strata::Vector<T, N, std::pmr::polymorphic_allocator<T>>

A Vector with a polymorphic allocator, as the std::pmr containers.

MatrixX

template <typename T, order_like O = ColumnMajor, typename Memory = Aligned<>>
using strata::MatrixX = Matrix<T, Dyn, Dyn, O, Memory>

A matrix whose rows and columns are both dynamic.

template <typename T, order_like O = ColumnMajor>
using strata::pmr::MatrixX = strata::MatrixX<T, O, std::pmr::polymorphic_allocator<T>>

A MatrixX with a polymorphic allocator, as the std::pmr containers.

VectorX

template <typename T, typename Memory = Aligned<>>
using strata::VectorX = Vector<T, Dyn, Memory>

A vector whose size is dynamic.

template <typename T>
using strata::pmr::VectorX = strata::VectorX<T, std::pmr::polymorphic_allocator<T>>

A VectorX with a polymorphic allocator, as the std::pmr containers.

MatrixView

template <typename T, Extent N, Extent M, typename Layout = Dense<>>
using strata::MatrixView = TensorView<T, Shape<N, M>, Layout>

A view of memory as a matrix of N rows and M columns, dense by default.

VectorView

template <typename T, Extent N, typename Layout = Dense<>>
using strata::VectorView = TensorView<T, Shape<N>, Layout>

A view of memory as a vector of N elements, dense by default.

StridedMatrixView

template <typename T>
using strata::StridedMatrixView = TensorView<T, Shape<Dyn, Dyn>, Strided<Dyn, Dyn>>

A view of memory as a matrix with a dynamic stride on each axis: any block or slice of one.

StridedVectorView

template <typename T>
using strata::StridedVectorView = TensorView<T, Shape<Dyn>, Strided<Dyn>>

A view of memory as a vector with a dynamic stride: any regular step through a buffer.

StridedView

template <typename T, std::size_t Rank>
using strata::StridedView = TensorView<T, DynShape<Rank>, typename detail::dyn_strided<std::make_index_sequence<Rank>>::type>

A view of memory of Rank axes, all with dynamic extents and strides.