Efficient computation of stencil based convolutions.
Represents a convolution stencil that we can apply to array. Only statically known stencils are supported right now.
How to handle the case when the stencil lies partly outside the array.
Use a fixed value for border regions.
Treat points outside the array as having a constant value.
Clamp points outside to the same value as the edge pixel.