2D buffer indexer: [dim0][dim1] More...
#include <BufferIndexing.h>
Public Member Functions | |
| HELIOS_HOST_DEVICE | BufferIndexer2D (size_t dim0_size, size_t dim1_size) |
| Construct 2D indexer. | |
| HELIOS_HOST_DEVICE size_t | operator() (size_t i, size_t j) const |
| Compute linear index for 2D access. | |
| HELIOS_HOST_DEVICE size_t | getDim1Size () const |
| Get size of second dimension. | |
2D buffer indexer: [dim0][dim1]
Computes linear index as: dim0_idx * dim1_size + dim1_idx
Common usage patterns:
Definition at line 65 of file BufferIndexing.h.
|
inlineexplicit |
Construct 2D indexer.
| dim0_size | Size of first dimension (stored for documentation/future validation) |
| dim1_size | Size of second dimension |
Definition at line 76 of file BufferIndexing.h.
|
inline |
Get size of second dimension.
Definition at line 92 of file BufferIndexing.h.
|
inline |
Compute linear index for 2D access.
| i | Index in first dimension |
| j | Index in second dimension |
Definition at line 87 of file BufferIndexing.h.