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

Classes

struct  mtl::interface::kernel::gemv
 detail::mult_generic_rows, default accumulator More...
struct  mtl::interface::kernel::trmv
 the generic trmv, both triangles More...
struct  mtl::interface::kernel::lower_trisolve
 detail::lower_trisolve_rows (trsv with a lower A) More...
struct  mtl::interface::interleave_rows< T, Kernel >
 How many rows Kernel interleaves for accumulator type T. More...

Namespaces

namespace  mtl
namespace  mtl::interface
namespace  mtl::interface::kernel
 The kernels that take their width from interleave_rows.
namespace  mtl::interface::detail

Functions

template<typename T, typename Kernel>
consteval std::size_t mtl::interface::measured_interleave_rows ()
 The measured float/double width for Kernel on this target, before the register cap (see the top of this file).
constexpr std::size_t mtl::interface::interleave_cap (std::size_t measured, std::size_t registers)
 A measured width capped at half of registers vector registers: the other half holds the batches of A and x.
template<typename T, typename Kernel>
consteval std::size_t mtl::interface::default_interleave_rows ()
 The default width for T and Kernel, before any override (see the top of this file).
template<typename T, typename Kernel>
consteval std::size_t mtl::interface::configured_interleave_rows ()
 The width with the -D overrides applied.
template<typename T, typename Kernel>
consteval bool mtl::interface::interleave_rows_at_runtime ()
 Whether Kernel picks its width for T at run time (#778): only with MTL5_INTERLEAVE_RUNTIME, on x86-64 or AArch64, for float and double, and only where neither a -D override nor a specialization fixed the width.
template<typename Kernel>
consteval int mtl::interface::detail::interleave_kernel_index ()
template<typename T, typename Kernel>
std::size_t mtl::interface::selected_interleave_rows () noexcept
 The width Kernel uses for T in this process: the run-time choice where there is one, else interleave_rows_v.
template<typename T, typename Kernel, typename F>
decltype(auto) mtl::interface::with_interleave_rows (F &&f)
 Call f(std::integral_constant<std::size_t, W>{}) with the width Kernel uses for T: interleave_rows_v, or with run-time selection, the width chosen for this CPU, dispatched over runtime_interleave_widths.

Variables

constexpr std::size_t mtl::interface::vector_registers
 The vector registers on the target, from the compiler's ISA macros: one floating-point accumulator occupies one, scalar or not.
template<typename T, typename Kernel>
constexpr std::size_t mtl::interface::interleave_rows_v
template<typename T, typename Kernel>
constexpr bool mtl::interface::interleave_rows_at_runtime_v = interleave_rows_at_runtime<T, Kernel>()