[squeak-dev] OpenCL

Bert Freudenberg bert at freudenbergs.de
Sat Jan 10 14:27:10 UTC 2009


On 10.01.2009, at 11:01, Josh Gargus wrote:
> As noted by John, Croquet uses fdlibm for bit-identical floating  
> point math.  Does anyone have a feeling for how difficult (or  
> impossible) it will be to achieve identical computation on OpenCL- 
> compliant devices?

The numerical behavior of compliant OpenCL implementations is covered  
in section 7 of the OpenCL spec. In particular, table 7.1 gives the  
error bounds for the various operations. If I interpret that  
correctly, very few functions are guaranteed to behave bit-identical.

>   For example, how difficult would it be to port, say, fdlibm, so  
> that trancedentals use the exact same code?  Any other show-stoppers  
> that might not occur to the naive mind :-)  ?

Well OpenCL only requires single-precision, double-precision support  
is optional, whereas fdlibm is double-precision only. I don't know how  
compliant current implementations actually are.

- Bert -





More information about the Squeak-dev mailing list