class blockDim(Stub): ''' The shape of a block of threads, as declared when instantiating the kernel. This value is the same for all threads in a given kernel, even if they belong to different blocks (i.e. each block is "full"). ''' x = Macro('ntid.x', SREG_SIGNATURE) y = Macro('ntid.y', SREG_SIGNATURE) z = Macro('ntid.z', SREG_SIGNATURE)
class gridDim(Stub): ''' The shape of the grid of blocks, accressed through the attributes ``x``, ``y``, and ``z``. ''' _description_ = '<gridDim.{x,y,z}>' x = Macro('nctaid.x', SREG_SIGNATURE) y = Macro('nctaid.y', SREG_SIGNATURE) z = Macro('nctaid.z', SREG_SIGNATURE)
class gridDim(Stub): """ The shape of the grid of blocks, accressed through the attributes ``x``, ``y``, and ``z``. """ _description_ = "<gridDim.{x,y,z}>" x = Macro("nctaid.x", SREG_SIGNATURE) y = Macro("nctaid.y", SREG_SIGNATURE) z = Macro("nctaid.z", SREG_SIGNATURE)
class blockIdx(Stub): ''' The block indices in the grid of thread blocks, accessed through the attributes ``x``, ``y``, and ``z``. Each index is an integer spanning the range from 0 inclusive to the corresponding value of the attribute in :attr:`numba.cuda.gridDim` exclusive. ''' _description_ = '<blockIdx.{x,y,z}>' x = Macro('ctaid.x', SREG_SIGNATURE) y = Macro('ctaid.y', SREG_SIGNATURE) z = Macro('ctaid.z', SREG_SIGNATURE)
class threadIdx(Stub): """ The thread indices in the current thread block, accessed through the attributes ``x``, ``y``, and ``z``. Each index is an integer spanning the range from 0 inclusive to the corresponding value of the attribute in :attr:`numba.cuda.blockDim` exclusive. """ _description_ = "<threadIdx.{x,y,z}>" x = Macro("tid.x", SREG_SIGNATURE) y = Macro("tid.y", SREG_SIGNATURE) z = Macro("tid.z", SREG_SIGNATURE)
class shared(Stub): """shared namespace""" _description_ = "<shared>" array = Macro("shared.array", shared_array, callable=True, argnames=["shape", "dtype"])
class shared(Stub): """shared namespace """ _description_ = '<shared>' array = Macro('shared.array', shared_array, callable=True, argnames=['shape', 'dtype'])
class const(Stub): ''' Constant memory namespace. ''' _description_ = '<const>' array_like = Macro('const.array_like', const_array_like, callable=True, argnames=['ary']) '''
class local(Stub): ''' Local memory namespace. ''' _description_ = '<local>' array = Macro('local.array', local_array, callable=True, argnames=['shape', 'dtype']) '''
class const(Stub): """ Constant memory namespace. """ _description_ = "<const>" array_like = Macro("const.array_like", const_array_like, callable=True, argnames=["ary"]) """
class local(Stub): """ Local memory namespace. """ _description_ = "<local>" array = Macro("local.array", local_array, callable=True, argnames=["shape", "dtype"]) """
y = Macro('ntid.y', SREG_SIGNATURE) z = Macro('ntid.z', SREG_SIGNATURE) class gridDim(Stub): ''' The shape of the grid of blocks, accressed through the attributes ``x``, ``y``, and ``z``. ''' _description_ = '<gridDim.{x,y,z}>' x = Macro('nctaid.x', SREG_SIGNATURE) y = Macro('nctaid.y', SREG_SIGNATURE) z = Macro('nctaid.z', SREG_SIGNATURE) warpsize = Macro('warpsize', SREG_SIGNATURE) laneid = Macro('laneid', SREG_SIGNATURE) #------------------------------------------------------------------------------- # Grid Macro def _ptx_grid1d(): pass def _ptx_grid2d(): pass def grid_expand(ndim): """grid(ndim) Return the absolute position of the current thread in the entire
z = Macro("ntid.z", SREG_SIGNATURE) class gridDim(Stub): """ The shape of the grid of blocks, accressed through the attributes ``x``, ``y``, and ``z``. """ _description_ = "<gridDim.{x,y,z}>" x = Macro("nctaid.x", SREG_SIGNATURE) y = Macro("nctaid.y", SREG_SIGNATURE) z = Macro("nctaid.z", SREG_SIGNATURE) warpsize = Macro("warpsize", SREG_SIGNATURE) laneid = Macro("laneid", SREG_SIGNATURE) # ------------------------------------------------------------------------------- # Grid Macro def _ptx_grid1d(): pass def _ptx_grid2d(): pass def grid_expand(ndim):