cubecl_core::frontend

Trait CubePrimitive

Source
pub trait CubePrimitive:
    CubeType<ExpandType = ExpandElementTyped<Self>>
    + ExpandElementBaseInit
    + IntoRuntime
    + PartialEq
    + Send
    + Sync
    + 'static
    + Clone
    + Copy {
    // Required method
    fn as_elem() -> Elem;

    // Provided method
    fn from_expand_elem(elem: ExpandElement) -> Self::ExpandType { ... }
}
Expand description

Form of CubeType that encapsulates all primitive types: Numeric, UInt, Bool

Required Methods§

Source

fn as_elem() -> Elem

Return the element type to use on GPU

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl CubePrimitive for bool

Source§

impl CubePrimitive for f32

Source§

fn as_elem() -> Elem

Return the element type to use on GPU

Source§

impl CubePrimitive for f64

Source§

fn as_elem() -> Elem

Return the element type to use on GPU

Source§

impl CubePrimitive for i32

Source§

impl CubePrimitive for i64

Source§

impl CubePrimitive for u32

Source§

impl CubePrimitive for bf16

Source§

fn as_elem() -> Elem

Return the element type to use on GPU

Source§

impl CubePrimitive for f16

Source§

fn as_elem() -> Elem

Return the element type to use on GPU

Implementors§