How to? DoubleArray
Yoshiki Ohshima
yoshiki at squeakland.org
Fri Feb 10 00:39:46 UTC 2006
Nicolas,
> Anyone implemented a DoubleArray ?
> (Array with IEEE 754 double precision 64 bits floats)
As far as I know, the answer is "not yet". (I wouldn't be surprized
that somebody have done it, though.)
> If not, how to declare such a class ? byteArray, wordArray ?
> I did not see a doubleWordArray...
> How to convert one element to a Float and vice versa ?
I would go with a subclass of ArrayedCollection. Look at
ShortIntegerArray, for example. It is "opposite" of what you would
like to do (two 16-bit quantities in one 32-bit word), but together
with FloatArray implementation, it should give you a sense of what is
needed.
> I did not see anything about endianness conversion. where is it ?
> Or Is squeak only for little endian machines ?
Of course, it runs on both endianness. Look at the
ShortIntegerArray, and other classes that implement
#restoreEndianness.
-- Yoshiki
I happened to have implemented a whole set of vector operations
primitives, and a syntax tree transformer whose output utilizes such
primitives, even if there is a ifTrue:ifFalse: messages.
More information about the Squeak-dev
mailing list
|