repa-3.4.1.2: High performance, regular, shape polymorphic parallel arrays.

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Repr.Cursored

Synopsis

Documentation

data C #

Cursored Arrays. These are produced by Repa's stencil functions, and help the fusion framework to share index compuations between array elements.

The basic idea is described in ``Efficient Parallel Stencil Convolution'', Ben Lippmeier and Gabriele Keller, Haskell 2011 -- though the underlying array representation has changed since this paper was published.

Instances

Source C a #

Compute elements of a cursored array.

Associated Types

data Array C sh a :: * #

Methods

extent :: Shape sh => Array C sh a -> sh #

index :: Shape sh => Array C sh a -> sh -> a #

unsafeIndex :: Shape sh => Array C sh a -> sh -> a #

linearIndex :: Shape sh => Array C sh a -> Int -> a #

unsafeLinearIndex :: Shape sh => Array C sh a -> Int -> a #

deepSeqArray :: Shape sh => Array C sh a -> b -> b #

Elt e => LoadRange C DIM2 e #

Compute a range of elements in a rank-2 array.

Methods

loadRangeS :: Target r2 e => Array C DIM2 e -> MVec r2 e -> DIM2 -> DIM2 -> IO () #

loadRangeP :: Target r2 e => Array C DIM2 e -> MVec r2 e -> DIM2 -> DIM2 -> IO () #

Elt e => Load C DIM2 e #

Compute all elements in an rank-2 array.

Methods

loadS :: Target r2 e => Array C DIM2 e -> MVec r2 e -> IO () #

loadP :: Target r2 e => Array C DIM2 e -> MVec r2 e -> IO () #

Structured C a b # 

Associated Types

type TR C :: * #

Methods

smap :: Shape sh => (a -> b) -> Array C sh a -> Array (TR C) sh b #

szipWith :: (Shape sh, Source r c) => (c -> a -> b) -> Array r sh c -> Array C sh a -> Array (TR C) sh b #

data Array C # 
data Array C where
type TR C # 
type TR C = C

makeCursored #

Arguments

:: sh 
-> (sh -> cursor)

Create a cursor for an index.

-> (sh -> cursor -> cursor)

Shift a cursor by an offset.

-> (cursor -> e)

Compute the element at the cursor.

-> Array C sh e 

Define a new cursored array.