repa-3.2.3.3: High performance, regular, shape polymorphic parallel arrays.

Safe HaskellNone

Data.Array.Repa.Repr.ForeignPtr

Synopsis

Documentation

data F Source

Arrays represented as foreign buffers in the C heap.

Instances

Storable a => Source F a

Read elements from a foreign buffer.

Storable e => Target F e

Filling foreign buffers.

Storable a => Structured F a b 

fromForeignPtr :: Shape sh => sh -> ForeignPtr e -> Array F sh eSource

O(1). Wrap a ForeignPtr as an array.

toForeignPtr :: Array F sh e -> ForeignPtr eSource

O(1). Unpack a ForeignPtr from an array.

computeIntoS :: (Load r1 sh e, Storable e) => ForeignPtr e -> Array r1 sh e -> IO ()Source

Compute an array sequentially and write the elements into a foreign buffer without intermediate copying. If you want to copy a pre-existing manifest array to a foreign buffer then delay it first.

computeIntoP :: (Load r1 sh e, Storable e) => ForeignPtr e -> Array r1 sh e -> IO ()Source

Compute an array in parallel and write the elements into a foreign buffer without intermediate copying. If you want to copy a pre-existing manifest array to a foreign buffer then delay it first.