pub trait WideSimd: Copy {
type Element: TensorElement + Float;
type Array: AsRef<[Self::Element]> + AsMut<[Self::Element]> + Copy;
const LANE: usize;
const ONE: Self;
const ZERO: Self;
const HALF: Self;
const NEG_INFINITY: Self;
const INFINITY: Self;
Show 19 methods
// Required methods
fn new(arr: Self::Array) -> Self;
fn from_slice(slice: &[Self::Element]) -> Self;
fn splat(val: Self::Element) -> Self;
fn to_array(self) -> Self::Array;
fn as_array_ref(&self) -> &Self::Array;
fn as_array_mut(&mut self) -> &mut Self::Array;
fn abs(self) -> Self;
fn max(self, rhs: Self) -> Self;
fn min(self, rhs: Self) -> Self;
fn exp(self) -> Self;
fn sqrt(self) -> Self;
fn recip(self) -> Self;
fn recip_sqrt(self) -> Self;
fn add(self, rhs: Self) -> Self;
fn sub(self, rhs: Self) -> Self;
fn mul(self, rhs: Self) -> Self;
fn div(self, rhs: Self) -> Self;
// Provided methods
unsafe fn from_slice_unaligned(slice: &[Self::Element]) -> Self { ... }
fn sum(self) -> Self::Element
where Self::Element: Sum<Self::Element> { ... }
}Required Associated Constants§
const LANE: usize
const ONE: Self
const ZERO: Self
const HALF: Self
const NEG_INFINITY: Self
const INFINITY: Self
Required Associated Types§
type Element: TensorElement + Float
type Array: AsRef<[Self::Element]> + AsMut<[Self::Element]> + Copy
Required Methods§
fn new(arr: Self::Array) -> Self
fn from_slice(slice: &[Self::Element]) -> Self
fn splat(val: Self::Element) -> Self
fn to_array(self) -> Self::Array
fn as_array_ref(&self) -> &Self::Array
fn as_array_mut(&mut self) -> &mut Self::Array
fn abs(self) -> Self
fn max(self, rhs: Self) -> Self
fn min(self, rhs: Self) -> Self
fn exp(self) -> Self
fn sqrt(self) -> Self
fn recip(self) -> Self
fn recip_sqrt(self) -> Self
fn add(self, rhs: Self) -> Self
fn sub(self, rhs: Self) -> Self
fn mul(self, rhs: Self) -> Self
fn div(self, rhs: Self) -> Self
Provided Methods§
Sourceunsafe fn from_slice_unaligned(slice: &[Self::Element]) -> Self
unsafe fn from_slice_unaligned(slice: &[Self::Element]) -> Self
Load from potentially unaligned memory without intermediate copy
§Safety
slice must have at least LANE elements
fn sum(self) -> Self::Element
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.