Re: [eigen] Patch for quaternion normalization and cross product for Vector4f

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


hi,

On Tue, Mar 10, 2009 at 4:13 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> hi,
>
> for your information normalize was already automagically vectorized

I didn't know that. Thanks for telling me.

> About the cross product, the perf boost is pretty low (x1.25), so I
> don't know if that's really worth it. It is much better to pack your
> data such that 4 cross products can be performed once.

Well, that's the classic AoS vs SoA argument. It's just that I have
seen many people use Vector3f where you lose vectorization. And yes, I
am doing an app where using vec4f for 3dim vectors would be a definite
win even without the cross product. So it is not an abstract demand.
In this case, the perf boost may not be much but added with other
cases, such as add, sub, dot, in a large app, it will almost always
turn out to be better.

SoA may be better from vectorization pov, but AoS is used more often
simply because it is easier from a conceptual pov. IMHO, it is a small
thing which makes vec4f much better overall and usable for stuff like
3d geometry. So please consider including it. If you look at the
Bullet physics SDK, they implement vec3 routines using sse only.

> Beyond that, yes "svn diff" is the right way to generate a patch.
So I got something right here. :)

Regards,

-- 
Rohit Garg

http://rpg-314.blogspot.com/

Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay



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