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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Repr.Partitioned

Synopsis

Documentation

data P r1 r2 #

Partitioned arrays. The last partition takes priority

These are produced by Repa's support functions and allow arrays to be defined using a different element function for each partition.

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 r1 e, Source r2 e) => Source (P r1 r2) e #

Read elements from a partitioned array.

Associated Types

data Array (P r1 r2) sh e :: * #

Methods

extent :: Shape sh => Array (P r1 r2) sh e -> sh #

index :: Shape sh => Array (P r1 r2) sh e -> sh -> e #

unsafeIndex :: Shape sh => Array (P r1 r2) sh e -> sh -> e #

linearIndex :: Shape sh => Array (P r1 r2) sh e -> Int -> e #

unsafeLinearIndex :: Shape sh => Array (P r1 r2) sh e -> Int -> e #

deepSeqArray :: Shape sh => Array (P r1 r2) sh e -> b -> b #

(LoadRange r1 sh e, Load r2 sh e) => Load (P r1 r2) sh e # 

Methods

loadS :: Target r2 e => Array (P r1 r2) sh e -> MVec r2 e -> IO () #

loadP :: Target r2 e => Array (P r1 r2) sh e -> MVec r2 e -> IO () #

(Structured r1 a b, Structured r2 a b) => Structured (P r1 r2) a b # 

Associated Types

type TR (P r1 r2) :: * #

Methods

smap :: Shape sh => (a -> b) -> Array (P r1 r2) sh a -> Array (TR (P r1 r2)) sh b #

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

data Array (P r1 r2) # 
data Array (P r1 r2) = APart !sh !(Range sh) !(Array r1 sh e) !(Array r2 sh e)
type TR (P r1 r2) # 
type TR (P r1 r2) = P (TR r1) (TR r2)

data Range sh #

Constructors

Range !sh !sh (sh -> Bool) 

inRange :: Range sh -> sh -> Bool #

Check whether an index is within the given range.