StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
Loading...
Searching...
No Matches
stencil::concepts::Grid Concept Reference

A regular grid of cells. More...

#include <Concepts.hpp>

Concept definition

template<typename G, typename Cell>
concept stencil::concepts::Grid = requires(G &grid, sycl::buffer<Cell, 2> buffer, uindex_t c, uindex_t r, Cell cell) {
{ G(c, r) } -> std::same_as<G>;
{ G(sycl::range<2>(c, r)) } -> std::same_as<G>;
{ G(buffer) } -> std::same_as<G>;
{ grid.copy_from_buffer(buffer) } -> std::same_as<void>;
{ grid.copy_to_buffer(buffer) } -> std::same_as<void>;
{ grid.get_grid_width() } -> std::convertible_to<uindex_t>;
{ grid.get_grid_height() } -> std::convertible_to<uindex_t>;
{ grid.make_similar() } -> std::same_as<G>;
{
typename G::template GridAccessor<sycl::access::mode::read_write>(grid)
} -> GridAccessor<Cell>;
}
A regular grid of cells.
Definition Concepts.hpp:115
BOOST_PP_CAT(BOOST_PP_CAT(uint, STENCIL_INDEX_WIDTH), _t) uindex_t
An unsigned integer of configurable width.
Definition Index.hpp:42

Detailed Description

A regular grid of cells.

Template Parameters
CellThe 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:

Newly created grids may be uninitialized.