Trait cubecl::prelude::BitCast

source ·
pub trait BitCast: CubePrimitive {
    // Provided methods
    fn bitcast_from<From>(value: From) -> Self
       where From: CubePrimitive { ... }
    fn __expand_bitcast_from<From>(
        context: &mut CubeContext,
        value: From,
    ) -> Self::ExpandType
       where From: Into<ExpandElement> { ... }
}
Expand description

Enables reinterpet-casting/bitcasting from any floating point value to any integer value and vice versa

Provided Methods§

source

fn bitcast_from<From>(value: From) -> Self
where From: CubePrimitive,

Reinterpret the bits of another primitive as this primitive without conversion.

source

fn __expand_bitcast_from<From>( context: &mut CubeContext, value: From, ) -> Self::ExpandType
where From: Into<ExpandElement>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<P> BitCast for P
where P: CubePrimitive,