#[repr(C)]pub struct Simd<T, const LANES: usize, const N: usize>(pub [T; LANES]);Tuple Fields§
§0: [T; LANES]Implementations§
Source§impl<T: Copy> Simd<T, 2, 2>
impl<T: Copy> Simd<T, 2, 2>
pub const fn with_xy(x: T, y: T) -> Self
pub fn with_rg(r: T, g: T) -> Self
pub fn x(&self) -> T
pub unsafe fn x_unchecked(&self) -> &T
pub fn set_x(&mut self, val: T)
pub fn r(&self) -> T
pub unsafe fn r_unchecked(&self) -> &T
pub fn set_r(&mut self, val: T)
pub fn y(&self) -> T
pub unsafe fn y_unchecked(&self) -> &T
pub fn set_y(&mut self, val: T)
pub fn g(&self) -> T
pub unsafe fn g_unchecked(&self) -> &T
pub fn set_g(&mut self, val: T)
pub fn xy(&self) -> Simd<T, 2, 2>
pub fn load(vals: &[T; 2]) -> Self
Source§impl<T: Default + Copy> Simd<T, 4, 3>
impl<T: Default + Copy> Simd<T, 4, 3>
pub fn with_xyz(x: T, y: T, z: T) -> Self
pub fn with_rgb(r: T, g: T, b: T) -> Self
pub fn x(&self) -> T
pub unsafe fn x_unchecked(&self) -> &T
pub fn set_x(&mut self, val: T)
pub fn r(&self) -> T
pub unsafe fn r_unchecked(&self) -> &T
pub fn set_r(&mut self, val: T)
pub fn y(&self) -> T
pub unsafe fn y_unchecked(&self) -> &T
pub fn set_y(&mut self, val: T)
pub fn g(&self) -> T
pub unsafe fn g_unchecked(&self) -> &T
pub fn set_g(&mut self, val: T)
pub fn xy(&self) -> Simd<T, 2, 2>
pub fn z(&self) -> T
pub unsafe fn z_unchecked(&self) -> &T
pub fn set_z(&mut self, val: T)
pub fn b(&self) -> T
pub unsafe fn b_unchecked(&self) -> &T
pub fn set_b(&mut self, val: T)
pub fn xyz(&self) -> Simd<T, 3, 3>
Source§impl<T: Copy> Simd<T, 4, 4>
impl<T: Copy> Simd<T, 4, 4>
pub const fn with_xyzw(x: T, y: T, z: T, w: T) -> Self
pub const fn with_rgba(r: T, g: T, b: T, a: T) -> Self
pub fn x(&self) -> T
pub unsafe fn x_unchecked(&self) -> &T
pub fn set_x(&mut self, val: T)
pub fn r(&self) -> T
pub unsafe fn r_unchecked(&self) -> &T
pub fn set_r(&mut self, val: T)
pub fn y(&self) -> T
pub unsafe fn y_unchecked(&self) -> &T
pub fn set_y(&mut self, val: T)
pub fn g(&self) -> T
pub unsafe fn g_unchecked(&self) -> &T
pub fn set_g(&mut self, val: T)
pub fn xy(&self) -> Simd<T, 2, 2>
pub fn z(&self) -> T
pub unsafe fn z_unchecked(&self) -> &T
pub fn set_z(&mut self, val: T)
pub fn b(&self) -> T
pub unsafe fn b_unchecked(&self) -> &T
pub fn set_b(&mut self, val: T)
pub fn xyz(&self) -> Simd<T, 3, 3>
pub fn w(&self) -> T
pub unsafe fn w_unchecked(&self) -> &T
pub fn set_w(&mut self, val: T)
pub fn a(&self) -> T
pub unsafe fn a_unchecked(&self) -> &T
pub fn set_a(&mut self, val: T)
pub fn load(vals: &[T; 4]) -> Self
Source§impl Simd<f32, 4, 4>
impl Simd<f32, 4, 4>
pub const fn with_xyzw_f32(x: f32, y: f32, z: f32, w: f32) -> Self
pub const fn with_rgba_f32(r: f32, g: f32, b: f32, a: f32) -> Self
pub fn with_xyz(xyz: &f32x3, w: f32) -> Self
pub fn dot(&self, other: &Self) -> f32
pub fn fmla(&self, n: &Self, m: &Self) -> Self
pub fn mul_f32(&self, val: f32) -> Self
pub fn div_f32(&self, val: f32) -> Self
Trait Implementations§
impl<T: Copy, const LANES: usize, const N: usize> Copy for Simd<T, LANES, N>
impl<T: Eq, const LANES: usize, const N: usize> Eq for Simd<T, LANES, N>
Source§impl<T: PartialEq, const LANES: usize, const N: usize> PartialEq for Simd<T, LANES, N>
impl<T: PartialEq, const LANES: usize, const N: usize> PartialEq for Simd<T, LANES, N>
impl<T: PartialEq, const LANES: usize, const N: usize> StructuralPartialEq for Simd<T, LANES, N>
Auto Trait Implementations§
impl<T, const LANES: usize, const N: usize> Freeze for Simd<T, LANES, N>where
T: Freeze,
impl<T, const LANES: usize, const N: usize> RefUnwindSafe for Simd<T, LANES, N>where
T: RefUnwindSafe,
impl<T, const LANES: usize, const N: usize> Send for Simd<T, LANES, N>where
T: Send,
impl<T, const LANES: usize, const N: usize> Sync for Simd<T, LANES, N>where
T: Sync,
impl<T, const LANES: usize, const N: usize> Unpin for Simd<T, LANES, N>where
T: Unpin,
impl<T, const LANES: usize, const N: usize> UnsafeUnpin for Simd<T, LANES, N>where
T: UnsafeUnpin,
impl<T, const LANES: usize, const N: usize> UnwindSafe for Simd<T, LANES, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more