How to? DoubleArray
Andreas Raab
andreas.raab at gmx.de
Sat Feb 11 03:08:29 UTC 2006
nicolas cellier wrote:
> Have you any objection or better ideas to suggest ?
This is a good solution if your main goal is to interface LAPACK or BLAS.
> Same optimized methods as FloatArray would be appreciated, but i do not need
> them for now. Is it a lot more than copy/pasting FloatArray implementation ?
Mostly the primitives would look different. I'd probably recommend you
write them in a DLL to begin with - the overhead of unpacking stuff
that's been packaged for FFI in a "regular" plugin is probably more work
than just writing C functions that take "double*" args.
> But i feel Squeak implementation is a little bit more tricky and less uniform
> than VW.
That is quite possible. Thus far there simply wasn't a need for this
facility outside of those few places that you have observed.
> Will i have to repeat such a trick at each new endian-dependent class ? (i
> would also have FloatComplex and DoubleComplex for instance).
> By the way, i saw no startup message in MatrixTransform2x3, where is this
> stuff ?
> (i cannot test if swapped, only have one little endian machine).
MatrixTransform2x3 (and all other single precision float arrays) don't
need the explicit byte swapping since the VM does endian reversal for
32bit quantities internally.
> Beside, tracking #endianness #isLittleEndian and #restoreEndianness, I did
> not manage to understand when those bytes where swapped when writing to a
> file, though i see very well how they are when reading, but i do not mind.
It's tricky business. Stay away from it for the time being; just getting
all the other things to work will be plenty of stuff to do for now.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|