Concept of Stencil Computation
Before using the SCA interface, it is necessary to understand some fundamental concepts of the stencil computation.
A stencil consists of stencil elements. Each stencil element has a relative location from the stencil center, a coefficient, and a reference to an input array. The mathematical expression of the stencil is shown below.
Here, denotes the relative location of the kth stencil element, denotes the coefficient of the kth stencil element, and denotes the input array which the kth stencil element refers to.
In the SCA interface, you can specify either a scalar or an array as the coefficients .