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

Safe Haskell | None
Language | Haskell98

Data.Array.Repa.Repr.Cursored

Synopsis

- data C
- makeCursored :: sh -> (sh -> cursor) -> (sh -> cursor -> cursor) -> (cursor -> e) -> Array C sh e

# Documentation

data C Source #

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 Source # | Compute elements of a cursored array.

Associated Types

data Array C sh a :: * Source #

Methods

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

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

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

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

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

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

Elt e => LoadRange C DIM2 e Source # | 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 () Source # loadRangeP :: Target r2 e => Array C DIM2 e -> MVec r2 e -> DIM2 -> DIM2 -> IO () Source #
Elt e => Load C DIM2 e Source # | Compute all elements in an rank-2 array.
Methods loadS :: Target r2 e => Array C DIM2 e -> MVec r2 e -> IO () Source # loadP :: Target r2 e => Array C DIM2 e -> MVec r2 e -> IO () Source #
Structured C a b Source # |
Associated Types type TR C :: * Source # Methods smap :: Shape sh => (a -> b) -> Array C sh a -> Array (TR C) sh b Source # szipWith :: (Shape sh, Source r c) => (c -> a -> b) -> Array r sh c -> Array C sh a -> Array (TR C) sh b Source #
data Array C Source # |

data Array C where

- ACursored :: Array C sh a

type TR C Source # |
type TR C = C

makeCursored Source #

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.