![]() |
StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
|
A regular grid of cells. More...
#include <Concepts.hpp>
A regular grid of cells.
Cell | The type of cells the grid contains. |
First of all, each grid must contain a template class called GridAccessor
that, given an instance of sycl::access::mode
, fulfills the GridAccessor concept. Apart from this, each grid class must implement the following methods:
Grid(uindex_t c, uindex_t r)
: Create a new grid with c
columns and r
rows.Grid(sycl::range<2> range)
: Create new grid with range[0]
columns and range[1]
rows.Grid(sycl::buffer<Cell, 2> buffer)
: Create new grid and copy the contents of the buffer
into the grid.void copy_from_buffer(sycl::buffer<Cell, 2> buffer)
: Copy the contents of the buffer
into the grid.void copy_to_buffer(sycl::buffer<Cell, 2> buffer)
: Copy the contents of the grid into the buffer
.uindex_t get_grid_width()
: Get the number of columns in the grid.uindex_t get_grid_height()
: Get the number of rows in the grid.Grid make_similar()
: Create a new grid with the same number of rows and columns as this grid.Newly created grids may be uninitialized.