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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Slice

Description

Index space transformation between arrays and slices.

Synopsis

Documentation

data All #

Select all indices at a certain position.

Constructors

All 

Instances

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

Methods

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

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

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

data Any sh #

Place holder for any possible shape.

Constructors

Any 

Instances

Slice (Any sh) # 

Methods

sliceOfFull :: Any sh -> FullShape (Any sh) -> SliceShape (Any sh) #

fullOfSlice :: Any sh -> SliceShape (Any sh) -> FullShape (Any sh) #

type SliceShape (Any sh) # 
type SliceShape (Any sh) = sh
type FullShape (Any sh) # 
type FullShape (Any sh) = sh

type family FullShape ss #

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

Instances

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

type family SliceShape ss #

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

Instances

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

class Slice ss where #

Class of index types that can map to slices.

Minimal complete definition

sliceOfFull, fullOfSlice

Methods

sliceOfFull :: ss -> FullShape ss -> SliceShape ss #

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

fullOfSlice :: ss -> SliceShape ss -> FullShape ss #

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

Instances

Slice Z # 
Slice (Any sh) # 

Methods

sliceOfFull :: Any sh -> FullShape (Any sh) -> SliceShape (Any sh) #

fullOfSlice :: Any sh -> SliceShape (Any sh) -> FullShape (Any sh) #

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

Methods

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

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

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

Methods

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

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