repa-flow- Data-parallel data flows.

Safe HaskellNone




class Bulk (Rep a) a => Storable a where Source

Class of element types that we can load and store to the file system.

TODO: change to Persistable.

Associated Types

data Spec a Source

Specification of how the elements are arranged in the file.

For atomic elements the specification is the storage type.

For fixed-length arrays of elements, the specification contains the element storage type as well as the array length.

type Rep a Source

Representation tag used for an array of these elements.

For atomic elements this will be F, for foreign arrays that do not require extra copying after the data is read.

For tuples of elements, this will be a tuple of strided arrays, so the elements can also be used without copying.


sizeElem :: Spec a -> Int Source

Get the size of a single element, in bytes.

getArray Source


:: Spec a

Element specification.

-> Integer

Number of elements to read.

-> Bucket

Bucket to read from.

-> IO (Maybe (Array (Rep a) a)) 

Read an array of the given length from a bucket. If the bucket does not contain a whole number of elements remaining then Nothing.


Storable Int32

A native 32-bit integer.

(Storable a, Storable b, Storable a, Storable b) => Storable (a, b)

Two elements stored consecutively.