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

Safe Haskell | None
Language | Haskell98

Data.Array.Repa.Stencil

Contents

- Stencil creation.

Description

Efficient computation of stencil based convolutions.

Synopsis

- data Stencil sh a = StencilStatic {
  - stencilExtent :: !sh
  - stencilZero :: !a
  - stencilAcc :: !(sh -> a -> a -> a)
  }
- data Boundary a
  - = BoundFixed !a
  - | BoundConst !a
  - | BoundClamp
- makeStencil :: Num a => sh -> (sh -> Maybe a) -> Stencil sh a

# 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

Instances details

Show a => Show (Boundary a) Source # |
Instance details Defined in Data.Array.Repa.Stencil.Base Methods showsPrec :: Int -> Boundary a -> ShowS show :: Boundary a -> String showList :: [Boundary a] -> ShowS

# Stencil creation.

makeStencil Source #

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.