Trait cubecl::prelude::CubeElement

source ·
pub trait CubeElement:
    Debug
    + Send
    + Sync
    + 'static
    + Clone
    + Pod {
    // Required methods
    fn type_name() -> &'static str;
    fn as_bytes(slice: &[Self]) -> &[u8] ;
    fn from_bytes(bytes: &[u8]) -> &[Self];
    fn cube_elem() -> Elem;
    fn maximum_value() -> Self;
    fn minimum_value() -> Self;
}
Expand description

The base element trait for the jit backend.

Required Methods§

source

fn type_name() -> &'static str

Returns the name of the type.

source

fn as_bytes(slice: &[Self]) -> &[u8]

Convert a slice of elements to a slice of bytes.

source

fn from_bytes(bytes: &[u8]) -> &[Self]

Convert a slice of bytes to a slice of elements.

source

fn cube_elem() -> Elem

Element representation for cubecl.

source

fn maximum_value() -> Self

Highest possible value

source

fn minimum_value() -> Self

Lowest possible value

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CubeElement for f32

source§

impl CubeElement for i32

source§

impl CubeElement for u32

source§

impl CubeElement for bf16

source§

impl CubeElement for f16

Implementors§