mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* Refactoring of the class hierarchy: introduction of DenseDirectAccessBase, removal of extra _Base/_Options template parameters.
* Introduction of strides-at-compile-time so for example the optimized code really knows when it needs to evaluate to a temporary * StorageKind / XprKind * Quaternion::setFromTwoVectors: use JacobiSVD instead of SVD * ComplexSchur: support the 1x1 case
This commit is contained in:
@@ -46,7 +46,8 @@ template<typename _Scalar, int _Flags>
|
||||
struct ei_traits<DynamicSparseMatrix<_Scalar, _Flags> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Sparse StorageType;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = Dynamic,
|
||||
ColsAtCompileTime = Dynamic,
|
||||
|
||||
@@ -29,7 +29,8 @@ template<typename MatrixType, int Size>
|
||||
struct ei_traits<SparseInnerVectorSet<MatrixType, Size> >
|
||||
{
|
||||
typedef typename ei_traits<MatrixType>::Scalar Scalar;
|
||||
typedef typename ei_traits<MatrixType>::StorageType StorageType;
|
||||
typedef typename ei_traits<MatrixType>::StorageKind StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
IsRowMajor = (int(MatrixType::Flags)&RowMajorBit)==RowMajorBit,
|
||||
Flags = MatrixType::Flags,
|
||||
|
||||
@@ -59,8 +59,8 @@ class CwiseBinaryOpImpl<BinaryOp, Lhs, Rhs, Sparse>
|
||||
};
|
||||
|
||||
template<typename BinaryOp, typename Lhs, typename Rhs, typename Derived,
|
||||
typename _LhsStorageMode = typename ei_traits<Lhs>::StorageType,
|
||||
typename _RhsStorageMode = typename ei_traits<Rhs>::StorageType>
|
||||
typename _LhsStorageMode = typename ei_traits<Lhs>::StorageKind,
|
||||
typename _RhsStorageMode = typename ei_traits<Rhs>::StorageKind>
|
||||
class ei_sparse_cwise_binary_op_inner_iterator_selector;
|
||||
|
||||
template<typename BinaryOp, typename Lhs, typename Rhs>
|
||||
|
||||
@@ -43,7 +43,8 @@ struct ei_traits<SparseDiagonalProduct<Lhs, Rhs> >
|
||||
typedef typename ei_cleantype<Lhs>::type _Lhs;
|
||||
typedef typename ei_cleantype<Rhs>::type _Rhs;
|
||||
typedef typename _Lhs::Scalar Scalar;
|
||||
typedef Sparse StorageType;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = _Lhs::RowsAtCompileTime,
|
||||
ColsAtCompileTime = _Rhs::ColsAtCompileTime,
|
||||
|
||||
@@ -45,7 +45,8 @@ template<typename _Scalar, int _Options>
|
||||
struct ei_traits<SparseMatrix<_Scalar, _Options> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Sparse StorageType;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
RowsAtCompileTime = Dynamic,
|
||||
ColsAtCompileTime = Dynamic,
|
||||
|
||||
@@ -52,7 +52,7 @@ struct SparseProductReturnType
|
||||
template<typename LhsNested, typename RhsNested>
|
||||
struct ei_traits<SparseProduct<LhsNested, RhsNested> >
|
||||
{
|
||||
typedef DenseStorageMatrix DenseStorageType;
|
||||
typedef MatrixXpr XprKind;
|
||||
// clean the nested types:
|
||||
typedef typename ei_cleantype<LhsNested>::type _LhsNested;
|
||||
typedef typename ei_cleantype<RhsNested>::type _RhsNested;
|
||||
@@ -82,7 +82,7 @@ struct ei_traits<SparseProduct<LhsNested, RhsNested> >
|
||||
CoeffReadCost = Dynamic
|
||||
};
|
||||
|
||||
typedef Sparse StorageType;
|
||||
typedef Sparse StorageKind;
|
||||
|
||||
typedef SparseMatrixBase<SparseProduct<LhsNested, RhsNested> > Base;
|
||||
};
|
||||
@@ -489,8 +489,8 @@ template<typename Lhs, typename Rhs>
|
||||
struct ei_traits<SparseTimeDenseProduct<Lhs,Rhs> >
|
||||
: ei_traits<ProductBase<SparseTimeDenseProduct<Lhs,Rhs>, Lhs, Rhs> >
|
||||
{
|
||||
typedef Dense StorageType;
|
||||
typedef DenseStorageMatrix DenseStorageType;
|
||||
typedef Dense StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
};
|
||||
|
||||
template<typename Lhs, typename Rhs>
|
||||
@@ -532,7 +532,7 @@ template<typename Lhs, typename Rhs>
|
||||
struct ei_traits<DenseTimeSparseProduct<Lhs,Rhs> >
|
||||
: ei_traits<ProductBase<DenseTimeSparseProduct<Lhs,Rhs>, Lhs, Rhs> >
|
||||
{
|
||||
typedef Dense StorageType;
|
||||
typedef Dense StorageKind;
|
||||
};
|
||||
|
||||
template<typename Lhs, typename Rhs>
|
||||
|
||||
@@ -145,7 +145,7 @@ template<typename Lhs, typename Rhs, int UpLo>
|
||||
struct ei_traits<SparseSelfAdjointTimeDenseProduct<Lhs,Rhs,UpLo> >
|
||||
: ei_traits<ProductBase<SparseSelfAdjointTimeDenseProduct<Lhs,Rhs,UpLo>, Lhs, Rhs> >
|
||||
{
|
||||
typedef Dense StorageType;
|
||||
typedef Dense StorageKind;
|
||||
};
|
||||
|
||||
template<typename Lhs, typename Rhs, int UpLo>
|
||||
|
||||
@@ -134,8 +134,8 @@ template<typename Lhs, typename Rhs> class SparseTimeDenseProduct;
|
||||
template<typename Lhs, typename Rhs> class DenseTimeSparseProduct;
|
||||
|
||||
template<typename Lhs, typename Rhs,
|
||||
typename LhsStorage = typename ei_traits<Lhs>::StorageType,
|
||||
typename RhsStorage = typename ei_traits<Rhs>::StorageType> struct ei_sparse_product_mode;
|
||||
typename LhsStorage = typename ei_traits<Lhs>::StorageKind,
|
||||
typename RhsStorage = typename ei_traits<Rhs>::StorageKind> struct ei_sparse_product_mode;
|
||||
|
||||
template<typename Lhs, typename Rhs> struct SparseProductReturnType;
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ template<typename _Scalar, int _Options>
|
||||
struct ei_traits<SparseVector<_Scalar, _Options> >
|
||||
{
|
||||
typedef _Scalar Scalar;
|
||||
typedef Sparse StorageType;
|
||||
typedef Sparse StorageKind;
|
||||
typedef MatrixXpr XprKind;
|
||||
enum {
|
||||
IsColVector = _Options & RowMajorBit ? 0 : 1,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user