Re: [eigen] Bug with "vec.cwise() + scalar"? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Bug with "vec.cwise() + scalar"?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 18 Apr 2009 11:32:18 +0200
- 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=BJ06KO9E9qa9yeu2lyBvcbi/AvqX+WL9qeH91Zg6zHc=; b=HxQGOIDGBon7p9uiwxWD3uhOmZrFDADgWF5K07ZcCJZ7HqpnOGj39c+2OSTPYSYNB1 iJd0jQ1N41ygPnyXfkMa5sesBDnjIkXSYnUOAA34iQQiDF0cbthSS7sHfxGIG2eQM8w9 pyilivS15dmoAYWelOCG0cVBb78EtPi0SawQ4=
- 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=BrhJxHMX5ICdfpPeUlOL1DtwfNV7adgAeIKYBSBdv9rK8cSLbKJNQ5EJJ5GhQxQcvM U1cQba+4sTJyo+7i6j6MYy4L5Fq+ry7cZTLVKcZfu0hZBEH0ALdYVDG5Kg9amL5GxPE0 ysQnAYpbekxjrHcwy+9zCvegdoKDBkuv2d38c=
I cannot try it now, but at least this features requires the array
module, so please try adding:
#include <Eigen/Array>
cheers,
gael
On Sat, Apr 18, 2009 at 11:00 AM, Ricard Marxer Piñón
<email@xxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> Find attached a little test which fails to compile with Eigen 2.0.1 (and
> SVN):
>
> ../eigen2/Eigen/src/Core/CwiseUnaryOp.h: In instantiation of
> ‘Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >’:
> test_vector_add.cpp:13: instantiated from here
> ../eigen2/Eigen/src/Core/CwiseUnaryOp.h:97: error:
> ‘Eigen::CwiseUnaryOp<UnaryOp, MatrixType>::m_functor’ has incomplete type
> ../eigen2/Eigen/src/Core/util/ForwardDeclarations.h:89: error: declaration
> of ‘const struct Eigen::ei_scalar_add_op<float>’
> ../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_add_op<float>, MatrixType = Eigen::Matrix<float,
> 4, 1, 0, 4, 1>]’:
> ../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_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >, Derived = Eigen::Matrix<float, 4, 1, 0, 4, 1>]’
> ../eigen2/Eigen/src/Core/Assign.h:117: instantiated from ‘static void
> Eigen::ei_assign_novec_CompleteUnrolling<Derived1, Derived2, Index,
> Stop>::run(Derived1&, const Derived2&) [with Derived1 = Eigen::Matrix<float,
> 4, 1, 0, 4, 1>, Derived2 =
> Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >, int Index = 0, int Stop = 4]’
> ../eigen2/Eigen/src/Core/Assign.h:233: instantiated from ‘static void
> Eigen::ei_assign_impl<Derived1, Derived2, 3, 2>::run(Derived1&, const
> Derived2&) [with Derived1 = Eigen::Matrix<float, 4, 1, 0, 4, 1>, Derived2 =
> Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >]’
> ../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_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >, Derived = Eigen::Matrix<float, 4, 1, 0, 4, 1>]’
> ../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, 4, 1, 0, 4, 1>, OtherDerived =
> Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>, Eigen::Matrix<float, 4,
> 1, 0, 4, 1> >]’
> ../eigen2/Eigen/src/Core/Matrix.h:532: instantiated from
> ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&
> Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows,
> _MaxCols>::_set_noalias(const Eigen::MatrixBase<OtherDerived>&) [with
> OtherDerived = Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>,
> Eigen::Matrix<float, 4, 1, 0, 4, 1> >, _Scalar = float, int _Rows = 4, int
> _Cols = 1, int _Options = 0, int _MaxRows = 4, int _MaxCols = 1]’
> ../eigen2/Eigen/src/Core/Matrix.h:410: instantiated from
> ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows,
> _MaxCols>::Matrix(const Eigen::MatrixBase<OtherDerived>&) [with OtherDerived
> = Eigen::CwiseUnaryOp<Eigen::ei_scalar_add_op<float>, Eigen::Matrix<float,
> 4, 1, 0, 4, 1> >, _Scalar = float, int _Rows = 4, int _Cols = 1, int
> _Options = 0, int _MaxRows = 4, int _MaxCols = 1]’
> test_vector_add.cpp:13: instantiated from here
> ../eigen2/Eigen/src/Core/CwiseUnaryOp.h:75: error: using invalid field
> ‘Eigen::CwiseUnaryOp<UnaryOp, MatrixType>::m_functor’
>
>
> I don't know if it is a bug or it's not the way it is supposed to be used..
>
> I wish I had found this before 2.0.1 release, but I have been a bit occupied
> with other things (new job).
> Anyway, as soon as I get some free time I'm back to doing the small and
> simple stuff I can for Eigen.
>
> --
> ricard
> http://www.ricardmarxer.com
> http://www.caligraft.com