pub trait LaunchArg:
    CubeType
    + Send
    + Sync
    + 'static {
    type RuntimeArg<'a, R: Runtime>: ArgSettings<R>;
    type CompilationArg: CompilationArg;
    // Required methods
    fn compilation_arg<R: Runtime>(
        runtime_arg: &Self::RuntimeArg<'_, R>,
    ) -> Self::CompilationArg;
    fn expand(
        arg: &Self::CompilationArg,
        builder: &mut KernelBuilder,
    ) -> <Self as CubeType>::ExpandType;
    // Provided method
    fn expand_output(
        arg: &Self::CompilationArg,
        builder: &mut KernelBuilder,
    ) -> <Self as CubeType>::ExpandType { ... }
}Expand description
Defines how a launch argument can be expanded.
TODO Verify the accuracy of the next comment.
Normally this type should be implemented two times for an argument. Once for the reference and the other for the mutable reference. Often time, the reference should expand the argument as an input while the mutable reference should expand the argument as an output.
Required Associated Types§
Sourcetype RuntimeArg<'a, R: Runtime>: ArgSettings<R>
 
type RuntimeArg<'a, R: Runtime>: ArgSettings<R>
The runtime argument for the kernel.
Sourcetype CompilationArg: CompilationArg
 
type CompilationArg: CompilationArg
Compilation argument.
Required Methods§
fn compilation_arg<R: Runtime>( runtime_arg: &Self::RuntimeArg<'_, R>, ) -> Self::CompilationArg
Sourcefn expand(
    arg: &Self::CompilationArg,
    builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
 
fn expand( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an input variable during compilation that fill the KernelBuilder.
Provided Methods§
Sourcefn expand_output(
    arg: &Self::CompilationArg,
    builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
 
fn expand_output( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an output variable during compilation that fill the KernelBuilder.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.