cubecl_core::frontend

Trait Int

Source
pub trait Int:
    Numeric
    + Rem<Output = Self>
    + Add<Output = Self>
    + Sub<Output = Self>
    + Mul<Output = Self>
    + Div<Output = Self>
    + BitOr<Output = Self>
    + BitAnd<Output = Self>
    + BitXor<Output = Self>
    + Shl<Output = Self>
    + Shr<Output = Self>
    + RemAssign
    + AddAssign
    + SubAssign
    + MulAssign
    + DivAssign
    + BitOrAssign
    + BitAndAssign
    + BitXorAssign
    + ShlAssign<u32>
    + ShrAssign<u32>
    + PartialOrd
    + PartialEq {
    const BITS: u32;

    // Required methods
    fn new(val: i64) -> Self;
    fn vectorized(val: i64, vectorization: u32) -> Self;

    // Provided methods
    fn __expand_new(
        context: &mut CubeContext,
        val: i64,
    ) -> <Self as CubeType>::ExpandType { ... }
    fn __expand_vectorized(
        context: &mut CubeContext,
        val: i64,
        vectorization: u32,
    ) -> <Self as CubeType>::ExpandType { ... }
}
Expand description

Signed or unsigned integer. Used as input in int kernels

Required Associated Constants§

Required Methods§

Source

fn new(val: i64) -> Self

Source

fn vectorized(val: i64, vectorization: u32) -> Self

Provided Methods§

Source

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

Source

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

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 Int for i32

Source§

const BITS: u32 = 32u32

Source§

fn new(val: i64) -> Self

Source§

fn vectorized(val: i64, _vectorization: u32) -> Self

Source§

impl Int for i64

Source§

const BITS: u32 = 64u32

Source§

fn new(val: i64) -> Self

Source§

fn vectorized(val: i64, _vectorization: u32) -> Self

Source§

impl Int for u32

Source§

const BITS: u32 = 32u32

Source§

fn new(val: i64) -> Self

Source§

fn vectorized(val: i64, _vectorization: u32) -> Self

Implementors§