Re: [eigen] Eigen SSE denorm modes?

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


These settings are not persistent but bound to a process.

Regarding the addition of a cross platform function to enable/disable
denorms, I'd say yes. On the same veine, crossplatform function to
catch floating-point exceptions would be nice too.

gael

On Fri, Mar 9, 2012 at 9:08 PM, Dick Lyon <dicklyon@xxxxxxxxxx> wrote:
> Thanks, Mark, for the info on the SSE control intrinsics.  I presume these
> are Intel-only; does Eigen has a way to wrap them that doesnt' make the code
> architecture dependent?
>
> Do these settings have persistent effect?  On the processor?  or the
> process?  Apple seems to say that you should restore the old control word
> after doing your thing, but it's not clear to me how this is scoped:
>  https://developer.apple.com/hardwaredrivers/ve/sse.html
>
> Dick
>
>
> On Fri, Mar 9, 2012 at 11:37 AM, Mark Borgerding <mark@xxxxxxxxxxxxxx>
> wrote:
>>
>> On 03/08/2012 04:22 PM, Dick Lyon wrote:
>>>
>>> Is there a way to control how Eigen deals with denormalized floats?
>>> There are low-level SSE registers to control flushing to zero and such,
>>> but does anyone who how to control them, or what the defaults are?
>>>
>>> Dick
>>>
>>
>> DAZ and FTZ makes a big speedup on intel machines, since handling
>> denormals is really slow (and often only propagates rounding errors).
>>
>> You can enabling these modes yourself:
>>    _mm_setcsr( _mm_getcsr() | (1<<15));  // FTZ
>>    _mm_setcsr( _mm_getcsr() | (1<<6)); // DAZ
>
>



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