|
Uni20
Asynchronous tensor and runtime library.
|
Stride utilities for mdspan-like tensors. More...
#include "concepts.hpp"#include <algorithm>#include <array>#include <cstdlib>#include <functional>#include <initializer_list>#include <limits>#include <uni20/common/static_vector.hpp>#include <uni20/common/trace.hpp>#include <uni20/core/types.hpp>#include <uni20/mdspan/mdspan.hpp>Go to the source code of this file.
Classes | |
| struct | uni20::extent_strides< N > |
| Structure to represent a common extent and an array of strides. More... | |
Namespaces | |
| namespace | uni20 |
Functions | |
| template<StridedMdspanLike AType, StridedMdspanLike BType, StridedMdspanLike CType, std::size_t N> | |
| auto | uni20::extract_strides (AType const &A, BType const &B, std::array< std::pair< std::size_t, std::size_t >, N > const &contractDims, CType const &C) |
| Extract merged stride groups for a tensor contraction. | |
| template<typename Extents , std::size_t R> requires (Extents::rank() == R) | |
| static_vector< extent_strides< 2 >, R > | uni20::merge_strides_left (Extents const &ext, std::array< std::ptrdiff_t, R > const &Stride1, std::array< std::ptrdiff_t, R > const &Stride2) |
| Build and merge stride metadata from two stride arrays favouring column-major (left) order. | |
| template<std::size_t N, std::size_t R> | |
| void | uni20::merge_strides_left (static_vector< extent_strides< N >, R > &out) |
| Merge adjacent stride descriptors in place using column-major (left) ordering. | |
| template<typename Extents , std::size_t R> requires (Extents::rank() == R) | |
| static_vector< extent_strides< 2 >, R > | uni20::merge_strides_right (Extents const &ext, std::array< std::ptrdiff_t, R > const &Stride1, std::array< std::ptrdiff_t, R > const &Stride2) |
| Build and merge stride metadata from two stride arrays favouring row-major (right) order. | |
| template<std::size_t N, std::size_t R> | |
| void | uni20::merge_strides_right (static_vector< extent_strides< N >, R > &out) |
| Merge adjacent stride descriptors in place using row-major (right) ordering. | |
Stride utilities for mdspan-like tensors.