StencilStream v3.0.0
SYCL-based Stencil Simulation Framework Targeting FPGAs
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
stencil Namespace Reference

Namespaces

namespace  concepts
 
namespace  cpu
 
namespace  monotile
 
namespace  tdv
 
namespace  tiling
 

Classes

class  AccessorSubscript
 A helper class to support the double-subscript idiom for GridAccessors. More...
 
class  BaseTransitionFunction
 Base class for transition functions that disables advanced features. More...
 
class  GenericID
 A generic, two-dimensional index. More...
 
struct  Padded
 A container with padding to the next power of two. More...
 
class  Stencil
 The stencil buffer. More...
 

Typedefs

typedef GenericID< index_tID
 A signed, two-dimensional index.
 
typedef GenericID< uindex_tUID
 An unsigned, two-dimensional index.
 
using uindex_t = BOOST_PP_CAT(BOOST_PP_CAT(uint, STENCIL_INDEX_WIDTH), _t)
 An unsigned integer of configurable width.
 
using index_t = BOOST_PP_CAT(BOOST_PP_CAT(int, STENCIL_INDEX_WIDTH), _t)
 A signed integer of configurable width.
 

Functions

constexpr uindex_t n_cells_to_n_words (uindex_t n_cells, uindex_t word_length)
 Compute the number of words necessary to store a given number of cells.
 
template<typename T >
struct stencil::Padded __attribute__ ((aligned(std::bit_ceil(sizeof(T)))))
 

Typedef Documentation

◆ ID

A signed, two-dimensional index.

◆ index_t

using stencil::index_t = typedef BOOST_PP_CAT(BOOST_PP_CAT(int, STENCIL_INDEX_WIDTH), _t)

A signed integer of configurable width.

This integer type is used in StencilStream to indicate cell positions and iterations, among others. Its width can be configured using the STENCIL_INDEX_WIDTH macro, which defaults to 64.

Note that this type is likely to be replaced by std::ptrdiff_t in a future update. Most performance-critical indices already use custom-precision integers tailored to their specific users, so the need to customize the width of the remaining indices is relatively low. In addition, using std::ptrdiff_t as a general index type would allow better compatibility with SYCL and other libraries.

◆ UID

An unsigned, two-dimensional index.

◆ uindex_t

using stencil::uindex_t = typedef BOOST_PP_CAT(BOOST_PP_CAT(uint, STENCIL_INDEX_WIDTH), _t)

An unsigned integer of configurable width.

This integer type is used in StencilStream to indicate cell positions and iterations, among others. Its width can be configured using the STENCIL_INDEX_WIDTH macro, which defaults to 64.

Note that this type is likely to be replaced by std::size_t in a future update. Most performance-critical indices already use custom-precision integers tailored to their specific users, so the need to customize the width of the remaining indices is relatively low. In addition, using std::size_t as a general index type would allow better compatibility with SYCL and other libraries.

Function Documentation

◆ __attribute__()

template<typename T >
struct stencil::Padded stencil::__attribute__ ( (aligned(std::bit_ceil(sizeof(T))))  )

◆ n_cells_to_n_words()

constexpr uindex_t stencil::n_cells_to_n_words ( uindex_t  n_cells,
uindex_t  word_length 
)
inlineconstexpr

Compute the number of words necessary to store a given number of cells.

Some backends store cells in groups called words. Each word contains a certain number of cells, and this function computes how many words are needed to store a certain number of cells. This is the total number of cells divided by the number of cells in a word, plus one additional word if the word length doesn't divide the total number of cells.