pub struct LaunchOptions {
pub mode: KernelMode,
pub grid_size: u32,
pub block_size: u32,
pub input_queue_capacity: usize,
pub output_queue_capacity: usize,
pub shared_memory_size: usize,
pub auto_activate: bool,
pub cooperative: bool,
pub enable_k2k: bool,
}Expand description
Options for launching a kernel.
Fields§
§mode: KernelModeExecution mode (persistent or event-driven).
grid_size: u32Grid size (number of blocks).
block_size: u32Block size (threads per block).
input_queue_capacity: usizeInput queue capacity.
output_queue_capacity: usizeOutput queue capacity.
Shared memory size in bytes.
auto_activate: boolWhether to activate immediately after launch.
cooperative: boolEnable cooperative groups for grid-wide synchronization. Requires GPU support for cooperative kernel launch.
enable_k2k: boolEnable K2K (kernel-to-kernel) messaging. Allocates routing table and inbox buffers on GPU.
Implementations§
Source§impl LaunchOptions
impl LaunchOptions
Sourcepub fn single_block(block_size: u32) -> LaunchOptions
pub fn single_block(block_size: u32) -> LaunchOptions
Create options for a single-block kernel.
Sourcepub fn multi_block(grid_size: u32, block_size: u32) -> LaunchOptions
pub fn multi_block(grid_size: u32, block_size: u32) -> LaunchOptions
Create options for a multi-block kernel.
Sourcepub fn with_mode(self, mode: KernelMode) -> LaunchOptions
pub fn with_mode(self, mode: KernelMode) -> LaunchOptions
Set execution mode.
Sourcepub fn with_queue_capacity(self, capacity: usize) -> LaunchOptions
pub fn with_queue_capacity(self, capacity: usize) -> LaunchOptions
Set queue capacities.
Set shared memory size.
Sourcepub fn without_auto_activate(self) -> LaunchOptions
pub fn without_auto_activate(self) -> LaunchOptions
Disable auto-activation.
Sourcepub fn with_grid_size(self, grid_size: u32) -> LaunchOptions
pub fn with_grid_size(self, grid_size: u32) -> LaunchOptions
Set the grid size (number of blocks).
Sourcepub fn with_block_size(self, block_size: u32) -> LaunchOptions
pub fn with_block_size(self, block_size: u32) -> LaunchOptions
Set the block size (threads per block).
Sourcepub fn with_cooperative(self, cooperative: bool) -> LaunchOptions
pub fn with_cooperative(self, cooperative: bool) -> LaunchOptions
Enable cooperative groups for grid-wide synchronization.
When enabled, the kernel will be launched cooperatively, allowing
all blocks to synchronize via grid.sync(). Requires GPU support
and nvcc at build time.
Sourcepub fn with_k2k(self, enable: bool) -> LaunchOptions
pub fn with_k2k(self, enable: bool) -> LaunchOptions
Enable K2K (kernel-to-kernel) messaging.
When enabled, allocates routing table and inbox buffers on GPU for direct kernel-to-kernel communication without host intervention.
Sourcepub fn with_priority(self, _priority: u8) -> LaunchOptions
pub fn with_priority(self, _priority: u8) -> LaunchOptions
Set priority hint for kernel scheduling.
Note: This is a hint for future use - currently ignored by backends.
Sourcepub fn with_input_queue_capacity(self, capacity: usize) -> LaunchOptions
pub fn with_input_queue_capacity(self, capacity: usize) -> LaunchOptions
Set input queue capacity only.
Sourcepub fn with_output_queue_capacity(self, capacity: usize) -> LaunchOptions
pub fn with_output_queue_capacity(self, capacity: usize) -> LaunchOptions
Set output queue capacity only.
Trait Implementations§
Source§impl Clone for LaunchOptions
impl Clone for LaunchOptions
Source§fn clone(&self) -> LaunchOptions
fn clone(&self) -> LaunchOptions
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LaunchOptions
impl Debug for LaunchOptions
Source§impl Default for LaunchOptions
impl Default for LaunchOptions
Source§fn default() -> LaunchOptions
fn default() -> LaunchOptions
Auto Trait Implementations§
impl Freeze for LaunchOptions
impl RefUnwindSafe for LaunchOptions
impl Send for LaunchOptions
impl Sync for LaunchOptions
impl Unpin for LaunchOptions
impl UnwindSafe for LaunchOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)