code: public int getNumGroups(int _dim) {
        return (_dim == 0 ? (globalSize_0 / localSize_0) : (_dim == 1 ? (globalSize_1 / localSize_1) : (globalSize_2 / localSize_2)));
     }
docs: Get the number of groups for the given dimension.
  
  <p>
  This will essentially return globalXXXX/localXXXX for the given dimension (width, height, depth)
  @param _dim The dim we are interested in 0, 1 or 2
  @return the number of groups for the given dimension.