MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
transpose_copy.hpp File Reference
#include <algorithm>
#include <cstddef>

Namespaces

namespace  mtl
namespace  mtl::detail
 mat*vec multiply into pre-allocated y: y = A * x.

Functions

template<typename T>
void mtl::detail::transpose_copy (const T *in, std::size_t rows, std::size_t cols, T *out)
 out[c * rows + r] = in[r * cols + c] for every r < rows, c < cols: copies the row-major rows x cols array in into out as the column-major one, which is the same as writing in^T row-major.

Variables

constexpr std::size_t mtl::detail::transpose_tile = 32
 Tile edge of transpose_copy, chosen by measurement on an Apple M2 and an x86-64 host (issue 1040): 32 beat 8, 16 and 64 for float and double.