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 Source #

An index of dimension zero

Constructors

Z 
Instances
Eq Z Source # 
Instance details

Defined in Data.Array.Repa.Index

Methods

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

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

Ord Z Source # 
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 Source # 
Instance details

Defined in Data.Array.Repa.Index

Show Z Source # 
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 Source # 
Instance details

Defined in Data.Array.Repa.Index

Slice Z Source # 
Instance details

Defined in Data.Array.Repa.Slice

Elt e => LoadRange D DIM2 e Source #

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

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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.

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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

Defined in Data.Array.Repa.Slice

type SliceShape Z = Z
type FullShape Z Source # 
Instance details

Defined in Data.Array.Repa.Slice

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.

Instance details

Defined in Data.Array.Repa.Repr.Delayed

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.

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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.

Instance details

Defined in Data.Array.Repa.Repr.Cursored

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

Defined in Data.Array.Repa.Index

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

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

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

Defined in Data.Array.Repa.Slice

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 #