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

Data.Array.Repa.Specialised.Dim2

Description

Functions specialised for arrays of dimension 2.

Synopsis

Documentation

isInside2Source

Arguments

:: DIM2

Extent of array.

-> DIM2

Index to check.

-> Bool 

Check if an index lies inside the given extent. As opposed to inRange from Data.Array.Repa.Index, this is a short-circuited test that checks that lowest dimension first.

isOutside2Source

Arguments

:: DIM2

Extent of array.

-> DIM2

Index to check.

-> Bool 

Check if an index lies outside the given extent. As opposed to inRange from Data.Array.Repa.Index, this is a short-circuited test that checks the lowest dimension first.

clampToBorder2Source

Arguments

:: DIM2

Extent of array.

-> DIM2

Index to clamp.

-> DIM2 

Given the extent of an array, clamp the components of an index so they lie within the given array. Outlying indices are clamped to the index of the nearest border element.

makeBordered2Source

Arguments

:: Elt a 
=> DIM2

Extent of array.

-> Int

Width of border.

-> Generator DIM2 a

Generator for border elements.

-> Generator DIM2 a

Generator for internal elements.

-> Array DIM2 a 

Make a 2D partitioned array given two generators, one to produce elements in the border region, and one to produce values in the internal region. The border must be the same width on all sides.