10 #ifndef EIGEN_SPARSESOLVERBASE_H
11 #define EIGEN_SPARSESOLVERBASE_H
21 template<
typename Decomposition,
typename Rhs,
typename Dest>
26 typedef typename Dest::Scalar DestScalar;
28 static const Index NbColsAtOnce = 4;
29 Index rhsCols = rhs.cols();
35 for(
Index k=0; k<rhsCols; k+=NbColsAtOnce)
37 Index actualCols = std::min<Index>(rhsCols-k, NbColsAtOnce);
38 tmp.leftCols(actualCols) = rhs.middleCols(k,actualCols);
39 tmpX.leftCols(actualCols) = dec.solve(tmp.leftCols(actualCols));
40 dest.middleCols(k,actualCols) = tmpX.leftCols(actualCols).sparseView();
45 template<
typename Decomposition,
typename Rhs,
typename Dest>
49 typedef typename Dest::Scalar DestScalar;
53 dest_dense = dec.solve(rhs_dense);
54 dest = dest_dense.sparseView();
66 template<
typename Derived>
79 Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
80 const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
86 template<
typename Rhs>
91 eigen_assert(
derived().rows()==b.rows() &&
"solve(): invalid number of rows of the right hand side matrix b");
99 template<
typename Rhs>
108 #ifndef EIGEN_PARSED_BY_DOXYGEN
110 template<
typename Rhs,
typename Dest>
#define eigen_assert(x)
Definition: Macros.h:1037
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Pseudo expression representing a solving operation.
Definition: Solve.h:63
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:28
Index rows() const
Definition: SparseMatrixBase.h:176
const Derived & derived() const
Definition: SparseMatrixBase.h:143
A base class for sparse solvers.
Definition: SparseSolverBase.h:68
const Solve< Derived, Rhs > solve(const SparseMatrixBase< Rhs > &b) const
Definition: SparseSolverBase.h:101
const Solve< Derived, Rhs > solve(const MatrixBase< Rhs > &b) const
Definition: SparseSolverBase.h:88
void _solve_impl(const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
Definition: SparseSolverBase.h:111
SparseSolverBase()
Definition: SparseSolverBase.h:72
~SparseSolverBase()
Definition: SparseSolverBase.h:76
bool m_isInitialized
Definition: SparseSolverBase.h:119
Derived & derived()
Definition: SparseSolverBase.h:79
const Derived & derived() const
Definition: SparseSolverBase.h:80
const unsigned int RowMajorBit
Definition: Constants.h:66
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16() min(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:571
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
enable_if< Rhs::ColsAtCompileTime!=1 &&Dest::ColsAtCompileTime!=1 >::type solve_sparse_through_dense_panels(const Decomposition &dec, const Rhs &rhs, Dest &dest)
Definition: SparseSolverBase.h:23
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
Flags
Special flags for archives.
Definition: cereal.hpp:185
Definition: document.h:416