|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
Functions | |
| template<std::size_t N> | |
| constexpr bool | same_layout (const shape< N > &sh, const std::array< std::size_t, N > &strides, const std::array< std::size_t, N > &dense) |
| Whether strides lay the elements out as dense does. | |
|
constexpr |
Whether strides lay the elements out as dense does.
The stride of a dimension of extent 1 is never used, so it may be anything (a slice keeps its parent's), and an array with no elements is contiguous, as in NumPy (#856: a size-1 dimension with another stride made a dense array take the strided paths).