Re: [eigen] eigen sqrt compilation error |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] eigen sqrt compilation error
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Thu, 18 Jun 2009 14:17:26 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ufXXKt85vZHpKgxOrm+aHpMEui2fbVxL3J9cG9wxlQo=; b=v+6xd4PNwaNxO+hUYxatWhkN1r5Xtf4Z2nAwQUAGPNMwLV3XgqfAmAiNEp1tuDhTFw d9wNEinJ09RYK7z36hB0QXmb7VfQONwf1AHbofUuTxdv/NRz0V9clTweKUj/eZzsqK6S YbyQf2I+EU1w4RYuFyVvg0rROGj2zG5GVwPgg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=PfqZ2+jrYW3VbuuCO1tUE1/xQgr+uif3CBoZbj/zv9xbXDXM6B4NaeAE3oKs5qE8Lr d6Nw5R/DwBiXyzt5up2CIPut+sgZTgfR5Pw/Muwk8Y7t33iXNkRMBd90U6P0STv1kGAO ze7MXGPUrqRihCp0e1Ji3lpYb7Ua+JV/y0LYA=
OOPS!!
Thanks a lot, Gael
On Thu, Jun 18, 2009 at 2:07 PM, Gael
Guennebaud<gael.guennebaud@xxxxxxxxx> wrote:
>
> Hi,
>
> what about:
>
> #include <Eigen/Array>
>
> Cheers,
> gael.
>
> On Thu, Jun 18, 2009 at 10:32 PM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
>>
>> 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
>>
>>
>
>
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay