Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
Switch between a d-dimensional grid to a flattened, 1D index. More...
#include <indexer.h>
Public Member Functions | |
HOSTDEVICE | IndexDD (unsigned int w=0) |
HOSTDEVICE | IndexDD (iVec w) |
HOSTDEVICE void | setSizes (unsigned int w) |
HOSTDEVICE void | setSizes (iVec w) |
HOSTDEVICE unsigned int | operator() (const iVec &i) const |
HOSTDEVICE iVec | inverseIndex (int i) |
What iVec would correspond to a given unsigned int IndexDD(iVec) More... | |
HOSTDEVICE unsigned int | getNumElements () const |
Return the number of elements that the indexer can index. More... | |
HOSTDEVICE iVec | getSizes () const |
Get the iVec of sizes. More... | |
Public Attributes | |
iVec | sizes |
a list of the size of the full array in each of the d dimensions More... | |
iVec | intermediateSizes |
intermediateSizes[a] = Product_{d<=a} sizes. intermediateSizes[0]=1; More... | |
unsigned int | numberOfElements |
unsigned int | width |
The total number of elements that the indexer can index. More... | |
Switch between a d-dimensional grid 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 |
References setSizes().
|
inline |
References setSizes().
|
inline |
References intermediateSizes, numberOfElements, sizes, and iVec::x.
Referenced by IndexDD().
|
inline |
References intermediateSizes, numberOfElements, sizes, and iVec::x.
|
inline |
References dot(), and intermediateSizes.
|
inline |
What iVec would correspond to a given unsigned int IndexDD(iVec)
References sizes, and iVec::x.
Referenced by hyperrectangularCellList::computeAdjacentCells(), hyperrectangularCellList::getCellNeighbors(), and hyperrectangularCellList::indexToiVec().
|
inline |
Return the number of elements that the indexer can index.
References numberOfElements.
|
inline |
iVec IndexDD::sizes |
a list of the size of the full array in each of the d dimensions
Referenced by getSizes(), inverseIndex(), and setSizes().
iVec IndexDD::intermediateSizes |
intermediateSizes[a] = Product_{d<=a} sizes. intermediateSizes[0]=1;
Referenced by operator()(), and setSizes().
unsigned int IndexDD::numberOfElements |
Referenced by getNumElements(), and setSizes().
unsigned int IndexDD::width |
The total number of elements that the indexer can index.
array width