accelerate- An embedded language for accelerated array processing

Portabilitynon-portable (GHC extensions)
MaintainerManuel M T Chakravarty <>
Safe HaskellNone




This module fixes the concrete representation of Accelerate arrays. We allocate all arrays using pinned memory to enable safe direct-access by non-Haskell code in multi-threaded code. In particular, we can safely pass pointers to an array's payload to foreign code.


Array operations and representations

type ArrayData e = GArrayData (UArray Int) eSource

Immutable array representation

type MutableArrayData s e = GArrayData (STUArray s Int) eSource

Mutable array representation

runArrayData :: ArrayElt e => (forall s. ST s (MutableArrayData s e, e)) -> (ArrayData e, e)Source

Safe combination of creating and fast freezing of array data.

data family GArrayData :: (* -> *) -> * -> *Source

Array tuple operations