|
TDLS 0.4.0
Tiny Device-callable Linear Solvers
|
Runtime-shape variant of the ArrowheadLUpp solver. More...
#include <limits>#include <tdls/core/macros.hpp>#include <tdls/core/math.hpp>#include <tdls/solvers/arrowhead_lupp/config.hpp>#include <tdls/solvers/arrowhead_lupp/storage_map.hpp>#include <tdls/solvers/tiled_lupp/solver_dynamic.hpp>Go to the source code of this file.
Classes | |
| struct | tdls::ArrowheadLUppSolverDynamic< T, Config > |
| Arrowhead solver with a runtime shape. More... | |
| struct | tdls::ArrowheadLUppSolverDynamic< T, Config >::StreamedBlock |
| Block k of a streamed solve: a view of the areas of the workspace where the solver factors and solves the block, which the caller fills through the accessors when the solver asks for it; the factorization and the solve then run in place; only a save, after the areas of the stored path, is copied to store a refused block as given. The accessors are those of ArrowheadLUppSolverStatic::StreamedBlock, so that one provider serves both solvers. Entries in logical order whatever the layout and the storage. The areas hold the previous block: the caller writes every entry, zeros included, by assignment. More... | |
| struct | tdls::ArrowheadLUppSolverDynamic< T, Config >::RecomputedBlock |
| Block k of a recomputed solve (solve_inplace_recomputed, solve_inplace_recomputed_or_tangent): a StreamedBlock, the same view and accessors, and whether the solver asks for the block again, in its recovery. A provider taking a StreamedBlock& serves too; one taking a RecomputedBlock&, or auto&, reads the flag. The streamed entry points keep the StreamedBlock alone, so that their code is that of a solver without the recomputed ones. More... | |
Macros | |
| #define | TDLS_ARROW_LUPP_DYN_A(idx) |
| Strided stored entry at index idx of the matrix. | |
| #define | TDLS_ARROW_LUPP_DYN_Y(i) |
| Strided entry i of the right-hand side and solution. | |
| #define | TDLS_ARROW_LUPP_DYN_YW(m, i) |
| Strided entry i of column m of the right-hand sides and solutions. The function declares ycols, its number of columns when fixed at compile time (0 otherwise): with one, m is ignored and the macro is TDLS_ARROW_LUPP_DYN_Y exactly. | |
| #define | TDLS_ARROW_LUPP_DYN_W(e) |
| Strided entry e of the workspace. | |
| #define | TDLS_ARROW_LUPP_DYN_F(r, c) |
| Entry (r, c) of the front of the second pass, row-major at the start of the workspace. | |
| #define | TDLS_ARROW_LUPP_DYN_LU(i, j) |
| Entry (i, j) of the factors of the block in the workspace, by rows (physical_solve). | |
| #define | TDLS_ARROW_LUPP_DYN_RC(c, i) |
| Entry i of column c of the right-hand sides of the block in the workspace (physical_solve). | |
Runtime-shape variant of the ArrowheadLUpp solver.
Same algorithm as ArrowheadLUppSolverStatic (solver_static.hpp): static condensation of the blocks with the pivot check, second pass of the refused blocks, border solve, recovery. The difference is that the shape is a runtime function argument instead of a template argument. The storage, the coupling, the layout and the knobs stay compile-time. The blocks and the border are solved by TiledLUppSolverDynamic.
Deliberate differences with the compile-time solver:
For equal shapes and configurations, the results are bitwise identical to the compile-time solver: the arithmetic sequence is the same, only the addressing and the loop mechanics differ. A compiler that fuses multiplications and additions differently in the two (GCC with -march=native does) changes the last bits. -ffp-contract=off (–fmad=false for nvcc) keeps them identical.
The compile-time solver is the performance path; this variant is the flexibility path (shapes unknown at compile time, faster builds).
Preconditions: a workspace and a pivot array of the sizes above. The entry points check the shape first, valid(shape, nrhs), and return false on a shape they reject. An rhs_pass_width above border + nrhs counts as border + nrhs, one pass (the compile-time solver rejects a width above border + 1, its border being known). Element offsets, index times stride, are computed in 64-bit arithmetic.
| #define TDLS_ARROW_LUPP_DYN_A | ( | idx | ) |
Strided stored entry at index idx of the matrix.
| #define TDLS_ARROW_LUPP_DYN_F | ( | r, | |
| c ) |
Entry (r, c) of the front of the second pass, row-major at the start of the workspace.
| #define TDLS_ARROW_LUPP_DYN_LU | ( | i, | |
| j ) |
Entry (i, j) of the factors of the block in the workspace, by rows (physical_solve).
| #define TDLS_ARROW_LUPP_DYN_RC | ( | c, | |
| i ) |
Entry i of column c of the right-hand sides of the block in the workspace (physical_solve).
| #define TDLS_ARROW_LUPP_DYN_W | ( | e | ) |
Strided entry e of the workspace.
| #define TDLS_ARROW_LUPP_DYN_Y | ( | i | ) |
Strided entry i of the right-hand side and solution.
| #define TDLS_ARROW_LUPP_DYN_YW | ( | m, | |
| i ) |
Strided entry i of column m of the right-hand sides and solutions. The function declares ycols, its number of columns when fixed at compile time (0 otherwise): with one, m is ignored and the macro is TDLS_ARROW_LUPP_DYN_Y exactly.