Trait cubecl_core::frontend::Cast
source · pub trait Cast: CubePrimitive {
// Required method
fn cast_from<From: CubePrimitive>(value: From) -> Self;
// Provided method
fn __expand_cast_from<From>(
context: &mut CubeContext,
value: From,
) -> <Self as CubeType>::ExpandType
where From: Into<ExpandElement> { ... }
}
Expand description
Enable elegant casting from any to any CubeElem
Required Methods§
fn cast_from<From: CubePrimitive>(value: From) -> Self
Provided Methods§
fn __expand_cast_from<From>(
context: &mut CubeContext,
value: From,
) -> <Self as CubeType>::ExpandTypewhere
From: Into<ExpandElement>,
Object Safety§
This trait is not object safe.