Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
Switch between a 3-dimensional grid to a flattened, 1D index. More...
#include <indexer.h>
Public Member Functions | |
HOSTDEVICE | Index3D (unsigned int w=0) |
HOSTDEVICE | Index3D (int3 w) |
HOSTDEVICE void | setSizes (unsigned int w) |
HOSTDEVICE void | setSizes (int3 w) |
HOSTDEVICE unsigned int | operator() (const int x, const int y, const int z) const |
HOSTDEVICE unsigned int | operator() (const int3 &i) const |
HOSTDEVICE int3 | 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 int3 | getSizes () const |
Get the iVec of sizes. More... | |
Public Attributes | |
int3 | sizes |
a list of the size of the full array in each of the d dimensions More... | |
int3 | 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 3-dimensional grid to a flattened, 1D index.
A class for converting between a 3d 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 |
Referenced by Index3D().
|
inline |
References intermediateSizes, numberOfElements, and sizes.
|
inline |
References intermediateSizes.
|
inline |
References intermediateSizes.
|
inline |
What iVec would correspond to a given unsigned int IndexDD(iVec)
References sizes.
Referenced by cubicLattice::getNeighbors(), multirankQTensorLatticeModel::getNeighbors(), gpu_lattice_spin_force_nn_kernel(), gpu_qTensor_computeBoundaryForcesGPU_kernel(), multirankQTensorLatticeModel::indexToPosition(), and multirankSimulation::setRankTopology().
|
inline |
Return the number of elements that the indexer can index.
References numberOfElements.
|
inline |
Get the iVec of sizes.
References sizes.
Referenced by gpu_lattice_spin_force_nn(), and gpu_qTensor_computeBoundaryForcesGPU_kernel().
int3 Index3D::sizes |
a list of the size of the full array in each of the d dimensions
Referenced by qTensorLatticeModel::createBoundaryFromFile(), qTensorLatticeModel::createSimpleFlatWallNormal(), qTensorLatticeModel::createSimpleFlatWallZNormal(), qTensorLatticeModel::createSimpleSpherialColloid(), multirankSimulation::determineCommunicationPattern(), cubicLattice::getNeighbors(), getSizes(), inverseIndex(), and setSizes().
int3 Index3D::intermediateSizes |
intermediateSizes[a] = Product_{d<=a} sizes. intermediateSizes[0]=1;
Referenced by operator()(), and setSizes().
unsigned int Index3D::numberOfElements |
Referenced by getNumElements(), and setSizes().
unsigned int Index3D::width |
The total number of elements that the indexer can index.
array width