3D buffer indexer: [dim0][dim1][dim2] More...
#include <BufferIndexing.h>
Public Member Functions | |
| HELIOS_HOST_DEVICE | BufferIndexer3D (size_t dim0_size, size_t dim1_size, size_t dim2_size) |
| Construct 3D indexer. | |
| HELIOS_HOST_DEVICE size_t | operator() (size_t i, size_t j, size_t k) const |
| Compute linear index for 3D access. | |
| HELIOS_HOST_DEVICE size_t | getDim1Size () const |
| Get size of second dimension. | |
| HELIOS_HOST_DEVICE size_t | getDim2Size () const |
| Get size of third dimension. | |
3D buffer indexer: [dim0][dim1][dim2]
Computes linear index as: dim0_idx * (dim1_size * dim2_size) + dim1_idx * dim2_size + dim2_idx
Common usage patterns:
Definition at line 106 of file BufferIndexing.h.
|
inlineexplicit |
Construct 3D indexer.
| dim0_size | Size of first dimension (stored for documentation/future validation) |
| dim1_size | Size of second dimension |
| dim2_size | Size of third dimension |
Definition at line 120 of file BufferIndexing.h.
|
inline |
Get size of second dimension.
Definition at line 136 of file BufferIndexing.h.
|
inline |
Get size of third dimension.
Definition at line 141 of file BufferIndexing.h.
|
inline |
Compute linear index for 3D access.
| i | Index in first dimension |
| j | Index in second dimension |
| k | Index in third dimension |
Definition at line 131 of file BufferIndexing.h.