|
TDLS 0.2.0
Tiny Device-callable Linear Solvers
|
TFEL adaptors: call the TiledLUpp solvers directly on the tfel::math objects (matrices, vectors, views) instead of raw pointers. More...
#include <cstddef>#include <type_traits>#include <tdls/core/macros.hpp>#include <tdls/solvers/tiled_lupp/solver_dynamic.hpp>#include <tdls/solvers/tiled_lupp/solver_static.hpp>Go to the source code of this file.
Classes | |
| struct | tdls::detail::has_data< T, typename > |
| Detects a data() member returning a pointer. More... | |
| struct | tdls::detail::has_data< T, std::void_t< decltype(std::declval< const T & >().data())> > |
| struct | tdls::detail::has_pair_data< T, typename > |
| Detects a data() member returning a (pointer, stride) pair: the shape of strided views, whose data pointer must not be mistaken for contiguous storage. More... | |
| struct | tdls::detail::has_pair_data< T, std::void_t< decltype(std::declval< const T & >().data().first), decltype(std::declval< const T & >().data().second)> > |
| struct | tdls::detail::const_data_pointer< T, bool > |
| Element pointer type of a dense object, const flavour. More... | |
| struct | tdls::detail::const_data_pointer< T, true > |
| Element pointer type of a dense object whose data() returns a (pointer, stride) pair, const flavour. More... | |
| struct | tdls::detail::mutable_data_pointer< T, bool > |
| Element pointer type of a dense object, mutable flavour. More... | |
| struct | tdls::detail::mutable_data_pointer< T, true > |
| Element pointer type of a dense object whose data() returns a (pointer, stride) pair, mutable flavour. More... | |
| struct | tdls::detail::has_stride< T, typename > |
| Detects a stride() member. More... | |
| struct | tdls::detail::has_stride< T, std::void_t< decltype(std::declval< const T & >().stride())> > |
| struct | tdls::detail::has_get_stride< T, typename > |
| Detects a getStride() member. More... | |
| struct | tdls::detail::has_get_stride< T, std::void_t< decltype(std::declval< const T & >().getStride())> > |
| struct | tdls::detail::has_indexing_policy< T, typename > |
| Detects a nested indexing_policy type. More... | |
| struct | tdls::detail::has_indexing_policy< T, std::void_t< typename T::indexing_policy > > |
| struct | tdls::storage_traits< DenseType, std::enable_if_t< detail::is_dense_v< DenseType > > > |
| Storage description of dense objects matching the structural contract: a data() member (plain pointer or (pointer, stride) pair) and an indexing_policy type with constexpr extents. More... | |
| struct | tdls::detail::has_storage_traits< T, typename > |
| Detects a complete storage_traits: the structural contract or a user specialization. More... | |
| struct | tdls::detail::has_storage_traits< T, std::void_t< typename storage_traits< T >::value_type > > |
| struct | tdls::detail::matrix_scalar_of< MatrixType > |
| Scalar type of a dense matrix argument, read from its storage description; a matrix argument without storage_traits is rejected here with an explicit message. More... | |
| struct | tdls::detail::is_solver_config< ConfigType > |
| Detects the configuration value types accepted by the entry points. Only the TiledLUpp family exists today; a specialization per family can join when another one lands. More... | |
| struct | tdls::detail::is_solver_config< TiledLUppConfig< Scalar > > |
| TiledLUppConfig values are accepted. More... | |
| struct | tdls::detail::adaptor_context< MatrixType, Config > |
| Common compile-time context of the adaptor entry points: resolves the scalar type, the dimension and the TiledLUpp solvers from the matrix argument and the configuration value. More... | |
| struct | tdls::detail::pivot_access< PivotType, N > |
| Pivot argument unwrapping: accepts a raw int pointer/array (treated as contiguous caller-local storage) or any int object with storage_traits, vector-like and of the system dimension when both are fixed-size. More... | |
Concepts | |
| concept | tdls::detail::solver_config |
| Concept gating the explicit-configuration entry points. | |
Typedefs | |
| template<typename MatrixType > | |
| using | tdls::detail::matrix_scalar = typename matrix_scalar_of<MatrixType>::type |
| Scalar type of a dense matrix argument, see matrix_scalar_of. | |
Functions | |
| template<typename MatrixType , auto UserConfig> | |
| consteval auto | tdls::detail::checked_config () |
| Validates a user configuration value against the matrix scalar type and returns it with its concrete type. | |
| template<typename VectorType , typename Scalar , int N> | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::detail::check_vector () |
| Checks that a vector-like argument matches the system: arity 1, extent N, same scalar type. The extent is only checkable when both the matrix and the vector are fixed-size; when either side is runtime-sized (N == 0, or a runtime-sized vector), the extent match is an unchecked precondition, as everywhere in the raw API. | |
| template<typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::detail::check_rhs_pair () |
| Checks that the right-hand side and the solution share one residency and one compile-time stride: the raw API carries a single rhs_stride for both. Their extents must match whenever both are fixed-size. With runtime-strided views, both must be mapped on the same batch (equal runtime strides), which is the caller's responsibility. | |
| template<typename RhsType , typename SolutionType , typename Scalar , int N> | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::detail::check_multirhs_pair () |
| Checks a matrix-like right-hand-side block pair (B, X): matching scalar, matching extents where compile-time knowledge allows, one shared layout. On any runtime-sized side the extents are unchecked preconditions, as everywhere in the raw API: B and X must have N rows and the same column count. | |
| template<typename Ctx , int pass_width, bool inplace, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::detail::substitute_multirhs_dispatch (const MatrixType &A, const PivotType &piv, const RhsType &b, SolutionType &x) |
| Shared translator of the matrix right-hand-side entry points: reduces the dense objects to raw arguments and forwards to the _multirhs entry points, which do the pass cutting themselves. Matrix right-hand sides are always routed through the external addressing of the raw API: the register convention of its internal mode is not the row-major layout of dense matrix objects. | |
| template<auto UserConfig, bool oot_diagnostics, typename MatrixType , typename PivotType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::detail::factorize_dispatch (MatrixType &A, PivotType &piv, int &oot_count) |
| Shared engine of the factorize entry points: reduces the dense objects to raw arguments and forwards to the raw factorize, with or without the out-of-tile counter. | |
| template<auto UserConfig, int pass_width, bool oot_diagnostics, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::detail::solve_dispatch (MatrixType &A, PivotType &piv, const RhsType &b, SolutionType &x, int &oot_count) |
| Shared engine of the solve entry points: factorize + substitute on dense objects, with or without the out-of-tile counter. | |
| template<auto UserConfig, int pass_width, bool oot_diagnostics, typename MatrixType , typename PivotType , typename VectorType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::detail::solve_inplace_dispatch (MatrixType &A, PivotType &piv, VectorType &y, int &oot_count) |
| Shared engine of the solve_inplace entry points: fused factorization on dense objects, with or without the out-of-tile counter. | |
| template<detail::solver_config auto UserConfig, typename MatrixType , typename PivotType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::factorize (MatrixType &A, PivotType &piv) |
| Factor a dense matrix object in place, A := P*L*U. | |
| template<typename MatrixType , typename PivotType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::factorize (MatrixType &A, PivotType &piv) |
| Default-configuration overload of factorize. | |
| template<detail::solver_config auto UserConfig, typename MatrixType , typename PivotType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::factorize (MatrixType &A, PivotType &piv, int &oot_count) |
| Counting overload of factorize: also reports the number of columns whose best in-tile pivot fell below oot_threshold. | |
| template<typename MatrixType , typename PivotType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::factorize (MatrixType &A, PivotType &piv, int &oot_count) |
| Default-configuration counting overload of factorize. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve (MatrixType &A, PivotType &piv, const RhsType &b, SolutionType &x) |
| Solve A x = b on dense objects: factorize + substitute. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve (MatrixType &A, PivotType &piv, const RhsType &b, SolutionType &x) |
| Default-configuration overload of solve. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve (MatrixType &A, PivotType &piv, const RhsType &b, SolutionType &x, int &oot_count) |
| Counting overload of solve: also reports the number of columns whose best in-tile pivot fell below oot_threshold. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve (MatrixType &A, PivotType &piv, const RhsType &b, SolutionType &x, int &oot_count) |
| Default-configuration counting overload of solve. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename VectorType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve_inplace (MatrixType &A, PivotType &piv, VectorType &y) |
| Solve A y = y on dense objects with the fused factorization (forward substitution folded into factorize, backward pass after). | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename VectorType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve_inplace (MatrixType &A, PivotType &piv, VectorType &y) |
| Default-configuration overload of solve_inplace. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename VectorType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve_inplace (MatrixType &A, PivotType &piv, VectorType &y, int &oot_count) |
| Counting overload of solve_inplace: also reports the number of columns whose best in-tile pivot fell below oot_threshold. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename VectorType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr bool | tdls::solve_inplace (MatrixType &A, PivotType &piv, VectorType &y, int &oot_count) |
| Default-configuration counting overload of solve_inplace. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute (const MatrixType &A, const PivotType &piv, const RhsType &b, SolutionType &x) |
| Solve x := U^-1 L^-1 P b on dense objects, from a prior factorize. b and x must not alias. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename RhsType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute (const MatrixType &A, const PivotType &piv, const RhsType &b, SolutionType &x) |
| Default-configuration overload of substitute. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute_inplace (const MatrixType &A, const PivotType &piv, SolutionType &x) |
| Solve in place on dense objects: x holds the unpermuted right-hand side on entry and the solution on exit. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute_inplace (const MatrixType &A, const PivotType &piv, SolutionType &x) |
| Default-configuration overload of substitute_inplace. | |
| template<detail::solver_config auto UserConfig, int pass_width = 0, typename MatrixType , typename PivotType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute_canonical (const MatrixType &A, const PivotType &piv, const int col, SolutionType &x) |
| Solve A x = e_col on dense objects, from a prior factorize: the consistent-tangent-operator path. | |
| template<int pass_width = 0, typename MatrixType , typename PivotType , typename SolutionType > | |
| TDLS_HOST_DEVICE TDLS_FORCEINLINE constexpr void | tdls::substitute_canonical (const MatrixType &A, const PivotType &piv, const int col, SolutionType &x) |
| Default-configuration overload of substitute_canonical. | |
Variables | |
| template<typename T > | |
| constexpr bool | tdls::detail::is_dense_v |
| A type is "dense" when it exposes both a data pointer and an indexing policy, the structural core of the TFEL protocol. | |
TFEL adaptors: call the TiledLUpp solvers directly on the tfel::math objects (matrices, vectors, views) instead of raw pointers.
The adaptors are designed for the TFEL math types, recognized STRUCTURALLY: TFEL is never named or included, so the library stays dependency-free, and any type following the TFEL protocol is accepted. Three families are recognized:
A fixed-size matrix resolves the compile-time TiledLUpp solver, with the dimension deduced from the indexing policy and the residency template booleans of the raw API inferred from the argument types (contiguous object -> internal, strided view -> external), mixed freely. A runtime-sized matrix resolves the runtime TiledLUpp solver, every argument reduced to its (pointer, stride) pair. On that path the extents cannot be checked at compile time: the matrix must be square and every vector extent must match its dimension. These are unchecked preconditions, exactly as in the raw API.
solve, solve_inplace, substitute and substitute_inplace also accept a matrix-like right-hand side holding one right-hand side per column: A X = B, every column solved against the one factorization through the multirhs entry points of the raw API. substitute_canonical accepts a matrix-like x the same way: its columns receive the consecutive canonical columns e_col .. e{col+M-1}. On all five, the template parameter pass_width cuts the substitution into passes (0, the default, means all columns in one pass; the last pass takes the remainder).
Two families are rejected at compile time with an explicit message: row-strided matrix views (sub-matrix views, whose stride between rows is unrelated to the column count) cannot be expressed by the TiledLUpp solvers' single-stride addressing, and gather views holding one pointer per element expose no data() at all.
TFEL stores matrices row-major and the adaptors follow that convention: a configuration selecting the column-major layout is rejected at compile time.
The detection can be overridden for non-TFEL types by specializing tdls::storage_traits.
Every entry point comes in two overloads: a default-configuration form, and an explicit-configuration form taking a constexpr TiledLUppConfig value of the matrix scalar type as its first template argument. Only the TiledLUpp family exists today; a configuration value of another family can select it when one lands.
factorize, solve and solve_inplace also come in counting overloads taking a trailing int& out-parameter: the out-of-tile search counter of the raw API. Without it the diagnostic is compiled out.
| using tdls::detail::matrix_scalar = typename matrix_scalar_of<MatrixType>::type |
Scalar type of a dense matrix argument, see matrix_scalar_of.
| MatrixType | dense matrix type |
|
constexpr |
Checks a matrix-like right-hand-side block pair (B, X): matching scalar, matching extents where compile-time knowledge allows, one shared layout. On any runtime-sized side the extents are unchecked preconditions, as everywhere in the raw API: B and X must have N rows and the same column count.
| RhsType | right-hand-side block type |
| SolutionType | solution block type |
| Scalar | scalar type of the system |
| N | system dimension (0 on the runtime path) |
|
constexpr |
Checks that the right-hand side and the solution share one residency and one compile-time stride: the raw API carries a single rhs_stride for both. Their extents must match whenever both are fixed-size. With runtime-strided views, both must be mapped on the same batch (equal runtime strides), which is the caller's responsibility.
| RhsType | right-hand-side type |
| SolutionType | solution type |
|
constexpr |
Checks that a vector-like argument matches the system: arity 1, extent N, same scalar type. The extent is only checkable when both the matrix and the vector are fixed-size; when either side is runtime-sized (N == 0, or a runtime-sized vector), the extent match is an unchecked precondition, as everywhere in the raw API.
| VectorType | dense vector type |
| Scalar | scalar type of the system |
| N | system dimension (0 on the runtime path) |
|
consteval |
Validates a user configuration value against the matrix scalar type and returns it with its concrete type.
| MatrixType | dense matrix type |
| UserConfig | user configuration value |
|
nodiscardconstexpr |
Factor a dense matrix object in place, A := P*L*U.
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
|
nodiscardconstexpr |
Default-configuration overload of factorize.
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
|
nodiscardconstexpr |
Counting overload of factorize: also reports the number of columns whose best in-tile pivot fell below oot_threshold.
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Default-configuration counting overload of factorize.
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Shared engine of the factorize entry points: reduces the dense objects to raw arguments and forwards to the raw factorize, with or without the out-of-tile counter.
| UserConfig | configuration value, validated by checked_config |
| oot_diagnostics | compile the out-of-tile counter in or out |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage |
| [out] | oot_count | out-of-tile search counter (oot_diagnostics) |
|
nodiscardconstexpr |
Solve A x = b on dense objects: factorize + substitute.
With a matrix-like b (and x), all its columns are solved against the one factorization: A X = B. pass_width then cuts the substitution into passes (0 = all columns in one pass; the last pass takes the remainder). The forward pass is not folded into the factorization on that path (see the raw solve_multirhs).
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in] | b | right-hand side, in original order: vector-like, or matrix-like holding one right-hand side per column |
| [out] | x | solution, of the same shape as b |
|
nodiscardconstexpr |
Default-configuration overload of solve.
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in] | b | right-hand side, in original order: vector-like, or matrix-like holding one right-hand side per column |
| [out] | x | solution, of the same shape as b |
|
nodiscardconstexpr |
Counting overload of solve: also reports the number of columns whose best in-tile pivot fell below oot_threshold.
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in] | b | right-hand side, in original order |
| [out] | x | solution, of the same shape as b |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Default-configuration counting overload of solve.
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in] | b | right-hand side, in original order |
| [out] | x | solution, of the same shape as b |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Shared engine of the solve entry points: factorize + substitute on dense objects, with or without the out-of-tile counter.
| UserConfig | configuration value, validated by checked_config |
| pass_width | columns per substitution pass for a matrix-like b |
| oot_diagnostics | compile the out-of-tile counter in or out |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage |
| [in] | b | right-hand side |
| [out] | x | solution |
| [out] | oot_count | out-of-tile search counter (oot_diagnostics) |
|
nodiscardconstexpr |
Solve A y = y on dense objects with the fused factorization (forward substitution folded into factorize, backward pass after).
With a matrix-like y, all its columns are overwritten by the solutions against the one factorization. pass_width then cuts the substitution into passes (0 = all columns in one pass; the last pass takes the remainder). The forward pass is not folded into the factorization on that path (see the raw solve_inplace_multirhs).
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like y (0 = all at once; must be 0 for a vector-like y) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in,out] | y | right-hand side on entry, solution on exit: vector-like, or matrix-like holding one right-hand side per column |
|
nodiscardconstexpr |
Default-configuration overload of solve_inplace.
| pass_width | columns per substitution pass for a matrix-like y (0 = all at once; must be 0 for a vector-like y) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in,out] | y | right-hand side on entry, solution on exit: vector-like, or matrix-like holding one right-hand side per column |
|
nodiscardconstexpr |
Counting overload of solve_inplace: also reports the number of columns whose best in-tile pivot fell below oot_threshold.
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like y (0 = all at once; must be 0 for a vector-like y) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in,out] | y | right-hand side on entry, solution on exit |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Default-configuration counting overload of solve_inplace.
| pass_width | columns per substitution pass for a matrix-like y (0 = all at once; must be 0 for a vector-like y) |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage: int pointer/array or dense int object |
| [in,out] | y | right-hand side on entry, solution on exit |
| [out] | oot_count | number of columns whose best in-tile pivot fell below oot_threshold |
|
nodiscardconstexpr |
Shared engine of the solve_inplace entry points: fused factorization on dense objects, with or without the out-of-tile counter.
| UserConfig | configuration value, validated by checked_config |
| pass_width | columns per substitution pass for a matrix-like y |
| oot_diagnostics | compile the out-of-tile counter in or out |
| [in,out] | A | matrix-like object (factored in place) |
| [in,out] | piv | pivot storage |
| [in,out] | y | right-hand side on entry, solution on exit |
| [out] | oot_count | out-of-tile search counter (oot_diagnostics) |
|
constexpr |
Solve x := U^-1 L^-1 P b on dense objects, from a prior factorize. b and x must not alias.
With a matrix-like b (and x), every column of b is solved into the matching column of x. pass_width then cuts the substitution into passes (0 = all columns in one pass; the last pass takes the remainder).
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in] | b | right-hand side, in original order: vector-like, or matrix-like holding one right-hand side per column |
| [out] | x | solution, of the same shape as b |
|
constexpr |
Default-configuration overload of substitute.
| pass_width | columns per substitution pass for a matrix-like b (0 = all at once; must be 0 for a vector-like b) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in] | b | right-hand side, in original order: vector-like, or matrix-like holding one right-hand side per column |
| [out] | x | solution, of the same shape as b |
|
constexpr |
Solve A x = e_col on dense objects, from a prior factorize: the consistent-tangent-operator path.
With a matrix-like x, its columns receive the solutions of the consecutive canonical columns e_col .. e_{col+M-1}, M being the column count of x, every L/U tile loaded once for the block. M is read from x: at compile time on the fixed-size path, at run time for a runtime-sized x, which the runtime-sized matrix path accepts exactly as substitute does for its right-hand-side block. pass_width then cuts the substitution into passes (0 = all columns in one pass; the last pass takes the remainder).
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like x (0 = all at once; must be 0 for a vector-like x) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in] | col | index of the canonical column e_col (the first one with a matrix-like x) |
| [out] | x | vector-like solution, or matrix-like holding one solution per canonical column |
|
constexpr |
Default-configuration overload of substitute_canonical.
| pass_width | columns per substitution pass for a matrix-like x (0 = all at once; must be 0 for a vector-like x) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in] | col | index of the canonical column e_col (the first one with a matrix-like x) |
| [out] | x | vector-like solution, or matrix-like holding one solution per canonical column |
|
constexpr |
Solve in place on dense objects: x holds the unpermuted right-hand side on entry and the solution on exit.
With a matrix-like x, every column is overwritten by its solution. pass_width then cuts the substitution into passes (0 = all columns in one pass; the last pass takes the remainder).
| UserConfig | compile-time knobs, a constexpr TiledLUppConfig value of the matrix scalar type |
| pass_width | columns per substitution pass for a matrix-like x (0 = all at once; must be 0 for a vector-like x) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in,out] | x | right-hand side, then solution: vector-like, or matrix-like holding one right-hand side per column |
|
constexpr |
Default-configuration overload of substitute_inplace.
| pass_width | columns per substitution pass for a matrix-like x (0 = all at once; must be 0 for a vector-like x) |
| [in] | A | factored matrix-like object |
| [in] | piv | pivot storage produced by factorize |
| [in,out] | x | right-hand side, then solution: vector-like, or matrix-like holding one right-hand side per column |
|
constexpr |
Shared translator of the matrix right-hand-side entry points: reduces the dense objects to raw arguments and forwards to the _multirhs entry points, which do the pass cutting themselves. Matrix right-hand sides are always routed through the external addressing of the raw API: the register convention of its internal mode is not the row-major layout of dense matrix objects.
| Ctx | adaptor context of the entry point |
| pass_width | columns per substitution pass (0 = all at once) |
| inplace | false: read B, write X; true: overwrite X in place (b is then ignored and may alias x) |
|
inlineconstexpr |
A type is "dense" when it exposes both a data pointer and an indexing policy, the structural core of the TFEL protocol.