Skip to main content

TypeCommon

Trait TypeCommon 

Source
pub trait TypeCommon
where Self: Sized + Copy,
{ type Vec: VecTrait<Self> + Send + Copy + IntoVec<Self::Vec> + Index<usize, Output = Self> + IndexMut<usize> + Sync + Debug + NormalOutUnary + NormalOut<Self::Vec, Output = Self::Vec> + FloatOutUnary + FloatOutBinary + FloatOutBinary<<Self::Vec as FloatOutUnary>::Output, Output = <Self::Vec as FloatOutUnary>::Output>; const MAX: Self; const MIN: Self; const ZERO: Self; const ONE: Self; const INF: Self; const NEG_INF: Self; const TWO: Self; const SIX: Self; const TEN: Self; const STR: &'static str; const BYTE_SIZE: usize; }
Expand description

common trait for all data types

This trait is used to define the common properties of all data types

Required Associated Constants§

Source

const MAX: Self

the maximum value of the data type

Source

const MIN: Self

the minimum value of the data type

Source

const ZERO: Self

the zero value of the data type

Source

const ONE: Self

the one value of the data type

Source

const INF: Self

the infinity value of the data type, for integer types, it is the maximum value

Source

const NEG_INF: Self

the negative infinity value of the data type, for integer types, it is the minimum value

Source

const TWO: Self

the two value of the data type

Source

const SIX: Self

the six value of the data type

Source

const TEN: Self

the ten value of the data type

Source

const STR: &'static str

the string representation of the data type

Source

const BYTE_SIZE: usize

the bit size of the data type, alias of std::mem::size_of()

Required Associated Types§

Source

type Vec: VecTrait<Self> + Send + Copy + IntoVec<Self::Vec> + Index<usize, Output = Self> + IndexMut<usize> + Sync + Debug + NormalOutUnary + NormalOut<Self::Vec, Output = Self::Vec> + FloatOutUnary + FloatOutBinary + FloatOutBinary<<Self::Vec as FloatOutUnary>::Output, Output = <Self::Vec as FloatOutUnary>::Output>

the simd vector type of the data type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TypeCommon for bool

Source§

const MAX: Self = true

Source§

const MIN: Self = false

Source§

const ZERO: Self = false

Source§

const ONE: Self = true

Source§

const INF: Self = true

Source§

const NEG_INF: Self = false

Source§

const TWO: Self = false

Source§

const SIX: Self = true

Source§

const TEN: Self = true

Source§

const STR: &'static str = "bool"

Source§

const BYTE_SIZE: usize

Source§

type Vec = boolx16

Source§

impl TypeCommon for f32

Source§

const MAX: Self = f32::MAX

Source§

const MIN: Self = f32::MIN

Source§

const ZERO: Self = 0.0

Source§

const ONE: Self = 1.0

Source§

const INF: Self = f32::INFINITY

Source§

const NEG_INF: Self = f32::NEG_INFINITY

Source§

const TWO: Self = 2.0

Source§

const SIX: Self = 6.0

Source§

const TEN: Self = 10.0

Source§

const STR: &'static str = "f32"

Source§

const BYTE_SIZE: usize

Source§

type Vec = f32x4

Source§

impl TypeCommon for f64

Source§

const MAX: Self = f64::MAX

Source§

const MIN: Self = f64::MIN

Source§

const ZERO: Self = 0.0

Source§

const ONE: Self = 1.0

Source§

const INF: Self = f64::INFINITY

Source§

const NEG_INF: Self = f64::NEG_INFINITY

Source§

const TWO: Self = 2.0

Source§

const SIX: Self = 6.0

Source§

const TEN: Self = 10.0

Source§

const STR: &'static str = "f64"

Source§

const BYTE_SIZE: usize

Source§

type Vec = f64x2

Source§

impl TypeCommon for i8

Source§

const MAX: Self = i8::MAX

Source§

const MIN: Self = i8::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = i8::MAX

Source§

const NEG_INF: Self = i8::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "i8"

Source§

const BYTE_SIZE: usize

Source§

type Vec = i8x16

Source§

impl TypeCommon for i16

Source§

const MAX: Self = i16::MAX

Source§

const MIN: Self = i16::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = i16::MAX

Source§

const NEG_INF: Self = i16::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "i16"

Source§

const BYTE_SIZE: usize

Source§

type Vec = i16x8

Source§

impl TypeCommon for i32

Source§

const MAX: Self = i32::MAX

Source§

const MIN: Self = i32::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = i32::MAX

Source§

const NEG_INF: Self = i32::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "i32"

Source§

const BYTE_SIZE: usize

Source§

type Vec = i32x4

Source§

impl TypeCommon for i64

Source§

const MAX: Self = i64::MAX

Source§

const MIN: Self = i64::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = i64::MAX

Source§

const NEG_INF: Self = i64::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "i64"

Source§

const BYTE_SIZE: usize

Source§

type Vec = i64x2

Source§

impl TypeCommon for isize

Source§

const MAX: Self = isize::MAX

Source§

const MIN: Self = isize::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = isize::MAX

Source§

const NEG_INF: Self = isize::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "isize"

Source§

const BYTE_SIZE: usize

Source§

type Vec = isizex2

Source§

impl TypeCommon for u8

Source§

const MAX: Self = u8::MAX

Source§

const MIN: Self = u8::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = u8::MAX

Source§

const NEG_INF: Self = u8::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "u8"

Source§

const BYTE_SIZE: usize

Source§

type Vec = u8x16

Source§

impl TypeCommon for u16

Source§

const MAX: Self = u16::MAX

Source§

const MIN: Self = u16::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = u16::MAX

Source§

const NEG_INF: Self = u16::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "u16"

Source§

const BYTE_SIZE: usize

Source§

type Vec = u16x8

Source§

impl TypeCommon for u32

Source§

const MAX: Self = u32::MAX

Source§

const MIN: Self = u32::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = u32::MAX

Source§

const NEG_INF: Self = u32::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "u32"

Source§

const BYTE_SIZE: usize

Source§

type Vec = u32x4

Source§

impl TypeCommon for u64

Source§

const MAX: Self = u64::MAX

Source§

const MIN: Self = u64::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = u64::MAX

Source§

const NEG_INF: Self = u64::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "u64"

Source§

const BYTE_SIZE: usize

Source§

type Vec = u64x2

Source§

impl TypeCommon for usize

Source§

const MAX: Self = usize::MAX

Source§

const MIN: Self = usize::MIN

Source§

const ZERO: Self = 0

Source§

const ONE: Self = 1

Source§

const INF: Self = usize::MAX

Source§

const NEG_INF: Self = usize::MIN

Source§

const TWO: Self = 2

Source§

const SIX: Self = 6

Source§

const TEN: Self = 10

Source§

const STR: &'static str = "usize"

Source§

const BYTE_SIZE: usize

Source§

type Vec = usizex2

Source§

impl TypeCommon for bf16

Source§

const MAX: Self = bf16::MAX

Source§

const MIN: Self = bf16::MIN

Source§

const ZERO: Self = bf16::ZERO

Source§

const ONE: Self = bf16::ONE

Source§

const INF: Self = bf16::INFINITY

Source§

const NEG_INF: Self = bf16::NEG_INFINITY

Source§

const TWO: Self

Source§

const SIX: Self

Source§

const TEN: Self

Source§

const STR: &'static str = "bf16"

Source§

const BYTE_SIZE: usize

Source§

type Vec = bf16x8

Source§

impl TypeCommon for f16

Source§

const MAX: Self = f16::MAX

Source§

const MIN: Self = f16::MIN

Source§

const ZERO: Self = f16::ZERO

Source§

const ONE: Self = f16::ONE

Source§

const INF: Self = f16::INFINITY

Source§

const NEG_INF: Self = f16::NEG_INFINITY

Source§

const TWO: Self

Source§

const SIX: Self

Source§

const TEN: Self

Source§

const STR: &'static str = "f16"

Source§

const BYTE_SIZE: usize

Source§

type Vec = f16x8

Source§

impl TypeCommon for Complex32

Source§

const MAX: Self

Source§

const MIN: Self

Source§

const ZERO: Self

Source§

const ONE: Self

Source§

const INF: Self

Source§

const NEG_INF: Self

Source§

const TWO: Self

Source§

const SIX: Self

Source§

const TEN: Self

Source§

const STR: &'static str = "c32"

Source§

const BYTE_SIZE: usize

Source§

type Vec = cplx32x2

Source§

impl TypeCommon for Complex64

Source§

const MAX: Self

Source§

const MIN: Self

Source§

const ZERO: Self

Source§

const ONE: Self

Source§

const INF: Self

Source§

const NEG_INF: Self

Source§

const TWO: Self

Source§

const SIX: Self

Source§

const TEN: Self

Source§

const STR: &'static str = "c64"

Source§

const BYTE_SIZE: usize

Source§

type Vec = cplx64x1

Implementors§