Re: [eigen] Re: 4x4 matrix inverse |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Re: 4x4 matrix inverse*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Tue, 15 Dec 2009 10:15:45 +0100*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; bh=ZxroH02t8OghrnrnXdwVMOe1TDJ8R0JoHefGk5VPLHc=; b=ALV71Web5yiDwMV6rCqqKc4icCGnAv2XqQ0muFSf3mrasVHHzat87liKzc3eJPUnmZ 74cHzmda9flH5CZH55QKLIDUDpg427s5WjFmcpvHQrN9d24w3oxASFP9qVZ0nthIcGGh gN+QqgII1zEvNXMfT/pew9lPDxddedHMdXeYY=*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; b=BhPeQQITLTZSoh+hygsmmVwdBNc04Ktd88vq0t3SA+4ICHyIFa9L8jRI54EQJpZMqg xk3TMtNE0GL0rzUSquuzZcB6M+ZoQRa0SYJgA491PJBR2T3u0eQOejomhws3f/k4V7fr rQUv5cGmxYPzfOfS8ciDL65vhTMOrCpbGDDsE=

On Tue, Dec 15, 2009 at 9:09 AM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote:

Indeed, a while ago I think we agreed that this optimized version should be enabled only if EIGEN_FAST_MATH==1 but it seems we never did that change. Let me also recall that -ffast-math => EIGEN_FAST_MATH.

So still OK to use the SSE intrinsic _mm_sqrt_p* by default and use the optimized version only when EIGEN_FAST_MATH==1 ?

gael

On Tue, Dec 15, 2009 at 5:25 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:There is one thing where I didn't follow Intel's code: they use a

RCPSS instruction to compute 1/det approximately, then followed by a

Newton-Raphson iteration. This sacrifices up to 2 bits of precision in

the mantissa, which already is a bit nontrivial for us (4x4 matrix

inversion is a basic operation on which people will rely very

heavily).

Hi Benoit, I recognized that you wrote in your commit log "that elsewhere in Eigen we dont allow ourselves this approximation" (Newton-Raphson). I just recalled stumbling once over such an approximation hidden in Eigen. It is for the SSE computation of the inverse square root.

The approximation takes place overe here in Packet4f ei_psqrt(Packet4f _x) at the very bottom.

Indeed, a while ago I think we agreed that this optimized version should be enabled only if EIGEN_FAST_MATH==1 but it seems we never did that change. Let me also recall that -ffast-math => EIGEN_FAST_MATH.

So still OK to use the SSE intrinsic _mm_sqrt_p* by default and use the optimized version only when EIGEN_FAST_MATH==1 ?

gael

- Hauke

**Follow-Ups**:**Re: [eigen] Re: 4x4 matrix inverse***From:*Gael Guennebaud

**References**:**[eigen] 4x4 matrix inverse***From:*Benoit Jacob

**[eigen] Re: 4x4 matrix inverse***From:*Benoit Jacob

**Re: [eigen] Re: 4x4 matrix inverse***From:*Hauke Heibel

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Re: 4x4 matrix inverse** - Next by Date:
**Re: [eigen] Re: 4x4 matrix inverse** - Previous by thread:
**Re: [eigen] Re: 4x4 matrix inverse** - Next by thread:
**Re: [eigen] Re: 4x4 matrix inverse**

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