Safe Haskell | Safe-Infered |
---|

- makeStencil2 :: Num a => Int -> Int -> (DIM2 -> Maybe a) -> Stencil DIM2 a
- stencil2 :: QuasiQuoter
- type PC5 = P C (P D (P D (P D (P D X))))
- mapStencil2 :: Repr r a => Boundary a -> Stencil DIM2 a -> Array r DIM2 a -> Array PC5 DIM2 a
- forStencil2 :: Repr r a => Boundary a -> Array r DIM2 a -> Stencil DIM2 a -> Array PC5 DIM2 a

# Stencil creation

:: Num a | |

=> Int | |

-> Int | extent of stencil |

-> (DIM2 -> Maybe a) | Get the coefficient at this index. |

-> Stencil DIM2 a |

Wrapper for `makeStencil`

that requires a DIM2 stencil.

QuasiQuoter for producing a static stencil defintion.

A definition like

[stencil2| 0 1 0 1 0 1 0 1 0 |]

Is converted to:

makeStencil2 (Z:.3:.3) (\ix -> case ix of Z :. -1 :. 0 -> Just 1 Z :. 0 :. -1 -> Just 1 Z :. 0 :. 1 -> Just 1 Z :. 1 :. 0 -> Just 1 _ -> Nothing)