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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Index

Contents

Description

Index types.

Synopsis

Index types

data Z #

An index of dimension zero

Constructors

Z 
Instances
Eq Z # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

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

Ord Z # 
Instance details

Defined in Data.Array.Repa.Index

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 # 
Instance details

Defined in Data.Array.Repa.Index

Show Z # 
Instance details

Defined in Data.Array.Repa.Index

Methods

showsPrec :: Int -> Z -> ShowS #

show :: Z -> String #

showList :: [Z] -> ShowS #

Arbitrary Z #

This module exports instances of Arbitrary and CoArbitrary for unboxed Repa arrays.

Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

arbitrary :: Gen Z #

shrink :: Z -> [Z] #

CoArbitrary Z # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

coarbitrary :: Z -> Gen b -> Gen b #

Shape Z # 
Instance details

Defined in Data.Array.Repa.Index

Methods

rank :: Z -> Int #

zeroDim :: Z #

unitDim :: Z #

intersectDim :: Z -> Z -> Z #

addDim :: Z -> Z -> Z #

size :: Z -> Int #

sizeIsValid :: Z -> Bool #

toIndex :: Z -> Z -> Int #

fromIndex :: Z -> Int -> Z #

inShapeRange :: Z -> Z -> Z -> Bool #

listOfShape :: Z -> [Int] #

shapeOfList :: [Int] -> Z #

deepSeq :: Z -> a -> a #

Slice Z # 
Instance details

Defined in Data.Array.Repa.Slice

Elt e => LoadRange D DIM2 e #

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

Instance details

Defined in Data.Array.Repa.Repr.Delayed

Methods

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

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

Elt e => LoadRange C DIM2 e #

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

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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.

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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 () #

type SliceShape Z # 
Instance details

Defined in Data.Array.Repa.Slice

type SliceShape Z = Z
type FullShape Z # 
Instance details

Defined in Data.Array.Repa.Slice

type FullShape Z = Z

data tail :. head infixl 3 #

Our index type, used for both shapes and indices.

Constructors

!tail :. !head infixl 3 
Instances
Elt e => LoadRange D DIM2 e #

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

Instance details

Defined in Data.Array.Repa.Repr.Delayed

Methods

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

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

Elt e => LoadRange C DIM2 e #

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

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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.

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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 () #

(Eq tail, Eq head) => Eq (tail :. head) # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

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

(Ord tail, Ord head) => Ord (tail :. head) # 
Instance details

Defined in Data.Array.Repa.Index

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 tail, Read head) => Read (tail :. head) # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

readList :: ReadS [tail :. head] #

readPrec :: ReadPrec (tail :. head) #

readListPrec :: ReadPrec [tail :. head] #

(Show tail, Show head) => Show (tail :. head) # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

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

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

Arbitrary a => Arbitrary (a :. Int) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

arbitrary :: Gen (a :. Int) #

shrink :: (a :. Int) -> [a :. Int] #

CoArbitrary a => CoArbitrary (a :. Int) # 
Instance details

Defined in Data.Array.Repa.Arbitrary

Methods

coarbitrary :: (a :. Int) -> Gen b -> Gen b #

Shape sh => Shape (sh :. Int) # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

zeroDim :: sh :. Int #

unitDim :: sh :. Int #

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

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

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

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

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

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

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

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

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

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

Slice sl => Slice (sl :. All) # 
Instance details

Defined in Data.Array.Repa.Slice

Methods

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

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

Slice sl => Slice (sl :. Int) # 
Instance details

Defined in Data.Array.Repa.Slice

Methods

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

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

type SliceShape (sl :. All) # 
Instance details

Defined in Data.Array.Repa.Slice

type SliceShape (sl :. All) = SliceShape sl :. Int
type SliceShape (sl :. Int) # 
Instance details

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

type FullShape (sl :. All) = FullShape sl :. Int
type FullShape (sl :. Int) # 
Instance details

Defined in Data.Array.Repa.Slice

type FullShape (sl :. Int) = FullShape sl :. Int

Common dimensions.

type DIM0 = Z #

type DIM1 = DIM0 :. Int #

type DIM2 = DIM1 :. Int #

type DIM3 = DIM2 :. Int #

type DIM4 = DIM3 :. Int #

type DIM5 = DIM4 :. Int #

ix1 :: Int -> DIM1 #

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 #

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

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

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