API reference¶
Shapes and extents¶
Static and dynamic extents, and the Shape that holds them.
Concepts: matching_shapes, shape_like
Types: dynamic_tag, Extent, Extent<dynamic_tag>, Extent<std::size_t>, Shape, std::formatter<strata::Shape<Extents...>, char>
Order and layout¶
How the axes of a tensor are laid out in memory: orders, and the index to offset mappings.
Concepts: concrete_order, order_for_rank, order_like, same_order, symbolic_order
Types: ColumnMajor, Dense, DenseMapping, Order, RowMajor, Strided, StridedMapping
Views and expressions¶
The interface every tensor expression shares, and the non-owning view of memory.
Concepts: dynamic_shape, indexable_by, indexed_tensor, layout_for, pipeable, same_rank_as, shape_bearing, shape_queryable, shape_with_rank, static_shape, tensor_like
Types: Block, Borrowed, Diagonal, Expanded, Owned, Permute, preferred_order, preferred_order<Borrowed<E>>, preferred_order<Owned<E>>, preferred_order<TensorView<T, S, Layout>>, seq, Slice, TensorInterface, TensorView
Tensors¶
The owning tensor, and the functions that make one from an expression.
Types: Tensor
Aliases¶
Names for the common tensors and views: matrices, vectors and their strided views.
Element-wise expressions¶
Lazy element-wise operations: operators, math functions, masks and pipes.
Concepts: left_foldable, stateless
Types: BitAnd, BitNot, BitOr, BitXor, Clamp, Divides, EqualTo, Ewise, Greater, GreaterEqual, Less, LessEqual, LogicalNot, Maximum, Minimum, Minus, Multiplies, Negate, NotEqualTo, Plus, Scalar, Select, Square
Generators¶
Tensors with values but no memory: constants, the identity, runs of numbers, functions of the index.
Reductions¶
Many values into one: of a whole expression, or along axes.
Concepts: reducer_for
Types: All, Any, Count, Max, Mean, Min, Product, Reduce, Sum
einsum¶
One notation for the products of linear algebra.
Evaluation and assignment¶
How an expression is computed into memory: assignment, aliasing, the cost model and scratch buffers.
Concepts: advances_along, steps_along, tensor_cursor, writable_cursor
Memory¶
Aligned memory for tensors: the allocator, the memory policy and the uninitialized marker.
Types: Aligned, AlignedAllocator, from_iterator_t, uninitialized_t
Utilities¶
Concepts, precondition checks and the building blocks shared across strata.
Concepts: axis_permutation, index_like
Types: fixed_string, SemiStaticValues
Formatting¶
Printing tensors and expressions with std::format.
Types: std::formatter<E, CharT>