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

Safe HaskellNone
LanguageHaskell98

Data.Array.Repa.Specialised.Dim2

Description

Functions specialised for arrays of dimension 2.

Synopsis

Documentation

isInside2 #

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.

isOutside2 #

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.

clampToBorder2 #

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.

makeBordered2 #

Arguments

:: (Source r1 a, Source r2 a) 
=> DIM2

Extent of array.

-> Int

Width of border.

-> Array r1 DIM2 a

Array for internal elements.

-> Array r2 DIM2 a

Array for border elements.

-> Array (P r1 (P r2 (P r2 (P r2 (P r2 X))))) DIM2 a 

Make a 2D partitioned array from two others, one to produce the elements in the internal region, and one to produce elements in the border region. The two arrays must have the same extent. The border must be the same width on all sides.