[Haskell-cafe] Storable Vector as a Storable record?
lemming at henning-thielemann.de
Thu Nov 5 16:54:51 EST 2009
> Is it possible to somehow make a StorableVector of a StorableVector via store-record or
> If yes, could some one please provide me with some hint?
storable-record just assists with generating Storable instances. It helps
using correct aligment and correct order of entries. It doesn't do any
magic to the Storable class.
> I need a very fast and efficient array of a large number of $ arrays of Ints.
> And the storableVector seems to be extremely nice.
Are the sub-arrays of the same size? If not, you might have a look into
Data Parallel Haskell, that flattens arrays of arrays into one array and
does the bookkeeping and optimizations for you. In other languages you
might use an array of pointers to the sub-arrays, but I'm uncertain
whether Ptrs are storable.
More information about the Haskell-Cafe