Skip to main content

Int

Trait Int 

Source
pub trait Int:
    Numeric
    + CubeNot
    + CountOnes
    + ReverseBits
    + LeadingZeros
    + TrailingZeros
    + FindFirstSet
    + SaturatingAdd
    + SaturatingSub
    + BitOr<Output = Self>
    + BitAnd<Output = Self>
    + BitXor<Output = Self>
    + Shl<Output = Self>
    + Shr<Output = Self>
    + Not<Output = Self>
    + BitOrAssign
    + BitAndAssign
    + BitXorAssign
    + ShlAssign<u32>
    + ShrAssign<u32>
    + Hash
    + PartialOrd
    + Ord
    + PartialEq
    + Eq {
    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 = i8::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for i16

Source§

const BITS: u32 = i16::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for i32

Source§

const BITS: u32 = i32::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for i64

Source§

const BITS: u32 = i64::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for isize

Source§

const BITS: u32 = isize::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for u8

Source§

const BITS: u32 = u8::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for u16

Source§

const BITS: u32 = u16::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for u32

Source§

const BITS: u32 = u32::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for u64

Source§

const BITS: u32 = u64::BITS

Source§

fn new(val: i64) -> Self

Source§

impl Int for usize

Source§

const BITS: u32 = usize::BITS

Source§

fn new(val: i64) -> Self

Implementors§

Source§

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

Source§

const BITS: u32 = 32

Source§

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

Source§

const BITS: u32 = 32