summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_run/T17151.hs
blob: 20c31ea11fe901cd51489078cd869a2422c5c413 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where

import T17151a

main :: IO ()
main = do
  let ys :: Array P Int Int
      ys = computeS (makeArray D 1 (const 5))
      applyStencil ::
           (Source P ix Int, Load D ix Int)
        => Stencil ix Int Int
        -> Array P ix Int
        -> Array P ix Int
      applyStencil s = computeS . mapStencil s
  print (applyStencil (makeConvolutionStencilFromKernel ys) ys `unsafeIndex` 0)
  print (applyStencil (makeConvolutionStencilFromKernel ys) ys `unsafeIndex` 0)