Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::HyperslabIndexer< N > Class Template Reference

Class for indexing into flattened N-dimensional data (N-D coords to index) More...

#include <HyperslabIndexer.hh>

Public Types

Type aliases
using Coords = Array< size_type, N >
 

Public Member Functions

CELER_FUNCTION HyperslabIndexer (Array< size_type, N > const &dims)
 Construct from array denoting the sizes of each dimension.
 
CELER_FUNCTION size_type operator() (Coords const &coords) const
 Convert N-dimensional coordinates to an index.
 
template<typename... Args>
CELER_FUNCTION size_type operator() (Args... args) const
 Convert N-dimensional coordinates to an index.
 

Detailed Description

template<size_type N>
class celeritas::HyperslabIndexer< N >

Class for indexing into flattened N-dimensional data (N-D coords to index)

Indexing is in standard C iteration order, such that final dimension "changes fastest". For example, when indexing into a 3D grid (N=3) with coords (i=0, j=0, k=1) the resulting index will be 1.

Todo:
https://github.com/celeritas-project/celeritas/pull/1518#discussion_r1856614365

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