![]() |
StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
|
A grid updater that applies an iterative stencil code to a grid. More...
#include <StencilUpdate.hpp>
Classes | |
struct | Params |
Parameters for the stencil updater. More... | |
Public Types | |
using | GridImpl = Grid< Cell > |
Shorthand for the used and supported grid type. | |
Public Member Functions | |
StencilUpdate (Params params) | |
Create a new stencil updater object. | |
GridImpl | operator() (GridImpl &source_grid) |
Compute a new grid based on the source grid, using the configured transition function. | |
Params & | get_params () |
Return a reference to the parameters. | |
uindex_t | get_n_processed_cells () const |
Return the accumulated total number of cells processed by this updater. | |
double | get_walltime () const |
Return the accumulated runtime of the updater, measured from the host side. | |
A grid updater that applies an iterative stencil code to a grid.
This updater applies an iterative stencil code, defined by the template parameter F
, to the grid; As often as requested.
F | The transition function to apply to input grids. |
using stencil::cpu::StencilUpdate< F >::GridImpl = Grid<Cell> |
Shorthand for the used and supported grid type.
|
inline |
Create a new stencil updater object.
|
inline |
Return the accumulated total number of cells processed by this updater.
For each call of to operator()(), this is the width times the height of the grid, times the number of computed iterations. This will also be accumulated across multiple calls to operator()().
|
inline |
Return a reference to the parameters.
Modifications to the parameters struct will be used in the next call to operator()().
|
inline |
Return the accumulated runtime of the updater, measured from the host side.
For each call to operator()(), the time it took to submit all kernels and, if Params::blocking is true, to finish the computation is recorded and accumulated.
|
inline |
Compute a new grid based on the source grid, using the configured transition function.
The computation does not work in-place. Instead, it will allocate two additional grids with the same size as the source grid and use them for a double buffering scheme. Therefore, you are free to reuse the source grid as it will not be altered.
If Params::blocking is set to true, this method will block until the computation is complete. Otherwise, it will return as soon as all kernels are submitted.