[LAD] Floating point Denormals: C++ and Waf

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Audio Developers <linux-audio-dev@...>
Date: Thursday, August 2, 2012 - 12:07 pm

--e89a8fb1ef14ecd6d904c6473ead
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

I've working on a LV2 instrument plugin, and it consumes about 1-2% CPU on
idle. When I leave it for about 20 seconds, the CPU usage jumps to 38 / 40
% of a core, and JACK xruns. The code contains IIR's for a reverb effect,
so I'm going to blame this CPU burning on denormal values.

I'm using waf as the build system, and appending "-O3" and "-ffast-math" to
the CFLAGS and CXXFLAGS. Building with ./waf -v shows the runner thread to
have the "-O3" and "-ffast-math" in the command.
Yet when I run it it still hogs CPU after about 10-20 seconds.

Reading on gcc's pages (http://www.acsu.buffalo.edu/~charngda/cc.html) tells
me that if DenomalsAreZero and FlushToZero are set, it should be linked
with crtfastmath.o. I don't know how to check if this is happening?

I'm not sure where to look next to fix the problem. Help appreciated!
-Harry

--e89a8fb1ef14ecd6d904c6473ead
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,I've working on a LV2 instrument plugin, and=
it consumes about 1-2% CPU on idle. When I leave it for about 20 seconds, =
the CPU usage jumps to 38 / 40 % of a core, and JACK xruns.=A0The code cont=
ains IIR's for a reverb effect, so I'm going to blame this CPU burn=
ing on denormal values.
I'm using waf as the build system, and appending &q=
uot;-O3" and "-ffast-math" to the CFLAGS and CXXFLAGS. Build=
ing with ./waf -v shows the runner thread to have the "-O3" and &=
quot;-ffast-math" in the command.
Yet when I run it it still hogs CPU after about 10-20 seconds.Reading on gcc's pages (http://www.acsu.buffalo.edu/~charngda/cc.html<=
/a>)=A0tells me that if DenomalsAreZero and FlushToZero are set, it should =
be linked with crtfastmath.o.=A0I don't know how to check if this is ha=
ppening?
I'm not sure where to look next to fix the problem.=
Help appreciated!-Harry

--e89a8fb1ef14ecd6d904c6473ead--


Messages in current thread:
[LAD] Floating point Denormals: C++ and Waf, Harry van Haaren, (Thu Aug 2, 12:07 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, David Robillard, (Thu Aug 2, 2:46 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Paul Davis, (Thu Aug 2, 3:28 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, David Robillard, (Thu Aug 2, 4:02 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Paul Davis, (Thu Aug 2, 4:41 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, J. Liles, (Thu Aug 2, 6:24 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Martin Homuth-Rosemann, (Thu Aug 2, 12:39 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Charles Henry, (Thu Aug 2, 3:14 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Martin Homuth-Rosemann, (Thu Aug 2, 6:31 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, David Robillard, (Thu Aug 2, 6:52 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Martin Homuth-Rosemann, (Fri Aug 3, 7:40 am)
Re: [LAD] Floating point Denormals: C++ and Waf, Tim Goetze, (Thu Aug 2, 8:15 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Harry van Haaren, (Thu Aug 2, 8:56 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Tim Goetze, (Fri Aug 3, 12:08 am)
Re: [LAD] Floating point Denormals: C++ and Waf, Fons Adriaensen, (Thu Aug 2, 9:18 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Robin Gareus, (Thu Aug 2, 9:17 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Harry van Haaren, (Fri Aug 3, 2:50 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Jens M Andreasen, (Sat Aug 4, 8:51 am)
Re: [LAD] Floating point Denormals: C++ and Waf, Charles Henry, (Thu Aug 2, 3:17 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, Robin Gareus, (Thu Aug 2, 12:20 pm)
Re: [LAD] Floating point Denormals: C++ and Waf, James Warden, (Thu Aug 2, 12:33 pm)