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,
}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.
Implementations§
Source§impl LaunchOptions
impl LaunchOptions
Sourcepub fn single_block(block_size: u32) -> Self
pub fn single_block(block_size: u32) -> Self
Create options for a single-block kernel.
Sourcepub fn multi_block(grid_size: u32, block_size: u32) -> Self
pub fn multi_block(grid_size: u32, block_size: u32) -> Self
Create options for a multi-block kernel.
Sourcepub fn with_mode(self, mode: KernelMode) -> Self
pub fn with_mode(self, mode: KernelMode) -> Self
Set execution mode.
Sourcepub fn with_queue_capacity(self, capacity: usize) -> Self
pub fn with_queue_capacity(self, capacity: usize) -> Self
Set queue capacities.
Set shared memory size.
Sourcepub fn without_auto_activate(self) -> Self
pub fn without_auto_activate(self) -> Self
Disable auto-activation.
Sourcepub fn with_grid_size(self, grid_size: u32) -> Self
pub fn with_grid_size(self, grid_size: u32) -> Self
Set the grid size (number of blocks).
Sourcepub fn with_block_size(self, block_size: u32) -> Self
pub fn with_block_size(self, block_size: u32) -> Self
Set the block size (threads per block).
Sourcepub fn with_priority(self, _priority: u8) -> Self
pub fn with_priority(self, _priority: u8) -> Self
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) -> Self
pub fn with_input_queue_capacity(self, capacity: usize) -> Self
Set input queue capacity only.
Sourcepub fn with_output_queue_capacity(self, capacity: usize) -> Self
pub fn with_output_queue_capacity(self, capacity: usize) -> Self
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
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 LaunchOptions
impl Debug for 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 = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.