14template <
int Mode,
bool IsLower = (Mode & Eigen::Lower) == Eigen::Lower>
15struct block_triangular_subsolve_impl;
27 typename Eigen::internal::ref_selector<MatrixType>::non_const_type;
28 using Scalar =
typename MatrixType::Scalar;
35 template <
typename Derived,
bool UseBlockGemmT = true>
38 assert(bAndX.rows() ==
m_matrix.cols());
40 const isize size = bAndX.rows();
55 auto b_cur =
IsLower ? bAndX.bottomRows(rem)
61 auto b0 =
IsLower ? b_cur.topRows(n0) : b_cur.bottomRows(n0);
62 auto b1 =
IsLower ? b_cur.bottomRows(rem) : b_cur.topRows(rem);
64 auto L00 =
IsLower ? L_cur.topLeftCorner(n0, n0)
65 : L_cur.bottomRightCorner(n0, n0);
67 auto L10 =
IsLower ? L_cur.bottomLeftCorner(rem, n0)
68 : L_cur.topRightCorner(rem, n0);
79 b1.noalias() -= L10 * b0;
89 auto L10_blk = L10.middleRows(p0, n_c);
90 auto dst = b1.middleRows(p0, n_c);
115 (Mode & Eigen::UnitDiag) == Eigen::UnitDiag;
118 template <
typename MatType,
typename OutType>
126 b0 = L00.diagonal().asDiagonal().inverse() * b0;
132 L00.template triangularView<Mode>().solveInPlace(b0);
Definition for matrix "kind" enums.
void gemmt(Eigen::MatrixBase< DstDerived > &dst, Eigen::MatrixBase< LhsDerived > const &lhs, Eigen::MatrixBase< RhsDerived > const &rhs, BlockKind lhs_kind, BlockKind rhs_kind, Scalar alpha)
BlockKind
Kind of matrix block: zeros, diagonal, lower/upper triangular or dense.
@ Dense
There is no known prior structure; assume a dense block.
@ Diag
The block is diagonal.
@ Zero
All entries in the block are zero.
@ TriL
The block is lower-triangular.
@ TriU
The block is upper-triangular.
Symbolic representation of the sparsity structure of a (square) block matrix.
isize nsegments() const noexcept
Representation for triangular block matrices.
TriangularBlockMatrix(MatrixType &mat, const SymbolicBlockMatrix &structure)
typename Eigen::internal::ref_selector< MatrixType >::non_const_type MatrixTypeNested
SymbolicBlockMatrix m_structure
typename MatrixType::Scalar Scalar
bool solveInPlace(Eigen::MatrixBase< Derived > &bAndX) const
Block-sparse variant of the TriangularViewType::solveInPlace() method on standard dense matrices.
MatrixTypeNested m_matrix
static bool run(const MatType &L00, OutType &b0, BlockKind kind)
static constexpr BlockKind WhichTriValid
static constexpr bool HasUnitDiag