| Safe Haskell | Safe-Infered |
|---|
Data.Array.Repa.Repr.ForeignPtr
- data F
- data family Array r sh e
- fromForeignPtr :: Shape sh => sh -> ForeignPtr e -> Array F sh e
- toForeignPtr :: Array F sh e -> ForeignPtr e
- computeIntoS :: Fill r1 F sh e => ForeignPtr e -> Array r1 sh e -> IO ()
- computeIntoP :: Fill r1 F sh e => ForeignPtr e -> Array r1 sh e -> IO ()
Documentation
Arrays represented as foreign buffers in the C heap.
data family Array r sh e Source
Arrays with a representation tag, shape, and element type.
Use one of the type tags like D, U and so on for r,
one of DIM1, DIM2 ... for sh.
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 :: Fill r1 F sh 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 :: Fill r1 F sh 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.