Re: [eigen] sse transcendental functions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] sse transcendental functions
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 26 Mar 2009 16:40:29 +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 :content-transfer-encoding; bh=83K0iUGSH1S0SCqJf0uZjQp2cWz2RgU3woYpYra0FeE=; b=Zc17QnYE8QjSsDokaiD1TMQdRwSWW2o2Kqdvn9qW3JN+X4U81iZW/MmKYnvtv2dVom k1HI+Mq5JDUvppibT6+RrJcjmLsTrrdZiHgril5TsDJ2sjcBUAy5zXslaOaxAZoFwNN0 DXjzAE1PUWAjHxMsrBcg/a+bBtBOJkm5c3GKw=
- 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=e+f6kapsDCCT3QkBLqZEYFETM1oH16l1aNzqQIEyGw7GUJNYQHC53N7q42N+UKEL8P HbRaEjDF2Qihlnz5U2E+8bavDL1f+QB/k2LAW8S00uHUfKjyPZxbZClWoA3OyMshjbjj /EAXOTZlTAZRY9MY367aVNSqJBOSoEG4EF5Ds=
On Thu, Mar 26, 2009 at 2:11 PM, Rohit Garg <rpg.314@xxxxxxxxx> wrote:
> I was looking through the svn log and i found this
>
> r944892 | ggael | 2009-03-26 18:20:24 +0530 (Thu, 26 Mar 2009) | 6 lines
>
> * enable vectorization of sin, cos, etc. by default with an option to
> disable them (-DEIGEN_FAST_MATH=0)
> * add a specialization of MatrixBase::operator*(RealScalar) for fast
> "matrix of complex" times scalar products (even more useful for
> autodiff scalar types)
>
> 1) It could be obvious but what does the DEIGEN_FAST_MATH macro do?
this is explained in the doxy doc, just on top of EIGEN_FAST_MATH,
basically it allows you to disable some optimizations which might
degrades the accuracy
> 2) do you feel there is place for fast implementations of such
> transcendental functions in eigen? I think we should clearly advertise
> in the documentation that the SSE version is for 'fast-operations' as
> seems to be the case. BTW, automagically enabling these when the user
> compiles with -ffast-math would be cool.
well, currently the only problem of accuracy is for sin/cos and single
precision floating point values out of the range [-8000 : 8000]. In
such cases, the error is still lower than taking the same value modulo
2pi and then call the glibc sin/cos function. So, really, I think, it
is safe to enable them by default.
> 3) any particular reason why the sincos4f from the Julian's sources
> hasn't made it in yet?
because currently there is no sincos function in eigen.
> --
> Rohit Garg
>
> http://rpg-314.blogspot.com/
>
> Senior Undergraduate
> Department of Physics
> Indian Institute of Technology
> Bombay
>
>
>