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§

source

fn new(val: f32) -> Self

source

fn vectorized(val: f32, vectorization: UInt) -> Self

source

fn vectorized_empty(vectorization: UInt) -> Self

source

fn __expand_vectorized_empty( context: &mut CubeContext, vectorization: UInt, ) -> <Self as CubeType>::ExpandType

Provided Methods§

source

fn __expand_new( context: &mut CubeContext, val: Self::ExpandType, ) -> <Self as CubeType>::ExpandType

source

fn __expand_vectorized( context: &mut CubeContext, val: Self::ExpandType, vectorization: UInt, ) -> <Self as CubeType>::ExpandType

Object Safety§

This trait is not object safe.

Implementors§