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

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

#include <HyperslabIndexer.hh>

Public Types

Type aliases
using Coords = Array< size_type, N >
 

Public Member Functions

CELER_FUNCTION HyperslabInverseIndexer (Array< size_type, N > const &dims)
 Construct from array denoting the sizes of each dimension.
 
CELER_FUNCTION Coords operator() (size_type index) const
 Convert an index to N-dimensional coordinates. More...
 

Detailed Description

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

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

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

Member Function Documentation

◆ operator()()

template<size_type N>
CELER_FUNCTION HyperslabInverseIndexer< N >::Coords celeritas::HyperslabInverseIndexer< N >::operator() ( size_type  index) const
inline

Convert an index to N-dimensional coordinates.

Convert an index into N-dimensional coordinates.


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