Trait cubecl_core::frontend::Init

source ·
pub trait Init: Sized {
    // Required method
    fn init(self, context: &mut CubeContext) -> Self;
}
Expand description

Trait to be implemented by cube types implementations.

Required Methods§

source

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

Initialize a type within a context.

You can return the same value when the variable is a non-mutable data structure or if the type can not be deeply cloned/copied.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Init for bool

source§

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

source§

impl Init for u32

source§

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

source§

impl Init for ()

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T: Init> Init for Option<T>

source§

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

source§

impl<T: Init> Init for Vec<T>

source§

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

Implementors§