xpu
xpu::kernel_context< SharedMemory, Constants > Class Template Reference

Public Types

using shared_memory = SharedMemory
 
using constants = Constants
 

Public Member Functions

XPU_D shared_memorysmem ()
 
XPU_D const shared_memorysmem () const
 
template<typename C >
XPU_D const C::data_t & cmem () const
 
XPU_D const constantscmem () const
 
XPU_D int thread_idx_x () const
 
XPU_D int thread_idx_y () const
 
XPU_D int thread_idx_z () const
 
XPU_D int block_dim_x () const
 
XPU_D int block_dim_y () const
 
XPU_D int block_dim_z () const
 
XPU_D int block_idx_x () const
 
XPU_D int block_idx_y () const
 
XPU_D int block_idx_z () const
 
XPU_D int grid_dim_x () const
 
XPU_D int grid_dim_y () const
 
XPU_D int grid_dim_z () const
 
XPU_D tpospos ()
 
XPU_D const tpospos () const
 
XPU_D kernel_context (detail::internal_ctor_t, tpos &pos, shared_memory &smem, const constants &cmem)
 

Member Typedef Documentation

◆ constants

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
using xpu::kernel_context< SharedMemory, Constants >::constants = Constants

◆ shared_memory

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
using xpu::kernel_context< SharedMemory, Constants >::shared_memory = SharedMemory

Constructor & Destructor Documentation

◆ kernel_context()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D xpu::kernel_context< SharedMemory, Constants >::kernel_context ( detail::internal_ctor_t  ,
tpos pos,
shared_memory smem,
const constants cmem 
)
inline

Member Function Documentation

◆ block_dim_x()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_dim_x ( ) const
inline

Shortcut to access block size in x dimension. Identical to pos().block_dim_x().

◆ block_dim_y()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_dim_y ( ) const
inline

Shortcut to access block size in y dimension. Identical to pos().block_dim_y().

◆ block_dim_z()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_dim_z ( ) const
inline

Shortcut to access block size in z dimension. Identical to pos().block_dim_z().

◆ block_idx_x()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_idx_x ( ) const
inline

Shortcut to access block position in x dimension. Identical to pos().block_idx_x().

◆ block_idx_y()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_idx_y ( ) const
inline

Shortcut to access block position in y dimension. Identical to pos().block_idx_y().

◆ block_idx_z()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::block_idx_z ( ) const
inline

Shortcut to access block position in z dimension. Identical to pos().block_idx_z().

◆ cmem() [1/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
template<typename C >
XPU_D const C::data_t& xpu::kernel_context< SharedMemory, Constants >::cmem ( ) const
inline

Shortcut to access a constant from constant memory.

◆ cmem() [2/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D const constants& xpu::kernel_context< SharedMemory, Constants >::cmem ( ) const
inline

Access the constant memory.

◆ grid_dim_x()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::grid_dim_x ( ) const
inline

Shortcut to access grid size in x dimension. Identical to pos().grid_dim_x().

◆ grid_dim_y()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::grid_dim_y ( ) const
inline

Shortcut to access grid size in y dimension. Identical to pos().grid_dim_y().

◆ grid_dim_z()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::grid_dim_z ( ) const
inline

Shortcut to access grid size in z dimension. Identical to pos().grid_dim_z().

◆ pos() [1/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D tpos& xpu::kernel_context< SharedMemory, Constants >::pos ( )
inline

◆ pos() [2/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D const tpos& xpu::kernel_context< SharedMemory, Constants >::pos ( ) const
inline

◆ smem() [1/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D shared_memory& xpu::kernel_context< SharedMemory, Constants >::smem ( )
inline

◆ smem() [2/2]

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D const shared_memory& xpu::kernel_context< SharedMemory, Constants >::smem ( ) const
inline

◆ thread_idx_x()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::thread_idx_x ( ) const
inline

Shortcut to access thread position in x dimension. Identical to pos().thread_idx_x().

◆ thread_idx_y()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::thread_idx_y ( ) const
inline

Shortcut to access thread position in y dimension. Identical to pos().thread_idx_y().

◆ thread_idx_z()

template<typename SharedMemory = xpu::no_smem, typename Constants = xpu::cmem<>>
XPU_D int xpu::kernel_context< SharedMemory, Constants >::thread_idx_z ( ) const
inline

Shortcut to access thread position in z dimension. Identical to pos().thread_idx_z().


The documentation for this class was generated from the following file: