Skip to main content

ViewLayoutLaunchArg

Trait ViewLayoutLaunchArg 

Source
pub trait ViewLayoutLaunchArg:
    CubeType
    + Send
    + Sync
    + 'static {
    type RuntimeArg<R: Runtime>: Send + Sync;
    type CompilationArg: CompilationArg;

    // Required methods
    fn register<R: Runtime, B: BufferArg>(
        arg: Self::RuntimeArg<R>,
        buffer: &B,
        ty: Type,
        launcher: &mut KernelLauncher<R>,
    ) -> Self::CompilationArg;
    fn expand(
        arg: &Self::CompilationArg,
        ty: Type,
        builder: &mut KernelBuilder,
    ) -> <Self as CubeType>::ExpandType;

    // Provided method
    fn expand_output(
        arg: &Self::CompilationArg,
        ty: Type,
        builder: &mut KernelBuilder,
    ) -> <Self as CubeType>::ExpandType { ... }
}
Expand description

Special launch arg that gets the handle and types of the view, to allow inferring launch state based on type/handle metadata, avoiding duplication. All LaunchArgs also implement this trait.

Required Associated Types§

Source

type RuntimeArg<R: Runtime>: Send + Sync

The runtime argument for the kernel.

Source

type CompilationArg: CompilationArg

Compilation argument.

Required Methods§

Source

fn register<R: Runtime, B: BufferArg>( arg: Self::RuntimeArg<R>, buffer: &B, ty: Type, launcher: &mut KernelLauncher<R>, ) -> Self::CompilationArg

Source

fn expand( arg: &Self::CompilationArg, ty: Type, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType

Register an input variable during compilation that fill the KernelBuilder.

Provided Methods§

Source

fn expand_output( arg: &Self::CompilationArg, ty: Type, 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.

Implementors§

Source§

impl ViewLayoutLaunchArg for LinearViewLayout

Source§

impl ViewLayoutLaunchArg for PermutedLayout

Source§

impl ViewLayoutLaunchArg for PlainLayout

Source§

impl ViewLayoutLaunchArg for StridedLayout

Source§

impl<L0: Layout + ViewLayoutLaunchArg, L1: Layout<SourceCoordinates = L0::Coordinates> + ViewLayoutLaunchArg> ViewLayoutLaunchArg for Chain<L0, L1>

Source§

impl<L: Layout<SourceCoordinates = (P, O)> + ViewLayoutLaunchArg, P: IntoDyn, O: IntoDyn> ViewLayoutLaunchArg for IntoDyn2Layout<L, P, O>

Source§

impl<L: Layout<SourceCoordinates: IntoDyn> + ViewLayoutLaunchArg> ViewLayoutLaunchArg for IntoDynLayout<L>

Source§

impl<T: LaunchArg> ViewLayoutLaunchArg for T