예제 #1
0
파일: cg.py 프로젝트: amulyagupta1278/cupy
    def group_index(self, env):
        """
        group_index()

        3-Dimensional index of the block within the launched grid.
        """
        from cupyx.jit._interface import _Dim3  # avoid circular import
        self._check_cg_include(env)
        return _Data('group_index()', _Dim3())
예제 #2
0
파일: cg.py 프로젝트: amulyagupta1278/cupy
    def thread_index(self, env):
        """
        thread_index()

        3-Dimensional index of the thread within the launched block.
        """
        from cupyx.jit._interface import _Dim3  # avoid circular import
        self._check_cg_include(env)
        return _Data('thread_index()', _Dim3())
예제 #3
0
파일: cg.py 프로젝트: amulyagupta1278/cupy
    def group_dim(self, env):
        """
        group_dim()

        Dimensions of the launched block in units of threads.
        """
        # despite it is an alias of dim_threads, we need it for earlier 11.x
        from cupyx.jit._interface import _Dim3  # avoid circular import
        self._check_cg_include(env)
        return _Data('group_dim()', _Dim3())
예제 #4
0
파일: cg.py 프로젝트: amulyagupta1278/cupy
    def dim_threads(self, env):
        """
        dim_threads()

        Dimensions of the launched block in units of threads.
        """
        if _runtime.runtimeGetVersion() < 11060:
            raise RuntimeError("dim_threads() is supported on CUDA 11.6+")
        from cupyx.jit._interface import _Dim3  # avoid circular import
        self._check_cg_include(env)
        return _Data('dim_threads()', _Dim3())
예제 #5
0
파일: cg.py 프로젝트: amulyagupta1278/cupy
    def block_index(self, env):
        """
        block_index()

        3-Dimensional index of the block within the launched grid.
        """
        if _runtime.runtimeGetVersion() < 11060:
            raise RuntimeError("block_index() is supported on CUDA 11.6+")
        from cupyx.jit._interface import _Dim3  # avoid circular import
        self._check_cg_include(env)
        return _Data('block_index()', _Dim3())