[−][src]Struct simd_aligned::VectorD
A dynamic (heap allocated) vector aligned for fast and safe SIMD access that also provides a flat view on its data.
Example
use packed_simd::*; use simd_aligned::*; // Create a vector of f64x__ elements that, in total, will hold space // for at least 4 f64 values. Internally this might be one f64x4, two f64x2, // or one f64x8 where the 2nd half is hidden, depending on the current architecture. let mut v = VectorD::<f64s>::with(0_f64, 4); // Get a 'flat view' (&[f64]) into the SIMD vectors and fill it. v.flat_mut().clone_from_slice(&[0.0, 1.0, 2.0, 3.0]);
Methods
impl<T> VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
pub fn with(t: T::Element, size: usize) -> Self
[src]
Produce a VectorD with the given element t
as default and a flat size of size
.
pub fn flat(&self) -> &[T::Element]
[src]
Get a flat view for this VectorD.
pub fn flat_mut(&mut self) -> &mut [T::Element]
[src]
Get a flat, mutable view for this VectorD.
Trait Implementations
impl<T: Clone> Clone for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
fn clone(&self) -> VectorD<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Deref for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
impl<T> DerefMut for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
impl<T: Debug> Debug for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
impl<T> Index<usize> for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl<T> IndexMut<usize> for VectorD<T> where
T: Simd + Default + Clone,
[src]
T: Simd + Default + Clone,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> FromCast<T> for T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,