Trait cubecl_core::frontend::Float
source · pub trait Float: Numeric + Exp + Log + Log1p + Cos + Sin + Tanh + Powf + Sqrt + Floor + Ceil + Erf + Recip + From<f32> + Add<f32, Output = Self> + Sub<f32, Output = Self> + Mul<f32, Output = Self> + Div<f32, Output = Self> + AddAssign<f32> + SubAssign<f32> + MulAssign<f32> + DivAssign<f32> + PartialOrd<f32> + PartialEq<f32> {
// Required methods
fn new(val: f32) -> Self;
fn vectorized(val: f32, vectorization: UInt) -> Self;
fn vectorized_empty(vectorization: UInt) -> Self;
fn __expand_vectorized_empty(
context: &mut CubeContext,
vectorization: UInt,
) -> <Self as CubeType>::ExpandType;
// Provided methods
fn __expand_new(
context: &mut CubeContext,
val: Self::ExpandType,
) -> <Self as CubeType>::ExpandType { ... }
fn __expand_vectorized(
context: &mut CubeContext,
val: Self::ExpandType,
vectorization: UInt,
) -> <Self as CubeType>::ExpandType { ... }
}
Expand description
Floating point numbers. Used as input in float kernels
Required Methods§
fn new(val: f32) -> Self
fn vectorized(val: f32, vectorization: UInt) -> Self
fn vectorized_empty(vectorization: UInt) -> Self
fn __expand_vectorized_empty( context: &mut CubeContext, vectorization: UInt, ) -> <Self as CubeType>::ExpandType
Provided Methods§
fn __expand_new( context: &mut CubeContext, val: Self::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_vectorized( context: &mut CubeContext, val: Self::ExpandType, vectorization: UInt, ) -> <Self as CubeType>::ExpandType
Object Safety§
This trait is not object safe.