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

Safe HaskellNone




data D Source

Delayed arrays are represented as functions from the index to element value.

Every time you index into a delayed array the element at that position is recomputed.


Source D a Source

Compute elements of a delayed array.

Elt e => LoadRange D DIM2 e Source

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

Shape sh => Load D sh e Source

Compute all elements in an array.

Structured D a b Source 
(Shape sh, Load D sh e) => Load (I D) sh e Source 
type TR D = D Source 
data Array D sh a = ADelayed !sh (sh -> a) Source 

fromFunction :: sh -> (sh -> a) -> Array D sh a Source

O(1). Wrap a function as a delayed array.

toFunction :: (Shape sh, Source r1 a) => Array r1 sh a -> (sh, sh -> a) Source

O(1). Produce the extent of an array, and a function to retrieve an arbitrary element.

delay :: Shape sh => Source r e => Array r sh e -> Array D sh e Source

O(1). Delay an array. This wraps the internal representation to be a function from indices to elements, so consumers don't need to worry about what the previous representation was.