pub struct ClusterLaunchParams {
pub grid: Dim3,
pub block: Dim3,
pub cluster: ClusterDim,
pub shared_mem_bytes: u32,
}Expand description
Launch parameters including thread block cluster configuration.
Extends the standard grid/block configuration with a cluster dimension. The grid dimensions must be evenly divisible by the cluster dimensions.
Fields§
§grid: Dim3Grid dimensions (number of thread blocks total).
block: Dim3Block dimensions (threads per block).
cluster: ClusterDimCluster dimensions (blocks per cluster).
Dynamic shared memory per block in bytes.
Implementations§
Source§impl ClusterLaunchParams
impl ClusterLaunchParams
Sourcepub fn blocks_per_cluster(&self) -> u32
pub fn blocks_per_cluster(&self) -> u32
Returns the total number of blocks per cluster.
Sourcepub fn cluster_count(&self) -> CudaResult<u32>
pub fn cluster_count(&self) -> CudaResult<u32>
Returns the total number of clusters in the grid.
This requires that the grid dimensions be evenly divisible by the cluster dimensions.
§Errors
Returns CudaError::InvalidValue if the grid is not evenly
divisible by the cluster dimensions, or if any dimension is zero.
Sourcepub fn validate(&self) -> CudaResult<()>
pub fn validate(&self) -> CudaResult<()>
Validates the cluster launch parameters.
Checks that:
- All grid, block, and cluster dimensions are non-zero.
- The grid dimensions are evenly divisible by the cluster dimensions.
§Errors
Returns CudaError::InvalidValue on any violation.
Trait Implementations§
Source§impl Clone for ClusterLaunchParams
impl Clone for ClusterLaunchParams
Source§fn clone(&self) -> ClusterLaunchParams
fn clone(&self) -> ClusterLaunchParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more