Copyright | [2012..2014] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <trevor.mcdonell@gmail.com> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
This provides an efficient non-copying Repa manifest array representation that can be passed directly to Accelerate.
The standard rules for dealing with manifest Repa arrays apply:
Synopsis
- data A
- class (Shape r, Shape a) => Shapes r a | a -> r, r -> a
- fromRepa :: (Shapes sh sh', Elt e) => Array A sh e -> Array sh' e
- toRepa :: Shapes sh sh' => Array sh' e -> Array A sh e
- computeAccS :: (Load r sh e, Elt e) => Array r sh e -> Array A sh e
- computeAccP :: (Load r sh e, Elt e, Monad m) => Array r sh e -> m (Array A sh e)
Documentation
The representation tag for manifest arrays based on Data.Array.Accelerate.
The Accelerate array implementation is based on type families and picks an efficient, unboxed representation for every element type. Moreover, these arrays can be handed efficiently (without copying) to Accelerate programs for further computation.
Instances
Elt e => Target A e Source # | Filling Accelerate arrays |
Elt e => Source A e Source # | Reading elements of the Accelerate array |
Defined in Data.Array.Repa.Repr.Accelerate extent :: Shape sh => Array A sh e -> sh # index :: Shape sh => Array A sh e -> sh -> e # unsafeIndex :: Shape sh => Array A sh e -> sh -> e # linearIndex :: Shape sh => Array A sh e -> Int -> e # unsafeLinearIndex :: Shape sh => Array A sh e -> Int -> e # deepSeqArray :: Shape sh => Array A sh e -> b -> b # | |
data MVec A e Source # | |
Defined in Data.Array.Repa.Repr.Accelerate | |
data Array A sh e Source # | |
Defined in Data.Array.Repa.Repr.Accelerate |
class (Shape r, Shape a) => Shapes r a | a -> r, r -> a Source #
Index conversion and equivalence statement between Repa and Accelerate array shapes. That is, a n-dimensional Repa array will produce an n-dimensional Accelerate array of the same extent, and vice-versa.
toR, toA
fromRepa :: (Shapes sh sh', Elt e) => Array A sh e -> Array sh' e Source #
O(1). Unpack to an Accelerate array.