|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
Functions | |
| constexpr std::size_t | ipow (std::size_t base, std::size_t exp) |
| Compile-time integer power: base^exp. | |
| template<std::size_t Dim, std::size_t Rank, typename... Indices> | |
| constexpr std::size_t | flat_index (Indices... indices) |
| Convert a variadic index pack (i, j, k, ...) to a flat offset. | |
| template<std::size_t Dim, std::size_t Rank> | |
| constexpr std::size_t | flat_index_arr (const std::array< std::size_t, Rank > &idx) |
| Convert an array-based index to flat offset. | |
|
constexpr |
Convert a variadic index pack (i, j, k, ...) to a flat offset.
In row-major-like order: offset = i * Dim^(Rank-1) + j * Dim^(Rank-2) + ... + last
|
constexpr |
Convert an array-based index to flat offset.
|
constexpr |
Compile-time integer power: base^exp.