Storable Vector as a Storable record?

View: New views
2 Messages — Rating Filter:   Alert me  

Storable Vector as a Storable record?

by Hemanth Kapila :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is it possible to somehow make a StorableVector of a StorableVector via store-record or something?
If yes, could some one please provide me with some hint? 



I need a very fast and efficient array of a large number of $ arrays of Ints.
And the storableVector seems to be extremely nice.


Am trying to understand the way a tuple is made a storable record in the synthesizer package on hackage but I thought I will ask it here too.

Thanks in advance
Hemanth K





_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Storable Vector as a Storable record?

by Henning Thielemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Hi,
> Is it possible to somehow make a StorableVector of a StorableVector via store-record or
> something?
> 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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe