[eigen] Issues regarding Quaternion-alignment and const Maps

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


Hi,

first of all great work, everyone!

I have two issues with Eigen2, which I'm not sure Eigen3 has solved/will solve (I did look at the new source, but might have overlooked something).

First, I guess there is no (easy) possibility to have an not-aligned quaternion (without disabling alignment globally). For ordanary matrices there is a Eigen::DontAlign option, which I haven't found for Quaternions. And currently I don't see a very lot of gain in vectorization of Quaternions, especially (quaternion * vector3) is not vectorized, and (quaternion * quaternion) only for float (at least in Eigen2).


The second issue is a bit more complicated:
Eigen::Map severely violates const-correctness. I.e., it is possible to create a non-const Map from a (const double*). If you still accept API-changes, I would suggest having a Map and a ConstMap (similar to iterators in STL).

Ok, and actually a third very minor issue regarding Maps:
Maps of fixed sizes should boil down to a single pointer, but they don't due to the ei_variable_if_dynamic-object, which is not allowed to have size 0, even if it contains no members. One possible solution (without to much code-rewriting) would be to combine the sizes and the m_data pointer to a single object, providing getter-functions for rows and cols, and some template-specializations if sizes are Dynamic (similar to how ei_matrix_storage is implemented)

Best regards,
Christoph

--
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: (+49) 421-218-64252
----------------------------------------------



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