pub trait SimdBaseIo: SimdConsts {
Show 19 methods
// Required methods
fn zeroes() -> Self;
fn set1(x: Self::Scalar) -> Self;
unsafe fn load_from_array(array: Self::ArrayRepresentation) -> Self;
unsafe fn load_from_ptr_unaligned(ptr: *const Self::Scalar) -> Self;
unsafe fn copy_to_ptr_unaligned(self, ptr: *mut Self::Scalar);
unsafe fn load_from_ptr_aligned(ptr: *const Self::Scalar) -> Self;
unsafe fn copy_to_ptr_aligned(self, ptr: *mut Self::Scalar);
unsafe fn underlying_value(self) -> Self::UnderlyingType;
unsafe fn underlying_value_mut(&mut self) -> &mut Self::UnderlyingType;
unsafe fn from_underlying_value(value: Self::UnderlyingType) -> Self;
// Provided methods
unsafe fn transmute_into_array_ref(&self) -> &Self::ArrayRepresentation { ... }
unsafe fn transmute_into_array_mut(
&mut self,
) -> &mut Self::ArrayRepresentation { ... }
unsafe fn as_array(&self) -> Self::ArrayRepresentation { ... }
unsafe fn get_unchecked(&self, index: usize) -> Self::Scalar { ... }
unsafe fn get_unchecked_mut<'a>(
&mut self,
index: usize,
) -> &'a mut Self::Scalar { ... }
fn load_from_slice_exact(slice: &[Self::Scalar]) -> Result<Self, usize> { ... }
fn load_from_slice(slice: &[Self::Scalar]) -> Self { ... }
fn copy_to_slice_exact(
self,
slice: &mut [Self::Scalar],
) -> Result<(), usize> { ... }
fn copy_to_slice(self, slice: &mut [Self::Scalar]) { ... }
}Required Methods§
unsafe fn load_from_array(array: Self::ArrayRepresentation) -> Self
Sourceunsafe fn load_from_ptr_unaligned(ptr: *const Self::Scalar) -> Self
unsafe fn load_from_ptr_unaligned(ptr: *const Self::Scalar) -> Self
Load a vector from an unaligned raw pointer.
Sourceunsafe fn copy_to_ptr_unaligned(self, ptr: *mut Self::Scalar)
unsafe fn copy_to_ptr_unaligned(self, ptr: *mut Self::Scalar)
Store a vector to an unaligned raw pointer.
Sourceunsafe fn load_from_ptr_aligned(ptr: *const Self::Scalar) -> Self
unsafe fn load_from_ptr_aligned(ptr: *const Self::Scalar) -> Self
Load a vector from a 32 bit aligned raw pointer.
Sourceunsafe fn copy_to_ptr_aligned(self, ptr: *mut Self::Scalar)
unsafe fn copy_to_ptr_aligned(self, ptr: *mut Self::Scalar)
Store a vector to a 32 bit aligned raw pointer.
unsafe fn underlying_value(self) -> Self::UnderlyingType
unsafe fn underlying_value_mut(&mut self) -> &mut Self::UnderlyingType
unsafe fn from_underlying_value(value: Self::UnderlyingType) -> Self
Provided Methods§
Sourceunsafe fn transmute_into_array_ref(&self) -> &Self::ArrayRepresentation
unsafe fn transmute_into_array_ref(&self) -> &Self::ArrayRepresentation
Transmutes the vector into a array representation defined by Self::ArrayRepresentation.
Please don’t use this function directly unless necessary.
Sourceunsafe fn transmute_into_array_mut(&mut self) -> &mut Self::ArrayRepresentation
unsafe fn transmute_into_array_mut(&mut self) -> &mut Self::ArrayRepresentation
Transmutes the vector into a mutable array representation defined by Self::ArrayRepresentation.
Please don’t use this function directly unless necessary.
unsafe fn as_array(&self) -> Self::ArrayRepresentation
Sourceunsafe fn get_unchecked(&self, index: usize) -> Self::Scalar
unsafe fn get_unchecked(&self, index: usize) -> Self::Scalar
Gets the value at the specified index, without a bounds check.
Sourceunsafe fn get_unchecked_mut<'a>(&mut self, index: usize) -> &'a mut Self::Scalar
unsafe fn get_unchecked_mut<'a>(&mut self, index: usize) -> &'a mut Self::Scalar
Gets the value at the specified index, without a bounds check.
Sourcefn load_from_slice_exact(slice: &[Self::Scalar]) -> Result<Self, usize>
fn load_from_slice_exact(slice: &[Self::Scalar]) -> Result<Self, usize>
Tries to load from a slice. If the slice is too short, it returns the length of the slice.
Sourcefn load_from_slice(slice: &[Self::Scalar]) -> Self
fn load_from_slice(slice: &[Self::Scalar]) -> Self
Tries to load from a slice. If the slice is too short, it uses zeroes for the remaining values.
Sourcefn copy_to_slice_exact(self, slice: &mut [Self::Scalar]) -> Result<(), usize>
fn copy_to_slice_exact(self, slice: &mut [Self::Scalar]) -> Result<(), usize>
Tries to copy to a slice. If the slice is too short, it returns the length of the slice.
Sourcefn copy_to_slice(self, slice: &mut [Self::Scalar])
fn copy_to_slice(self, slice: &mut [Self::Scalar])
Tries to copy to a slice. If the slice is too short, it copies as much as possible until the end of the slice.
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.