use super::num_traits::*;
impl Num for i32 {
type Element = i32;
type Bool = bool;
#[inline]
fn lanes() -> usize {
1
}
#[inline]
fn splat(val: Self::Element) -> Self {
val
}
#[inline]
fn extract(&self, _i: usize) -> Self::Element {
*self
}
#[inline]
unsafe fn extract_unchecked(&self, _i: usize) -> Self::Element {
*self
}
#[inline]
fn replace(&mut self, _i: usize, val: Self::Element) {
*self = val
}
#[inline]
unsafe fn replace_unchecked(&mut self, _i: usize, val: Self::Element) {
*self = val
}
#[inline]
fn select(self, cond: Self::Bool, other: Self) -> Self {
if cond {
self
} else {
other
}
}
}
impl Signed for i32 {
#[inline]
fn absf(self) -> Self {
self.abs()
}
#[inline]
fn signumf(self) -> Self {
self.signum()
}
}