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

Safe HaskellNone

Data.Array.Repa.Stencil

Contents

Description

Efficient computation of stencil based convolutions.

Synopsis

Documentation

data Stencil sh a Source

Represents a convolution stencil that we can apply to array. Only statically known stencils are supported right now.

Constructors

StencilStatic

Static stencils are used when the coefficients are fixed, and known at compile time.

Fields

stencilExtent :: !sh
 
stencilZero :: !a
 
stencilAcc :: !(sh -> a -> a -> a)
 

data Boundary a Source

How to handle the case when the stencil lies partly outside the array.

Constructors

BoundFixed !a

Use a fixed value for border regions.

BoundConst !a

Treat points outside the array as having a constant value.

BoundClamp

Clamp points outside to the same value as the edge pixel.

Instances

Show a => Show (Boundary a) 

Stencil creation.

makeStencilSource

Arguments

:: Num a 
=> sh

Extent of stencil.

-> (sh -> Maybe a)

Get the coefficient at this index.

-> Stencil sh a 

Make a stencil from a function yielding coefficients at each index.