[eigen] Problem compiling dense matrix mult with complex<custom-real-scalar> |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Problem compiling dense matrix mult with complex<custom-real-scalar>
- From: Manoj Rajagopalan <rmanoj@xxxxxxxxx>
- Date: Wed, 26 May 2010 11:52:11 -0400
- Organization: EECS Dept., University of Michigan, Ann Arbor, MI, USA
Hi eigen developers,
I am able to extend eigen for use with a real-scalar class named dd_real. But I get compilation errors when using
std::complex<dd_real> value-type for dense-matrix multiplication (no problems with addition). The error seems to be due to no
declaration/definition of ProductBase<>::scaleAndAddTo() for matrices of complex<dd_real>.
I tested the + and * operators for complex<dd_real> scalars and they work. Is there something I am missing? I have
implemented NumTraits<dd_real> and I believe NumTraits<complex<dd_real> > is auto-inferred.
The gcc 4.2.4 error log is appended.
Thanks,
Manoj
g++ -I/usr/local/include/eigen3 -I/home/rmanoj/Software/src -ftemplate-depth-100 qd-gemv.cpp -o qd-gemv -lqd
/usr/local/include/eigen3/Eigen/src/Core/ProductBase.h: In member function ‘void Eigen::ProductBase<Derived, Lhs,
Rhs>::evalTo(Dest&) const [with Dest = Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, Derived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Lhs = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>, Rhs = Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>]’:
/usr/local/include/eigen3/Eigen/src/Core/ProductBase.h:244: instantiated from ‘Derived&
Eigen::MatrixBase<Derived>::lazyAssign(const Eigen::ProductBase<ProductDerived, Lhs, Rhs>&) [with ProductDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Lhs = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>, Rhs = Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, Derived =
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>]’
/usr/local/include/eigen3/Eigen/src/Core/DenseStorageBase.h:306: instantiated from ‘Derived&
Eigen::DenseStorageBase<Derived>::lazyAssign(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Derived = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>]’
/usr/local/include/eigen3/Eigen/src/Core/Assign.h:492: instantiated from ‘static Derived& Eigen::ei_assign_selector<Derived,
OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<std::complex<dd_real>, 33331,
33331, 0, 33331, 33331>, OtherDerived = Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0,
33331, 33331>, Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>]’
/usr/local/include/eigen3/Eigen/src/Core/DenseStorageBase.h:473: instantiated from ‘Derived&
Eigen::DenseStorageBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Derived = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>]’
/usr/local/include/eigen3/Eigen/src/Core/Matrix.h:284: instantiated from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived>&) [with OtherDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, _Scalar = std::complex<dd_real>, int _Rows =
33331, int _Cols = 33331, int _Options = 0, int _MaxRows = 33331, int _MaxCols = 33331]’
/usr/local/include/eigen3/Eigen/src/Core/DenseBase.h:453: instantiated from ‘const typename Eigen::ei_eval<T, typename
Eigen::ei_traits<T>::StorageKind>::type Eigen::DenseBase<Derived>::eval() const [with Derived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>]’
/usr/local/include/eigen3/Eigen/src/Core/DenseStorageBase.h:457: instantiated from ‘void
Eigen::DenseStorageBase<Derived>::_set_selector(const OtherDerived&, const Eigen::ei_meta_true&) [with OtherDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Derived = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>]’
/usr/local/include/eigen3/Eigen/src/Core/DenseStorageBase.h:452: instantiated from ‘Derived&
Eigen::DenseStorageBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived =
Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Derived = Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>]’
/usr/local/include/eigen3/Eigen/src/Core/Matrix.h:180: instantiated from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const
Eigen::MatrixBase<OtherDerived>&) [with OtherDerived = Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>,
33331, 33331, 0, 33331, 33331>, Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, _Scalar =
std::complex<dd_real>, int _Rows = 33331, int _Cols = 33331, int _Options = 0, int _MaxRows = 33331, int _MaxCols =
33331]’
qd-gemv.cpp:96: instantiated from here (this line is 'C=A*B;' where all are 5x5 matrices of complex<dd_real>)
/usr/local/include/eigen3/Eigen/src/Core/ProductBase.h:107: error: no matching function for call
to ‘Eigen::ProductBase<Eigen::GeneralProduct<Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>,
Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>, 5>, Eigen::Matrix<std::complex<dd_real>, 33331,
33331, 0, 33331, 33331>, Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>
>::scaleAndAddTo(Eigen::Matrix<std::complex<dd_real>, 33331, 33331, 0, 33331, 33331>&, int) const’
make: *** [qd-gemv] Error 1