Re: [linux-audio-dev] swh plugins and fixing undenormalize

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] swh plugins and fixing undenormalize
From: Simon Jenkins (sjenkins_AT_blueyonder.co.uk)
Date: Fri Jun 25 2004 - 02:45:34 EEST


Steve Harris wrote:

>On Thu, Jun 24, 2004 at 01:10:37 -0300, Juan Linietsky wrote:
>
>
>>>>>inline float FlushToZero( volatile float f )
>>>>>{
>>>>> f += 9.8607615E-32f;
>>>>> return f - 9.8607615E-32f;
>>>>>}
>>>>>
>>>>>
>>That actually looks nice... since thanks to writing "volatile float f",
>>the optimizer should not touch it.. it' the same thing than
>>when one accsses directly to the harware using pointers
>>to memmaped registers.. lack of using "volatile" often
>>ends up in non-working code..
>>
>>
>
>Ah, yes, I guess volatile should mean that. Hmmm...
>
The reason its an inline function rather than a drop-in replacement
macro is because casting macro arguments to volatile wasn't having
the desired effect on the optimiser, whereas this does.

Simon Jenkins
(Bristol, UK)


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jun 25 2004 - 01:29:41 EEST