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

Namespaces

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

Functions

constexpr std::size_t mtl::detail::quad_depth (std::size_t k)
 k rounded up to a whole number of 4-value groups – the depth the quad layout actually stores, and the depth the micro-kernel steps.
constexpr std::size_t mtl::detail::packed_A_quad_size (std::size_t m, std::size_t k, std::size_t MR)
 Elements needed to pack an m x k A block into quad-interleaved MR-row panels.
constexpr std::size_t mtl::detail::packed_B_quad_size (std::size_t k, std::size_t n, std::size_t NR)
 Elements needed to pack a k x n B block into quad-interleaved NR-col panels.
template<bool Quad>
constexpr std::size_t mtl::detail::packed_A_size_for (std::size_t m, std::size_t k, std::size_t MR)
 The A-panel size for whichever layout the (accumulator, operand) pair selects.
template<bool Quad>
constexpr std::size_t mtl::detail::packed_B_size_for (std::size_t k, std::size_t n, std::size_t NR)
 The B-panel size for whichever layout the pair selects; see packed_A_size_for.
template<typename T, std::size_t MR>
requires mtl::Scalar<T>
void mtl::detail::pack_A_quad (const T *A, std::ptrdiff_t rs, std::ptrdiff_t cs, std::size_t m, std::size_t k, T *Ap)
 Pack an m x k block of A into quad-interleaved MR-row micro-panels.
template<typename T, std::size_t NR>
requires mtl::Scalar<T>
void mtl::detail::pack_B_quad_panels (const T *B, std::ptrdiff_t rs, std::ptrdiff_t cs, std::size_t k, std::size_t n, T *Bp, std::size_t q0, std::size_t q1)
 Pack panels [q0, q1) of a k x n B block into quad-interleaved NR-col micro-panels, each written at the offset it would occupy in a whole pack:
template<typename T, std::size_t NR>
requires mtl::Scalar<T>
void mtl::detail::pack_B_quad (const T *B, std::ptrdiff_t rs, std::ptrdiff_t cs, std::size_t k, std::size_t n, T *Bp)