Questions about FloatArrays

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Fri Jun 12 19:50:06 UTC 1998


> Doubles need alignment in some plataform, but floats need it too?

Yes, on several platforms both need alignment. However, Squeak already
aligns all data to 4-byte boundaries which is ok for single precision

> 	Have you implemented FloatArrays? If so, could you tell me a bit
> more about your implementation? I'd like to take a look at your changes.

I haven't done a whole lot. Just a floatAt: and floatAt:put: primitive.
My idea was to use FloatArrays as repository for floats which are
converted in the two methods from and to doubles. So, floatAt: actually
returns a double precision float and floatAt:put: stores a double
precision float. Any more primitives should then operate on the raw single
precision data for obvious speed and bandwidth reasons.

Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< >=============+

More information about the Squeak-dev mailing list