![]() |
StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
|
An accessor for the monotile grid. More...
#include <Grid.hpp>
Public Types | |
using | BaseSubscript = AccessorSubscript< Cell, GridAccessor, access_mode > |
Shorthand for the used subscript type. | |
Public Member Functions | |
GridAccessor (Grid &grid) | |
Create a new accessor to the given grid. | |
BaseSubscript | operator[] (uindex_t i) |
Access/Dereference the first dimension. | |
Cell const & | operator[] (sycl::id< 2 > id) |
Access a cell of the grid. | |
Cell & | operator[] (sycl::id< 2 > id) |
Access a cell of the grid. | |
Static Public Attributes | |
static constexpr uindex_t | dimensions = Grid::dimensions |
The number of dimensions of the underlying grid. | |
An accessor for the monotile grid.
Instances of this class provide access to a grid, so that host code can read and write the contents of a grid. As such, it fullfils the GridAccessor concept.
access_mode | The access mode for the accessor. |
using stencil::tiling::Grid< Cell, tile_width, tile_height, halo_radius >::GridAccessor< access_mode >::BaseSubscript = AccessorSubscript<Cell, GridAccessor, access_mode> |
Shorthand for the used subscript type.
|
inline |
Create a new accessor to the given grid.
|
inline |
Access a cell of the grid.
id | The index of the accessed cell. The first index is the column index, the second one is the row index. |
|
inline |
Access a cell of the grid.
id | The index of the accessed cell. The first index is the column index, the second one is the row index. |
|
inline |
Access/Dereference the first dimension.
This subscript operator is the first subscript in an expression like accessor[i_column][i_row]
. It will return a BaseSubscript object that handles subsequent dimensions.
|
staticconstexpr |
The number of dimensions of the underlying grid.