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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Index

Contents

Description

Index types.

Synopsis

Index types

data Z Source #

An index of dimension zero

Constructors

Z 

Instances

Eq Z Source # 

Methods

(==) :: Z -> Z -> Bool #

(/=) :: Z -> Z -> Bool #

Ord Z Source # 

Methods

compare :: Z -> Z -> Ordering #

(<) :: Z -> Z -> Bool #

(<=) :: Z -> Z -> Bool #

(>) :: Z -> Z -> Bool #

(>=) :: Z -> Z -> Bool #

max :: Z -> Z -> Z #

min :: Z -> Z -> Z #

Read Z Source # 
Show Z Source # 

Methods

showsPrec :: Int -> Z -> ShowS #

show :: Z -> String #

showList :: [Z] -> ShowS #

Shape Z Source # 
Slice Z Source # 
Elt e => LoadRange D DIM2 e Source #

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

Methods

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

loadRangeP :: Target r2 e => Array D DIM2 e -> MVec r2 e -> DIM2 -> DIM2 -> IO () 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 #

type SliceShape Z Source # 
type SliceShape Z = Z
type FullShape Z Source # 
type FullShape Z = Z

data tail :. head infixl 3 Source #

Our index type, used for both shapes and indices.

Constructors

!tail :. !head infixl 3 

Instances

Elt e => LoadRange D DIM2 e Source #

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

Methods

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

loadRangeP :: Target r2 e => Array D DIM2 e -> MVec r2 e -> DIM2 -> DIM2 -> IO () 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 #

(Eq head, Eq tail) => Eq ((:.) tail head) Source # 

Methods

(==) :: (tail :. head) -> (tail :. head) -> Bool #

(/=) :: (tail :. head) -> (tail :. head) -> Bool #

(Ord head, Ord tail) => Ord ((:.) tail head) Source # 

Methods

compare :: (tail :. head) -> (tail :. head) -> Ordering #

(<) :: (tail :. head) -> (tail :. head) -> Bool #

(<=) :: (tail :. head) -> (tail :. head) -> Bool #

(>) :: (tail :. head) -> (tail :. head) -> Bool #

(>=) :: (tail :. head) -> (tail :. head) -> Bool #

max :: (tail :. head) -> (tail :. head) -> tail :. head #

min :: (tail :. head) -> (tail :. head) -> tail :. head #

(Read head, Read tail) => Read ((:.) tail head) Source # 

Methods

readsPrec :: Int -> ReadS (tail :. head) #

readList :: ReadS [tail :. head] #

readPrec :: ReadPrec (tail :. head) #

readListPrec :: ReadPrec [tail :. head] #

(Show head, Show tail) => Show ((:.) tail head) Source # 

Methods

showsPrec :: Int -> (tail :. head) -> ShowS #

show :: (tail :. head) -> String #

showList :: [tail :. head] -> ShowS #

Shape sh => Shape ((:.) sh Int) Source # 

Methods

rank :: (sh :. Int) -> Int Source #

zeroDim :: sh :. Int Source #

unitDim :: sh :. Int Source #

intersectDim :: (sh :. Int) -> (sh :. Int) -> sh :. Int Source #

addDim :: (sh :. Int) -> (sh :. Int) -> sh :. Int Source #

size :: (sh :. Int) -> Int Source #

sizeIsValid :: (sh :. Int) -> Bool Source #

toIndex :: (sh :. Int) -> (sh :. Int) -> Int Source #

fromIndex :: (sh :. Int) -> Int -> sh :. Int Source #

inShapeRange :: (sh :. Int) -> (sh :. Int) -> (sh :. Int) -> Bool Source #

listOfShape :: (sh :. Int) -> [Int] Source #

shapeOfList :: [Int] -> sh :. Int Source #

deepSeq :: (sh :. Int) -> a -> a Source #

Slice sl => Slice ((:.) sl All) Source # 

Methods

sliceOfFull :: (sl :. All) -> FullShape (sl :. All) -> SliceShape (sl :. All) Source #

fullOfSlice :: (sl :. All) -> SliceShape (sl :. All) -> FullShape (sl :. All) Source #

Slice sl => Slice ((:.) sl Int) Source # 

Methods

sliceOfFull :: (sl :. Int) -> FullShape (sl :. Int) -> SliceShape (sl :. Int) Source #

fullOfSlice :: (sl :. Int) -> SliceShape (sl :. Int) -> FullShape (sl :. Int) Source #

type SliceShape ((:.) sl All) Source # 
type SliceShape ((:.) sl Int) Source # 
type SliceShape ((:.) sl Int) = SliceShape sl
type FullShape ((:.) sl All) Source # 
type FullShape ((:.) sl All) = (:.) (FullShape sl) Int
type FullShape ((:.) sl Int) Source # 
type FullShape ((:.) sl Int) = (:.) (FullShape sl) Int

Common dimensions.

type DIM0 = Z Source #

ix1 :: Int -> DIM1 Source #

Helper for index construction.

Use this instead of explicit constructors like (Z :. (x :: Int)). The this is sometimes needed to ensure that x is constrained to be in Int.

ix2 :: Int -> Int -> DIM2 Source #

ix3 :: Int -> Int -> Int -> DIM3 Source #

ix4 :: Int -> Int -> Int -> Int -> DIM4 Source #

ix5 :: Int -> Int -> Int -> Int -> Int -> DIM5 Source #