class_docstr: A handle to the current grid group. Must be created via :func:`this_grid`.
  
  .. seealso:: `CUDA Grid Group API`_, :class:`numba.cuda.cg.GridGroup`
  
  .. _CUDA Grid Group API:
      https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#grid-group-cg
class_docstr_tok: ["A","handle","to","the","current","grid","group",".","Must","be","created","via",":","func",":","`","this_grid","`",".","..","seealso",":",":","`","CUDA","Grid","Group","API","`","_",",",":","class",":","`","numba.cuda.cg.GridGroup","`","..","_CUDA","Grid","Group","API",":","https",":","\/\/docs.nvidia.com\/cuda\/cuda-c-programming-guide\/index.html","#","grid-group-cg"]
docstr: thread_rank()
  
  Rank of the calling thread within ``[0, num_threads)``.
docstr_tok: ["thread_rank","(",")","Rank","of","the","calling","thread","within","``","[","0",",","num_threads",")","``","."]
code: def thread_rank(self, env, instance):
      """
      thread_rank()
  
      Rank of the calling thread within ``[0, num_threads)``.
      """
      _check_include(env, "cg")
      return _Data(f"{instance.code}.thread_rank()", _cuda_types.uint64)
  
imports: from cupy.cuda import runtime
  from cupyx.jit import _compile
  from cupyx.jit import _cuda_types
  from cupyx.jit._internal_types import BuiltinFunc
  from cupyx.jit._internal_types import Constant
  from cupyx.jit._internal_types import Data
  from cupyx.jit._internal_types import wraps_class_method
label_desc: Use image node_id 4 for calling the _GridGroup obj's underlying member method code with example usage: obj.thread_rank(env, instance) and returns: _Data