StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode > Class Template Reference

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.
 

Detailed Description

template<class Cell, uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
class stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >

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.

Template Parameters
access_modeThe access mode for the accessor.

Member Typedef Documentation

◆ BaseSubscript

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
using stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::BaseSubscript = AccessorSubscript<Cell, GridAccessor, access_mode>

Shorthand for the used subscript type.

Constructor & Destructor Documentation

◆ GridAccessor()

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::GridAccessor ( Grid grid)
inline

Create a new accessor to the given grid.

Member Function Documentation

◆ operator[]() [1/3]

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
Cell const & stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::operator[] ( sycl::id< 2 >  id)
inline

Access a cell of the grid.

Parameters
idThe index of the accessed cell. The first index is the column index, the second one is the row index.
Returns
A constant reference to the indexed cell.

◆ operator[]() [2/3]

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
Cell & stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::operator[] ( sycl::id< 2 >  id)
inline

Access a cell of the grid.

Parameters
idThe index of the accessed cell. The first index is the column index, the second one is the row index.
Returns
A reference to the indexed cell.

◆ operator[]() [3/3]

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
BaseSubscript stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::operator[] ( uindex_t  i)
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.

Member Data Documentation

◆ dimensions

template<class Cell , uindex_t word_size = 64>
template<sycl::access::mode access_mode = sycl::access::mode::read_write>
constexpr uindex_t stencil::monotile::Grid< Cell, word_size >::GridAccessor< access_mode >::dimensions = Grid::dimensions
staticconstexpr

The number of dimensions of the underlying grid.


The documentation for this class was generated from the following file: