pub struct KernelConfig {
pub grid: (u32, u32, u32),
pub block: (u32, u32, u32),
pub shared_mem_bytes: u32,
}Expand description
GPU grid/block launch configuration for a kernel node.
Fields§
§grid: (u32, u32, u32)Grid dimensions (x, y, z).
block: (u32, u32, u32)Block dimensions (x, y, z).
Dynamic shared memory in bytes.
Implementations§
Source§impl KernelConfig
impl KernelConfig
Sourcepub fn linear(
num_blocks: u32,
threads_per_block: u32,
shared_mem_bytes: u32,
) -> Self
pub fn linear( num_blocks: u32, threads_per_block: u32, shared_mem_bytes: u32, ) -> Self
Creates a simple 1-D launch configuration.
num_blocks— number of thread-blocks in the x dimension.threads_per_block— threads per block in the x dimension.shared_mem_bytes— bytes of dynamic shared memory per block.
Sourcepub fn total_threads(&self) -> u64
pub fn total_threads(&self) -> u64
Total number of threads launched.
Sourcepub fn total_blocks(&self) -> u64
pub fn total_blocks(&self) -> u64
Total number of thread-blocks.
Trait Implementations§
Source§impl Clone for KernelConfig
impl Clone for KernelConfig
Source§fn clone(&self) -> KernelConfig
fn clone(&self) -> KernelConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for KernelConfig
Source§impl Debug for KernelConfig
impl Debug for KernelConfig
Source§impl Display for KernelConfig
impl Display for KernelConfig
impl Eq for KernelConfig
Source§impl Hash for KernelConfig
impl Hash for KernelConfig
Source§impl PartialEq for KernelConfig
impl PartialEq for KernelConfig
impl StructuralPartialEq for KernelConfig
Auto Trait Implementations§
impl Freeze for KernelConfig
impl RefUnwindSafe for KernelConfig
impl Send for KernelConfig
impl Sync for KernelConfig
impl Unpin for KernelConfig
impl UnsafeUnpin for KernelConfig
impl UnwindSafe for KernelConfig
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