NumericAL
A header-only C++20 lexer built on REAL
Loading...
Searching...
No Matches
Classes | Static Public Member Functions | Static Public Attributes | List of all members
numerical::detail::vector_tile_kernel< T > Struct Template Reference

The vector path's tile: gemm_mr × gemm_nr elements of C in registers (gemm_kernel), each product rounded before its sum unless the compiler contracts c + a·b into a fused multiply-add. More...

#include <gemm.hpp>

Classes

struct  session
 Nothing to turn on around a task. More...
 

Static Public Member Functions

static constexpr bool reads_b_in_place (std::size_t ldb) noexcept
 Whether B's rows ldb apart are read in place: no farther apart than a packed sliver's (and a B that one block of rows of A reads once, wherever its rows are: gemm_packed).
 
static void pack_a (const T *a, std::size_t lda, std::size_t rows, std::size_t kc, T *out)
 A's slivers for this tile (gemm_pack_a).
 
static void tile (std::size_t kc, const T *ap, const T *bp, std::size_t ldb, T *c, std::size_t ldc, std::size_t rows, std::size_t cols)
 C += Aₚ·Bₚ for one tile of C (rows × cols) over a panel of depth kc, B's rows ldb apart.
 

Static Public Attributes

static constexpr std::size_t mr {gemm_mr}
 The tile's rows.
 
static constexpr std::size_t nr {gemm_nr<T>}
 The tile's columns.
 
static constexpr std::size_t depth {gemm_kc}
 The panel depth.
 
static constexpr std::size_t block_rows {gemm_mc}
 
static constexpr std::size_t b_in_place_rows {mr}
 The most rows of A for which gemm_packed reads B in place at any distance between its rows (where reads_b_in_place does at all): one row of tiles, each of B's slivers read once. Six AVX2 cores, B of 300 to 800 square: 1 to 8 rows 22 to 40 % faster, 16 to 72 up to 2.5 times slower, B read again for each row of tiles.
 
static constexpr std::size_t speedup {gemm_kernel_speedup}
 The weight of its work (gemm_kernel_speedup).
 
static constexpr std::size_t serial_below {1}
 Every product with work shares it (gemm_shares).
 

Detailed Description

template<typename T>
struct numerical::detail::vector_tile_kernel< T >

The vector path's tile: gemm_mr × gemm_nr elements of C in registers (gemm_kernel), each product rounded before its sum unless the compiler contracts c + a·b into a fused multiply-add.

Definition at line 987 of file gemm.hpp.

Member Function Documentation

◆ pack_a()

template<typename T >
static void numerical::detail::vector_tile_kernel< T >::pack_a ( const T *  a,
std::size_t  lda,
std::size_t  rows,
std::size_t  kc,
T *  out 
)
inlinestatic

A's slivers for this tile (gemm_pack_a).

Definition at line 1013 of file gemm.hpp.

◆ reads_b_in_place()

template<typename T >
static constexpr bool numerical::detail::vector_tile_kernel< T >::reads_b_in_place ( std::size_t  ldb)
inlinestaticconstexprnoexcept

Whether B's rows ldb apart are read in place: no farther apart than a packed sliver's (and a B that one block of rows of A reads once, wherever its rows are: gemm_packed).

Definition at line 1007 of file gemm.hpp.

◆ tile()

template<typename T >
static void numerical::detail::vector_tile_kernel< T >::tile ( std::size_t  kc,
const T *  ap,
const T *  bp,
std::size_t  ldb,
T *  c,
std::size_t  ldc,
std::size_t  rows,
std::size_t  cols 
)
inlinestatic

C += Aₚ·Bₚ for one tile of C (rows × cols) over a panel of depth kc, B's rows ldb apart.

Definition at line 1023 of file gemm.hpp.

Member Data Documentation

◆ b_in_place_rows

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::b_in_place_rows {mr}
staticconstexpr

The most rows of A for which gemm_packed reads B in place at any distance between its rows (where reads_b_in_place does at all): one row of tiles, each of B's slivers read once. Six AVX2 cores, B of 300 to 800 square: 1 to 8 rows 22 to 40 % faster, 16 to 72 up to 2.5 times slower, B read again for each row of tiles.

Definition at line 997 of file gemm.hpp.

◆ block_rows

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::block_rows {gemm_mc}
staticconstexpr

The rows of one task, a whole number of tiles.

Definition at line 992 of file gemm.hpp.

◆ depth

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::depth {gemm_kc}
staticconstexpr

The panel depth.

Definition at line 991 of file gemm.hpp.

◆ mr

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::mr {gemm_mr}
staticconstexpr

The tile's rows.

Definition at line 989 of file gemm.hpp.

◆ nr

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::nr {gemm_nr<T>}
staticconstexpr

The tile's columns.

Definition at line 990 of file gemm.hpp.

◆ serial_below

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::serial_below {1}
staticconstexpr

Every product with work shares it (gemm_shares).

Definition at line 999 of file gemm.hpp.

◆ speedup

template<typename T >
constexpr std::size_t numerical::detail::vector_tile_kernel< T >::speedup {gemm_kernel_speedup}
staticconstexpr

The weight of its work (gemm_kernel_speedup).

Definition at line 998 of file gemm.hpp.


The documentation for this struct was generated from the following file: