|Re: [eigen] Patch for quaternion normalization and cross product for Vector4f|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Patch for quaternion normalization and cross product for Vector4f
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Wed, 11 Mar 2009 10:04:17 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=js+C2UvGcdqqZwkNjTQkoOguJCGLyiR+HIby0ko55C8=; b=C5hn/0QEwdkLUm7z3PnzWDYG0cB33U8LhJJgpPeVK1m8kn3EzMVDjEMWq6zCrClTgH cZfTv5bj7MP0wpm4p/bbvx+E7VERv7eTo9ZCTNTODEM7t26MYmktrAXbL0IDwi5YXa99 96wNZWCca807xl+K2C5Uda+hZi6aux3N62zTU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gFIDELj7gTCfFiiFdlKOrR8PG/vr/AcBKTnjsqoJZPkbshDY3Ujn4wYlSCNmAOjxEB T1jGstgJUbk3iMWwZ5zVGjSdPG+v1+5JiELRhRlOjNuzhug2PZ9W04SVGOkO6eZX2Vk2 AnwY4Y64e+G/6Ms3zRfC/yBU+b8aEblTRTV6I=
> yes that's true that AoS is more convenient, and I agree it might be
> handy to have an optimized cross3. Honestly, when dealing with such
> small vectors, if your code includes many dot/cross products,
> normalizations, etc... then I doubt the speed up could be above x1.5.
> Significant speedup can only come from a more high level
> reorganization of your algorithm, and using complex memory layouts...
Yes, but the problem is that many api's (like opengl for instance)
like AoS input form. And 1.5x is any day better than 1x. :) And we
_do_ have vectorized dot's, add, mul, normalize, subtract etc. for
small vectors in eigen, don't we?
Bottom line, what is the reason for such a function not being part of
the eigen's api when almost all the family of vector ops is? After
all, it only improves speed. :/ And it's an opt-in feature, not an
> Regarding Bullet SDK, actually only some specific parts of the SDK are
> vectorized by hand (using directly inline assembly and/or using
> directly intrinsics) and there the base classes (matrix, vector) are
> not vectorized at all.
Department of Physics
Indian Institute of Technology