MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
interleave_runtime.hpp File Reference
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <mtl/util/cpuid.hpp>

Classes

struct  mtl::interface::interleave_choice
 A table entry: width[type][kernel], type 0 = double and 1 = float, kernel 0 = gemv, 1 = trmv and 2 = the forward substitution. More...

Namespaces

namespace  mtl
namespace  mtl::interface
namespace  mtl::interface::detail

Enumerations

enum class  mtl::interface::interleave_cpu : unsigned char {
  mtl::interface::unknown , mtl::interface::alder_lake , mtl::interface::ivy_bridge , mtl::interface::zen4 ,
  mtl::interface::cortex_a78ae , mtl::interface::cortex_a78c
}
 The cores the table knows. More...

Functions

constexpr bool mtl::interface::is_runtime_interleave_width (std::size_t w) noexcept
 Whether w is one of runtime_interleave_widths.
constexpr const char * mtl::interface::to_string (interleave_cpu c) noexcept
constexpr interleave_choice mtl::interface::interleave_table (interleave_cpu cpu) noexcept
 The measured widths for cpu under this compiler and build (see the top of this file).
interleave_cpu mtl::interface::detect_interleave_cpu () noexcept
 The core this thread's CPU is, as far as the table goes.
interleave_cpu mtl::interface::runtime_interleave_cpu () noexcept
 The core detected on first use, cached.
std::atomic< std::size_t > & mtl::interface::detail::forced_interleave_rows () noexcept
const interleave_choice & mtl::interface::detail::runtime_interleave_choice () noexcept
void mtl::interface::force_interleave_rows (std::size_t w)
 Make every run-time-selected kernel use width w; 0 goes back to the table.
std::size_t mtl::interface::runtime_interleave_width (int type, int kernel) noexcept
 The width run-time selection picks for type (0 = double, 1 = float) and kernel (0 = gemv, 1 = trmv, 2 = the forward substitution): the forced one, else the table's, else 0 for the compile-time default.

Variables

constexpr std::size_t mtl::interface::runtime_interleave_widths [] = {2, 4, 6, 8, 12}
 The widths run-time selection compiles each kernel at.