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

Safe HaskellNone

Data.Array.Repa.Index

Contents

Description

Index types.

Synopsis

Index types

data Z Source

An index of dimension zero

Constructors

Z 

Instances

Eq Z 
Ord Z 
Read Z 
Show Z 
Arbitrary Z

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

CoArbitrary Z 
Shape Z 
Slice Z 
(Source D e, Shape DIM2, Elt e) => LoadRange D DIM2 e

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

(Source C e, Shape DIM2, Elt e) => LoadRange C DIM2 e

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

(Source C e, Shape DIM2, Elt e) => Load C DIM2 e

Compute all elements in an rank-2 array.

data tail :. head Source

Our index type, used for both shapes and indices.

Constructors

!tail :. !head 

Instances

(Source D e, Shape DIM2, Elt e) => LoadRange D DIM2 e

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

(Source C e, Shape DIM2, Elt e) => LoadRange C DIM2 e

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

(Source C e, Shape DIM2, Elt e) => Load C DIM2 e

Compute all elements in an rank-2 array.

(Eq tail, Eq head) => Eq (:. tail head) 
(Eq (:. tail head), Ord tail, Ord head) => Ord (:. tail head) 
(Read tail, Read head) => Read (:. tail head) 
(Show tail, Show head) => Show (:. tail head) 
(Shape a, Arbitrary a) => Arbitrary (:. a Int) 
(Shape a, CoArbitrary a) => CoArbitrary (:. a Int) 
(Eq (:. sh Int), Shape sh) => Shape (:. sh Int) 
Slice sl => Slice (:. sl All) 
Slice sl => Slice (:. sl Int) 

Common dimensions.

type DIM0 = ZSource

ix1 :: Int -> DIM1Source

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.

ix3 :: Int -> Int -> Int -> DIM3Source

ix4 :: Int -> Int -> Int -> Int -> DIM4Source

ix5 :: Int -> Int -> Int -> Int -> Int -> DIM5Source