Trait Int

Source
pub trait Int:
    Numeric
    + CountOnes
    + ReverseBits
    + BitwiseNot
    + LeadingZeros
    + FindFirstSet
    + 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>
    + Not<Output = Self>
    + RemAssign
    + AddAssign
    + SubAssign
    + MulAssign
    + DivAssign
    + BitOrAssign
    + BitAndAssign
    + BitXorAssign
    + ShlAssign<u32>
    + ShrAssign<u32>
    + PartialOrd
    + PartialEq {
    const BITS: u32;

    // Required method
    fn new(val: i64) -> Self;

    // Provided method
    fn __expand_new(
        scope: &mut Scope,
        val: i64,
    ) -> <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

Provided Methods§

Source

fn __expand_new(scope: &mut Scope, val: i64) -> <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 i8

Source§

const BITS: u32 = 8u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for i16

Source§

const BITS: u32 = 16u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for i32

Source§

const BITS: u32 = 32u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for i64

Source§

const BITS: u32 = 64u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for u8

Source§

const BITS: u32 = 8u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for u16

Source§

const BITS: u32 = 16u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for u32

Source§

const BITS: u32 = 32u32

Source§

fn new(val: i64) -> Self

Source§

impl Int for u64

Source§

const BITS: u32 = 64u32

Source§

fn new(val: i64) -> Self

Implementors§

Source§

impl<const POS: u8> Int for IntExpand<POS>

Source§

const BITS: u32 = 32u32