15 template<
typename Decomposition,
typename RhsType,
typename StorageKind>
class SolveImpl;
32 template<
typename Decomposition,
typename RhsType,
typename StorageKind>
struct solve_traits;
34 template<
typename Decomposition,
typename RhsType>
37 typedef Matrix<
typename RhsType::Scalar,
38 Decomposition::ColsAtCompileTime,
39 RhsType::ColsAtCompileTime,
40 RhsType::PlainObject::Options,
41 Decomposition::MaxColsAtCompileTime,
45 template<
typename Decomposition,
typename RhsType>
47 :
traits<typename solve_traits<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>::PlainObject>
61 template<
typename Decomposition,
typename RhsType>
62 class Solve :
public SolveImpl<Decomposition,RhsType,typename internal::traits<RhsType>::StorageKind>
68 Solve(
const Decomposition &dec,
const RhsType &rhs)
69 : m_dec(dec), m_rhs(rhs)
72 EIGEN_DEVICE_FUNC
Index rows()
const {
return m_dec.cols(); }
73 EIGEN_DEVICE_FUNC
Index cols()
const {
return m_rhs.cols(); }
75 EIGEN_DEVICE_FUNC
const Decomposition& dec()
const {
return m_dec; }
76 EIGEN_DEVICE_FUNC
const RhsType& rhs()
const {
return m_rhs; }
79 const Decomposition &m_dec;
85 template<
typename Decomposition,
typename RhsType>
87 :
public MatrixBase<Solve<Decomposition,RhsType> >
94 EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
103 template<
typename Decomposition,
typename RhsType,
typename StorageKind>
113 template<
typename Decomposition,
typename RhsType>
115 :
public evaluator<typename Solve<Decomposition,RhsType>::PlainObject>
118 typedef typename SolveType::PlainObject PlainObject;
123 EIGEN_DEVICE_FUNC
explicit evaluator(
const SolveType& solve)
124 : m_result(solve.rows(), solve.cols())
126 ::new (static_cast<Base*>(
this)) Base(m_result);
127 solve.dec()._solve_impl(solve.rhs(), m_result);
131 PlainObject m_result;
136 template<
typename DstXprType,
typename DecType,
typename RhsType,
typename Scalar>
142 Index dstRows = src.rows();
143 Index dstCols = src.cols();
144 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
145 dst.resize(dstRows, dstCols);
147 src.dec()._solve_impl(src.rhs(), dst);
152 template<
typename DstXprType,
typename DecType,
typename RhsType,
typename Scalar>
158 Index dstRows = src.rows();
159 Index dstCols = src.cols();
160 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
161 dst.resize(dstRows, dstCols);
163 src.dec().nestedExpression().template _solve_impl_transposed<false>(src.rhs(), dst);
168 template<
typename DstXprType,
typename DecType,
typename RhsType,
typename Scalar>
175 Index dstRows = src.rows();
176 Index dstCols = src.cols();
177 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
178 dst.resize(dstRows, dstCols);
180 src.dec().nestedExpression().nestedExpression().template _solve_impl_transposed<true>(src.rhs(), dst);
188 #endif // EIGEN_SOLVE_H Definition: UnaryFunctors.h:109
internal::traits< Derived >::Scalar Scalar
The numeric type of the expression' coefficients, e.g.
Definition: DenseBase.h:66
const int HugeCost
This value means that the cost to evaluate an expression coefficient is either very expensive or cann...
Definition: Constants.h:39
Expression of the transpose of a matrix.
Definition: Transpose.h:52
Definition: CoreEvaluators.h:90
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
Definition: AssignmentFunctors.h:21
Definition: AssignEvaluator.h:753
Definition: AssignEvaluator.h:743
The type used to identify a matrix expression.
Definition: Constants.h:506
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Definition: BandTriangularSolver.h:13
The type used to identify a dense storage.
Definition: Constants.h:491
Definition: XprHelper.h:481
Pseudo expression representing a solving operation.
Definition: Solve.h:62
const unsigned int EvalBeforeNestingBit
means the expression should be evaluated by the calling expression
Definition: Constants.h:65
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17