1.3.64
 
Loading...
Searching...
No Matches
BufferIndexer3D Class Reference

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.
 

Detailed Description

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:

  • Material properties: [source][primitive][band]
  • Source camera fluxes: [source][band][camera]

Definition at line 106 of file BufferIndexing.h.

Constructor & Destructor Documentation

◆ BufferIndexer3D()

HELIOS_HOST_DEVICE BufferIndexer3D::BufferIndexer3D ( size_t  dim0_size,
size_t  dim1_size,
size_t  dim2_size 
)
inlineexplicit

Construct 3D indexer.

Parameters
dim0_sizeSize of first dimension (stored for documentation/future validation)
dim1_sizeSize of second dimension
dim2_sizeSize of third dimension

Definition at line 120 of file BufferIndexing.h.

Member Function Documentation

◆ getDim1Size()

HELIOS_HOST_DEVICE size_t BufferIndexer3D::getDim1Size ( ) const
inline

Get size of second dimension.

Definition at line 136 of file BufferIndexing.h.

◆ getDim2Size()

HELIOS_HOST_DEVICE size_t BufferIndexer3D::getDim2Size ( ) const
inline

Get size of third dimension.

Definition at line 141 of file BufferIndexing.h.

◆ operator()()

HELIOS_HOST_DEVICE size_t BufferIndexer3D::operator() ( size_t  i,
size_t  j,
size_t  k 
) const
inline

Compute linear index for 3D access.

Parameters
iIndex in first dimension
jIndex in second dimension
kIndex in third dimension
Returns
Linear array index

Definition at line 131 of file BufferIndexing.h.


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