[eigen] DenseBase<Derived>::operator/=(const Scalar& other)

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



I am happy EIGEN user since 2010

I have developed a LTI "recursive convolution" software based on EIGEN matrices including
exponential feature ( "Padé" approximants )

Until recently my development was done on a 32 bits windows pc

Now, I have switched to a 64 bits machine and gcc64 5.1.0

When targetting 32 bits windows executables all my validation flow remains OK

It also the case, when generating 64 bits executable but only with Eigen 3.2.6

But, generating 64 bits executable with Eigen 3.2.7 (and above) several testcases just blow-up

I have traced down the problem to the "DenseBase<Derived>::operator/=(const Scalar& other)"
template definition of the Eigen/src/Core/SelfCwiseBinaryOp.h file

3.2.6
=====

   template<typename Derived>
   inline Derived& DenseBase<Derived>::operator/=(const Scalar& other)
   {
     typedef typename internal::conditional<NumTraits<Scalar>::IsInteger,
                                           internal::scalar_quotient_op<Scalar>,
                                           internal::scalar_product_op<Scalar> >::type BinOp;
     typedef typename Derived::PlainObject PlainObject;
     SelfCwiseBinaryOp<BinOp, Derived, typename PlainObject::ConstantReturnType> tmp(derived());
     Scalar actual_other;
     if(NumTraits<Scalar>::IsInteger)  actual_other = other;
     else                              actual_other = Scalar(1)/other;
     tmp = PlainObject::Constant(rows(),cols(), actual_other);
     return derived();
  }


3.2.7
=====

  template<typename Derived>
  inline Derived& DenseBase<Derived>::operator/=(const Scalar& other)
  {
    typedef typename Derived::PlainObject PlainObject;
    SelfCwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, typename PlainObject::ConstantReturnType> tmp(derived());
    tmp = PlainObject::Constant(rows(),cols(), other);
    return derived();
  }

Just feeding back the 3.2.6 definition into 3.2.7 solves the issue

My problem is now that nowhere, in my code, I am using "operator/=", so I am somewhat stuck since I do not know how to
continue my investigation

Clearly, this has to do with the generation of 64 bits executable by gcc64 for Eigen 3.2.7 up to 3.3.3
( as stated above, the issue just does not show up when targeting 32 bits executable )

Regards,
   Jacques

PS1:  my code is only using regular "int" and "double"

PS2:  I do not get any error, nor warning, from gcc64







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