cubecl_core::frontend

Trait IntoRuntime

Source
pub trait IntoRuntime: CubeType + Sized {
    // Required method
    fn __expand_runtime_method(
        self,
        context: &mut CubeContext,
    ) -> Self::ExpandType;

    // Provided method
    fn runtime(self) -> Self { ... }
}
Expand description

Trait useful for cube types that are also used with comptime.

Required Methods§

Source

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Provided Methods§

Source

fn runtime(self) -> Self

Make sure a type is actually expanded into its runtime expand type.

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 IntoRuntime for bool

Source§

impl IntoRuntime for f32

Source§

impl IntoRuntime for f64

Source§

impl IntoRuntime for i32

Source§

impl IntoRuntime for i64

Source§

impl IntoRuntime for u32

Source§

impl IntoRuntime for bf16

Source§

impl IntoRuntime for f16

Source§

impl<P1: IntoRuntime> IntoRuntime for (P1,)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Source§

impl<P1: IntoRuntime, P2: IntoRuntime> IntoRuntime for (P1, P2)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Source§

impl<P1: IntoRuntime, P2: IntoRuntime, P3: IntoRuntime> IntoRuntime for (P1, P2, P3)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Source§

impl<P1: IntoRuntime, P2: IntoRuntime, P3: IntoRuntime, P4: IntoRuntime> IntoRuntime for (P1, P2, P3, P4)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Source§

impl<P1: IntoRuntime, P2: IntoRuntime, P3: IntoRuntime, P4: IntoRuntime, P5: IntoRuntime> IntoRuntime for (P1, P2, P3, P4, P5)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Source§

impl<P1: IntoRuntime, P2: IntoRuntime, P3: IntoRuntime, P4: IntoRuntime, P5: IntoRuntime, P6: IntoRuntime> IntoRuntime for (P1, P2, P3, P4, P5, P6)

Source§

fn __expand_runtime_method(self, context: &mut CubeContext) -> Self::ExpandType

Implementors§