pub struct LaunchConfig {
pub grid_dim: (u32, u32, u32),
pub block_dim: (u32, u32, u32),
pub shared_mem_bytes: u32,
}Expand description
Configuration for result::launch_kernel
See cuda docs for description of each parameter.
Fields§
§grid_dim: (u32, u32, u32)(width, height, depth) of grid in blocks
block_dim: (u32, u32, u32)(x, y, z) dimension of each thread block
Dynamic shared-memory size per thread block in bytes
Implementations§
Source§impl LaunchConfig
impl LaunchConfig
Sourcepub fn for_num_elems(n: u32) -> LaunchConfig
pub fn for_num_elems(n: u32) -> LaunchConfig
Creates a LaunchConfig with:
- block_dim ==
1024 - grid_dim ==
(n + 1023) / 1024 - shared_mem_bytes ==
0
Trait Implementations§
Source§impl Clone for LaunchConfig
impl Clone for LaunchConfig
Source§fn clone(&self) -> LaunchConfig
fn clone(&self) -> LaunchConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LaunchConfig
impl Debug for LaunchConfig
impl Copy for LaunchConfig
Auto Trait Implementations§
impl Freeze for LaunchConfig
impl RefUnwindSafe for LaunchConfig
impl Send for LaunchConfig
impl Sync for LaunchConfig
impl Unpin for LaunchConfig
impl UnsafeUnpin for LaunchConfig
impl UnwindSafe for LaunchConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more