|
| template<typename T , bool gpu> |
| TDLS_HOST_DEVICE constexpr bool | tdls::detail::physical_rows_fit_on (const int n) noexcept |
| | Whether a matrix of n unknowns is small enough for the physical row interchanges on the given hardware (RowInterchange::Auto). On GPU, the matrix must fit in the registers of a thread, n^2 values of T within about 200 registers of 32 bits: n <= 14 in float, 10 in double and long double (which GPUs compute as double). On CPU, measured on 6 cores (the blocks of ArrowheadLUpp): n <= 8 in float (the tiled solver vectorizes better beyond), 12 in double and long double.
|
| |
| template<typename T > |
| TDLS_HOST_DEVICE constexpr bool | tdls::detail::physical_rows_fit (const int n) noexcept |
| | physical_rows_fit_on for the hardware of this compilation pass (TDLS_TARGET_GPU).
|
| |
| template<typename T , bool gpu> |
| TDLS_HOST_DEVICE constexpr bool | tdls::detail::physical_rows_on (const RowInterchange r, const int n) noexcept |
| | Whether a factorization of n unknowns interchanges its rows physically on the given hardware, RowInterchange::Auto resolved.
|
| |
| template<typename T > |
| TDLS_HOST_DEVICE constexpr bool | tdls::detail::physical_rows (const RowInterchange r, const int n) noexcept |
| | physical_rows_on for the hardware of this compilation pass (TDLS_TARGET_GPU).
|
| |
| template<typename T > |
| TDLS_HOST_DEVICE constexpr bool | tdls::detail::physical_rows_here (const RowInterchange r, const int n) noexcept |
| | Whether a factorization of n unknowns interchanges its rows physically, decided at run time on the side of the code: as physical_rows, except in a single-pass nvc++ compilation, where host code takes the CPU rule and device code the GPU rule.
|
| |
| template<int s> |
| TDLS_HOST_DEVICE TDLS_FORCE_INLINE_ALL constexpr int | tdls::detail::stride_or (const int runtime) noexcept |
| | The stride an entry point uses: the compile-time stride when it is known, the runtime one otherwise (see dynamic_stride).
|
| |
Shared vocabulary and conventions of the solver families.
- Author
- Tristan Chenaille
- Copyright
- Copyright (C) 2026 CEA. All rights reserved. This project is publicly released under the BSD 3-Clause License (see the LICENSE file). CEA may also distribute it under specific licensing conditions.
Knob types shared by the configuration of every solver family: the elimination schedule of a factorization, the row interchanges of its partial pivoting and the memory layout of a dense matrix. Each family configuration carries its own members of these types.
The families also share one calling convention. Every operand is a raw pointer pre-offset by the caller plus one runtime element stride, which covers the AoS, SoA and AoSoA batch layouts alike. The entry points of the compile-time solvers also take each stride as a template argument, dynamic_stride by default: a stride known at compile time is given there (see dynamic_stride). The flat element index of an object (N*N for a matrix) must stay below 2^31; element offsets, index times stride, are computed in 64-bit arithmetic (TDLS_STRIDED). Residency template booleans, where a solver offers them, describe what the passed buffers are and carry no default. Factorizing entry points come in counting and diagnostics-free overloads, the latter compiling the diagnostics out entirely.
template<typename T , bool gpu>
| TDLS_HOST_DEVICE constexpr bool tdls::detail::physical_rows_fit_on |
( |
const int | n | ) |
|
|
nodiscardconstexprnoexcept |
Whether a matrix of n unknowns is small enough for the physical row interchanges on the given hardware (RowInterchange::Auto). On GPU, the matrix must fit in the registers of a thread, n^2 values of T within about 200 registers of 32 bits: n <= 14 in float, 10 in double and long double (which GPUs compute as double). On CPU, measured on 6 cores (the blocks of ArrowheadLUpp): n <= 8 in float (the tiled solver vectorizes better beyond), 12 in double and long double.
- Template Parameters
-
| T | scalar type |
| gpu | the hardware: GPU (true) or CPU (false) |
- Parameters
-
- Returns
- true when Auto takes the physical row interchanges
| int tdls::dynamic_stride = -1 |
|
inlineconstexpr |
The compile-time stride of an operand whose stride is known at run time only: the default of the stride template parameters of the compile-time solvers.
Every entry point of TiledLUppSolverStatic, CooperativeLUppSolverStatic and ArrowheadLUppSolverStatic takes the element stride of each strided operand twice: an int function argument, X_stride, and an int template parameter, X_static_stride, dynamic_stride by default. These template parameters come after the others, but for the deduced types of the callables, in the order of the function arguments. With dynamic_stride, the solver reads the function argument. With a positive value, 1 in AoS or 32 in AoSoA by blocks of 32 interleaved systems for instance, the solver uses that value and ignores the function argument: it runs as if the caller had passed the constant, which the compilers fold wherever they inline the solver, everywhere on GPU, and the out-of-line parts of ArrowheadLUpp (the second pass, streamed_out_of_line) receive it as a template argument. A stride known only at run time, the number of systems in SoA, stays a function argument. Under internal residency the stride of the operand is ignored either way.