[][src]Struct simd_aligned::VectorD

pub struct VectorD<T> where
    T: Simd + Default + Clone
{ /* fields omitted */ }

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]

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]

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]

type Target = [T]

The resulting type after dereferencing.

impl<T> DerefMut for VectorD<T> where
    T: Simd + Default + Clone
[src]

impl<T: Debug> Debug for VectorD<T> where
    T: Simd + Default + Clone
[src]

impl<T> Index<usize> for VectorD<T> where
    T: Simd + Default + Clone
[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<usize> for VectorD<T> where
    T: Simd + Default + Clone
[src]

Auto Trait Implementations

impl<T> Send for VectorD<T> where
    T: Send

impl<T> Sync for VectorD<T> where
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]