|
| concept | BlasDenseMatrix |
| | Concept satisfied by dense matrix types eligible for BLAS/LAPACK dispatch.
|
| concept | BlasHermitianMatrix |
| | Concept satisfied by dense matrix types eligible for complex-Hermitian LAPACK dispatch (cheev/zheev).
|
| concept | ContiguousVector |
| | True when a vector type's storage is CONTIGUOUS – data()[i] IS element i.
|
| concept | BlasDenseVector |
| | Concept satisfied by dense vector types eligible for BLAS dispatch.
|
| concept | SimdDenseVector |
| | Concept satisfied by dense vector types eligible for MTL5's OWN SIMD kernels.
|
| concept | SimdNarrowVector |
| | Concept satisfied by dense vector types whose element type is not a lane but can be WIDENED into one by a dot-product accumulate – 16-bit integers, as of #451 phase 2.
|
| concept | SimdQuadVector |
| | Concept satisfied by dense vector types of an 8-bit element that the quad multiply-accumulate can widen into a 32-bit lane (#451 phase 3).
|
| concept | ContiguousMatrixData |
| | Storage shape only: contiguous data() plus dimensions, with NO constraint on the element type.
|
| concept | SimdDenseMatrix |
| | Concept satisfied by dense matrix types eligible for MTL5's own SIMD kernels – BlasDenseMatrix widened to every mtl::simd lane type, for the same reason as SimdDenseVector.
|
| concept | ThreadableDenseMatrix |
| | Concept satisfied by dense matrix types whose OUTPUT ROWS may be partitioned across threads: the storage shape only, with NO constraint on the element type.
|
| concept | ThreadableDenseVector |
| | Concept satisfied by dense vector types usable as an operand or an output of a row-partitioned kernel.
|
|
| template<typename T> |
| constexpr std::size_t | row_grain (std::size_t units_per_row) |
| | Grain (in output rows) for a kernel that partitions over rows, given the work each row costs in iteration units – num_cols() for a GEMV, N*K for a GEMM.
|
| template<typename MA, typename MB> |
| blas_triangular_call | blas_triangular_describe (bool upper, std::size_t m, std::size_t n) |
| template<typename M> |
| constexpr char | blas_lower_uplo () |
| | For a symmetric operand whose LOWER triangle holds the data: the uplo that names that triangle in the column-major view of its buffer.
|
| template<typename T, typename Kernel> |
| consteval std::size_t | measured_interleave_rows () |
| | The measured float/double width for Kernel on this target, before the register cap (see the top of this file).
|
| constexpr std::size_t | interleave_cap (std::size_t measured, std::size_t registers) |
| | A measured width capped at half of registers vector registers: the other half holds the batches of A and x.
|
| template<typename T, typename Kernel> |
| consteval std::size_t | default_interleave_rows () |
| | The default width for T and Kernel, before any override (see the top of this file).
|
| template<typename T, typename Kernel> |
| consteval std::size_t | configured_interleave_rows () |
| | The width with the -D overrides applied.
|
| template<typename T, typename Kernel> |
| consteval bool | interleave_rows_at_runtime () |
| | Whether Kernel picks its width for T at run time (#778): only with MTL5_INTERLEAVE_RUNTIME, on x86-64 or AArch64, for float and double, and only where neither a -D override nor a specialization fixed the width.
|
| template<typename T, typename Kernel> |
| std::size_t | selected_interleave_rows () noexcept |
| | The width Kernel uses for T in this process: the run-time choice where there is one, else interleave_rows_v.
|
| template<typename T, typename Kernel, typename F> |
| decltype(auto) | with_interleave_rows (F &&f) |
| | Call f(std::integral_constant<std::size_t, W>{}) with the width Kernel uses for T: interleave_rows_v, or with run-time selection, the width chosen for this CPU, dispatched over runtime_interleave_widths.
|
| constexpr bool | is_runtime_interleave_width (std::size_t w) noexcept |
| | Whether w is one of runtime_interleave_widths.
|
| constexpr const char * | to_string (interleave_cpu c) noexcept |
| constexpr interleave_choice | interleave_table (interleave_cpu cpu) noexcept |
| | The measured widths for cpu under this compiler and build (see the top of this file).
|
| interleave_cpu | detect_interleave_cpu () noexcept |
| | The core this thread's CPU is, as far as the table goes.
|
| interleave_cpu | runtime_interleave_cpu () noexcept |
| | The core detected on first use, cached.
|
| void | 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 | 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.
|
| constexpr const char * | blas_vendor () noexcept |
| | The BLAS/LAPACK vendor CMake detected: "mkl", "blis", "openblas" or "".
|
| constexpr bool | blas_capped_in_region () noexcept |
| | Whether a vendor call made inside an MTL5 region runs on one thread.
|
| int | blas_vendor_threads () noexcept |
| | The number of threads the detected vendor would use for a call made on this thread now; 0 when no vendor was detected.
|
|
| template<typename T> |
| constexpr bool | is_blas_scalar_v |
| | True for scalar types supported by standard BLAS/LAPACK (float, double).
|
| template<typename T> |
| constexpr bool | is_lapack_complex_v = false |
| | True for complex scalar types backed by LAPACK (complex<float>, complex<double>).
|
| template<typename T> |
| constexpr bool | is_lapack_complex_v< std::complex< T > > = is_blas_scalar_v<T> |
| template<typename Accumulator> |
| constexpr bool | accumulator_allows_blas_v = std::is_void_v<Accumulator> |
| | Whether the requested accumulator policy permits a hardware-fixed BLAS / native-fast path.
|
| template<typename M> |
| constexpr bool | host_resident_v = memory_space_t<M>::host_accessible |
| | Whether host code, and so every dispatch target in this header, may read M's elements.
|
| template<typename M, typename Space> |
| constexpr bool | in_memory_space_v = std::is_same_v<memory_space_t<M>, Space> |
| | Whether M's elements live in memory space Space.
|
| template<typename M, typename... Ms> |
| constexpr bool | same_runtime_v |
| | Whether every operand belongs to one device runtime (#1017).
|
| template<typename R, typename T> |
| constexpr bool | runtime_supports_v |
| | Whether runtime R's devices can compute in T (#1017): false for double on a device without FP64.
|
| template<typename T> |
| constexpr std::size_t | parallel_chunk_units |
| | Iteration units that make one parallel chunk worth dispatching, for element type T.
|
| template<typename M> |
| constexpr bool | is_row_major_v |
| | Check if a matrix type uses row-major orientation.
|
| template<typename M> |
| constexpr bool | is_compressed2D_v = false |
| | Check if a matrix type is a sparse compressed2D (for sparse solver dispatch).
|
| template<typename Value, typename Params> |
| constexpr bool | is_compressed2D_v< mat::compressed2D< Value, Params > > = true |
| template<typename M> |
| constexpr bool | is_suitesparse_eligible_v |
| | True for sparse matrices with BLAS-compatible scalar types (float/double).
|
| template<typename V> |
| constexpr bool | is_dense_vector_double_v = false |
| | True for vec::dense_vector<double, P>, the only vector type the SuiteSparse bindings (umfpack_solve, cholmod_solve, spqr_solve) take.
|
| template<typename Params> |
| constexpr bool | is_dense_vector_double_v< vec::dense_vector< double, Params > > = true |
| template<typename M, typename VecX, typename VecB> |
| constexpr bool | suitesparse_solve_dispatches_v |
| | True when the sparse solve dispatch can call a SuiteSparse binding: compressed2D<double> with dense_vector<double> x and b.
|
| constexpr std::size_t | vector_registers |
| | The vector registers on the target, from the compiler's ISA macros: one floating-point accumulator occupies one, scalar or not.
|
| template<typename T, typename Kernel> |
| constexpr std::size_t | interleave_rows_v |
| template<typename T, typename Kernel> |
| constexpr bool | interleave_rows_at_runtime_v = interleave_rows_at_runtime<T, Kernel>() |
| constexpr std::size_t | runtime_interleave_widths [] = {2, 4, 6, 8, 12} |
| | The widths run-time selection compiles each kernel at.
|
template<typename T>
| std::size_t mtl::interface::parallel_chunk_units |
|
inlineconstexpr |
Initial value:=
std::is_arithmetic_v<T> ? std::size_t{65536} : std::size_t{1024}
Iteration units that make one parallel chunk worth dispatching, for element type T.
A chunk must hold enough work to amortize the pool's condition-variable handoff, and "enough" is a WALL-CLOCK quantity, so counting operations only works if you know what an operation costs. 65536 is the budget the native paths have always used, and it is right for a type whose multiply-add is one instruction.
A class-type scalar is not that type. Its multiply-add is at minimum a non-inlined call, and for the software-emulated formats this predicate exists to serve it measures 100x-6000x a double flop (#446). Charging them the same 65536 units per chunk asks for hundreds of times more wall-clock per chunk than the handoff needs, and the cost is paid in PARALLELISM, not overhead: parallel_for caps the team at n / grain chunks, so a posit GEMM at n=64 (4096 units per output row -> grain 16) would form 4 chunks and leave half of an 8-way pool idle on a problem that already takes a second. 1024 units keeps the chunk far above the handoff cost for any emulated format while letting the small-n case fill the pool.
std::is_arithmetic_v is the split because it is exactly the line between "the hardware does this" and "software does this". std::complex<double> is class-typed and lands on the smaller budget – a few times too small rather than orders of magnitude too large, which is the safe side to miss on.