|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
#include <algorithm>#include <bit>#include <cmath>#include <cstddef>#include <cstdint>#include <limits>#include <stdexcept>#include <string>#include <vector>#include <type_traits>#include <mtl/mat/compressed2D.hpp>#include <mtl/vec/dense_vector.hpp>#include <mtl/concepts/scalar.hpp>#include <mtl/math/accumulator_traits.hpp>#include <mtl/sparse/util/csc.hpp>#include <mtl/sparse/util/permutation.hpp>#include <mtl/sparse/analysis/column_etree.hpp>#include <mtl/sparse/factorization/triangular_solve.hpp>#include <mtl/sparse/factorization/level_schedule.hpp>#include <mtl/sparse/factorization/sparse_lu.hpp>#include <mtl/sparse/iterative_refine.hpp>Classes | |
| struct | mtl::sparse::factorization::supernodal_lu_symbolic |
| Symbolic analysis for supernodal LU: a fill-reducing column order fused with the column-etree postorder (so supernode columns are contiguous), plus the relaxed-supernode boundaries that cap dynamic supernode growth. More... | |
| struct | mtl::sparse::factorization::supernodal_lu_factor< Value > |
| Result of numeric supernodal LU factorization (same factor layout as lu_numeric, plus the dynamic L-supernode boundaries). More... | |
| struct | mtl::sparse::factorization::detail::lu_snode< Value > |
| One closed (finished) L-supernode kept densely for use as an update source. More... | |
Namespaces | |
| namespace | mtl |
| namespace | mtl::sparse |
| namespace | mtl::sparse::factorization |
| namespace | mtl::sparse::factorization::detail |
| Numeric KLU factorization: BTF permutation, the permuted matrix B = P*A*Q (block upper triangular), the per-new-index block id, and a left-looking LU factorization of each diagonal block. | |
Functions | |
| template<typename Value, typename Parameters, typename Ordering> | |
| supernodal_lu_symbolic | mtl::sparse::factorization::supernodal_lu_symbolic_analyze (const mat::compressed2D< Value, Parameters > &A, const Ordering &ordering) |
| Symbolic supernodal LU analysis with a fill-reducing column ordering. | |
| template<typename Accumulator = void, typename Value, typename Parameters> requires OrderedField<Value> | |
| supernodal_lu_factor< Value > | mtl::sparse::factorization::supernodal_lu_numeric (const mat::compressed2D< Value, Parameters > &A, const supernodal_lu_symbolic &sym, Value threshold=Value{1}, std::size_t max_super=64, bool scale=false, Value pivot_perturb=Value{0}, std::size_t panel=supernodal_lu_default_panel) |
| Numeric supernodal LU factorization with threshold partial pivoting. | |
| template<typename Value, typename Parameters> requires OrderedField<Value> | |
| void | mtl::sparse::factorization::supernodal_lu_refactor_in_place (const mat::compressed2D< Value, Parameters > &A, supernodal_lu_factor< Value > &fac) |
| Refactorize IN PLACE: recompute fac's numeric values from a matrix with the SAME sparsity pattern, reusing its analyze + pivot/supernode pattern – no ordering, no reach DFS, no pivot search, no supernode detection – and install them while KEEPING the factor pattern and the coupled solve schedules (#310). | |
| template<typename Value, typename Parameters> requires OrderedField<Value> | |
| supernodal_lu_factor< Value > | mtl::sparse::factorization::supernodal_lu_refactor (const mat::compressed2D< Value, Parameters > &A, const supernodal_lu_factor< Value > &prev) |
| Refactorize into a NEW factor object, leaving prev untouched: a copy of prev (symbolic analysis, permutations, supernode boundaries, factor pattern and solve schedules) refactorized in place. | |
| template<typename Accumulator = void, typename Value, typename Parameters, typename VecX, typename VecB, typename Ordering> requires OrderedField<Value> | |
| void | mtl::sparse::factorization::supernodal_lu_solve (const mat::compressed2D< Value, Parameters > &A, VecX &x, const VecB &b, const Ordering &ordering, Value threshold=Value{1}) |
| One-shot supernodal LU solve with a fill-reducing column ordering. | |
| template<typename FactorValue, typename Accumulator = FactorValue, typename Residual, typename Parameters, typename Ordering> | |
| refine_result | mtl::sparse::factorization::supernodal_lu_solve_refined (const mat::compressed2D< Residual, Parameters > &A, vec::dense_vector< Residual > &x, const vec::dense_vector< Residual > &b, const Ordering &ordering, const refine_options &opt={}, FactorValue pivot_perturb=FactorValue{0}) |
| Mixed-precision solve with iterative refinement: factor in FactorValue (e.g. | |
Variables | |
| constexpr std::size_t | mtl::sparse::factorization::supernodal_lu_default_panel = 16 |
| The default panel of supernodal_lu_numeric (#195): the columns whose updates from the supernodes closed before them are applied together, so each supernode block is read once per panel instead of once per column. | |