accelerate-0.9.0.1: An embedded language for accelerated array processing

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
MaintainerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Safe HaskellNone

Data.Array.Accelerate.Array.Data

Contents

Description

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.

Synopsis

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