Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
Switch between a 2D array to a flattened, 1D index. More...
#include <indexer.h>
Public Member Functions | |
HOSTDEVICE | Index2D (unsigned int w=0) |
HOSTDEVICE | Index2D (unsigned int w, unsigned int h) |
HOSTDEVICE unsigned int | operator() (unsigned int i, unsigned int j) const |
HOSTDEVICE unsigned int | getNumElements () const |
Return the number of elements that the indexer can index. More... | |
HOSTDEVICE unsigned int | getW () const |
Get the width. More... | |
HOSTDEVICE unsigned int | getH () const |
get the height More... | |
Public Attributes | |
unsigned int | width |
array width More... | |
unsigned int | height |
array height More... | |
Switch between a 2D array to a flattened, 1D index.
A class for converting between a 2d index and a 1-d array, which makes calculation on the GPU a bit easier. This was inspired by the indexer class of Hoomd-blue
|
inline |
|
inline |
|
inline |
References width.
|
inline |
Return the number of elements that the indexer can index.
Referenced by gpu_compute_cell_list_kernel(), hyperrectangularCellList::resetCellSizes(), hyperrectangularCellList::resetCellSizesCPU(), neighborList::resetNeighborsCPU(), and neighborList::resetNeighborsGPU().
|
inline |
Get the width.
References width.
|
inline |
get the height
References height.
unsigned int Index2D::width |
array width
Referenced by getNumElements(), getW(), and operator()().
unsigned int Index2D::height |
array height
Referenced by getH(), and getNumElements().