|
TDLS 0.2.0
Tiny Device-callable Linear Solvers
|
Compile-time knobs of the TiledLUpp solvers, carrying the tuned defaults. More...
#include <config.hpp>
Public Attributes | |
| int | tile_size = 3 |
| Schedule | schedule = Schedule::RightLooking |
| Elimination schedule of the tiled factorization, see Schedule. | |
| StructuralReal< T > | oot_threshold = std::is_same_v<T, float> ? T(1e-4f) : T(1e-10) |
| StructuralReal< T > | singular_floor = std::numeric_limits<T>::min() |
| bool | oot_first_acceptable = true |
| bool | unroll_inner = true |
| MatrixLayout | layout = MatrixLayout::RowMajor |
Compile-time knobs of the TiledLUpp solvers, carrying the tuned defaults.
| T | scalar type (float, double or long double) |
| MatrixLayout tdls::TiledLUppConfig< T >::layout = MatrixLayout::RowMajor |
Memory layout of the factor matrix, in both solvers and both residency modes. The knob only remaps the flat element index that the element stride scales: the arithmetic sequence is unchanged, so both layouts produce bitwise-identical results on identical inputs. Row-major is the TFEL convention and the default. A factorization keeps the layout of its configuration, so its substitutions share it by construction. The vector operands and the pivot are one-dimensional and unaffected.
| bool tdls::TiledLUppConfig< T >::oot_first_acceptable = true |
Out-of-tile pivot search strategy. When true, the below-tile scan stops at the first candidate whose corrected magnitude reaches oot_threshold instead of scanning the whole panel for the maximum; the running maximum is still kept as the fallback when no candidate is acceptable. Cheaper in the OOT-heavy regime (especially left-looking, where every candidate replays the prior tiles), at the cost of a possibly smaller (but still >= oot_threshold) pivot. Set false to restore the full-panel partial-pivoting scan.
| StructuralReal<T> tdls::TiledLUppConfig< T >::oot_threshold = std::is_same_v<T, float> ? T(1e-4f) : T(1e-10) |
Acceptable-pivot threshold of the out-of-tile search. Both thresholds carry the scalar type T by construction, stored exactly as tdls::StructuralReal values so that the configuration stays a template argument everywhere; write them as plain T values, the conversions are implicit (a long double value must fit a 63-bit odd mantissa, as every double literal does). An in-tile pivot candidate whose magnitude reaches this value is accepted without looking outside the tile; below it, the search extends to the rows under the tile (out-of-tile pivoting) and the best corrected candidate wins.
| StructuralReal<T> tdls::TiledLUppConfig< T >::singular_floor = std::numeric_limits<T>::min() |
Singularity floor: the factorization is declared singular when even the best candidate of the out-of-tile recovery stays below it, or when the best pivot of a trailing tile does. The floor only guards the pivots below oot_threshold (a pivot reaching it is accepted directly), so it must not exceed oot_threshold, and it must be positive, a zero floor letting a zero pivot through; the solvers enforce both contracts at compile time. numeric_limits<T>::min() rejects only a zero/subnormal pivot, a genuine structural singularity. A merely small pivot is kept on purpose: the loss of stability is surfaced by the backward error and overflow is caught downstream by the caller, whereas an absolute floor wrongly flags well-conditioned matrices at small scale.
| int tdls::TiledLUppConfig< T >::tile_size = 3 |
Tile extent: the matrix is processed as a grid of tile_size x tile_size register tiles. This is the main performance axis of the solvers. Tune it per system dimension (measured optima in tfelGPU, the source project: 3, 4 or 6 depending on N). Both TiledLUpp solvers only require tile_size >= 1. The tile size may exceed the dimension (the grid is then a single partial tile), and tile_size = 1 degenerates into an untiled scalar elimination.
| bool tdls::TiledLUppConfig< T >::unroll_inner = true |
Unroll policy of the in-tile scalar loops, applied through a two-branch if constexpr (the pragma dialect itself lives in core/macros.hpp). true: loops indexing register tiles carry a forced-unroll pragma, the guard that keeps tiles in registers on GPU backends, where a rolled loop indexes the tile dynamically and demotes it to slow local memory. false: no unroll pragma anywhere, for faster compiles, GPU performance not guaranteed. Outer tile-sweep loops never carry a pragma in either branch.