Skip to main content

CompilationArg

Trait CompilationArg 

Source
pub trait CompilationArg:
    Clone
    + PartialEq
    + Eq
    + Hash
    + Debug
    + Send
    + Sync
    + 'static {
    // Provided method
    fn dynamic_cast<Arg>(&self) -> Arg
       where Arg: CompilationArg { ... }
}
Expand description

Argument used during the compilation of kernels.

Provided Methods§

Source

fn dynamic_cast<Arg>(&self) -> Arg
where Arg: CompilationArg,

Compilation args should be the same even with different element types. However, it isn’t possible to enforce it with the type system. So, we make the compilation args serializable and dynamically cast them.

Without this, the compilation time is unreasonable. The performance drop isn’t a concern since this is only done once when compiling a kernel for the first time.

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.

Implementations on Foreign Types§

Source§

impl CompilationArg for LinearLayoutCompilationArg

Source§

impl CompilationArg for ()

Source§

impl CompilationArg for SwizzleCompilationArg

Source§

impl CompilationArg for PermutedLayoutCompilationArg

Source§

impl CompilationArg for PlainLayoutCompilationArg

Source§

impl CompilationArg for SimpleLayoutCompilationArg

Source§

impl CompilationArg for StridedLayoutCompilationArg

Source§

impl<C> CompilationArg for ViewCompilationArg<C>
where C: Coordinates + 'static,

Source§

impl<C, S> CompilationArg for VirtualLayoutCompilationArg<C, S>
where C: Coordinates + 'static, S: Coordinates + 'static,

Source§

impl<D> CompilationArg for FixedDimLayoutCompilationArg<D>
where D: IntoDyn,

Source§

impl<L0, L1> CompilationArg for ChainCompilationArg<L0, L1>
where L0: Layout + LaunchArg, L1: Layout<SourceCoordinates = <L0 as Layout>::Coordinates> + LaunchArg,

Source§

impl<L> CompilationArg for IntoDynLayoutCompilationArg<L>

Source§

impl<L> CompilationArg for TypedViewCompilationArg<L>
where L: LaunchLayout<SourceCoordinates = usize>,

Source§

impl<L, P, O> CompilationArg for IntoDyn2LayoutCompilationArg<L, P, O>
where L: Layout<SourceCoordinates = (P, O)> + LaunchArg, P: IntoDyn, O: IntoDyn,

Source§

impl<Q, S, F, C> CompilationArg for QuantizedViewCompilationArg<Q, S, F, C>
where Q: CubePrimitive, S: CubePrimitive, F: Numeric, C: Coordinates + 'static,

Source§

impl<T0, T1> CompilationArg for (T0, T1)

Source§

impl<T0, T1, T2> CompilationArg for (T0, T1, T2)

Source§

impl<T0, T1, T2, T3> CompilationArg for (T0, T1, T2, T3)

Source§

impl<T0, T1, T2, T3, T4> CompilationArg for (T0, T1, T2, T3, T4)

Source§

impl<T0, T1, T2, T3, T4, T5> CompilationArg for (T0, T1, T2, T3, T4, T5)

Source§

impl<T0, T1, T2, T3, T4, T5, T6> CompilationArg for (T0, T1, T2, T3, T4, T5, T6)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> CompilationArg for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> CompilationArg for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> CompilationArg for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> CompilationArg for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> CompilationArg for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T> CompilationArg for CubeOptionCompilationArg<T>
where T: LaunchArg,

Implementors§