[eigen] eigen sqrt compilation error |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] eigen sqrt compilation error
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Thu, 18 Jun 2009 13:32:29 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=WMp3iS23cnhsqwJoI/fmtH18k6Fu9P+GmgBqw1h4luw=; b=LTDPwcKJ9t/3Ss6w9fEfgVUyfCa/hezzfE6HyF8SmQT7tD2GoTRfK/WH5yCmXHI5uO 1UQFwG6YBUTG/cN6VuQ5JU3vfue+N3W/b/M9S0eBT1tFAMeJqi/CksekFT/bovhz8YYz 3kw+L2tC6G8HxueyzJ2xoapUHB6N4cnNm9Hp8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=xYGUw4yln8LTS5yFIScPnrojNR0HvIJMc9bC1Yf0Ri4TY7CIELSCtA3/WEPN0lFeUk Boi5J9zQIIViYwgF7nkmrNj3P3LLbu/XpnazZdAbayiB5TVIPSgaN5NiS3KM0oMC3kF6 7FCbUdHlt1e4ZdA+X4CoxElsmOr3xL5fKAfrs=
Hi,
I am surprised at this code. The line containing the sqrt is
generating lot's of errors. Its the only place in the code (it is line
61) where I am getting errors.
VectorXf mu[framesAfterCDS],sigma[framesAfterCDS];
//framesAfterCDS is a compile time constant
for(i=0; i<framesAfterCDS; i++)
{
mu[i]=x_accum[i]*(1.0/N);
sigma[i]=(x2_accum[i]*(1.0/N)-mu[i].cwise()*mu[i]);
sigma[i]=sigma[i].cwise().sqrt();
}
==========
error msg begin
==========
g++ -Wall -I. analysis.cpp binary_matrix_io.c -O2 -msse3 -march=native
-mtune=native -o analysis -I/home/rpg/Documents/numerical/eigen2
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/CwiseUnaryOp.h: In
instantiation of ‘Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >’:
analysis.cpp:61: instantiated from here
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/CwiseUnaryOp.h:97:
error: ‘Eigen::CwiseUnaryOp<UnaryOp, MatrixType>::m_functor’ has
incomplete type
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/util/ForwardDeclarations.h:71:
error: declaration of ‘const struct Eigen::ei_scalar_sqrt_op<float>’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/CwiseUnaryOp.h: In
member function ‘const typename
Eigen::ei_traits<Eigen::CwiseUnaryOp<UnaryOp, MatrixType>
>::Scalar Eigen::CwiseUnaryOp<UnaryOp, MatrixType>::coeff(int, int) const [with UnaryOp = Eigen::ei_scalar_sqrt_op<float>, MatrixType = Eigen::Matrix<float, 10000, 1, 2, 10000, 1>]’:
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Coeffs.h:331:
instantiated from ‘void Eigen::MatrixBase<Derived>::copyCoeff(int,
int, const Eigen::MatrixBase<OtherDerived>&) [with OtherDerived =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >, Derived =
Eigen::Matrix<float, 10000, 1, 2, 10000, 1>]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Assign.h:221:
instantiated from ‘static void Eigen::ei_assign_impl<Derived1,
Derived2, 3, 0>::run(Derived1&, const Derived2&) [with Derived1 =
Eigen::Matrix<float, 10000, 1, 2, 10000, 1>, Derived2 =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Assign.h:407:
instantiated from ‘Derived&
Eigen::MatrixBase<Derived>::lazyAssign(const
Eigen::MatrixBase<OtherDerived>&) [with OtherDerived =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >, Derived =
Eigen::Matrix<float, 10000, 1, 2, 10000, 1>]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Assign.h:422:
instantiated from ‘static Derived& Eigen::ei_assign_selector<Derived,
OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with
Derived = Eigen::Matrix<float, 10000, 1, 2, 10000, 1>, OtherDerived =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Assign.h:442:
instantiated from ‘Derived&
Eigen::MatrixBase<Derived>::operator=(const
Eigen::MatrixBase<OtherDerived>&) [with OtherDerived =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >, Derived =
Eigen::Matrix<float, 10000, 1, 2, 10000, 1>]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Matrix.h:511:
instantiated from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options,
_MaxRows, _MaxCols>::_set(const Eigen::MatrixBase<OtherDerived>&)
[with OtherDerived =
Eigen::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >, _Scalar = float, int
_Rows = 10000, int _Cols = 1, int _Options = 2, int _MaxRows = 10000,
int _MaxCols = 1]’
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/Matrix.h:261:
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::CwiseUnaryOp<Eigen::ei_scalar_sqrt_op<float>,
Eigen::Matrix<float, 10000, 1, 2, 10000, 1> >, _Scalar = float, int
_Rows = 10000, int _Cols = 1, int _Options = 2, int _MaxRows = 10000,
int _MaxCols = 1]’
analysis.cpp:61: instantiated from here
/home/rpg/Documents/numerical/eigen2/Eigen/src/Core/CwiseUnaryOp.h:75:
error: using invalid field ‘Eigen::CwiseUnaryOp<UnaryOp,
MatrixType>::m_functor’
The error is there with both the 2.0.2 and dev branch.
Can somebody help me?
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay