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.

This is used to set a variable as mutable. (Need to be fixed or at least renamed.)

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 i8

Source§

impl IntoRuntime for i16

Source§

impl IntoRuntime for i32

Source§

impl IntoRuntime for i64

Source§

impl IntoRuntime for u8

Source§

impl IntoRuntime for u16

Source§

impl IntoRuntime for u32

Source§

impl IntoRuntime for u64

Source§

impl IntoRuntime for bf16

Source§

impl IntoRuntime for f16

Source§

impl<E: CubePrimitive> IntoRuntime for *const Tensor<E>

Source§

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

Source§

impl<E: CubePrimitive> IntoRuntime for *mut Tensor<E>

Source§

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

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

Source§

impl<T: Clone> IntoRuntime for PhantomData<T>

Source§

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

Implementors§