RE: [eigen] no matching function for call to 'abs(const float&)'

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Anyone? Christoph?

Thanks! Best,

---
Nuno Marques
Tenente Aluno de Transmissões (Eng)

+351 912 090 991
Azambuja | Portugal

As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...

Follow me in:
   

This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.



From: n.marques21@xxxxxxxxxxx
To: eigen@xxxxxxxxxxxxxxxxxxx
Subject: [eigen] no matching function for call to 'abs(const float&)'
Date: Mon, 24 Aug 2015 23:29:59 +0100

Hello,

I'm getting the bellow error for the following code:   Matrix<float, 6, 6> S_I = ((C * _P * C.transpose()) + R).inverse();

../Eigen/src/Core/functors/UnaryFunctors..h: In instantiation of 'const result_type Eigen::internal::scalar_abs_op<Scalar>::operator()(const Scalar&) const [with Scalar = float; Eigen::internal::scalar_abs_op<Scalar>::result_type = float]':
../Eigen/src/Core/CoreEvaluators.h:396:47:   required from 'Eigen::internal::unary_evaluator<Eigen::CwiseUnaryOp<UnaryOp, ArgType>, Eigen::internal::IndexBased>::CoeffReturnType Eigen::internal::unary_evaluator<Eigen::CwiseUnaryOp<UnaryOp, ArgType>, Eigen::internal::IndexBased>::coeff(Eigen::Index, Eigen::Index) const [with UnaryOp = Eigen::internal::scalar_score_coeff_op<float>; ArgType = const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false>; typename Eigen::CwiseUnaryOp<UnaryOp, ArgType>::Scalar = float; Eigen::internal::unary_evaluator<Eigen::CwiseUnaryOp<UnaryOp, ArgType>, Eigen::internal::IndexBased>::CoeffReturnType = float; Eigen::Index = int]'
../Eigen/src/Core/Visitor.h:79:38:   required from 'Eigen::internal::visitor_evaluator<XprType>::CoeffReturnType Eigen::internal::visitor_evaluator<XprType>::coeff(Eigen::Index, Eigen::Index) const [with XprType = Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> >; Eigen::internal::visitor_evaluator<XprType>::CoeffReturnType = float; Eigen::Index = int]'
../Eigen/src/Core/Visitor.h:49:5:   required from 'static void Eigen::internal::visitor_impl<Visitor, Derived, -1>::run(const Derived&, Visitor&) [with Visitor = Eigen::internal::max_coeff_visitor<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> > >; Derived = Eigen::internal::visitor_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> > >]'
../Eigen/src/Core/Visitor.h:119:29:   required from 'void Eigen::DenseBase<Derived>::visit(Visitor&) const [with Visitor = Eigen::internal::max_coeff_visitor<Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> > >; Derived = Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> >]'
../Eigen/src/Core/Visitor.h:267:3:   required from 'typename Eigen::internal::traits<T>::Scalar Eigen::DenseBase<Derived>::maxCoeff(IndexType*) const [with IndexType = int; Derived = Eigen::CwiseUnaryOp<Eigen::internal::scalar_score_coeff_op<float>, const Eigen::Block<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0, Eigen::Stride<0, 0> >, -1, -1, false>, -1, 1, false>, -1, 1, false> >; typename Eigen::internal::traits<T>::Scalar = float]'
../Eigen/src/LU/PartialPivLU.h:298:86:   [ skipping 7 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
../Eigen/src/LU/InverseImpl.h:306:76:   required from 'static void Eigen::internal::Assignment<DstXprType, Eigen::Inverse<XprType>, Eigen::internal::assign_op<Scalar>, Eigen::internal::Dense2Dense, Scalar>::run(DstXprType&, const SrcXprType&, const Eigen::internal::assign_op<Scalar>&) [with DstXprType = Eigen::Matrix<float, 6, 6, 0, 6, 6>; XprType = Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<float>, const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> >; Scalar = float; Eigen::internal::Assignment<DstXprType, Eigen::Inverse<XprType>, Eigen::internal::assign_op<Scalar>, Eigen::internal::Dense2Dense, Scalar>::SrcXprType = Eigen::Inverse<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<float>, const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> > >]'
../Eigen/src/Core/AssignEvaluator.h:765:70:   required from 'void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<float, 6, 6, 0, 6, 6>; Src = "" const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> > >; Func = Eigen::internal::assign_op<float>]'
../Eigen/src/Core/PlainObjectBase.h:695:105:   required from 'Derived& Eigen::PlainObjectBase<Derived>::_set_noalias(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Inverse<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<float>, const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> > >; Derived = Eigen::Matrix<float, 6, 6, 0, 6, 6>]'
../Eigen/src/Core/PlainObjectBase.h:518:25:   required from 'Eigen::PlainObjectBase<Derived>::PlainObjectBase(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Inverse<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<float>, const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> > >; Derived = Eigen::Matrix<float, 6, 6, 0, 6, 6>]'
../Eigen/src/Core/Matrix.h:380:29:   required from 'Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::EigenBase<OtherDerived>&) [with OtherDerived = Eigen::Inverse<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<float>, const Eigen::Product<Eigen::Product<Eigen::Matrix<float, 6, 6, 0, 6, 6>, Eigen::Matrix<float, 6, 6, 0, 6, 6>, 0>, Eigen::Transpose<Eigen::Matrix<float, 6, 6, 0, 6, 6> >, 0>, const Eigen::Matrix<float, 6, 6, 0, 6, 6> > >; _Scalar = float; int _Rows = 6; int _Cols = 6; int _Options = 0; int _MaxRows = 6; int _MaxCols = 6]'
...:   required from here
../Eigen/src/Core/functors/UnaryFunctors.h:44:124: error: no matching function for call to 'abs(const float&)'
   EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { using std::abs; return abs(a); }
                                                                                                                            ^
compilation terminated due to -Wfatal-errors.

Is this a bug related to Eigen? In the abs() macro?

Thanks in advance! Best,

---
Nuno Marques
Tenente Aluno de Transmissões (Eng)

+351 912 090 991
Azambuja | Portugal

As the creation appears, the path is driven in the conscious feeling of madness and happiness, which returns, in multiple ways, to what we achieve in greatness...

Follow me in:
   

This message and any files herewith attached may contain confidential or privileged information and is intended solely for the use of the entity to which it is addressed. If you receive this message in error, please notify the sender immediately and delete this message and any files attached without copying them in any way.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/