MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::BlockScheme Concept Reference

A block-quantized storage format: More...

#include <block_scheme.hpp>

Concept definition

template<typename S>
concept mtl::BlockScheme = requires(const std::byte* src, float* dst) {
{ S::block_size } -> std::convertible_to<std::size_t>;
{ S::block_bytes } -> std::convertible_to<std::size_t>;
S::decode(src, dst);
} && (S::block_size > 0) && (S::block_bytes > 0)
A block-quantized storage format:
Definition block_scheme.hpp:35

Detailed Description

A block-quantized storage format:

  • S::block_size – elements per block;
  • S::block_bytes – bytes per block, as stored;
  • S::decode(src, dst) – the REFERENCE decode of the block at src into block_size floats at dst. Fused kernels are optimizations measured against this.

Optionally, S::decode_element(src, j) decodes element j of the block alone. block_matrix_view uses it for element access when it exists, and decodes the whole block otherwise.