4D buffer indexer: [dim0][dim1][dim2][dim3] More...
#include <BufferIndexing.h>
Public Member Functions | |
| HELIOS_HOST_DEVICE | BufferIndexer4D (size_t dim0_size, size_t dim1_size, size_t dim2_size, size_t dim3_size) |
| Construct 4D indexer. | |
| HELIOS_HOST_DEVICE size_t | operator() (size_t i, size_t j, size_t k, size_t l) const |
| Compute linear index for 4D 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. | |
| HELIOS_HOST_DEVICE size_t | getDim3Size () const |
| Get size of fourth dimension. | |
4D buffer indexer: [dim0][dim1][dim2][dim3]
Computes linear index as: dim0_idx * (dim1 * dim2 * dim3) + dim1_idx * (dim2 * dim3) + dim2_idx * dim3 + dim3_idx
Common usage patterns:
Definition at line 156 of file BufferIndexing.h.
|
inlineexplicit |
Construct 4D indexer.
| dim0_size | Size of first dimension (stored for documentation/future validation) |
| dim1_size | Size of second dimension |
| dim2_size | Size of third dimension |
| dim3_size | Size of fourth dimension |
Definition at line 173 of file BufferIndexing.h.
|
inline |
Get size of second dimension.
Definition at line 191 of file BufferIndexing.h.
|
inline |
Get size of third dimension.
Definition at line 196 of file BufferIndexing.h.
|
inline |
Get size of fourth dimension.
Definition at line 201 of file BufferIndexing.h.
|
inline |
Compute linear index for 4D access.
| i | Index in first dimension |
| j | Index in second dimension |
| k | Index in third dimension |
| l | Index in fourth dimension |
Definition at line 186 of file BufferIndexing.h.