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

Safe Haskell | None
Language | Haskell98

Data.Array.Repa.Slice

Description

Index space transformation between arrays and slices.

Synopsis

- data All = All
- data Any sh = Any
- type family FullShape ss
- type family SliceShape ss
- class Slice ss where
  - sliceOfFull :: ss -> FullShape ss -> SliceShape ss
  - fullOfSlice :: ss -> SliceShape ss -> FullShape ss

# Documentation

data All Source

Select all indices at a certain position.

Constructors

All |

Instances

Slice sl => Slice ((:.) sl All) Source |
type SliceShape ((:.) sl All) = (:.) (SliceShape sl) Int Source |
type FullShape ((:.) sl All) = (:.) (FullShape sl) Int Source |

data Any sh Source

Place holder for any possible shape.

Constructors

Any |

Instances

Slice (Any sh) Source |
type SliceShape (Any sh) = sh Source |
type FullShape (Any sh) = sh Source |

type family FullShape ss Source

Map a type of the index in the full shape, to the type of the index in the slice.

Instances

type FullShape Z = Z Source |
type FullShape (Any sh) = sh Source |
type FullShape ((:.) sl All) = (:.) (FullShape sl) Int Source |
type FullShape ((:.) sl Int) = (:.) (FullShape sl) Int Source |

type family SliceShape ss Source

Map the type of an index in the slice, to the type of the index in the full shape.

Instances

type SliceShape Z = Z Source |
type SliceShape (Any sh) = sh Source |
type SliceShape ((:.) sl All) = (:.) (SliceShape sl) Int Source |
type SliceShape ((:.) sl Int) = SliceShape sl Source |

class Slice ss where Source

Class of index types that can map to slices.

Methods

sliceOfFull :: ss -> FullShape ss -> SliceShape ss Source

Map an index of a full shape onto an index of some slice.

fullOfSlice :: ss -> SliceShape ss -> FullShape ss Source

Map an index of a slice onto an index of the full shape.

Instances

Slice Z Source |
Slice (Any sh) Source |
Slice sl => Slice ((:.) sl All) Source |
Slice sl => Slice ((:.) sl Int) Source |