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

Safe HaskellNone
LanguageHaskell98

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 Source

Read elements from a foreign buffer.

Storable e => Target F e Source

Filling foreign buffers.

Storable a => Structured F a b Source 
data MVec F = FPVec !Int !(ForeignPtr e) Source 
type TR F = D Source 
data Array F sh a = AForeignPtr !sh !Int !(ForeignPtr a) Source 

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

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

toForeignPtr :: Array F sh e -> ForeignPtr e Source

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.