|
NumericAL
A header-only C++20 lexer built on REAL
|
The storage of a product's packed operands, kept by the calling thread from one product to the next. More...
#include <gemm.hpp>
Public Member Functions | |
| packing_storage (std::size_t a_count, std::size_t b_count) | |
Room for a_count packed elements of A and b_count of B. | |
| packing_storage (const packing_storage &)=delete | |
| packing_storage & | operator= (const packing_storage &)=delete |
| packing_storage (packing_storage &&)=delete | |
| packing_storage & | operator= (packing_storage &&)=delete |
| ~packing_storage () | |
| T * | a () const noexcept |
| A's packed elements. | |
| T * | b () const noexcept |
| B's packed elements. | |
Static Public Member Functions | |
| static buffer< T > & | kept () noexcept |
| The storage this thread keeps between products. | |
Static Public Attributes | |
| static constexpr std::size_t | kept_limit {(std::size_t {32} << 20U) / sizeof(T)} |
| The most elements a thread keeps between products (32 MiB). | |
Static Private Member Functions | |
| static buffer< T > | grown (buffer< T > storage, std::size_t count) |
storage with at least count elements (it only grows, so a reuse writes nothing). | |
| static T * | aligned (T *at) noexcept |
| line_aligned. | |
Private Attributes | |
| buffer< T > | storage_ |
| T * | a_ |
| T * | b_ |
Static Private Attributes | |
| static constexpr std::size_t | padding {(packed_line / sizeof(T)) + 1} |
| Elements enough to reach a line. | |
The storage of a product's packed operands, kept by the calling thread from one product to the next.
A fresh allocation of megabytes is mapped anew and faulted in page by page on every product (at order 512 on twenty x86-64 threads, a product took 3.6 times as long). Each operand starts a cache line, so a vector load of a packed row never straddles two (one in two did, which cost an AVX-512 product a fifth of its speed). The storage leaves the thread's keeping while a product uses it: a product nested in another on the same thread (a scalar whose arithmetic multiplies matrices) finds none kept and takes its own. Storage past kept_limit is released, so one huge product holds no memory afterwards.
|
inline |
|
delete |
|
delete |
|
inline |
|
inlinenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
|
delete |
|
delete |
|
private |
|
private |
|
staticconstexpr |
|
staticconstexprprivate |