Re: [eigen] Quaternion and expression template

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


On Thu, Oct 29, 2009 at 5:04 PM, Mathieu Gautier <mathieu.gautier@xxxxxx> wrote:
A little update, I also use icc (intel compiler). icc can generate optimized code if :

1/ operator* and ei_quat_product are force inlined (EIGEN_STRONG_INLINE)
2/ the Quaternion<Scalar> constructor is modified :

 - inline Quaternion(Scalar w, Scalar x, Scalar y, Scalar z) {coeffs() << x, y, z, w;}
 + inline Quaternion(Scalar w, Scalar x, Scalar y, Scalar z) : m_coeffs(x, y, z, w){}

We definitely should do this. All ctors should use initializer lists whenever possible.

In general, I can confirm that the VC assembly is strange for this example. It will take some time to find out what is the actual issue that VC does not like. It could be some strange members or something resulting from issues in the base classes. I also noticed that the ei_traits can be removed from the Quaternion class - ei_traits<Derived> seems to be sufficient. Though this change did not help regarding the inlining... I put this on my todo list.

- Hauke


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