[Bf-committers] Re: __APPLE__ using doubles sqrt, instead of sqrtf ? Can we optimize Apple OS X Intel?

erwin at erwincoumans.com erwin at erwincoumans.com
Thu Dec 7 04:12:02 CET 2006


Hi Ton, 

So for Apple Intel (the Macbooks) gcc is always gcc4 or later isn't it? 

For Bullet there is already such wrapper headerfile inside 
Bullet/src/LinearMath/btScalar.h, and it defines btFabs as either fabs or 
fabsf (etc). 

it currently uses fabsf for all platforms except
>> #if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__)
 

Is there some define that filters out APPLE + INTEL, or do we use gcc 3 for 
the Apple Intel build? 

Thanks,
Erwin 

 


Ton Roosendaal writes: 

> Hi, 
> 
> This is only supported for gcc4 and later. Our releases were stil gcc3,  
> reason why it cannot be added simply. 
> 
> AFAIK sun cc (and irix cc) do have float.h math for ages. Blender was  
> using this all over in the past, but it was removed in the NaN days  
> (2000-2001) to comply to linux gcc better. 
> 
> To make the migration to float math nice again, it should be tackled  much 
> friendlier... preferably with a wrapper header file redefining all  
> sqrtf() and friends to the double counterparts (if not available). 
> 
> Wouldn't that work better? 
> 
> -Ton- 
> 
> 
> On 6 Dec, 2006, at 5:21, erwin at erwincoumans.com wrote: 
> 
>> 
>> Hi,
>> This is in my Bullet code, for Blender. I want to enable the single  
>> precision faster floating point versions.
>> #if defined (__sun) || defined (__sun__) || defined (__sparc) ||  defined 
>> (__APPLE__)
>> //use double float precision operation on those platforms for Blender 
>> 
>> If this is not possible, how can we optimize at least for Apple OS X  
>> Intel?
>> I want to add SSE/SIMD in Bullet for some platforms, in particular  Apple 
>> Intel. Can we use some ifdef for that?
>> Thanks,
>> Erwin
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers 
>> 
>>  
>> 
> ------------------------------------------------------------------------ 
> --
> Ton Roosendaal  Blender Foundation ton at blender.org  http://www.blender.org 
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
 



More information about the Bf-committers mailing list