accelerate-io-1.2.0.0: Read and write Accelerate arrays in various formats

Copyright[2017] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <tmcdonell@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.IO.Foreign.Ptr

Description

 

Synopsis

Documentation

type Ptrs e = ArrayPtrs e Source #

A family of types which represent a collection of Ptrs. The structure of the collection depends on the element type e.

fromPtrs :: (Shape sh, Elt e) => sh -> Ptrs (EltRepr e) -> Array sh e Source #

O(1). Treat the set of Ptrs as an Accelerate array. The type of elements e in the output Accelerate array determines the structure of the collection.

Data is considered to be in row-major order. You must ensure that each of the input pointers contains the right number of elements.

The data may not be modified through the Ptrs afterwards.

You are responsible for ensuring that the data remains alive for the duration of the Accelerate computation, and for freeing it afterwards.

You should make sure that the data is suitably aligned.

since 1.1.0.0

toPtrs :: (Shape sh, Elt e) => Array sh e -> Ptrs (EltRepr e) Source #

O(1). Yield the underlying Ptrs backing the given Accelerate array. The element type e will determine the structure of the output collection.

Data is considered to be in row-major order.

since 1.1.0.0