Skip to main content

LaunchExBuilder

Struct LaunchExBuilder 

Source
pub struct LaunchExBuilder<'s> { /* private fields */ }
Expand description

Builder for cudaLaunchKernelEx — accepts up to ~14 attribute kinds.

Implementations§

Source§

impl<'s> LaunchExBuilder<'s>

Source

pub fn new( stream: &'s Stream, grid: impl Into<Dim3>, block: impl Into<Dim3>, ) -> Self

Source

pub fn dynamic_shared_memory(self, bytes: usize) -> Self

Source

pub fn cluster_dim(self, dims: impl Into<Dim3>) -> Self

Hopper cluster dimension (x, y, z) in blocks.

Source

pub fn cooperative(self, enable: bool) -> Self

Enable a cooperative launch.

Source

pub fn priority(self, prio: i32) -> Self

Assign a priority to this launch (overrides stream priority for this kernel).

Source

pub fn raw_attr(self, id: i32, val: cudaLaunchAttributeValue) -> Self

Push a raw attribute slot — escape hatch for IDs this builder doesn’t expose typed.

Source

pub unsafe fn launch( self, kernel: &Kernel, args: &mut [*mut c_void], ) -> Result<()>

Execute the launch.

§Safety

args must match kernel’s C signature in count / order / types exactly (the marshaling is bytewise).

Trait Implementations§

Source§

impl<'s> Debug for LaunchExBuilder<'s>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'s> Freeze for LaunchExBuilder<'s>

§

impl<'s> RefUnwindSafe for LaunchExBuilder<'s>

§

impl<'s> !Send for LaunchExBuilder<'s>

§

impl<'s> !Sync for LaunchExBuilder<'s>

§

impl<'s> Unpin for LaunchExBuilder<'s>

§

impl<'s> UnsafeUnpin for LaunchExBuilder<'s>

§

impl<'s> UnwindSafe for LaunchExBuilder<'s>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.