Re: SSE
Re: SSE
- Subject: Re: SSE
- From: Joe Lake <email@hidden>
- Date: Thu, 15 May 2008 13:35:13 +0000 (UTC)
I added -msse to OTHER_CFLAGS and checked the box that said enable SSE3
extensions. with or without these the project compiles fine, which made
me think that SSE must be enabled by default or something. I was under
the impression that if I didn't have SSE enabled I'd get a preprocessor
error in xmmintrin.h, and if I got past that I'd get a link error, and if
I got passed that I'd crash at runtime. it's not possible that the _mm_
functions would be automatically replaced with scalar code if SSE is not
enabled is it?
I also added
fegetenv( &oldEnv );
fesetenv( FE_DFL_DISABLE_SSE_DENORMS_ENV );
int oldMXCSR = _mm_getcsr();
int newMXCSR = oldMXCSR | 0x8040; // set DAZ and FZ bits
_mm_setcsr( newMXCSR ); //write the new MXCSR setting to the MXCSR
at the beginning of my process routine and
_mm_setcsr( oldMXCSR );
fesetenv( &oldEnv );
at the end of my process routine to turn off denormals and flush to zero
(and I have the #pragma STDC FENV_ACCESS ON at the beginning of that
file). when I discovered this, I thought for sure that it would solve the
problem, but it had no effect whatsoever. you'd think at least it would
improve the performance a little bit, so maybe it's not working, but I
copied the code directly from the SSE performance programming guide.
any other suggestions? thanks for your help!
Joe
On Thu, 15 May 2008, tahome izwah wrote:
Did you check your Xcode project settings to use the SSE extensions?
Do you set some specific options to treat underflow conditions?
--th
2008/5/15 Joe Lake <email@hidden>:
hello all,
I have a vst written for windows that I'm building on os x. the vst is
extremely processor intensive and uses the sse vector math functions define
in xmmintrin.h. I didn't have to change any of this code to get it to build
on os x.
my computer is a 2GHZ core duo with 2GB RAM which boots both tiger and
windows xp. I'm testing the vst in max/msp. on windows it uses 34% of the
cpu, but on os x it uses 100% of the cpu.
can anyone think of any reasons this would be happening? is it possible
that the _mm_etc functions are not actually using the SIMD hardware on os x?
my project compiles fine regardless of whether I pass -msse to the compiler.
does anyone else have any experience using these extensions?
thanks a lot!
Joe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >SSE (From: Joe Lake <email@hidden>) |
| >Re: SSE (From: "tahome izwah" <email@hidden>) |