pathfinder_simd-0.5.2/.cargo_vcs_info.json0000644000000001420000000000100141750ustar { "git": { "sha1": "78482d8afe09098c14ea213876e751d4c84e9a6d" }, "path_in_vcs": "simd" }pathfinder_simd-0.5.2/Cargo.toml0000644000000015440000000000100122020ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "pathfinder_simd" version = "0.5.2" authors = ["Patrick Walton "] build = "build.rs" description = "A simple SIMD library" homepage = "https://github.com/servo/pathfinder" license = "MIT/Apache-2.0" repository = "https://github.com/servo/pathfinder" [dependencies] [build-dependencies.rustc_version] version = "0.4" [features] pf-no-simd = [] pathfinder_simd-0.5.2/Cargo.toml.orig000064400000000000000000000006111046102023000156550ustar 00000000000000[package] name = "pathfinder_simd" version = "0.5.2" edition = "2018" authors = ["Patrick Walton "] build = "build.rs" description = "A simple SIMD library" license = "MIT/Apache-2.0" repository = "https://github.com/servo/pathfinder" homepage = "https://github.com/servo/pathfinder" [features] pf-no-simd = [] [dependencies] [build-dependencies] rustc_version = "0.4" pathfinder_simd-0.5.2/build.rs000064400000000000000000000014401046102023000144340ustar 00000000000000// pathfinder/simd/build.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. extern crate rustc_version; use rustc_version::Channel; fn main() { // Assert we haven't travelled back in time assert!(rustc_version::version().unwrap().major >= 1); // Set cfg flags depending on release channel match rustc_version::version_meta().unwrap().channel { Channel::Nightly => { println!("cargo:rustc-cfg=pf_rustc_nightly"); } _ => {} } } pathfinder_simd-0.5.2/src/arm/mod.rs000064400000000000000000000527761046102023000155040ustar 00000000000000// pathfinder/simd/src/arm.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::arch::aarch64::{self, float32x2_t, float32x4_t, int32x2_t, int32x4_t}; use std::arch::aarch64::{uint32x2_t, uint32x4_t}; use std::f32; use std::fmt::{self, Debug, Formatter}; use std::mem; use std::ops::{Add, BitAnd, BitOr, Div, Index, IndexMut, Mul, Not, Shr, Sub}; mod swizzle_f32x4; mod swizzle_i32x4; macro_rules! simd_shuffle2 { ($x:expr, $y:expr, <$(const $imm:ident : $ty:ty),+> $idx:expr $(,)?) => {{ struct ConstParam<$(const $imm: $ty),+>; impl<$(const $imm: $ty),+> ConstParam<$($imm),+> { const IDX: [u32; 2] = $idx; } simd_shuffle($x, $y, ConstParam::<$($imm),+>::IDX) }}; ($x:expr, $y:expr, $idx:expr $(,)?) => {{ const IDX: [u32; 2] = $idx; simd_shuffle($x, $y, IDX) }}; } macro_rules! simd_shuffle4 { ($x:expr, $y:expr, <$(const $imm:ident : $ty:ty),+> $idx:expr $(,)?) => {{ struct ConstParam<$(const $imm: $ty),+>; impl<$(const $imm: $ty),+> ConstParam<$($imm),+> { const IDX: [u32; 4] = $idx; } simd_shuffle($x, $y, ConstParam::<$($imm),+>::IDX) }}; ($x:expr, $y:expr, $idx:expr $(,)?) => {{ const IDX: [u32; 4] = $idx; simd_shuffle($x, $y, IDX) }}; } // Two 32-bit floats #[derive(Clone, Copy)] pub struct F32x2(pub float32x2_t); impl F32x2 { // Constructors #[inline] pub fn new(a: f32, b: f32) -> F32x2 { unsafe { F32x2(mem::transmute([a, b])) } } #[inline] pub fn splat(x: f32) -> F32x2 { F32x2::new(x, x) } // Basic operations #[inline] pub fn approx_recip(self) -> F32x2 { unsafe { F32x2(vrecpe_v2f32(self.0)) } } #[inline] pub fn min(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_fmin(self.0, other.0)) } } #[inline] pub fn max(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_fmax(self.0, other.0)) } } #[inline] pub fn clamp(self, min: F32x2, max: F32x2) -> F32x2 { self.max(min).min(max) } #[inline] pub fn abs(self) -> F32x2 { unsafe { F32x2(fabs_v2f32(self.0)) } } #[inline] pub fn floor(self) -> F32x2 { unsafe { F32x2(floor_v2f32(self.0)) } } #[inline] pub fn ceil(self) -> F32x2 { unsafe { F32x2(ceil_v2f32(self.0)) } } #[inline] pub fn sqrt(self) -> F32x2 { unsafe { F32x2(sqrt_v2f32(self.0)) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x2) -> U32x2 { unsafe { U32x2(simd_eq(self.0, other.0)) } } #[inline] pub fn packed_gt(self, other: F32x2) -> U32x2 { unsafe { U32x2(simd_gt(self.0, other.0)) } } #[inline] pub fn packed_lt(self, other: F32x2) -> U32x2 { unsafe { U32x2(simd_lt(self.0, other.0)) } } #[inline] pub fn packed_le(self, other: F32x2) -> U32x2 { unsafe { U32x2(simd_le(self.0, other.0)) } } // Conversions #[inline] pub fn to_f32x4(self) -> F32x4 { self.concat_xy_xy(F32x2::default()) } /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x2(self) -> I32x2 { unsafe { I32x2(simd_cast(round_v2f32(self.0))) } } #[inline] pub fn to_i32x4(self) -> I32x4 { self.to_i32x2().concat_xy_xy(I32x2::default()) } // Swizzle #[inline] pub fn yx(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [1, 0])) } } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x2) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, other.0, [0, 1, 2, 3])) } } } impl Default for F32x2 { #[inline] fn default() -> F32x2 { F32x2::new(0.0, 0.0) } } impl Debug for F32x2 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}>", self[0], self[1]) } } impl Index for F32x2 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { unsafe { assert!(index < 2); let ptr = &self.0 as *const float32x2_t as *const f32; mem::transmute::<*const f32, &f32>(ptr.offset(index as isize)) } } } impl IndexMut for F32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { unsafe { assert!(index < 2); let ptr = &mut self.0 as *mut float32x2_t as *mut f32; mem::transmute::<*mut f32, &mut f32>(ptr.offset(index as isize)) } } } impl Add for F32x2 { type Output = F32x2; #[inline] fn add(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_add(self.0, other.0)) } } } impl Div for F32x2 { type Output = F32x2; #[inline] fn div(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_div(self.0, other.0)) } } } impl Mul for F32x2 { type Output = F32x2; #[inline] fn mul(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_mul(self.0, other.0)) } } } impl Sub for F32x2 { type Output = F32x2; #[inline] fn sub(self, other: F32x2) -> F32x2 { unsafe { F32x2(simd_sub(self.0, other.0)) } } } // Four 32-bit floats #[derive(Clone, Copy)] pub struct F32x4(pub float32x4_t); impl F32x4 { #[inline] pub fn new(a: f32, b: f32, c: f32, d: f32) -> F32x4 { unsafe { F32x4(mem::transmute([a, b, c, d])) } } #[inline] pub fn splat(x: f32) -> F32x4 { F32x4::new(x, x, x, x) } // Basic operations #[inline] pub fn approx_recip(self) -> F32x4 { unsafe { F32x4(vrecpe_v4f32(self.0)) } } #[inline] pub fn min(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_fmin(self.0, other.0)) } } #[inline] pub fn max(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_fmax(self.0, other.0)) } } #[inline] pub fn clamp(self, min: F32x4, max: F32x4) -> F32x4 { self.max(min).min(max) } #[inline] pub fn abs(self) -> F32x4 { unsafe { F32x4(fabs_v4f32(self.0)) } } #[inline] pub fn floor(self) -> F32x4 { unsafe { F32x4(floor_v4f32(self.0)) } } #[inline] pub fn ceil(self) -> F32x4 { unsafe { F32x4(ceil_v4f32(self.0)) } } #[inline] pub fn sqrt(self) -> F32x4 { unsafe { F32x4(sqrt_v4f32(self.0)) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x4) -> U32x4 { unsafe { U32x4(simd_eq(self.0, other.0)) } } #[inline] pub fn packed_gt(self, other: F32x4) -> U32x4 { unsafe { U32x4(simd_gt(self.0, other.0)) } } #[inline] pub fn packed_le(self, other: F32x4) -> U32x4 { unsafe { U32x4(simd_le(self.0, other.0)) } } #[inline] pub fn packed_lt(self, other: F32x4) -> U32x4 { unsafe { U32x4(simd_lt(self.0, other.0)) } } // Swizzle conversions #[inline] pub fn xy(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [0, 1])) } } #[inline] pub fn yx(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [1, 0])) } } #[inline] pub fn xw(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [0, 3])) } } #[inline] pub fn zy(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [2, 1])) } } #[inline] pub fn zw(self) -> F32x2 { unsafe { F32x2(simd_shuffle2!(self.0, self.0, [2, 3])) } } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, other.0, [0, 1, 2, 3])) } } #[inline] pub fn concat_xy_zw(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, other.0, [0, 1, 6, 7])) } } #[inline] pub fn concat_zw_zw(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, other.0, [2, 3, 6, 7])) } } // Conversions /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x4(self) -> I32x4 { unsafe { I32x4(simd_cast(round_v4f32(self.0))) } } } impl Default for F32x4 { #[inline] fn default() -> F32x4 { F32x4::new(0.0, 0.0, 0.0, 0.0) } } impl Index for F32x4 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { unsafe { assert!(index < 4); let ptr = &self.0 as *const float32x4_t as *const f32; mem::transmute::<*const f32, &f32>(ptr.offset(index as isize)) } } } impl IndexMut for F32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { unsafe { assert!(index < 4); let ptr = &mut self.0 as *mut float32x4_t as *mut f32; mem::transmute::<*mut f32, &mut f32>(ptr.offset(index as isize)) } } } impl Debug for F32x4 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}, {}, {}>", self[0], self[1], self[2], self[3]) } } impl PartialEq for F32x4 { #[inline] fn eq(&self, other: &F32x4) -> bool { self.packed_eq(*other).all_true() } } impl Add for F32x4 { type Output = F32x4; #[inline] fn add(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_add(self.0, other.0)) } } } impl Div for F32x4 { type Output = F32x4; #[inline] fn div(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_div(self.0, other.0)) } } } impl Mul for F32x4 { type Output = F32x4; #[inline] fn mul(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_mul(self.0, other.0)) } } } impl Sub for F32x4 { type Output = F32x4; #[inline] fn sub(self, other: F32x4) -> F32x4 { unsafe { F32x4(simd_sub(self.0, other.0)) } } } // Two 32-bit signed integers #[derive(Clone, Copy, Debug)] pub struct I32x2(pub int32x2_t); impl I32x2 { #[inline] pub fn new(x: i32, y: i32) -> I32x2 { unsafe { I32x2(mem::transmute([x, y])) } } #[inline] pub fn splat(x: i32) -> I32x2 { I32x2::new(x, x) } // Accessors #[inline] pub fn x(self) -> i32 { self[0] } #[inline] pub fn y(self) -> i32 { self[1] } #[inline] pub fn packed_eq(self, other: I32x2) -> U32x2 { unsafe { U32x2(simd_eq(self.0, other.0)) } } // Basic operations #[inline] pub fn max(self, other: I32x2) -> I32x2 { self.to_i32x4().max(other.to_i32x4()).xy() } #[inline] pub fn min(self, other: I32x2) -> I32x2 { self.to_i32x4().min(other.to_i32x4()).xy() } // Concatenations #[inline] pub fn concat_xy_xy(self, other: I32x2) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, other.0, [0, 1, 2, 3])) } } // Conversions /// Converts these packed integers to floats. #[inline] pub fn to_f32x2(self) -> F32x2 { unsafe { F32x2(simd_cast(self.0)) } } #[inline] pub fn to_i32x4(self) -> I32x4 { self.concat_xy_xy(I32x2::default()) } } impl Default for I32x2 { #[inline] fn default() -> I32x2 { I32x2::splat(0) } } impl PartialEq for I32x2 { #[inline] fn eq(&self, other: &I32x2) -> bool { self.packed_eq(*other).all_true() } } impl Index for I32x2 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { unsafe { assert!(index < 2); let ptr = &self.0 as *const int32x2_t as *const i32; mem::transmute::<*const i32, &i32>(ptr.offset(index as isize)) } } } impl IndexMut for I32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { unsafe { assert!(index < 2); let ptr = &mut self.0 as *mut int32x2_t as *mut i32; mem::transmute::<*mut i32, &mut i32>(ptr.offset(index as isize)) } } } impl Add for I32x2 { type Output = I32x2; #[inline] fn add(self, other: I32x2) -> I32x2 { unsafe { I32x2(simd_add(self.0, other.0)) } } } impl Sub for I32x2 { type Output = I32x2; #[inline] fn sub(self, other: I32x2) -> I32x2 { unsafe { I32x2(simd_sub(self.0, other.0)) } } } impl Mul for I32x2 { type Output = I32x2; #[inline] fn mul(self, other: I32x2) -> I32x2 { unsafe { I32x2(simd_mul(self.0, other.0)) } } } // Four 32-bit signed integers #[derive(Clone, Copy, Debug)] pub struct I32x4(pub int32x4_t); impl I32x4 { #[inline] pub fn new(a: i32, b: i32, c: i32, d: i32) -> I32x4 { unsafe { I32x4(mem::transmute([a, b, c, d])) } } #[inline] pub fn splat(x: i32) -> I32x4 { I32x4::new(x, x, x, x) } // Basic operations #[inline] pub fn max(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_cast(simd_fmax(self.to_f32x4().0, other.to_f32x4().0))) } } #[inline] pub fn min(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_cast(simd_fmin(self.to_f32x4().0, other.to_f32x4().0))) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: I32x4) -> U32x4 { unsafe { U32x4(simd_eq(self.0, other.0)) } } #[inline] pub fn packed_le(self, other: I32x4) -> U32x4 { unsafe { U32x4(simd_le(self.0, other.0)) } } #[inline] pub fn packed_lt(self, other: I32x4) -> U32x4 { unsafe { U32x4(simd_lt(self.0, other.0)) } } // Concatenations #[inline] pub fn concat_xy_xy(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, other.0, [0, 1, 4, 5])) } } #[inline] pub fn concat_zw_zw(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, other.0, [2, 3, 6, 7])) } } // Swizzle conversions #[inline] pub fn xy(self) -> I32x2 { unsafe { I32x2(simd_shuffle2!(self.0, self.0, [0, 1])) } } #[inline] pub fn yx(self) -> I32x2 { unsafe { I32x2(simd_shuffle2!(self.0, self.0, [1, 0])) } } #[inline] pub fn xw(self) -> I32x2 { unsafe { I32x2(simd_shuffle2!(self.0, self.0, [0, 3])) } } #[inline] pub fn zy(self) -> I32x2 { unsafe { I32x2(simd_shuffle2!(self.0, self.0, [2, 1])) } } #[inline] pub fn zw(self) -> I32x2 { unsafe { I32x2(simd_shuffle2!(self.0, self.0, [2, 3])) } } // Conversions /// Converts these packed integers to floats. #[inline] pub fn to_f32x4(self) -> F32x4 { unsafe { F32x4(simd_cast(self.0)) } } } impl Default for I32x4 { #[inline] fn default() -> I32x4 { I32x4::new(0, 0, 0, 0) } } impl Index for I32x4 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { unsafe { assert!(index < 4); let ptr = &self.0 as *const int32x4_t as *const i32; mem::transmute::<*const i32, &i32>(ptr.offset(index as isize)) } } } impl IndexMut for I32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { unsafe { assert!(index < 4); let ptr = &mut self.0 as *mut int32x4_t as *mut i32; mem::transmute::<*mut i32, &mut i32>(ptr.offset(index as isize)) } } } impl Add for I32x4 { type Output = I32x4; #[inline] fn add(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_add(self.0, other.0)) } } } impl Sub for I32x4 { type Output = I32x4; #[inline] fn sub(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_sub(self.0, other.0)) } } } impl Mul for I32x4 { type Output = I32x4; #[inline] fn mul(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_mul(self.0, other.0)) } } } impl PartialEq for I32x4 { #[inline] fn eq(&self, other: &I32x4) -> bool { self.packed_eq(*other).all_true() } } impl BitAnd for I32x4 { type Output = I32x4; #[inline] fn bitand(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_and(self.0, other.0)) } } } impl BitOr for I32x4 { type Output = I32x4; #[inline] fn bitor(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_or(self.0, other.0)) } } } impl Shr for I32x4 { type Output = I32x4; #[inline] fn shr(self, other: I32x4) -> I32x4 { unsafe { I32x4(simd_shr(self.0, other.0)) } } } // Two 32-bit unsigned integers #[derive(Clone, Copy)] pub struct U32x2(pub uint32x2_t); impl U32x2 { #[inline] pub fn new(x: u32, y: u32) -> U32x2 { unsafe { U32x2(mem::transmute([x, y])) } } #[inline] pub fn splat(x: u32) -> U32x2 { U32x2::new(x, x) } /// Returns true if both booleans in this vector are true. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(&self) -> bool { unsafe { aarch64::vminv_u32(self.0) == !0 } } /// Returns true if both booleans in this vector are false. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(&self) -> bool { unsafe { aarch64::vmaxv_u32(self.0) == 0 } } #[inline] pub fn to_i32x2(self) -> I32x2 { unsafe { I32x2(simd_cast(self.0)) } } } impl Index for U32x2 { type Output = u32; #[inline] fn index(&self, index: usize) -> &u32 { unsafe { assert!(index < 2); let ptr = &self.0 as *const uint32x2_t as *const u32; mem::transmute::<*const u32, &u32>(ptr.offset(index as isize)) } } } impl Not for U32x2 { type Output = U32x2; #[inline] fn not(self) -> U32x2 { // FIXME(pcwalton): Is there a better way to do this? unsafe { U32x2(simd_xor(self.0, U32x2::splat(!0).0)) } } } impl BitAnd for U32x2 { type Output = U32x2; #[inline] fn bitand(self, other: U32x2) -> U32x2 { unsafe { U32x2(simd_and(self.0, other.0)) } } } impl BitOr for U32x2 { type Output = U32x2; #[inline] fn bitor(self, other: U32x2) -> U32x2 { unsafe { U32x2(simd_or(self.0, other.0)) } } } // Four 32-bit unsigned integers #[derive(Clone, Copy)] pub struct U32x4(pub uint32x4_t); impl U32x4 { /// Returns true if all four booleans in this vector are true. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(&self) -> bool { unsafe { aarch64::vminvq_u32(self.0) == !0 } } /// Returns true if all four booleans in this vector are false. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(&self) -> bool { unsafe { aarch64::vmaxvq_u32(self.0) == 0 } } } impl Index for U32x4 { type Output = u32; #[inline] fn index(&self, index: usize) -> &u32 { unsafe { assert!(index < 4); let ptr = &self.0 as *const uint32x4_t as *const u32; mem::transmute::<*const u32, &u32>(ptr.offset(index as isize)) } } } // Intrinsics extern "platform-intrinsic" { fn simd_add(x: T, y: T) -> T; fn simd_div(x: T, y: T) -> T; fn simd_mul(x: T, y: T) -> T; fn simd_sub(x: T, y: T) -> T; fn simd_shr(x: T, y: T) -> T; fn simd_and(x: T, y: T) -> T; fn simd_or(x: T, y: T) -> T; fn simd_xor(x: T, y: T) -> T; fn simd_fmin(x: T, y: T) -> T; fn simd_fmax(x: T, y: T) -> T; fn simd_eq(x: T, y: T) -> U; fn simd_gt(x: T, y: T) -> U; fn simd_le(x: T, y: T) -> U; fn simd_lt(x: T, y: T) -> U; fn simd_shuffle(x: T, y: T, idx: I) -> U; fn simd_cast(x: T) -> U; } extern "C" { #[link_name = "llvm.fabs.v2f32"] fn fabs_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.floor.v2f32"] fn floor_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.ceil.v2f32"] fn ceil_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.round.v2f32"] fn round_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.sqrt.v2f32"] fn sqrt_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.fabs.v4f32"] fn fabs_v4f32(a: float32x4_t) -> float32x4_t; #[link_name = "llvm.floor.v4f32"] fn floor_v4f32(a: float32x4_t) -> float32x4_t; #[link_name = "llvm.ceil.v4f32"] fn ceil_v4f32(a: float32x4_t) -> float32x4_t; #[link_name = "llvm.round.v4f32"] fn round_v4f32(a: float32x4_t) -> float32x4_t; #[link_name = "llvm.sqrt.v4f32"] fn sqrt_v4f32(a: float32x4_t) -> float32x4_t; #[link_name = "llvm.aarch64.neon.frecpe.v2f32"] fn vrecpe_v2f32(a: float32x2_t) -> float32x2_t; #[link_name = "llvm.aarch64.neon.frecpe.v4f32"] fn vrecpe_v4f32(a: float32x4_t) -> float32x4_t; } pathfinder_simd-0.5.2/src/arm/swizzle_f32x4.rs000064400000000000000000001732341046102023000173530ustar 00000000000000// pathfinder/simd/src/arm/swizzle_f32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::arm::{self, F32x4}; macro_rules! simd_shuffle4 { ($x:expr, $y:expr, <$(const $imm:ident : $ty:ty),+> $idx:expr $(,)?) => {{ struct ConstParam<$(const $imm: $ty),+>; impl<$(const $imm: $ty),+> ConstParam<$($imm),+> { const IDX: [u32; 4] = $idx; } arm::simd_shuffle($x, $y, ConstParam::<$($imm),+>::IDX) }}; ($x:expr, $y:expr, $idx:expr $(,)?) => {{ const IDX: [u32; 4] = $idx; arm::simd_shuffle($x, $y, IDX) }}; } impl F32x4 { /// Constructs a new vector from the first, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn xxxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 0])) } } /// Constructs a new vector from the second, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn yxxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 0])) } } /// Constructs a new vector from the third, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn zxxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 0])) } } /// Constructs a new vector from the fourth, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn wxxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 0])) } } /// Constructs a new vector from the first, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn xyxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 0])) } } /// Constructs a new vector from the second, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn yyxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 0])) } } /// Constructs a new vector from the third, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn zyxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 0])) } } /// Constructs a new vector from the fourth, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn wyxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 0])) } } /// Constructs a new vector from the first, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn xzxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 0])) } } /// Constructs a new vector from the second, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn yzxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 0])) } } /// Constructs a new vector from the third, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn zzxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 0])) } } /// Constructs a new vector from the fourth, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn wzxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 0])) } } /// Constructs a new vector from the first, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn xwxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 0])) } } /// Constructs a new vector from the second, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn ywxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 0])) } } /// Constructs a new vector from the third, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn zwxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 0])) } } /// Constructs a new vector from the fourth, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn wwxx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 0])) } } /// Constructs a new vector from the first, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn xxyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 0])) } } /// Constructs a new vector from the second, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn yxyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 0])) } } /// Constructs a new vector from the third, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn zxyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 0])) } } /// Constructs a new vector from the fourth, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn wxyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 0])) } } /// Constructs a new vector from the first, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn xyyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 0])) } } /// Constructs a new vector from the second, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn yyyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 0])) } } /// Constructs a new vector from the third, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn zyyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 0])) } } /// Constructs a new vector from the fourth, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn wyyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 0])) } } /// Constructs a new vector from the first, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn xzyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 0])) } } /// Constructs a new vector from the second, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn yzyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 0])) } } /// Constructs a new vector from the third, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn zzyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 0])) } } /// Constructs a new vector from the fourth, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn wzyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 0])) } } /// Constructs a new vector from the first, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn xwyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 0])) } } /// Constructs a new vector from the second, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn ywyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 0])) } } /// Constructs a new vector from the third, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn zwyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 0])) } } /// Constructs a new vector from the fourth, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn wwyx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 0])) } } /// Constructs a new vector from the first, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn xxzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 0])) } } /// Constructs a new vector from the second, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn yxzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 0])) } } /// Constructs a new vector from the third, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn zxzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 0])) } } /// Constructs a new vector from the fourth, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn wxzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 0])) } } /// Constructs a new vector from the first, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn xyzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 0])) } } /// Constructs a new vector from the second, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn yyzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 0])) } } /// Constructs a new vector from the third, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn zyzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 0])) } } /// Constructs a new vector from the fourth, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn wyzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 0])) } } /// Constructs a new vector from the first, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn xzzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 0])) } } /// Constructs a new vector from the second, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn yzzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 0])) } } /// Constructs a new vector from the third, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn zzzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 0])) } } /// Constructs a new vector from the fourth, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn wzzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 0])) } } /// Constructs a new vector from the first, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn xwzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 0])) } } /// Constructs a new vector from the second, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn ywzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 0])) } } /// Constructs a new vector from the third, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn zwzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 0])) } } /// Constructs a new vector from the fourth, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn wwzx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 0])) } } /// Constructs a new vector from the first, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xxwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 0])) } } /// Constructs a new vector from the second, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yxwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 0])) } } /// Constructs a new vector from the third, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zxwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 0])) } } /// Constructs a new vector from the fourth, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wxwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 0])) } } /// Constructs a new vector from the first, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xywx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 0])) } } /// Constructs a new vector from the second, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yywx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 0])) } } /// Constructs a new vector from the third, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zywx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 0])) } } /// Constructs a new vector from the fourth, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wywx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 0])) } } /// Constructs a new vector from the first, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xzwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 0])) } } /// Constructs a new vector from the second, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yzwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 0])) } } /// Constructs a new vector from the third, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zzwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 0])) } } /// Constructs a new vector from the fourth, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wzwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 0])) } } /// Constructs a new vector from the first, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xwwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 0])) } } /// Constructs a new vector from the second, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn ywwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 0])) } } /// Constructs a new vector from the third, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zwwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 0])) } } /// Constructs a new vector from the fourth, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wwwx(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 0])) } } /// Constructs a new vector from the first, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn xxxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 1])) } } /// Constructs a new vector from the second, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn yxxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 1])) } } /// Constructs a new vector from the third, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn zxxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 1])) } } /// Constructs a new vector from the fourth, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn wxxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 1])) } } /// Constructs a new vector from the first, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn xyxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 1])) } } /// Constructs a new vector from the second, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn yyxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 1])) } } /// Constructs a new vector from the third, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn zyxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 1])) } } /// Constructs a new vector from the fourth, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn wyxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 1])) } } /// Constructs a new vector from the first, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn xzxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 1])) } } /// Constructs a new vector from the second, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn yzxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 1])) } } /// Constructs a new vector from the third, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn zzxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 1])) } } /// Constructs a new vector from the fourth, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn wzxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 1])) } } /// Constructs a new vector from the first, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn xwxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 1])) } } /// Constructs a new vector from the second, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn ywxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 1])) } } /// Constructs a new vector from the third, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn zwxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 1])) } } /// Constructs a new vector from the fourth, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn wwxy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 1])) } } /// Constructs a new vector from the first, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn xxyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 1])) } } /// Constructs a new vector from the second, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn yxyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 1])) } } /// Constructs a new vector from the third, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn zxyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 1])) } } /// Constructs a new vector from the fourth, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn wxyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 1])) } } /// Constructs a new vector from the first, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn xyyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 1])) } } /// Constructs a new vector from the second, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn yyyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 1])) } } /// Constructs a new vector from the third, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn zyyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 1])) } } /// Constructs a new vector from the fourth, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn wyyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 1])) } } /// Constructs a new vector from the first, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn xzyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 1])) } } /// Constructs a new vector from the second, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn yzyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 1])) } } /// Constructs a new vector from the third, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn zzyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 1])) } } /// Constructs a new vector from the fourth, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn wzyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 1])) } } /// Constructs a new vector from the first, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn xwyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 1])) } } /// Constructs a new vector from the second, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn ywyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 1])) } } /// Constructs a new vector from the third, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn zwyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 1])) } } /// Constructs a new vector from the fourth, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn wwyy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 1])) } } /// Constructs a new vector from the first, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn xxzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 1])) } } /// Constructs a new vector from the second, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn yxzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 1])) } } /// Constructs a new vector from the third, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn zxzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 1])) } } /// Constructs a new vector from the fourth, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn wxzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 1])) } } /// Constructs a new vector from the first, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn xyzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 1])) } } /// Constructs a new vector from the second, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn yyzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 1])) } } /// Constructs a new vector from the third, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn zyzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 1])) } } /// Constructs a new vector from the fourth, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn wyzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 1])) } } /// Constructs a new vector from the first, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn xzzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 1])) } } /// Constructs a new vector from the second, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn yzzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 1])) } } /// Constructs a new vector from the third, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn zzzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 1])) } } /// Constructs a new vector from the fourth, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn wzzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 1])) } } /// Constructs a new vector from the first, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn xwzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 1])) } } /// Constructs a new vector from the second, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn ywzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 1])) } } /// Constructs a new vector from the third, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn zwzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 1])) } } /// Constructs a new vector from the fourth, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn wwzy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 1])) } } /// Constructs a new vector from the first, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xxwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 1])) } } /// Constructs a new vector from the second, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yxwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 1])) } } /// Constructs a new vector from the third, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zxwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 1])) } } /// Constructs a new vector from the fourth, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wxwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 1])) } } /// Constructs a new vector from the first, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xywy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 1])) } } /// Constructs a new vector from the second, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yywy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 1])) } } /// Constructs a new vector from the third, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zywy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 1])) } } /// Constructs a new vector from the fourth, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wywy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 1])) } } /// Constructs a new vector from the first, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xzwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 1])) } } /// Constructs a new vector from the second, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yzwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 1])) } } /// Constructs a new vector from the third, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zzwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 1])) } } /// Constructs a new vector from the fourth, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wzwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 1])) } } /// Constructs a new vector from the first, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xwwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 1])) } } /// Constructs a new vector from the second, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn ywwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 1])) } } /// Constructs a new vector from the third, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zwwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 1])) } } /// Constructs a new vector from the fourth, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wwwy(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 1])) } } /// Constructs a new vector from the first, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn xxxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 2])) } } /// Constructs a new vector from the second, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn yxxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 2])) } } /// Constructs a new vector from the third, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn zxxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 2])) } } /// Constructs a new vector from the fourth, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn wxxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 2])) } } /// Constructs a new vector from the first, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn xyxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 2])) } } /// Constructs a new vector from the second, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn yyxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 2])) } } /// Constructs a new vector from the third, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn zyxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 2])) } } /// Constructs a new vector from the fourth, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn wyxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 2])) } } /// Constructs a new vector from the first, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn xzxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 2])) } } /// Constructs a new vector from the second, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn yzxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 2])) } } /// Constructs a new vector from the third, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn zzxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 2])) } } /// Constructs a new vector from the fourth, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn wzxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 2])) } } /// Constructs a new vector from the first, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn xwxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 2])) } } /// Constructs a new vector from the second, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn ywxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 2])) } } /// Constructs a new vector from the third, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn zwxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 2])) } } /// Constructs a new vector from the fourth, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn wwxz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 2])) } } /// Constructs a new vector from the first, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn xxyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 2])) } } /// Constructs a new vector from the second, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn yxyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 2])) } } /// Constructs a new vector from the third, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn zxyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 2])) } } /// Constructs a new vector from the fourth, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn wxyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 2])) } } /// Constructs a new vector from the first, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn xyyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 2])) } } /// Constructs a new vector from the second, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn yyyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 2])) } } /// Constructs a new vector from the third, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn zyyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 2])) } } /// Constructs a new vector from the fourth, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn wyyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 2])) } } /// Constructs a new vector from the first, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn xzyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 2])) } } /// Constructs a new vector from the second, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn yzyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 2])) } } /// Constructs a new vector from the third, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn zzyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 2])) } } /// Constructs a new vector from the fourth, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn wzyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 2])) } } /// Constructs a new vector from the first, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn xwyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 2])) } } /// Constructs a new vector from the second, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn ywyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 2])) } } /// Constructs a new vector from the third, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn zwyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 2])) } } /// Constructs a new vector from the fourth, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn wwyz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 2])) } } /// Constructs a new vector from the first, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn xxzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 2])) } } /// Constructs a new vector from the second, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn yxzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 2])) } } /// Constructs a new vector from the third, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn zxzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 2])) } } /// Constructs a new vector from the fourth, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn wxzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 2])) } } /// Constructs a new vector from the first, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn xyzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 2])) } } /// Constructs a new vector from the second, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn yyzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 2])) } } /// Constructs a new vector from the third, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn zyzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 2])) } } /// Constructs a new vector from the fourth, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn wyzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 2])) } } /// Constructs a new vector from the first, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn xzzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 2])) } } /// Constructs a new vector from the second, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn yzzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 2])) } } /// Constructs a new vector from the third, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn zzzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 2])) } } /// Constructs a new vector from the fourth, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn wzzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 2])) } } /// Constructs a new vector from the first, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn xwzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 2])) } } /// Constructs a new vector from the second, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn ywzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 2])) } } /// Constructs a new vector from the third, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn zwzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 2])) } } /// Constructs a new vector from the fourth, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn wwzz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 2])) } } /// Constructs a new vector from the first, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xxwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 2])) } } /// Constructs a new vector from the second, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yxwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 2])) } } /// Constructs a new vector from the third, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zxwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 2])) } } /// Constructs a new vector from the fourth, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wxwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 2])) } } /// Constructs a new vector from the first, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xywz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 2])) } } /// Constructs a new vector from the second, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yywz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 2])) } } /// Constructs a new vector from the third, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zywz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 2])) } } /// Constructs a new vector from the fourth, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wywz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 2])) } } /// Constructs a new vector from the first, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xzwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 2])) } } /// Constructs a new vector from the second, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yzwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 2])) } } /// Constructs a new vector from the third, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zzwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 2])) } } /// Constructs a new vector from the fourth, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wzwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 2])) } } /// Constructs a new vector from the first, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xwwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 2])) } } /// Constructs a new vector from the second, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn ywwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 2])) } } /// Constructs a new vector from the third, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zwwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 2])) } } /// Constructs a new vector from the fourth, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wwwz(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 2])) } } /// Constructs a new vector from the first, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 3])) } } /// Constructs a new vector from the second, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 3])) } } /// Constructs a new vector from the third, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 3])) } } /// Constructs a new vector from the fourth, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 3])) } } /// Constructs a new vector from the first, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 3])) } } /// Constructs a new vector from the second, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 3])) } } /// Constructs a new vector from the third, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 3])) } } /// Constructs a new vector from the fourth, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 3])) } } /// Constructs a new vector from the first, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 3])) } } /// Constructs a new vector from the second, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 3])) } } /// Constructs a new vector from the third, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 3])) } } /// Constructs a new vector from the fourth, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 3])) } } /// Constructs a new vector from the first, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 3])) } } /// Constructs a new vector from the second, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 3])) } } /// Constructs a new vector from the third, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 3])) } } /// Constructs a new vector from the fourth, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwxw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 3])) } } /// Constructs a new vector from the first, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 3])) } } /// Constructs a new vector from the second, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 3])) } } /// Constructs a new vector from the third, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 3])) } } /// Constructs a new vector from the fourth, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 3])) } } /// Constructs a new vector from the first, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 3])) } } /// Constructs a new vector from the second, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 3])) } } /// Constructs a new vector from the third, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 3])) } } /// Constructs a new vector from the fourth, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 3])) } } /// Constructs a new vector from the first, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 3])) } } /// Constructs a new vector from the second, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 3])) } } /// Constructs a new vector from the third, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 3])) } } /// Constructs a new vector from the fourth, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 3])) } } /// Constructs a new vector from the first, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 3])) } } /// Constructs a new vector from the second, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 3])) } } /// Constructs a new vector from the third, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 3])) } } /// Constructs a new vector from the fourth, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwyw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 3])) } } /// Constructs a new vector from the first, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 3])) } } /// Constructs a new vector from the second, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 3])) } } /// Constructs a new vector from the third, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 3])) } } /// Constructs a new vector from the fourth, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 3])) } } /// Constructs a new vector from the first, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 3])) } } /// Constructs a new vector from the second, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 3])) } } /// Constructs a new vector from the third, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 3])) } } /// Constructs a new vector from the fourth, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 3])) } } /// Constructs a new vector from the first, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 3])) } } /// Constructs a new vector from the second, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 3])) } } /// Constructs a new vector from the third, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 3])) } } /// Constructs a new vector from the fourth, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 3])) } } /// Constructs a new vector from the first, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 3])) } } /// Constructs a new vector from the second, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 3])) } } /// Constructs a new vector from the third, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 3])) } } /// Constructs a new vector from the fourth, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwzw(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 3])) } } /// Constructs a new vector from the first, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 3])) } } /// Constructs a new vector from the second, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 3])) } } /// Constructs a new vector from the third, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 3])) } } /// Constructs a new vector from the fourth, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 3])) } } /// Constructs a new vector from the first, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 3])) } } /// Constructs a new vector from the second, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 3])) } } /// Constructs a new vector from the third, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 3])) } } /// Constructs a new vector from the fourth, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 3])) } } /// Constructs a new vector from the first, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 3])) } } /// Constructs a new vector from the second, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 3])) } } /// Constructs a new vector from the third, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 3])) } } /// Constructs a new vector from the fourth, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 3])) } } /// Constructs a new vector from the first, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 3])) } } /// Constructs a new vector from the second, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 3])) } } /// Constructs a new vector from the third, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 3])) } } /// Constructs a new vector from the fourth, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwww(self) -> F32x4 { unsafe { F32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 3])) } } } pathfinder_simd-0.5.2/src/arm/swizzle_i32x4.rs000064400000000000000000001732341046102023000173560ustar 00000000000000// pathfinder/simd/src/arm/swizzle_i32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::arm::{self, I32x4}; macro_rules! simd_shuffle4 { ($x:expr, $y:expr, <$(const $imm:ident : $ty:ty),+> $idx:expr $(,)?) => {{ struct ConstParam<$(const $imm: $ty),+>; impl<$(const $imm: $ty),+> ConstParam<$($imm),+> { const IDX: [u32; 4] = $idx; } arm::simd_shuffle($x, $y, ConstParam::<$($imm),+>::IDX) }}; ($x:expr, $y:expr, $idx:expr $(,)?) => {{ const IDX: [u32; 4] = $idx; arm::simd_shuffle($x, $y, IDX) }}; } impl I32x4 { /// Constructs a new vector from the first, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn xxxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 0])) } } /// Constructs a new vector from the second, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn yxxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 0])) } } /// Constructs a new vector from the third, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn zxxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 0])) } } /// Constructs a new vector from the fourth, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn wxxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 0])) } } /// Constructs a new vector from the first, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn xyxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 0])) } } /// Constructs a new vector from the second, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn yyxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 0])) } } /// Constructs a new vector from the third, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn zyxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 0])) } } /// Constructs a new vector from the fourth, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn wyxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 0])) } } /// Constructs a new vector from the first, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn xzxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 0])) } } /// Constructs a new vector from the second, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn yzxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 0])) } } /// Constructs a new vector from the third, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn zzxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 0])) } } /// Constructs a new vector from the fourth, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn wzxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 0])) } } /// Constructs a new vector from the first, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn xwxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 0])) } } /// Constructs a new vector from the second, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn ywxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 0])) } } /// Constructs a new vector from the third, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn zwxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 0])) } } /// Constructs a new vector from the fourth, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn wwxx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 0])) } } /// Constructs a new vector from the first, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn xxyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 0])) } } /// Constructs a new vector from the second, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn yxyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 0])) } } /// Constructs a new vector from the third, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn zxyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 0])) } } /// Constructs a new vector from the fourth, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn wxyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 0])) } } /// Constructs a new vector from the first, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn xyyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 0])) } } /// Constructs a new vector from the second, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn yyyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 0])) } } /// Constructs a new vector from the third, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn zyyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 0])) } } /// Constructs a new vector from the fourth, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn wyyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 0])) } } /// Constructs a new vector from the first, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn xzyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 0])) } } /// Constructs a new vector from the second, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn yzyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 0])) } } /// Constructs a new vector from the third, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn zzyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 0])) } } /// Constructs a new vector from the fourth, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn wzyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 0])) } } /// Constructs a new vector from the first, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn xwyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 0])) } } /// Constructs a new vector from the second, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn ywyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 0])) } } /// Constructs a new vector from the third, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn zwyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 0])) } } /// Constructs a new vector from the fourth, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn wwyx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 0])) } } /// Constructs a new vector from the first, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn xxzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 0])) } } /// Constructs a new vector from the second, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn yxzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 0])) } } /// Constructs a new vector from the third, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn zxzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 0])) } } /// Constructs a new vector from the fourth, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn wxzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 0])) } } /// Constructs a new vector from the first, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn xyzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 0])) } } /// Constructs a new vector from the second, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn yyzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 0])) } } /// Constructs a new vector from the third, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn zyzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 0])) } } /// Constructs a new vector from the fourth, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn wyzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 0])) } } /// Constructs a new vector from the first, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn xzzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 0])) } } /// Constructs a new vector from the second, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn yzzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 0])) } } /// Constructs a new vector from the third, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn zzzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 0])) } } /// Constructs a new vector from the fourth, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn wzzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 0])) } } /// Constructs a new vector from the first, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn xwzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 0])) } } /// Constructs a new vector from the second, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn ywzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 0])) } } /// Constructs a new vector from the third, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn zwzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 0])) } } /// Constructs a new vector from the fourth, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn wwzx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 0])) } } /// Constructs a new vector from the first, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xxwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 0])) } } /// Constructs a new vector from the second, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yxwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 0])) } } /// Constructs a new vector from the third, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zxwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 0])) } } /// Constructs a new vector from the fourth, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wxwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 0])) } } /// Constructs a new vector from the first, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xywx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 0])) } } /// Constructs a new vector from the second, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yywx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 0])) } } /// Constructs a new vector from the third, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zywx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 0])) } } /// Constructs a new vector from the fourth, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wywx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 0])) } } /// Constructs a new vector from the first, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xzwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 0])) } } /// Constructs a new vector from the second, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yzwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 0])) } } /// Constructs a new vector from the third, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zzwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 0])) } } /// Constructs a new vector from the fourth, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wzwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 0])) } } /// Constructs a new vector from the first, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xwwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 0])) } } /// Constructs a new vector from the second, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn ywwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 0])) } } /// Constructs a new vector from the third, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zwwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 0])) } } /// Constructs a new vector from the fourth, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wwwx(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 0])) } } /// Constructs a new vector from the first, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn xxxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 1])) } } /// Constructs a new vector from the second, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn yxxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 1])) } } /// Constructs a new vector from the third, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn zxxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 1])) } } /// Constructs a new vector from the fourth, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn wxxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 1])) } } /// Constructs a new vector from the first, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn xyxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 1])) } } /// Constructs a new vector from the second, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn yyxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 1])) } } /// Constructs a new vector from the third, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn zyxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 1])) } } /// Constructs a new vector from the fourth, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn wyxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 1])) } } /// Constructs a new vector from the first, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn xzxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 1])) } } /// Constructs a new vector from the second, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn yzxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 1])) } } /// Constructs a new vector from the third, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn zzxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 1])) } } /// Constructs a new vector from the fourth, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn wzxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 1])) } } /// Constructs a new vector from the first, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn xwxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 1])) } } /// Constructs a new vector from the second, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn ywxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 1])) } } /// Constructs a new vector from the third, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn zwxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 1])) } } /// Constructs a new vector from the fourth, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn wwxy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 1])) } } /// Constructs a new vector from the first, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn xxyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 1])) } } /// Constructs a new vector from the second, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn yxyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 1])) } } /// Constructs a new vector from the third, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn zxyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 1])) } } /// Constructs a new vector from the fourth, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn wxyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 1])) } } /// Constructs a new vector from the first, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn xyyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 1])) } } /// Constructs a new vector from the second, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn yyyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 1])) } } /// Constructs a new vector from the third, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn zyyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 1])) } } /// Constructs a new vector from the fourth, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn wyyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 1])) } } /// Constructs a new vector from the first, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn xzyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 1])) } } /// Constructs a new vector from the second, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn yzyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 1])) } } /// Constructs a new vector from the third, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn zzyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 1])) } } /// Constructs a new vector from the fourth, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn wzyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 1])) } } /// Constructs a new vector from the first, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn xwyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 1])) } } /// Constructs a new vector from the second, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn ywyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 1])) } } /// Constructs a new vector from the third, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn zwyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 1])) } } /// Constructs a new vector from the fourth, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn wwyy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 1])) } } /// Constructs a new vector from the first, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn xxzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 1])) } } /// Constructs a new vector from the second, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn yxzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 1])) } } /// Constructs a new vector from the third, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn zxzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 1])) } } /// Constructs a new vector from the fourth, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn wxzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 1])) } } /// Constructs a new vector from the first, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn xyzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 1])) } } /// Constructs a new vector from the second, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn yyzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 1])) } } /// Constructs a new vector from the third, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn zyzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 1])) } } /// Constructs a new vector from the fourth, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn wyzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 1])) } } /// Constructs a new vector from the first, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn xzzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 1])) } } /// Constructs a new vector from the second, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn yzzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 1])) } } /// Constructs a new vector from the third, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn zzzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 1])) } } /// Constructs a new vector from the fourth, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn wzzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 1])) } } /// Constructs a new vector from the first, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn xwzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 1])) } } /// Constructs a new vector from the second, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn ywzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 1])) } } /// Constructs a new vector from the third, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn zwzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 1])) } } /// Constructs a new vector from the fourth, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn wwzy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 1])) } } /// Constructs a new vector from the first, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xxwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 1])) } } /// Constructs a new vector from the second, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yxwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 1])) } } /// Constructs a new vector from the third, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zxwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 1])) } } /// Constructs a new vector from the fourth, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wxwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 1])) } } /// Constructs a new vector from the first, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xywy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 1])) } } /// Constructs a new vector from the second, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yywy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 1])) } } /// Constructs a new vector from the third, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zywy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 1])) } } /// Constructs a new vector from the fourth, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wywy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 1])) } } /// Constructs a new vector from the first, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xzwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 1])) } } /// Constructs a new vector from the second, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yzwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 1])) } } /// Constructs a new vector from the third, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zzwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 1])) } } /// Constructs a new vector from the fourth, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wzwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 1])) } } /// Constructs a new vector from the first, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xwwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 1])) } } /// Constructs a new vector from the second, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn ywwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 1])) } } /// Constructs a new vector from the third, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zwwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 1])) } } /// Constructs a new vector from the fourth, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wwwy(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 1])) } } /// Constructs a new vector from the first, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn xxxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 2])) } } /// Constructs a new vector from the second, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn yxxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 2])) } } /// Constructs a new vector from the third, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn zxxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 2])) } } /// Constructs a new vector from the fourth, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn wxxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 2])) } } /// Constructs a new vector from the first, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn xyxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 2])) } } /// Constructs a new vector from the second, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn yyxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 2])) } } /// Constructs a new vector from the third, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn zyxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 2])) } } /// Constructs a new vector from the fourth, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn wyxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 2])) } } /// Constructs a new vector from the first, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn xzxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 2])) } } /// Constructs a new vector from the second, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn yzxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 2])) } } /// Constructs a new vector from the third, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn zzxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 2])) } } /// Constructs a new vector from the fourth, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn wzxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 2])) } } /// Constructs a new vector from the first, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn xwxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 2])) } } /// Constructs a new vector from the second, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn ywxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 2])) } } /// Constructs a new vector from the third, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn zwxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 2])) } } /// Constructs a new vector from the fourth, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn wwxz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 2])) } } /// Constructs a new vector from the first, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn xxyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 2])) } } /// Constructs a new vector from the second, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn yxyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 2])) } } /// Constructs a new vector from the third, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn zxyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 2])) } } /// Constructs a new vector from the fourth, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn wxyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 2])) } } /// Constructs a new vector from the first, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn xyyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 2])) } } /// Constructs a new vector from the second, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn yyyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 2])) } } /// Constructs a new vector from the third, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn zyyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 2])) } } /// Constructs a new vector from the fourth, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn wyyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 2])) } } /// Constructs a new vector from the first, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn xzyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 2])) } } /// Constructs a new vector from the second, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn yzyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 2])) } } /// Constructs a new vector from the third, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn zzyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 2])) } } /// Constructs a new vector from the fourth, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn wzyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 2])) } } /// Constructs a new vector from the first, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn xwyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 2])) } } /// Constructs a new vector from the second, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn ywyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 2])) } } /// Constructs a new vector from the third, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn zwyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 2])) } } /// Constructs a new vector from the fourth, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn wwyz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 2])) } } /// Constructs a new vector from the first, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn xxzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 2])) } } /// Constructs a new vector from the second, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn yxzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 2])) } } /// Constructs a new vector from the third, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn zxzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 2])) } } /// Constructs a new vector from the fourth, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn wxzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 2])) } } /// Constructs a new vector from the first, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn xyzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 2])) } } /// Constructs a new vector from the second, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn yyzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 2])) } } /// Constructs a new vector from the third, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn zyzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 2])) } } /// Constructs a new vector from the fourth, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn wyzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 2])) } } /// Constructs a new vector from the first, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn xzzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 2])) } } /// Constructs a new vector from the second, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn yzzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 2])) } } /// Constructs a new vector from the third, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn zzzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 2])) } } /// Constructs a new vector from the fourth, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn wzzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 2])) } } /// Constructs a new vector from the first, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn xwzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 2])) } } /// Constructs a new vector from the second, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn ywzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 2])) } } /// Constructs a new vector from the third, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn zwzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 2])) } } /// Constructs a new vector from the fourth, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn wwzz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 2])) } } /// Constructs a new vector from the first, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xxwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 2])) } } /// Constructs a new vector from the second, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yxwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 2])) } } /// Constructs a new vector from the third, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zxwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 2])) } } /// Constructs a new vector from the fourth, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wxwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 2])) } } /// Constructs a new vector from the first, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xywz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 2])) } } /// Constructs a new vector from the second, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yywz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 2])) } } /// Constructs a new vector from the third, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zywz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 2])) } } /// Constructs a new vector from the fourth, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wywz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 2])) } } /// Constructs a new vector from the first, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xzwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 2])) } } /// Constructs a new vector from the second, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yzwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 2])) } } /// Constructs a new vector from the third, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zzwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 2])) } } /// Constructs a new vector from the fourth, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wzwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 2])) } } /// Constructs a new vector from the first, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xwwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 2])) } } /// Constructs a new vector from the second, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn ywwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 2])) } } /// Constructs a new vector from the third, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zwwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 2])) } } /// Constructs a new vector from the fourth, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wwwz(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 2])) } } /// Constructs a new vector from the first, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 0, 3])) } } /// Constructs a new vector from the second, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 0, 3])) } } /// Constructs a new vector from the third, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 0, 3])) } } /// Constructs a new vector from the fourth, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 0, 3])) } } /// Constructs a new vector from the first, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 0, 3])) } } /// Constructs a new vector from the second, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 0, 3])) } } /// Constructs a new vector from the third, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 0, 3])) } } /// Constructs a new vector from the fourth, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 0, 3])) } } /// Constructs a new vector from the first, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 0, 3])) } } /// Constructs a new vector from the second, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 0, 3])) } } /// Constructs a new vector from the third, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 0, 3])) } } /// Constructs a new vector from the fourth, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 0, 3])) } } /// Constructs a new vector from the first, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 0, 3])) } } /// Constructs a new vector from the second, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 0, 3])) } } /// Constructs a new vector from the third, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 0, 3])) } } /// Constructs a new vector from the fourth, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwxw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 0, 3])) } } /// Constructs a new vector from the first, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 1, 3])) } } /// Constructs a new vector from the second, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 1, 3])) } } /// Constructs a new vector from the third, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 1, 3])) } } /// Constructs a new vector from the fourth, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 1, 3])) } } /// Constructs a new vector from the first, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 1, 3])) } } /// Constructs a new vector from the second, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 1, 3])) } } /// Constructs a new vector from the third, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 1, 3])) } } /// Constructs a new vector from the fourth, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 1, 3])) } } /// Constructs a new vector from the first, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 1, 3])) } } /// Constructs a new vector from the second, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 1, 3])) } } /// Constructs a new vector from the third, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 1, 3])) } } /// Constructs a new vector from the fourth, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 1, 3])) } } /// Constructs a new vector from the first, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 1, 3])) } } /// Constructs a new vector from the second, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 1, 3])) } } /// Constructs a new vector from the third, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 1, 3])) } } /// Constructs a new vector from the fourth, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwyw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 1, 3])) } } /// Constructs a new vector from the first, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 2, 3])) } } /// Constructs a new vector from the second, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 2, 3])) } } /// Constructs a new vector from the third, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 2, 3])) } } /// Constructs a new vector from the fourth, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 2, 3])) } } /// Constructs a new vector from the first, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 2, 3])) } } /// Constructs a new vector from the second, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 2, 3])) } } /// Constructs a new vector from the third, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 2, 3])) } } /// Constructs a new vector from the fourth, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 2, 3])) } } /// Constructs a new vector from the first, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 2, 3])) } } /// Constructs a new vector from the second, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 2, 3])) } } /// Constructs a new vector from the third, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 2, 3])) } } /// Constructs a new vector from the fourth, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 2, 3])) } } /// Constructs a new vector from the first, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 2, 3])) } } /// Constructs a new vector from the second, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 2, 3])) } } /// Constructs a new vector from the third, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 2, 3])) } } /// Constructs a new vector from the fourth, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwzw(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 2, 3])) } } /// Constructs a new vector from the first, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 0, 3, 3])) } } /// Constructs a new vector from the second, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 0, 3, 3])) } } /// Constructs a new vector from the third, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 0, 3, 3])) } } /// Constructs a new vector from the fourth, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 0, 3, 3])) } } /// Constructs a new vector from the first, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 1, 3, 3])) } } /// Constructs a new vector from the second, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 1, 3, 3])) } } /// Constructs a new vector from the third, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 1, 3, 3])) } } /// Constructs a new vector from the fourth, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 1, 3, 3])) } } /// Constructs a new vector from the first, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 2, 3, 3])) } } /// Constructs a new vector from the second, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 2, 3, 3])) } } /// Constructs a new vector from the third, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 2, 3, 3])) } } /// Constructs a new vector from the fourth, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 2, 3, 3])) } } /// Constructs a new vector from the first, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [0, 3, 3, 3])) } } /// Constructs a new vector from the second, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [1, 3, 3, 3])) } } /// Constructs a new vector from the third, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [2, 3, 3, 3])) } } /// Constructs a new vector from the fourth, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwww(self) -> I32x4 { unsafe { I32x4(simd_shuffle4!(self.0, self.0, [3, 3, 3, 3])) } } } pathfinder_simd-0.5.2/src/extras.rs000064400000000000000000000106311046102023000154340ustar 00000000000000// pathfinder/simd/src/extras.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::default::{F32x2, F32x4, I32x2, I32x4}; use std::ops::{AddAssign, MulAssign, Neg, SubAssign}; // Two 32-bit floats impl F32x2 { // Constructors #[inline] pub fn from_slice(slice: &[f32]) -> F32x2 { F32x2::new(slice[0], slice[1]) } // Accessors #[inline] pub fn x(self) -> f32 { self[0] } #[inline] pub fn y(self) -> f32 { self[1] } // Mutators #[inline] pub fn set_x(&mut self, x: f32) { self[0] = x } #[inline] pub fn set_y(&mut self, y: f32) { self[1] = y } // Comparisons #[inline] pub fn approx_eq(self, other: F32x2, epsilon: f32) -> bool { (self - other).abs().packed_gt(F32x2::splat(epsilon)).all_false() } } impl AddAssign for F32x2 { #[inline] fn add_assign(&mut self, other: F32x2) { *self = *self + other } } impl SubAssign for F32x2 { #[inline] fn sub_assign(&mut self, other: F32x2) { *self = *self - other } } impl MulAssign for F32x2 { #[inline] fn mul_assign(&mut self, other: F32x2) { *self = *self * other } } impl Neg for F32x2 { type Output = F32x2; #[inline] fn neg(self) -> F32x2 { F32x2::default() - self } } // Four 32-bit floats impl F32x4 { // Constructors #[inline] pub fn from_slice(slice: &[f32]) -> F32x4 { F32x4::new(slice[0], slice[1], slice[2], slice[3]) } // Accessors #[inline] pub fn x(self) -> f32 { self[0] } #[inline] pub fn y(self) -> f32 { self[1] } #[inline] pub fn z(self) -> f32 { self[2] } #[inline] pub fn w(self) -> f32 { self[3] } // Mutators #[inline] pub fn set_x(&mut self, x: f32) { self[0] = x } #[inline] pub fn set_y(&mut self, y: f32) { self[1] = y } #[inline] pub fn set_z(&mut self, z: f32) { self[2] = z } #[inline] pub fn set_w(&mut self, w: f32) { self[3] = w } // Comparisons #[inline] pub fn approx_eq(self, other: F32x4, epsilon: f32) -> bool { (self - other).abs().packed_gt(F32x4::splat(epsilon)).all_false() } } impl AddAssign for F32x4 { #[inline] fn add_assign(&mut self, other: F32x4) { *self = *self + other } } impl SubAssign for F32x4 { #[inline] fn sub_assign(&mut self, other: F32x4) { *self = *self - other } } impl MulAssign for F32x4 { #[inline] fn mul_assign(&mut self, other: F32x4) { *self = *self * other } } impl Neg for F32x4 { type Output = F32x4; #[inline] fn neg(self) -> F32x4 { F32x4::default() - self } } // Two 32-bit integers impl AddAssign for I32x2 { #[inline] fn add_assign(&mut self, other: I32x2) { *self = *self + other } } impl SubAssign for I32x2 { #[inline] fn sub_assign(&mut self, other: I32x2) { *self = *self - other } } impl MulAssign for I32x2 { #[inline] fn mul_assign(&mut self, other: I32x2) { *self = *self * other } } impl Neg for I32x2 { type Output = I32x2; #[inline] fn neg(self) -> I32x2 { I32x2::default() - self } } // Four 32-bit integers impl I32x4 { // Accessors #[inline] pub fn x(self) -> i32 { self[0] } #[inline] pub fn y(self) -> i32 { self[1] } #[inline] pub fn z(self) -> i32 { self[2] } #[inline] pub fn w(self) -> i32 { self[3] } } impl AddAssign for I32x4 { #[inline] fn add_assign(&mut self, other: I32x4) { *self = *self + other } } impl SubAssign for I32x4 { #[inline] fn sub_assign(&mut self, other: I32x4) { *self = *self - other } } impl MulAssign for I32x4 { #[inline] fn mul_assign(&mut self, other: I32x4) { *self = *self * other } } impl Neg for I32x4 { type Output = I32x4; #[inline] fn neg(self) -> I32x4 { I32x4::default() - self } } pathfinder_simd-0.5.2/src/lib.rs000064400000000000000000000023421046102023000146740ustar 00000000000000// pathfinder/simd/src/lib.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![cfg_attr(pf_rustc_nightly, feature(link_llvm_intrinsics, platform_intrinsics))] #![cfg_attr(pf_rustc_nightly, feature(simd_ffi, stdsimd))] //! A minimal SIMD abstraction, usable outside of Pathfinder. #[cfg(all(not(feature = "pf-no-simd"), pf_rustc_nightly, target_arch = "aarch64"))] pub use crate::arm as default; #[cfg(any( feature = "pf-no-simd", not(any( target_arch = "x86", target_arch = "x86_64", all(pf_rustc_nightly, target_arch = "aarch64") )) ))] pub use crate::scalar as default; #[cfg(all( not(feature = "pf-no-simd"), any(target_arch = "x86", target_arch = "x86_64") ))] pub use crate::x86 as default; #[cfg(all(pf_rustc_nightly, target_arch = "aarch64"))] pub mod arm; mod extras; pub mod scalar; #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub mod x86; #[cfg(test)] mod test; pathfinder_simd-0.5.2/src/scalar/mod.rs000064400000000000000000000521071046102023000161560ustar 00000000000000// pathfinder/simd/src/scalar.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::f32; use std::fmt::{self, Debug, Formatter}; use std::ops::{Add, BitAnd, BitOr, Div, Index, IndexMut, Mul, Shr, Sub, Not}; mod swizzle_f32x4; mod swizzle_i32x4; // Two 32-bit floats #[derive(Clone, Copy, Debug, Default, PartialEq)] pub struct F32x2(pub [f32; 2]); impl F32x2 { // Constructors #[inline] pub fn new(a: f32, b: f32) -> F32x2 { F32x2([a, b]) } #[inline] pub fn splat(x: f32) -> F32x2 { F32x2([x, x]) } // Basic operations #[inline] pub fn approx_recip(self) -> F32x2 { F32x2([1.0 / self[0], 1.0 / self[1]]) } #[inline] pub fn min(self, other: F32x2) -> F32x2 { F32x2([f32::min(self[0], other[0]), f32::min(self[1], other[1])]) } #[inline] pub fn max(self, other: F32x2) -> F32x2 { F32x2([f32::max(self[0], other[0]), f32::max(self[1], other[1])]) } #[inline] pub fn clamp(self, min: F32x2, max: F32x2) -> F32x2 { self.max(min).min(max) } #[inline] pub fn abs(self) -> F32x2 { F32x2([self[0].abs(), self[1].abs()]) } #[inline] pub fn floor(self) -> F32x2 { F32x2([self[0].floor(), self[1].floor()]) } #[inline] pub fn ceil(self) -> F32x2 { F32x2([self[0].ceil(), self[1].ceil()]) } #[inline] pub fn sqrt(self) -> F32x2 { F32x2([self[0].sqrt(), self[1].sqrt()]) } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x2) -> U32x2 { U32x2([ if self[0] == other[0] { !0 } else { 0 }, if self[1] == other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_gt(self, other: F32x2) -> U32x2 { U32x2([ if self[0] > other[0] { !0 } else { 0 }, if self[1] > other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_lt(self, other: F32x2) -> U32x2 { U32x2([ if self[0] < other[0] { !0 } else { 0 }, if self[1] < other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_le(self, other: F32x2) -> U32x2 { U32x2([ if self[0] <= other[0] { !0 } else { 0 }, if self[1] <= other[1] { !0 } else { 0 }, ]) } // Conversions #[inline] pub fn to_f32x4(self) -> F32x4 { F32x4([self[0] as f32, self[1] as f32, 0.0, 0.0]) } /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x2(self) -> I32x2 { I32x2([self[0].round() as i32, self[1].round() as i32]) } /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x4(self) -> I32x4 { I32x4([self[0].round() as i32, self[1].round() as i32, 0, 0]) } // Swizzle #[inline] pub fn yx(self) -> F32x2 { F32x2([self[1], self[0]]) } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x2) -> F32x4 { F32x4([self[0], self[1], other[0], other[1]]) } } impl Index for F32x2 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { &self.0[index] } } impl IndexMut for F32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { &mut self.0[index] } } impl Add for F32x2 { type Output = F32x2; #[inline] fn add(self, other: F32x2) -> F32x2 { F32x2([self[0] + other[0], self[1] + other[1]]) } } impl Div for F32x2 { type Output = F32x2; #[inline] fn div(self, other: F32x2) -> F32x2 { F32x2([self[0] / other[0], self[1] / other[1]]) } } impl Mul for F32x2 { type Output = F32x2; #[inline] fn mul(self, other: F32x2) -> F32x2 { F32x2([self[0] * other[0], self[1] * other[1]]) } } impl Sub for F32x2 { type Output = F32x2; #[inline] fn sub(self, other: F32x2) -> F32x2 { F32x2([self[0] - other[0], self[1] - other[1]]) } } // Four 32-bit floats #[derive(Clone, Copy, Default, PartialEq)] pub struct F32x4(pub [f32; 4]); impl F32x4 { #[inline] pub fn new(a: f32, b: f32, c: f32, d: f32) -> F32x4 { F32x4([a, b, c, d]) } #[inline] pub fn splat(x: f32) -> F32x4 { F32x4([x; 4]) } // Basic operations #[inline] pub fn approx_recip(self) -> F32x4 { F32x4([1.0 / self[0], 1.0 / self[1], 1.0 / self[2], 1.0 / self[3]]) } #[inline] pub fn min(self, other: F32x4) -> F32x4 { F32x4([ self[0].min(other[0]), self[1].min(other[1]), self[2].min(other[2]), self[3].min(other[3]), ]) } #[inline] pub fn max(self, other: F32x4) -> F32x4 { F32x4([ self[0].max(other[0]), self[1].max(other[1]), self[2].max(other[2]), self[3].max(other[3]), ]) } #[inline] pub fn clamp(self, min: F32x4, max: F32x4) -> F32x4 { self.max(min).min(max) } #[inline] pub fn abs(self) -> F32x4 { F32x4([self[0].abs(), self[1].abs(), self[2].abs(), self[3].abs()]) } #[inline] pub fn floor(self) -> F32x4 { F32x4([ self[0].floor(), self[1].floor(), self[2].floor(), self[3].floor(), ]) } #[inline] pub fn ceil(self) -> F32x4 { F32x4([ self[0].ceil(), self[1].ceil(), self[2].ceil(), self[3].ceil(), ]) } #[inline] pub fn sqrt(self) -> F32x4 { F32x4([ self[0].sqrt(), self[1].sqrt(), self[2].sqrt(), self[3].sqrt(), ]) } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x4) -> U32x4 { U32x4([ if self[0] == other[0] { !0 } else { 0 }, if self[1] == other[1] { !0 } else { 0 }, if self[2] == other[2] { !0 } else { 0 }, if self[3] == other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_gt(self, other: F32x4) -> U32x4 { U32x4([ if self[0] > other[0] { !0 } else { 0 }, if self[1] > other[1] { !0 } else { 0 }, if self[2] > other[2] { !0 } else { 0 }, if self[3] > other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_le(self, other: F32x4) -> U32x4 { U32x4([ if self[0] <= other[0] { !0 } else { 0 }, if self[1] <= other[1] { !0 } else { 0 }, if self[2] <= other[2] { !0 } else { 0 }, if self[3] <= other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_lt(self, other: F32x4) -> U32x4 { U32x4([ if self[0] < other[0] { !0 } else { 0 }, if self[1] < other[1] { !0 } else { 0 }, if self[2] < other[2] { !0 } else { 0 }, if self[3] < other[3] { !0 } else { 0 }, ]) } /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x4(self) -> I32x4 { I32x4([ self[0].round() as i32, self[1].round() as i32, self[2].round() as i32, self[3].round() as i32, ]) } // Swizzle conversions #[inline] pub fn xy(self) -> F32x2 { F32x2([self[0], self[1]]) } #[inline] pub fn xw(self) -> F32x2 { F32x2([self[0], self[3]]) } #[inline] pub fn yx(self) -> F32x2 { F32x2([self[1], self[0]]) } #[inline] pub fn zy(self) -> F32x2 { F32x2([self[2], self[1]]) } #[inline] pub fn zw(self) -> F32x2 { F32x2([self[2], self[3]]) } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x4) -> F32x4 { F32x4([self[0], self[1], other[0], other[1]]) } #[inline] pub fn concat_xy_zw(self, other: F32x4) -> F32x4 { F32x4([self[0], self[1], other[2], other[3]]) } #[inline] pub fn concat_zw_zw(self, other: F32x4) -> F32x4 { F32x4([self[2], self[3], other[2], other[3]]) } #[inline] pub fn concat_wz_yx(self, other: F32x4) -> F32x4 { F32x4([self[3], self[2], other[1], other[0]]) } } impl Index for F32x4 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { &self.0[index] } } impl IndexMut for F32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { &mut self.0[index] } } impl Debug for F32x4 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}, {}, {}>", self[0], self[1], self[2], self[3]) } } impl Add for F32x4 { type Output = F32x4; #[inline] fn add(self, other: F32x4) -> F32x4 { F32x4([ self[0] + other[0], self[1] + other[1], self[2] + other[2], self[3] + other[3], ]) } } impl Div for F32x4 { type Output = F32x4; #[inline] fn div(self, other: F32x4) -> F32x4 { F32x4([ self[0] / other[0], self[1] / other[1], self[2] / other[2], self[3] / other[3], ]) } } impl Mul for F32x4 { type Output = F32x4; #[inline] fn mul(self, other: F32x4) -> F32x4 { F32x4([ self[0] * other[0], self[1] * other[1], self[2] * other[2], self[3] * other[3], ]) } } impl Sub for F32x4 { type Output = F32x4; #[inline] fn sub(self, other: F32x4) -> F32x4 { F32x4([ self[0] - other[0], self[1] - other[1], self[2] - other[2], self[3] - other[3], ]) } } // Two 32-bit signed integers #[derive(Clone, Copy, Default, Debug, PartialEq)] pub struct I32x2([i32; 2]); impl I32x2 { #[inline] pub fn new(x: i32, y: i32) -> I32x2 { I32x2([x, y]) } #[inline] pub fn splat(x: i32) -> I32x2 { I32x2([x, x]) } // Accessors #[inline] pub fn x(self) -> i32 { self[0] } #[inline] pub fn y(self) -> i32 { self[1] } #[inline] pub fn concat_xy_xy(self, other: I32x2) -> I32x4 { I32x4([self[0], self[1], other[0], other[1]]) } #[inline] pub fn min(self, other: I32x2) -> I32x2 { I32x2([ self[0].min(other[0]), self[1].min(other[1]), ]) } #[inline] pub fn max(self, other: I32x2) -> I32x2 { I32x2([ self[0].max(other[0]), self[1].max(other[1]), ]) } // Packed comparisons #[inline] pub fn packed_eq(self, other: I32x2) -> U32x2 { U32x2([ if self[0] == other[0] { !0 } else { 0 }, if self[1] == other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_gt(self, other: I32x2) -> U32x2 { U32x2([ if self[0] > other[0] { !0 } else { 0 }, if self[1] > other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_le(self, other: I32x2) -> U32x2 { U32x2([ if self[0] <= other[0] { !0 } else { 0 }, if self[1] <= other[1] { !0 } else { 0 }, ]) } #[inline] pub fn packed_lt(self, other: I32x2) -> U32x2 { U32x2([ if self[0] < other[0] { !0 } else { 0 }, if self[1] < other[1] { !0 } else { 0 }, ]) } // Conversions /// Converts these packed integers to floats. #[inline] pub fn to_f32x2(self) -> F32x2 { F32x2([self[0] as f32, self[1] as f32]) } } impl Index for I32x2 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { &self.0[index] } } impl IndexMut for I32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { &mut self.0[index] } } impl Add for I32x2 { type Output = I32x2; #[inline] fn add(self, other: I32x2) -> I32x2 { I32x2([self[0] + other[0], self[1] + other[1]]) } } impl Sub for I32x2 { type Output = I32x2; #[inline] fn sub(self, other: I32x2) -> I32x2 { I32x2([self[0] - other[0], self[1] - other[1]]) } } impl Mul for I32x2 { type Output = I32x2; #[inline] fn mul(self, other: I32x2) -> I32x2 { I32x2([self[0] * other[0], self[1] * other[1]]) } } // Four 32-bit signed integers #[derive(Clone, Copy, Default, Debug, PartialEq)] pub struct I32x4([i32; 4]); impl I32x4 { #[inline] pub fn new(a: i32, b: i32, c: i32, d: i32) -> I32x4 { I32x4([a, b, c, d]) } #[inline] pub fn splat(x: i32) -> I32x4 { I32x4([x; 4]) } // Basic operations #[inline] pub fn min(self, other: I32x4) -> I32x4 { I32x4([ self[0].min(other[0]), self[1].min(other[1]), self[2].min(other[2]), self[3].min(other[3]), ]) } #[inline] pub fn max(self, other: I32x4) -> I32x4 { I32x4([ self[0].max(other[0]), self[1].max(other[1]), self[2].max(other[2]), self[3].max(other[3]), ]) } // Packed comparisons #[inline] pub fn packed_eq(self, other: I32x4) -> U32x4 { U32x4([ if self[0] == other[0] { !0 } else { 0 }, if self[1] == other[1] { !0 } else { 0 }, if self[2] == other[2] { !0 } else { 0 }, if self[3] == other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_gt(self, other: I32x4) -> U32x4 { U32x4([ if self[0] > other[0] { !0 } else { 0 }, if self[1] > other[1] { !0 } else { 0 }, if self[2] > other[2] { !0 } else { 0 }, if self[3] > other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_le(self, other: I32x4) -> U32x4 { U32x4([ if self[0] <= other[0] { !0 } else { 0 }, if self[1] <= other[1] { !0 } else { 0 }, if self[2] <= other[2] { !0 } else { 0 }, if self[3] <= other[3] { !0 } else { 0 }, ]) } #[inline] pub fn packed_lt(self, other: I32x4) -> U32x4 { U32x4([ if self[0] < other[0] { !0 } else { 0 }, if self[1] < other[1] { !0 } else { 0 }, if self[2] < other[2] { !0 } else { 0 }, if self[3] < other[3] { !0 } else { 0 }, ]) } // Concatenations #[inline] pub fn concat_xy_xy(self, other: I32x4) -> I32x4 { I32x4([self[0], self[1], other[0], other[1]]) } #[inline] pub fn concat_zw_zw(self, other: I32x4) -> I32x4 { I32x4([self[2], self[3], other[2], other[3]]) } // Swizzle conversions #[inline] pub fn xy(self) -> I32x2 { I32x2([self[0], self[1]]) } #[inline] pub fn xw(self) -> I32x2 { I32x2([self[0], self[3]]) } #[inline] pub fn zy(self) -> I32x2 { I32x2([self[2], self[1]]) } #[inline] pub fn zw(self) -> I32x2 { I32x2([self[2], self[3]]) } // Conversions /// Converts these packed integers to floats. #[inline] pub fn to_f32x4(self) -> F32x4 { F32x4([ self[0] as f32, self[1] as f32, self[2] as f32, self[3] as f32, ]) } /// Converts these packed signed integers to unsigned integers. /// /// Overflowing values will wrap around. /// /// FIXME(pcwalton): Should they? This will assert on overflow in debug. #[inline] pub fn to_u32x4(self) -> U32x4 { U32x4([self[0] as u32, self[1] as u32, self[2] as u32, self[3] as u32]) } } impl Index for I32x4 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { &self.0[index] } } impl IndexMut for I32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { &mut self.0[index] } } impl Add for I32x4 { type Output = I32x4; #[inline] fn add(self, other: I32x4) -> I32x4 { I32x4([ self[0] + other[0], self[1] + other[1], self[2] + other[2], self[3] + other[3], ]) } } impl Sub for I32x4 { type Output = I32x4; #[inline] fn sub(self, other: I32x4) -> I32x4 { I32x4([ self[0] - other[0], self[1] - other[1], self[2] - other[2], self[3] - other[3], ]) } } impl Mul for I32x4 { type Output = I32x4; #[inline] fn mul(self, other: I32x4) -> I32x4 { I32x4([ self[0] * other[0], self[1] * other[1], self[2] * other[2], self[3] * other[3], ]) } } impl BitAnd for I32x4 { type Output = I32x4; #[inline] fn bitand(self, other: I32x4) -> I32x4 { I32x4([self[0] & other[0], self[1] & other[1], self[2] & other[2], self[3] & other[3]]) } } impl BitOr for I32x4 { type Output = I32x4; #[inline] fn bitor(self, other: I32x4) -> I32x4 { I32x4([self[0] | other[0], self[1] | other[1], self[2] | other[2], self[3] | other[3]]) } } impl Shr for I32x4 { type Output = I32x4; #[inline] fn shr(self, other: I32x4) -> I32x4 { I32x4([ self[0] >> other[0], self[1] >> other[1], self[2] >> other[2], self[3] >> other[3], ]) } } // Two 32-bit unsigned integers #[derive(Clone, Copy)] pub struct U32x2(pub [u32; 2]); impl U32x2 { #[inline] pub fn new(x: u32, y: u32) -> U32x2 { U32x2([x, y]) } #[inline] pub fn splat(x: u32) -> U32x2 { U32x2::new(x, x) } /// Returns true if both booleans in this vector are true. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(&self) -> bool { self[0] == !0 && self[1] == !0 } /// Returns true if both booleans in this vector are false. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(&self) -> bool { self[0] == 0 && self[1] == 0 } #[inline] pub fn to_i32x2(self) -> I32x2 { I32x2::new(self[0] as i32, self[1] as i32) } } impl BitAnd for U32x2 { type Output = U32x2; #[inline] fn bitand(self, other: U32x2) -> U32x2 { U32x2([self[0] & other[0], self[1] & other[1]]) } } impl BitOr for U32x2 { type Output = U32x2; #[inline] fn bitor(self, other: U32x2) -> U32x2 { U32x2([self[0] | other[0], self[1] | other[1]]) } } impl Not for U32x2 { type Output = U32x2; #[inline] fn not(self) -> U32x2 { U32x2([!self[0], !self[1]]) } } impl Index for U32x2 { type Output = u32; #[inline] fn index(&self, index: usize) -> &u32 { &self.0[index] } } // Four 32-bit unsigned integers #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub struct U32x4(pub [u32; 4]); impl U32x4 { pub fn new(a: u32, b: u32, c: u32, d: u32) -> U32x4 { U32x4([a, b, c, d]) } // Conversions /// Converts these packed unsigned integers to signed integers. /// /// Overflowing values will wrap around. /// /// FIXME(pcwalton): Should they? This will assert on overflow in debug. #[inline] pub fn to_i32x4(self) -> I32x4 { I32x4([self[0] as i32, self[1] as i32, self[2] as i32, self[3] as i32]) } // Basic operations /// Returns true if all four booleans in this vector are true. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(&self) -> bool { self[0] == !0 && self[1] == !0 && self[2] == !0 && self[3] == !0 } /// Returns true if all four booleans in this vector are false. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(&self) -> bool { self[0] == 0 && self[1] == 0 && self[2] == 0 && self[3] == 0 } } impl Index for U32x4 { type Output = u32; #[inline] fn index(&self, index: usize) -> &u32 { &self.0[index] } } impl Shr for U32x4 { type Output = U32x4; #[inline] fn shr(self, amount: u32) -> U32x4 { U32x4([self[0] >> amount, self[1] >> amount, self[2] >> amount, self[3] >> amount]) } } pathfinder_simd-0.5.2/src/scalar/swizzle_f32x4.rs000064400000000000000000001607031046102023000200360ustar 00000000000000// pathfinder/simd/src/scalar/swizzle_f32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::scalar::F32x4; impl F32x4 { /// Constructs a new vector from the first, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn xxxx(self) -> F32x4 { F32x4([self[0], self[0], self[0], self[0]]) } /// Constructs a new vector from the second, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn yxxx(self) -> F32x4 { F32x4([self[1], self[0], self[0], self[0]]) } /// Constructs a new vector from the third, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn zxxx(self) -> F32x4 { F32x4([self[2], self[0], self[0], self[0]]) } /// Constructs a new vector from the fourth, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn wxxx(self) -> F32x4 { F32x4([self[3], self[0], self[0], self[0]]) } /// Constructs a new vector from the first, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn xyxx(self) -> F32x4 { F32x4([self[0], self[1], self[0], self[0]]) } /// Constructs a new vector from the second, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn yyxx(self) -> F32x4 { F32x4([self[1], self[1], self[0], self[0]]) } /// Constructs a new vector from the third, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn zyxx(self) -> F32x4 { F32x4([self[2], self[1], self[0], self[0]]) } /// Constructs a new vector from the fourth, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn wyxx(self) -> F32x4 { F32x4([self[3], self[1], self[0], self[0]]) } /// Constructs a new vector from the first, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn xzxx(self) -> F32x4 { F32x4([self[0], self[2], self[0], self[0]]) } /// Constructs a new vector from the second, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn yzxx(self) -> F32x4 { F32x4([self[1], self[2], self[0], self[0]]) } /// Constructs a new vector from the third, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn zzxx(self) -> F32x4 { F32x4([self[2], self[2], self[0], self[0]]) } /// Constructs a new vector from the fourth, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn wzxx(self) -> F32x4 { F32x4([self[3], self[2], self[0], self[0]]) } /// Constructs a new vector from the first, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn xwxx(self) -> F32x4 { F32x4([self[0], self[3], self[0], self[0]]) } /// Constructs a new vector from the second, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn ywxx(self) -> F32x4 { F32x4([self[1], self[3], self[0], self[0]]) } /// Constructs a new vector from the third, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn zwxx(self) -> F32x4 { F32x4([self[2], self[3], self[0], self[0]]) } /// Constructs a new vector from the fourth, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn wwxx(self) -> F32x4 { F32x4([self[3], self[3], self[0], self[0]]) } /// Constructs a new vector from the first, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn xxyx(self) -> F32x4 { F32x4([self[0], self[0], self[1], self[0]]) } /// Constructs a new vector from the second, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn yxyx(self) -> F32x4 { F32x4([self[1], self[0], self[1], self[0]]) } /// Constructs a new vector from the third, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn zxyx(self) -> F32x4 { F32x4([self[2], self[0], self[1], self[0]]) } /// Constructs a new vector from the fourth, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn wxyx(self) -> F32x4 { F32x4([self[3], self[0], self[1], self[0]]) } /// Constructs a new vector from the first, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn xyyx(self) -> F32x4 { F32x4([self[0], self[1], self[1], self[0]]) } /// Constructs a new vector from the second, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn yyyx(self) -> F32x4 { F32x4([self[1], self[1], self[1], self[0]]) } /// Constructs a new vector from the third, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn zyyx(self) -> F32x4 { F32x4([self[2], self[1], self[1], self[0]]) } /// Constructs a new vector from the fourth, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn wyyx(self) -> F32x4 { F32x4([self[3], self[1], self[1], self[0]]) } /// Constructs a new vector from the first, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn xzyx(self) -> F32x4 { F32x4([self[0], self[2], self[1], self[0]]) } /// Constructs a new vector from the second, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn yzyx(self) -> F32x4 { F32x4([self[1], self[2], self[1], self[0]]) } /// Constructs a new vector from the third, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn zzyx(self) -> F32x4 { F32x4([self[2], self[2], self[1], self[0]]) } /// Constructs a new vector from the fourth, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn wzyx(self) -> F32x4 { F32x4([self[3], self[2], self[1], self[0]]) } /// Constructs a new vector from the first, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn xwyx(self) -> F32x4 { F32x4([self[0], self[3], self[1], self[0]]) } /// Constructs a new vector from the second, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn ywyx(self) -> F32x4 { F32x4([self[1], self[3], self[1], self[0]]) } /// Constructs a new vector from the third, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn zwyx(self) -> F32x4 { F32x4([self[2], self[3], self[1], self[0]]) } /// Constructs a new vector from the fourth, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn wwyx(self) -> F32x4 { F32x4([self[3], self[3], self[1], self[0]]) } /// Constructs a new vector from the first, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn xxzx(self) -> F32x4 { F32x4([self[0], self[0], self[2], self[0]]) } /// Constructs a new vector from the second, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn yxzx(self) -> F32x4 { F32x4([self[1], self[0], self[2], self[0]]) } /// Constructs a new vector from the third, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn zxzx(self) -> F32x4 { F32x4([self[2], self[0], self[2], self[0]]) } /// Constructs a new vector from the fourth, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn wxzx(self) -> F32x4 { F32x4([self[3], self[0], self[2], self[0]]) } /// Constructs a new vector from the first, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn xyzx(self) -> F32x4 { F32x4([self[0], self[1], self[2], self[0]]) } /// Constructs a new vector from the second, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn yyzx(self) -> F32x4 { F32x4([self[1], self[1], self[2], self[0]]) } /// Constructs a new vector from the third, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn zyzx(self) -> F32x4 { F32x4([self[2], self[1], self[2], self[0]]) } /// Constructs a new vector from the fourth, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn wyzx(self) -> F32x4 { F32x4([self[3], self[1], self[2], self[0]]) } /// Constructs a new vector from the first, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn xzzx(self) -> F32x4 { F32x4([self[0], self[2], self[2], self[0]]) } /// Constructs a new vector from the second, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn yzzx(self) -> F32x4 { F32x4([self[1], self[2], self[2], self[0]]) } /// Constructs a new vector from the third, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn zzzx(self) -> F32x4 { F32x4([self[2], self[2], self[2], self[0]]) } /// Constructs a new vector from the fourth, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn wzzx(self) -> F32x4 { F32x4([self[3], self[2], self[2], self[0]]) } /// Constructs a new vector from the first, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn xwzx(self) -> F32x4 { F32x4([self[0], self[3], self[2], self[0]]) } /// Constructs a new vector from the second, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn ywzx(self) -> F32x4 { F32x4([self[1], self[3], self[2], self[0]]) } /// Constructs a new vector from the third, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn zwzx(self) -> F32x4 { F32x4([self[2], self[3], self[2], self[0]]) } /// Constructs a new vector from the fourth, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn wwzx(self) -> F32x4 { F32x4([self[3], self[3], self[2], self[0]]) } /// Constructs a new vector from the first, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xxwx(self) -> F32x4 { F32x4([self[0], self[0], self[3], self[0]]) } /// Constructs a new vector from the second, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yxwx(self) -> F32x4 { F32x4([self[1], self[0], self[3], self[0]]) } /// Constructs a new vector from the third, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zxwx(self) -> F32x4 { F32x4([self[2], self[0], self[3], self[0]]) } /// Constructs a new vector from the fourth, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wxwx(self) -> F32x4 { F32x4([self[3], self[0], self[3], self[0]]) } /// Constructs a new vector from the first, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xywx(self) -> F32x4 { F32x4([self[0], self[1], self[3], self[0]]) } /// Constructs a new vector from the second, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yywx(self) -> F32x4 { F32x4([self[1], self[1], self[3], self[0]]) } /// Constructs a new vector from the third, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zywx(self) -> F32x4 { F32x4([self[2], self[1], self[3], self[0]]) } /// Constructs a new vector from the fourth, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wywx(self) -> F32x4 { F32x4([self[3], self[1], self[3], self[0]]) } /// Constructs a new vector from the first, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xzwx(self) -> F32x4 { F32x4([self[0], self[2], self[3], self[0]]) } /// Constructs a new vector from the second, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yzwx(self) -> F32x4 { F32x4([self[1], self[2], self[3], self[0]]) } /// Constructs a new vector from the third, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zzwx(self) -> F32x4 { F32x4([self[2], self[2], self[3], self[0]]) } /// Constructs a new vector from the fourth, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wzwx(self) -> F32x4 { F32x4([self[3], self[2], self[3], self[0]]) } /// Constructs a new vector from the first, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xwwx(self) -> F32x4 { F32x4([self[0], self[3], self[3], self[0]]) } /// Constructs a new vector from the second, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn ywwx(self) -> F32x4 { F32x4([self[1], self[3], self[3], self[0]]) } /// Constructs a new vector from the third, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zwwx(self) -> F32x4 { F32x4([self[2], self[3], self[3], self[0]]) } /// Constructs a new vector from the fourth, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wwwx(self) -> F32x4 { F32x4([self[3], self[3], self[3], self[0]]) } /// Constructs a new vector from the first, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn xxxy(self) -> F32x4 { F32x4([self[0], self[0], self[0], self[1]]) } /// Constructs a new vector from the second, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn yxxy(self) -> F32x4 { F32x4([self[1], self[0], self[0], self[1]]) } /// Constructs a new vector from the third, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn zxxy(self) -> F32x4 { F32x4([self[2], self[0], self[0], self[1]]) } /// Constructs a new vector from the fourth, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn wxxy(self) -> F32x4 { F32x4([self[3], self[0], self[0], self[1]]) } /// Constructs a new vector from the first, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn xyxy(self) -> F32x4 { F32x4([self[0], self[1], self[0], self[1]]) } /// Constructs a new vector from the second, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn yyxy(self) -> F32x4 { F32x4([self[1], self[1], self[0], self[1]]) } /// Constructs a new vector from the third, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn zyxy(self) -> F32x4 { F32x4([self[2], self[1], self[0], self[1]]) } /// Constructs a new vector from the fourth, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn wyxy(self) -> F32x4 { F32x4([self[3], self[1], self[0], self[1]]) } /// Constructs a new vector from the first, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn xzxy(self) -> F32x4 { F32x4([self[0], self[2], self[0], self[1]]) } /// Constructs a new vector from the second, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn yzxy(self) -> F32x4 { F32x4([self[1], self[2], self[0], self[1]]) } /// Constructs a new vector from the third, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn zzxy(self) -> F32x4 { F32x4([self[2], self[2], self[0], self[1]]) } /// Constructs a new vector from the fourth, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn wzxy(self) -> F32x4 { F32x4([self[3], self[2], self[0], self[1]]) } /// Constructs a new vector from the first, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn xwxy(self) -> F32x4 { F32x4([self[0], self[3], self[0], self[1]]) } /// Constructs a new vector from the second, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn ywxy(self) -> F32x4 { F32x4([self[1], self[3], self[0], self[1]]) } /// Constructs a new vector from the third, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn zwxy(self) -> F32x4 { F32x4([self[2], self[3], self[0], self[1]]) } /// Constructs a new vector from the fourth, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn wwxy(self) -> F32x4 { F32x4([self[3], self[3], self[0], self[1]]) } /// Constructs a new vector from the first, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn xxyy(self) -> F32x4 { F32x4([self[0], self[0], self[1], self[1]]) } /// Constructs a new vector from the second, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn yxyy(self) -> F32x4 { F32x4([self[1], self[0], self[1], self[1]]) } /// Constructs a new vector from the third, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn zxyy(self) -> F32x4 { F32x4([self[2], self[0], self[1], self[1]]) } /// Constructs a new vector from the fourth, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn wxyy(self) -> F32x4 { F32x4([self[3], self[0], self[1], self[1]]) } /// Constructs a new vector from the first, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn xyyy(self) -> F32x4 { F32x4([self[0], self[1], self[1], self[1]]) } /// Constructs a new vector from the second, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn yyyy(self) -> F32x4 { F32x4([self[1], self[1], self[1], self[1]]) } /// Constructs a new vector from the third, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn zyyy(self) -> F32x4 { F32x4([self[2], self[1], self[1], self[1]]) } /// Constructs a new vector from the fourth, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn wyyy(self) -> F32x4 { F32x4([self[3], self[1], self[1], self[1]]) } /// Constructs a new vector from the first, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn xzyy(self) -> F32x4 { F32x4([self[0], self[2], self[1], self[1]]) } /// Constructs a new vector from the second, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn yzyy(self) -> F32x4 { F32x4([self[1], self[2], self[1], self[1]]) } /// Constructs a new vector from the third, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn zzyy(self) -> F32x4 { F32x4([self[2], self[2], self[1], self[1]]) } /// Constructs a new vector from the fourth, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn wzyy(self) -> F32x4 { F32x4([self[3], self[2], self[1], self[1]]) } /// Constructs a new vector from the first, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn xwyy(self) -> F32x4 { F32x4([self[0], self[3], self[1], self[1]]) } /// Constructs a new vector from the second, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn ywyy(self) -> F32x4 { F32x4([self[1], self[3], self[1], self[1]]) } /// Constructs a new vector from the third, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn zwyy(self) -> F32x4 { F32x4([self[2], self[3], self[1], self[1]]) } /// Constructs a new vector from the fourth, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn wwyy(self) -> F32x4 { F32x4([self[3], self[3], self[1], self[1]]) } /// Constructs a new vector from the first, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn xxzy(self) -> F32x4 { F32x4([self[0], self[0], self[2], self[1]]) } /// Constructs a new vector from the second, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn yxzy(self) -> F32x4 { F32x4([self[1], self[0], self[2], self[1]]) } /// Constructs a new vector from the third, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn zxzy(self) -> F32x4 { F32x4([self[2], self[0], self[2], self[1]]) } /// Constructs a new vector from the fourth, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn wxzy(self) -> F32x4 { F32x4([self[3], self[0], self[2], self[1]]) } /// Constructs a new vector from the first, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn xyzy(self) -> F32x4 { F32x4([self[0], self[1], self[2], self[1]]) } /// Constructs a new vector from the second, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn yyzy(self) -> F32x4 { F32x4([self[1], self[1], self[2], self[1]]) } /// Constructs a new vector from the third, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn zyzy(self) -> F32x4 { F32x4([self[2], self[1], self[2], self[1]]) } /// Constructs a new vector from the fourth, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn wyzy(self) -> F32x4 { F32x4([self[3], self[1], self[2], self[1]]) } /// Constructs a new vector from the first, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn xzzy(self) -> F32x4 { F32x4([self[0], self[2], self[2], self[1]]) } /// Constructs a new vector from the second, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn yzzy(self) -> F32x4 { F32x4([self[1], self[2], self[2], self[1]]) } /// Constructs a new vector from the third, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn zzzy(self) -> F32x4 { F32x4([self[2], self[2], self[2], self[1]]) } /// Constructs a new vector from the fourth, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn wzzy(self) -> F32x4 { F32x4([self[3], self[2], self[2], self[1]]) } /// Constructs a new vector from the first, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn xwzy(self) -> F32x4 { F32x4([self[0], self[3], self[2], self[1]]) } /// Constructs a new vector from the second, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn ywzy(self) -> F32x4 { F32x4([self[1], self[3], self[2], self[1]]) } /// Constructs a new vector from the third, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn zwzy(self) -> F32x4 { F32x4([self[2], self[3], self[2], self[1]]) } /// Constructs a new vector from the fourth, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn wwzy(self) -> F32x4 { F32x4([self[3], self[3], self[2], self[1]]) } /// Constructs a new vector from the first, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xxwy(self) -> F32x4 { F32x4([self[0], self[0], self[3], self[1]]) } /// Constructs a new vector from the second, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yxwy(self) -> F32x4 { F32x4([self[1], self[0], self[3], self[1]]) } /// Constructs a new vector from the third, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zxwy(self) -> F32x4 { F32x4([self[2], self[0], self[3], self[1]]) } /// Constructs a new vector from the fourth, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wxwy(self) -> F32x4 { F32x4([self[3], self[0], self[3], self[1]]) } /// Constructs a new vector from the first, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xywy(self) -> F32x4 { F32x4([self[0], self[1], self[3], self[1]]) } /// Constructs a new vector from the second, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yywy(self) -> F32x4 { F32x4([self[1], self[1], self[3], self[1]]) } /// Constructs a new vector from the third, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zywy(self) -> F32x4 { F32x4([self[2], self[1], self[3], self[1]]) } /// Constructs a new vector from the fourth, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wywy(self) -> F32x4 { F32x4([self[3], self[1], self[3], self[1]]) } /// Constructs a new vector from the first, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xzwy(self) -> F32x4 { F32x4([self[0], self[2], self[3], self[1]]) } /// Constructs a new vector from the second, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yzwy(self) -> F32x4 { F32x4([self[1], self[2], self[3], self[1]]) } /// Constructs a new vector from the third, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zzwy(self) -> F32x4 { F32x4([self[2], self[2], self[3], self[1]]) } /// Constructs a new vector from the fourth, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wzwy(self) -> F32x4 { F32x4([self[3], self[2], self[3], self[1]]) } /// Constructs a new vector from the first, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xwwy(self) -> F32x4 { F32x4([self[0], self[3], self[3], self[1]]) } /// Constructs a new vector from the second, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn ywwy(self) -> F32x4 { F32x4([self[1], self[3], self[3], self[1]]) } /// Constructs a new vector from the third, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zwwy(self) -> F32x4 { F32x4([self[2], self[3], self[3], self[1]]) } /// Constructs a new vector from the fourth, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wwwy(self) -> F32x4 { F32x4([self[3], self[3], self[3], self[1]]) } /// Constructs a new vector from the first, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn xxxz(self) -> F32x4 { F32x4([self[0], self[0], self[0], self[2]]) } /// Constructs a new vector from the second, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn yxxz(self) -> F32x4 { F32x4([self[1], self[0], self[0], self[2]]) } /// Constructs a new vector from the third, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn zxxz(self) -> F32x4 { F32x4([self[2], self[0], self[0], self[2]]) } /// Constructs a new vector from the fourth, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn wxxz(self) -> F32x4 { F32x4([self[3], self[0], self[0], self[2]]) } /// Constructs a new vector from the first, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn xyxz(self) -> F32x4 { F32x4([self[0], self[1], self[0], self[2]]) } /// Constructs a new vector from the second, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn yyxz(self) -> F32x4 { F32x4([self[1], self[1], self[0], self[2]]) } /// Constructs a new vector from the third, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn zyxz(self) -> F32x4 { F32x4([self[2], self[1], self[0], self[2]]) } /// Constructs a new vector from the fourth, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn wyxz(self) -> F32x4 { F32x4([self[3], self[1], self[0], self[2]]) } /// Constructs a new vector from the first, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn xzxz(self) -> F32x4 { F32x4([self[0], self[2], self[0], self[2]]) } /// Constructs a new vector from the second, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn yzxz(self) -> F32x4 { F32x4([self[1], self[2], self[0], self[2]]) } /// Constructs a new vector from the third, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn zzxz(self) -> F32x4 { F32x4([self[2], self[2], self[0], self[2]]) } /// Constructs a new vector from the fourth, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn wzxz(self) -> F32x4 { F32x4([self[3], self[2], self[0], self[2]]) } /// Constructs a new vector from the first, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn xwxz(self) -> F32x4 { F32x4([self[0], self[3], self[0], self[2]]) } /// Constructs a new vector from the second, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn ywxz(self) -> F32x4 { F32x4([self[1], self[3], self[0], self[2]]) } /// Constructs a new vector from the third, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn zwxz(self) -> F32x4 { F32x4([self[2], self[3], self[0], self[2]]) } /// Constructs a new vector from the fourth, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn wwxz(self) -> F32x4 { F32x4([self[3], self[3], self[0], self[2]]) } /// Constructs a new vector from the first, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn xxyz(self) -> F32x4 { F32x4([self[0], self[0], self[1], self[2]]) } /// Constructs a new vector from the second, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn yxyz(self) -> F32x4 { F32x4([self[1], self[0], self[1], self[2]]) } /// Constructs a new vector from the third, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn zxyz(self) -> F32x4 { F32x4([self[2], self[0], self[1], self[2]]) } /// Constructs a new vector from the fourth, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn wxyz(self) -> F32x4 { F32x4([self[3], self[0], self[1], self[2]]) } /// Constructs a new vector from the first, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn xyyz(self) -> F32x4 { F32x4([self[0], self[1], self[1], self[2]]) } /// Constructs a new vector from the second, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn yyyz(self) -> F32x4 { F32x4([self[1], self[1], self[1], self[2]]) } /// Constructs a new vector from the third, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn zyyz(self) -> F32x4 { F32x4([self[2], self[1], self[1], self[2]]) } /// Constructs a new vector from the fourth, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn wyyz(self) -> F32x4 { F32x4([self[3], self[1], self[1], self[2]]) } /// Constructs a new vector from the first, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn xzyz(self) -> F32x4 { F32x4([self[0], self[2], self[1], self[2]]) } /// Constructs a new vector from the second, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn yzyz(self) -> F32x4 { F32x4([self[1], self[2], self[1], self[2]]) } /// Constructs a new vector from the third, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn zzyz(self) -> F32x4 { F32x4([self[2], self[2], self[1], self[2]]) } /// Constructs a new vector from the fourth, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn wzyz(self) -> F32x4 { F32x4([self[3], self[2], self[1], self[2]]) } /// Constructs a new vector from the first, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn xwyz(self) -> F32x4 { F32x4([self[0], self[3], self[1], self[2]]) } /// Constructs a new vector from the second, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn ywyz(self) -> F32x4 { F32x4([self[1], self[3], self[1], self[2]]) } /// Constructs a new vector from the third, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn zwyz(self) -> F32x4 { F32x4([self[2], self[3], self[1], self[2]]) } /// Constructs a new vector from the fourth, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn wwyz(self) -> F32x4 { F32x4([self[3], self[3], self[1], self[2]]) } /// Constructs a new vector from the first, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn xxzz(self) -> F32x4 { F32x4([self[0], self[0], self[2], self[2]]) } /// Constructs a new vector from the second, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn yxzz(self) -> F32x4 { F32x4([self[1], self[0], self[2], self[2]]) } /// Constructs a new vector from the third, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn zxzz(self) -> F32x4 { F32x4([self[2], self[0], self[2], self[2]]) } /// Constructs a new vector from the fourth, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn wxzz(self) -> F32x4 { F32x4([self[3], self[0], self[2], self[2]]) } /// Constructs a new vector from the first, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn xyzz(self) -> F32x4 { F32x4([self[0], self[1], self[2], self[2]]) } /// Constructs a new vector from the second, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn yyzz(self) -> F32x4 { F32x4([self[1], self[1], self[2], self[2]]) } /// Constructs a new vector from the third, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn zyzz(self) -> F32x4 { F32x4([self[2], self[1], self[2], self[2]]) } /// Constructs a new vector from the fourth, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn wyzz(self) -> F32x4 { F32x4([self[3], self[1], self[2], self[2]]) } /// Constructs a new vector from the first, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn xzzz(self) -> F32x4 { F32x4([self[0], self[2], self[2], self[2]]) } /// Constructs a new vector from the second, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn yzzz(self) -> F32x4 { F32x4([self[1], self[2], self[2], self[2]]) } /// Constructs a new vector from the third, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn zzzz(self) -> F32x4 { F32x4([self[2], self[2], self[2], self[2]]) } /// Constructs a new vector from the fourth, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn wzzz(self) -> F32x4 { F32x4([self[3], self[2], self[2], self[2]]) } /// Constructs a new vector from the first, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn xwzz(self) -> F32x4 { F32x4([self[0], self[3], self[2], self[2]]) } /// Constructs a new vector from the second, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn ywzz(self) -> F32x4 { F32x4([self[1], self[3], self[2], self[2]]) } /// Constructs a new vector from the third, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn zwzz(self) -> F32x4 { F32x4([self[2], self[3], self[2], self[2]]) } /// Constructs a new vector from the fourth, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn wwzz(self) -> F32x4 { F32x4([self[3], self[3], self[2], self[2]]) } /// Constructs a new vector from the first, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xxwz(self) -> F32x4 { F32x4([self[0], self[0], self[3], self[2]]) } /// Constructs a new vector from the second, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yxwz(self) -> F32x4 { F32x4([self[1], self[0], self[3], self[2]]) } /// Constructs a new vector from the third, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zxwz(self) -> F32x4 { F32x4([self[2], self[0], self[3], self[2]]) } /// Constructs a new vector from the fourth, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wxwz(self) -> F32x4 { F32x4([self[3], self[0], self[3], self[2]]) } /// Constructs a new vector from the first, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xywz(self) -> F32x4 { F32x4([self[0], self[1], self[3], self[2]]) } /// Constructs a new vector from the second, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yywz(self) -> F32x4 { F32x4([self[1], self[1], self[3], self[2]]) } /// Constructs a new vector from the third, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zywz(self) -> F32x4 { F32x4([self[2], self[1], self[3], self[2]]) } /// Constructs a new vector from the fourth, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wywz(self) -> F32x4 { F32x4([self[3], self[1], self[3], self[2]]) } /// Constructs a new vector from the first, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xzwz(self) -> F32x4 { F32x4([self[0], self[2], self[3], self[2]]) } /// Constructs a new vector from the second, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yzwz(self) -> F32x4 { F32x4([self[1], self[2], self[3], self[2]]) } /// Constructs a new vector from the third, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zzwz(self) -> F32x4 { F32x4([self[2], self[2], self[3], self[2]]) } /// Constructs a new vector from the fourth, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wzwz(self) -> F32x4 { F32x4([self[3], self[2], self[3], self[2]]) } /// Constructs a new vector from the first, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xwwz(self) -> F32x4 { F32x4([self[0], self[3], self[3], self[2]]) } /// Constructs a new vector from the second, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn ywwz(self) -> F32x4 { F32x4([self[1], self[3], self[3], self[2]]) } /// Constructs a new vector from the third, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zwwz(self) -> F32x4 { F32x4([self[2], self[3], self[3], self[2]]) } /// Constructs a new vector from the fourth, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wwwz(self) -> F32x4 { F32x4([self[3], self[3], self[3], self[2]]) } /// Constructs a new vector from the first, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxxw(self) -> F32x4 { F32x4([self[0], self[0], self[0], self[3]]) } /// Constructs a new vector from the second, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxxw(self) -> F32x4 { F32x4([self[1], self[0], self[0], self[3]]) } /// Constructs a new vector from the third, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxxw(self) -> F32x4 { F32x4([self[2], self[0], self[0], self[3]]) } /// Constructs a new vector from the fourth, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxxw(self) -> F32x4 { F32x4([self[3], self[0], self[0], self[3]]) } /// Constructs a new vector from the first, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyxw(self) -> F32x4 { F32x4([self[0], self[1], self[0], self[3]]) } /// Constructs a new vector from the second, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyxw(self) -> F32x4 { F32x4([self[1], self[1], self[0], self[3]]) } /// Constructs a new vector from the third, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyxw(self) -> F32x4 { F32x4([self[2], self[1], self[0], self[3]]) } /// Constructs a new vector from the fourth, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyxw(self) -> F32x4 { F32x4([self[3], self[1], self[0], self[3]]) } /// Constructs a new vector from the first, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzxw(self) -> F32x4 { F32x4([self[0], self[2], self[0], self[3]]) } /// Constructs a new vector from the second, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzxw(self) -> F32x4 { F32x4([self[1], self[2], self[0], self[3]]) } /// Constructs a new vector from the third, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzxw(self) -> F32x4 { F32x4([self[2], self[2], self[0], self[3]]) } /// Constructs a new vector from the fourth, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzxw(self) -> F32x4 { F32x4([self[3], self[2], self[0], self[3]]) } /// Constructs a new vector from the first, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwxw(self) -> F32x4 { F32x4([self[0], self[3], self[0], self[3]]) } /// Constructs a new vector from the second, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywxw(self) -> F32x4 { F32x4([self[1], self[3], self[0], self[3]]) } /// Constructs a new vector from the third, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwxw(self) -> F32x4 { F32x4([self[2], self[3], self[0], self[3]]) } /// Constructs a new vector from the fourth, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwxw(self) -> F32x4 { F32x4([self[3], self[3], self[0], self[3]]) } /// Constructs a new vector from the first, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxyw(self) -> F32x4 { F32x4([self[0], self[0], self[1], self[3]]) } /// Constructs a new vector from the second, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxyw(self) -> F32x4 { F32x4([self[1], self[0], self[1], self[3]]) } /// Constructs a new vector from the third, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxyw(self) -> F32x4 { F32x4([self[2], self[0], self[1], self[3]]) } /// Constructs a new vector from the fourth, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxyw(self) -> F32x4 { F32x4([self[3], self[0], self[1], self[3]]) } /// Constructs a new vector from the first, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyyw(self) -> F32x4 { F32x4([self[0], self[1], self[1], self[3]]) } /// Constructs a new vector from the second, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyyw(self) -> F32x4 { F32x4([self[1], self[1], self[1], self[3]]) } /// Constructs a new vector from the third, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyyw(self) -> F32x4 { F32x4([self[2], self[1], self[1], self[3]]) } /// Constructs a new vector from the fourth, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyyw(self) -> F32x4 { F32x4([self[3], self[1], self[1], self[3]]) } /// Constructs a new vector from the first, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzyw(self) -> F32x4 { F32x4([self[0], self[2], self[1], self[3]]) } /// Constructs a new vector from the second, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzyw(self) -> F32x4 { F32x4([self[1], self[2], self[1], self[3]]) } /// Constructs a new vector from the third, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzyw(self) -> F32x4 { F32x4([self[2], self[2], self[1], self[3]]) } /// Constructs a new vector from the fourth, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzyw(self) -> F32x4 { F32x4([self[3], self[2], self[1], self[3]]) } /// Constructs a new vector from the first, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwyw(self) -> F32x4 { F32x4([self[0], self[3], self[1], self[3]]) } /// Constructs a new vector from the second, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywyw(self) -> F32x4 { F32x4([self[1], self[3], self[1], self[3]]) } /// Constructs a new vector from the third, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwyw(self) -> F32x4 { F32x4([self[2], self[3], self[1], self[3]]) } /// Constructs a new vector from the fourth, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwyw(self) -> F32x4 { F32x4([self[3], self[3], self[1], self[3]]) } /// Constructs a new vector from the first, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxzw(self) -> F32x4 { F32x4([self[0], self[0], self[2], self[3]]) } /// Constructs a new vector from the second, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxzw(self) -> F32x4 { F32x4([self[1], self[0], self[2], self[3]]) } /// Constructs a new vector from the third, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxzw(self) -> F32x4 { F32x4([self[2], self[0], self[2], self[3]]) } /// Constructs a new vector from the fourth, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxzw(self) -> F32x4 { F32x4([self[3], self[0], self[2], self[3]]) } /// Constructs a new vector from the first, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyzw(self) -> F32x4 { F32x4([self[0], self[1], self[2], self[3]]) } /// Constructs a new vector from the second, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyzw(self) -> F32x4 { F32x4([self[1], self[1], self[2], self[3]]) } /// Constructs a new vector from the third, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyzw(self) -> F32x4 { F32x4([self[2], self[1], self[2], self[3]]) } /// Constructs a new vector from the fourth, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyzw(self) -> F32x4 { F32x4([self[3], self[1], self[2], self[3]]) } /// Constructs a new vector from the first, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzzw(self) -> F32x4 { F32x4([self[0], self[2], self[2], self[3]]) } /// Constructs a new vector from the second, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzzw(self) -> F32x4 { F32x4([self[1], self[2], self[2], self[3]]) } /// Constructs a new vector from the third, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzzw(self) -> F32x4 { F32x4([self[2], self[2], self[2], self[3]]) } /// Constructs a new vector from the fourth, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzzw(self) -> F32x4 { F32x4([self[3], self[2], self[2], self[3]]) } /// Constructs a new vector from the first, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwzw(self) -> F32x4 { F32x4([self[0], self[3], self[2], self[3]]) } /// Constructs a new vector from the second, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywzw(self) -> F32x4 { F32x4([self[1], self[3], self[2], self[3]]) } /// Constructs a new vector from the third, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwzw(self) -> F32x4 { F32x4([self[2], self[3], self[2], self[3]]) } /// Constructs a new vector from the fourth, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwzw(self) -> F32x4 { F32x4([self[3], self[3], self[2], self[3]]) } /// Constructs a new vector from the first, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxww(self) -> F32x4 { F32x4([self[0], self[0], self[3], self[3]]) } /// Constructs a new vector from the second, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxww(self) -> F32x4 { F32x4([self[1], self[0], self[3], self[3]]) } /// Constructs a new vector from the third, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxww(self) -> F32x4 { F32x4([self[2], self[0], self[3], self[3]]) } /// Constructs a new vector from the fourth, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxww(self) -> F32x4 { F32x4([self[3], self[0], self[3], self[3]]) } /// Constructs a new vector from the first, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyww(self) -> F32x4 { F32x4([self[0], self[1], self[3], self[3]]) } /// Constructs a new vector from the second, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyww(self) -> F32x4 { F32x4([self[1], self[1], self[3], self[3]]) } /// Constructs a new vector from the third, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyww(self) -> F32x4 { F32x4([self[2], self[1], self[3], self[3]]) } /// Constructs a new vector from the fourth, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyww(self) -> F32x4 { F32x4([self[3], self[1], self[3], self[3]]) } /// Constructs a new vector from the first, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzww(self) -> F32x4 { F32x4([self[0], self[2], self[3], self[3]]) } /// Constructs a new vector from the second, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzww(self) -> F32x4 { F32x4([self[1], self[2], self[3], self[3]]) } /// Constructs a new vector from the third, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzww(self) -> F32x4 { F32x4([self[2], self[2], self[3], self[3]]) } /// Constructs a new vector from the fourth, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzww(self) -> F32x4 { F32x4([self[3], self[2], self[3], self[3]]) } /// Constructs a new vector from the first, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwww(self) -> F32x4 { F32x4([self[0], self[3], self[3], self[3]]) } /// Constructs a new vector from the second, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywww(self) -> F32x4 { F32x4([self[1], self[3], self[3], self[3]]) } /// Constructs a new vector from the third, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwww(self) -> F32x4 { F32x4([self[2], self[3], self[3], self[3]]) } /// Constructs a new vector from the fourth, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwww(self) -> F32x4 { F32x4([self[3], self[3], self[3], self[3]]) } } pathfinder_simd-0.5.2/src/scalar/swizzle_i32x4.rs000064400000000000000000001607031046102023000200410ustar 00000000000000// pathfinder/simd/src/scalar/swizzle_i32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::scalar::I32x4; impl I32x4 { /// Constructs a new vector from the first, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn xxxx(self) -> I32x4 { I32x4([self[0], self[0], self[0], self[0]]) } /// Constructs a new vector from the second, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn yxxx(self) -> I32x4 { I32x4([self[1], self[0], self[0], self[0]]) } /// Constructs a new vector from the third, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn zxxx(self) -> I32x4 { I32x4([self[2], self[0], self[0], self[0]]) } /// Constructs a new vector from the fourth, first, first, and first /// lanes in this vector, respectively. #[inline] pub fn wxxx(self) -> I32x4 { I32x4([self[3], self[0], self[0], self[0]]) } /// Constructs a new vector from the first, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn xyxx(self) -> I32x4 { I32x4([self[0], self[1], self[0], self[0]]) } /// Constructs a new vector from the second, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn yyxx(self) -> I32x4 { I32x4([self[1], self[1], self[0], self[0]]) } /// Constructs a new vector from the third, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn zyxx(self) -> I32x4 { I32x4([self[2], self[1], self[0], self[0]]) } /// Constructs a new vector from the fourth, second, first, and first /// lanes in this vector, respectively. #[inline] pub fn wyxx(self) -> I32x4 { I32x4([self[3], self[1], self[0], self[0]]) } /// Constructs a new vector from the first, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn xzxx(self) -> I32x4 { I32x4([self[0], self[2], self[0], self[0]]) } /// Constructs a new vector from the second, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn yzxx(self) -> I32x4 { I32x4([self[1], self[2], self[0], self[0]]) } /// Constructs a new vector from the third, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn zzxx(self) -> I32x4 { I32x4([self[2], self[2], self[0], self[0]]) } /// Constructs a new vector from the fourth, third, first, and first /// lanes in this vector, respectively. #[inline] pub fn wzxx(self) -> I32x4 { I32x4([self[3], self[2], self[0], self[0]]) } /// Constructs a new vector from the first, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn xwxx(self) -> I32x4 { I32x4([self[0], self[3], self[0], self[0]]) } /// Constructs a new vector from the second, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn ywxx(self) -> I32x4 { I32x4([self[1], self[3], self[0], self[0]]) } /// Constructs a new vector from the third, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn zwxx(self) -> I32x4 { I32x4([self[2], self[3], self[0], self[0]]) } /// Constructs a new vector from the fourth, fourth, first, and first /// lanes in this vector, respectively. #[inline] pub fn wwxx(self) -> I32x4 { I32x4([self[3], self[3], self[0], self[0]]) } /// Constructs a new vector from the first, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn xxyx(self) -> I32x4 { I32x4([self[0], self[0], self[1], self[0]]) } /// Constructs a new vector from the second, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn yxyx(self) -> I32x4 { I32x4([self[1], self[0], self[1], self[0]]) } /// Constructs a new vector from the third, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn zxyx(self) -> I32x4 { I32x4([self[2], self[0], self[1], self[0]]) } /// Constructs a new vector from the fourth, first, second, and first /// lanes in this vector, respectively. #[inline] pub fn wxyx(self) -> I32x4 { I32x4([self[3], self[0], self[1], self[0]]) } /// Constructs a new vector from the first, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn xyyx(self) -> I32x4 { I32x4([self[0], self[1], self[1], self[0]]) } /// Constructs a new vector from the second, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn yyyx(self) -> I32x4 { I32x4([self[1], self[1], self[1], self[0]]) } /// Constructs a new vector from the third, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn zyyx(self) -> I32x4 { I32x4([self[2], self[1], self[1], self[0]]) } /// Constructs a new vector from the fourth, second, second, and first /// lanes in this vector, respectively. #[inline] pub fn wyyx(self) -> I32x4 { I32x4([self[3], self[1], self[1], self[0]]) } /// Constructs a new vector from the first, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn xzyx(self) -> I32x4 { I32x4([self[0], self[2], self[1], self[0]]) } /// Constructs a new vector from the second, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn yzyx(self) -> I32x4 { I32x4([self[1], self[2], self[1], self[0]]) } /// Constructs a new vector from the third, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn zzyx(self) -> I32x4 { I32x4([self[2], self[2], self[1], self[0]]) } /// Constructs a new vector from the fourth, third, second, and first /// lanes in this vector, respectively. #[inline] pub fn wzyx(self) -> I32x4 { I32x4([self[3], self[2], self[1], self[0]]) } /// Constructs a new vector from the first, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn xwyx(self) -> I32x4 { I32x4([self[0], self[3], self[1], self[0]]) } /// Constructs a new vector from the second, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn ywyx(self) -> I32x4 { I32x4([self[1], self[3], self[1], self[0]]) } /// Constructs a new vector from the third, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn zwyx(self) -> I32x4 { I32x4([self[2], self[3], self[1], self[0]]) } /// Constructs a new vector from the fourth, fourth, second, and first /// lanes in this vector, respectively. #[inline] pub fn wwyx(self) -> I32x4 { I32x4([self[3], self[3], self[1], self[0]]) } /// Constructs a new vector from the first, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn xxzx(self) -> I32x4 { I32x4([self[0], self[0], self[2], self[0]]) } /// Constructs a new vector from the second, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn yxzx(self) -> I32x4 { I32x4([self[1], self[0], self[2], self[0]]) } /// Constructs a new vector from the third, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn zxzx(self) -> I32x4 { I32x4([self[2], self[0], self[2], self[0]]) } /// Constructs a new vector from the fourth, first, third, and first /// lanes in this vector, respectively. #[inline] pub fn wxzx(self) -> I32x4 { I32x4([self[3], self[0], self[2], self[0]]) } /// Constructs a new vector from the first, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn xyzx(self) -> I32x4 { I32x4([self[0], self[1], self[2], self[0]]) } /// Constructs a new vector from the second, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn yyzx(self) -> I32x4 { I32x4([self[1], self[1], self[2], self[0]]) } /// Constructs a new vector from the third, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn zyzx(self) -> I32x4 { I32x4([self[2], self[1], self[2], self[0]]) } /// Constructs a new vector from the fourth, second, third, and first /// lanes in this vector, respectively. #[inline] pub fn wyzx(self) -> I32x4 { I32x4([self[3], self[1], self[2], self[0]]) } /// Constructs a new vector from the first, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn xzzx(self) -> I32x4 { I32x4([self[0], self[2], self[2], self[0]]) } /// Constructs a new vector from the second, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn yzzx(self) -> I32x4 { I32x4([self[1], self[2], self[2], self[0]]) } /// Constructs a new vector from the third, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn zzzx(self) -> I32x4 { I32x4([self[2], self[2], self[2], self[0]]) } /// Constructs a new vector from the fourth, third, third, and first /// lanes in this vector, respectively. #[inline] pub fn wzzx(self) -> I32x4 { I32x4([self[3], self[2], self[2], self[0]]) } /// Constructs a new vector from the first, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn xwzx(self) -> I32x4 { I32x4([self[0], self[3], self[2], self[0]]) } /// Constructs a new vector from the second, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn ywzx(self) -> I32x4 { I32x4([self[1], self[3], self[2], self[0]]) } /// Constructs a new vector from the third, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn zwzx(self) -> I32x4 { I32x4([self[2], self[3], self[2], self[0]]) } /// Constructs a new vector from the fourth, fourth, third, and first /// lanes in this vector, respectively. #[inline] pub fn wwzx(self) -> I32x4 { I32x4([self[3], self[3], self[2], self[0]]) } /// Constructs a new vector from the first, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xxwx(self) -> I32x4 { I32x4([self[0], self[0], self[3], self[0]]) } /// Constructs a new vector from the second, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yxwx(self) -> I32x4 { I32x4([self[1], self[0], self[3], self[0]]) } /// Constructs a new vector from the third, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zxwx(self) -> I32x4 { I32x4([self[2], self[0], self[3], self[0]]) } /// Constructs a new vector from the fourth, first, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wxwx(self) -> I32x4 { I32x4([self[3], self[0], self[3], self[0]]) } /// Constructs a new vector from the first, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xywx(self) -> I32x4 { I32x4([self[0], self[1], self[3], self[0]]) } /// Constructs a new vector from the second, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yywx(self) -> I32x4 { I32x4([self[1], self[1], self[3], self[0]]) } /// Constructs a new vector from the third, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zywx(self) -> I32x4 { I32x4([self[2], self[1], self[3], self[0]]) } /// Constructs a new vector from the fourth, second, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wywx(self) -> I32x4 { I32x4([self[3], self[1], self[3], self[0]]) } /// Constructs a new vector from the first, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xzwx(self) -> I32x4 { I32x4([self[0], self[2], self[3], self[0]]) } /// Constructs a new vector from the second, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn yzwx(self) -> I32x4 { I32x4([self[1], self[2], self[3], self[0]]) } /// Constructs a new vector from the third, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zzwx(self) -> I32x4 { I32x4([self[2], self[2], self[3], self[0]]) } /// Constructs a new vector from the fourth, third, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wzwx(self) -> I32x4 { I32x4([self[3], self[2], self[3], self[0]]) } /// Constructs a new vector from the first, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn xwwx(self) -> I32x4 { I32x4([self[0], self[3], self[3], self[0]]) } /// Constructs a new vector from the second, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn ywwx(self) -> I32x4 { I32x4([self[1], self[3], self[3], self[0]]) } /// Constructs a new vector from the third, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn zwwx(self) -> I32x4 { I32x4([self[2], self[3], self[3], self[0]]) } /// Constructs a new vector from the fourth, fourth, fourth, and first /// lanes in this vector, respectively. #[inline] pub fn wwwx(self) -> I32x4 { I32x4([self[3], self[3], self[3], self[0]]) } /// Constructs a new vector from the first, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn xxxy(self) -> I32x4 { I32x4([self[0], self[0], self[0], self[1]]) } /// Constructs a new vector from the second, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn yxxy(self) -> I32x4 { I32x4([self[1], self[0], self[0], self[1]]) } /// Constructs a new vector from the third, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn zxxy(self) -> I32x4 { I32x4([self[2], self[0], self[0], self[1]]) } /// Constructs a new vector from the fourth, first, first, and second /// lanes in this vector, respectively. #[inline] pub fn wxxy(self) -> I32x4 { I32x4([self[3], self[0], self[0], self[1]]) } /// Constructs a new vector from the first, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn xyxy(self) -> I32x4 { I32x4([self[0], self[1], self[0], self[1]]) } /// Constructs a new vector from the second, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn yyxy(self) -> I32x4 { I32x4([self[1], self[1], self[0], self[1]]) } /// Constructs a new vector from the third, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn zyxy(self) -> I32x4 { I32x4([self[2], self[1], self[0], self[1]]) } /// Constructs a new vector from the fourth, second, first, and second /// lanes in this vector, respectively. #[inline] pub fn wyxy(self) -> I32x4 { I32x4([self[3], self[1], self[0], self[1]]) } /// Constructs a new vector from the first, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn xzxy(self) -> I32x4 { I32x4([self[0], self[2], self[0], self[1]]) } /// Constructs a new vector from the second, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn yzxy(self) -> I32x4 { I32x4([self[1], self[2], self[0], self[1]]) } /// Constructs a new vector from the third, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn zzxy(self) -> I32x4 { I32x4([self[2], self[2], self[0], self[1]]) } /// Constructs a new vector from the fourth, third, first, and second /// lanes in this vector, respectively. #[inline] pub fn wzxy(self) -> I32x4 { I32x4([self[3], self[2], self[0], self[1]]) } /// Constructs a new vector from the first, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn xwxy(self) -> I32x4 { I32x4([self[0], self[3], self[0], self[1]]) } /// Constructs a new vector from the second, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn ywxy(self) -> I32x4 { I32x4([self[1], self[3], self[0], self[1]]) } /// Constructs a new vector from the third, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn zwxy(self) -> I32x4 { I32x4([self[2], self[3], self[0], self[1]]) } /// Constructs a new vector from the fourth, fourth, first, and second /// lanes in this vector, respectively. #[inline] pub fn wwxy(self) -> I32x4 { I32x4([self[3], self[3], self[0], self[1]]) } /// Constructs a new vector from the first, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn xxyy(self) -> I32x4 { I32x4([self[0], self[0], self[1], self[1]]) } /// Constructs a new vector from the second, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn yxyy(self) -> I32x4 { I32x4([self[1], self[0], self[1], self[1]]) } /// Constructs a new vector from the third, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn zxyy(self) -> I32x4 { I32x4([self[2], self[0], self[1], self[1]]) } /// Constructs a new vector from the fourth, first, second, and second /// lanes in this vector, respectively. #[inline] pub fn wxyy(self) -> I32x4 { I32x4([self[3], self[0], self[1], self[1]]) } /// Constructs a new vector from the first, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn xyyy(self) -> I32x4 { I32x4([self[0], self[1], self[1], self[1]]) } /// Constructs a new vector from the second, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn yyyy(self) -> I32x4 { I32x4([self[1], self[1], self[1], self[1]]) } /// Constructs a new vector from the third, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn zyyy(self) -> I32x4 { I32x4([self[2], self[1], self[1], self[1]]) } /// Constructs a new vector from the fourth, second, second, and second /// lanes in this vector, respectively. #[inline] pub fn wyyy(self) -> I32x4 { I32x4([self[3], self[1], self[1], self[1]]) } /// Constructs a new vector from the first, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn xzyy(self) -> I32x4 { I32x4([self[0], self[2], self[1], self[1]]) } /// Constructs a new vector from the second, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn yzyy(self) -> I32x4 { I32x4([self[1], self[2], self[1], self[1]]) } /// Constructs a new vector from the third, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn zzyy(self) -> I32x4 { I32x4([self[2], self[2], self[1], self[1]]) } /// Constructs a new vector from the fourth, third, second, and second /// lanes in this vector, respectively. #[inline] pub fn wzyy(self) -> I32x4 { I32x4([self[3], self[2], self[1], self[1]]) } /// Constructs a new vector from the first, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn xwyy(self) -> I32x4 { I32x4([self[0], self[3], self[1], self[1]]) } /// Constructs a new vector from the second, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn ywyy(self) -> I32x4 { I32x4([self[1], self[3], self[1], self[1]]) } /// Constructs a new vector from the third, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn zwyy(self) -> I32x4 { I32x4([self[2], self[3], self[1], self[1]]) } /// Constructs a new vector from the fourth, fourth, second, and second /// lanes in this vector, respectively. #[inline] pub fn wwyy(self) -> I32x4 { I32x4([self[3], self[3], self[1], self[1]]) } /// Constructs a new vector from the first, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn xxzy(self) -> I32x4 { I32x4([self[0], self[0], self[2], self[1]]) } /// Constructs a new vector from the second, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn yxzy(self) -> I32x4 { I32x4([self[1], self[0], self[2], self[1]]) } /// Constructs a new vector from the third, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn zxzy(self) -> I32x4 { I32x4([self[2], self[0], self[2], self[1]]) } /// Constructs a new vector from the fourth, first, third, and second /// lanes in this vector, respectively. #[inline] pub fn wxzy(self) -> I32x4 { I32x4([self[3], self[0], self[2], self[1]]) } /// Constructs a new vector from the first, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn xyzy(self) -> I32x4 { I32x4([self[0], self[1], self[2], self[1]]) } /// Constructs a new vector from the second, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn yyzy(self) -> I32x4 { I32x4([self[1], self[1], self[2], self[1]]) } /// Constructs a new vector from the third, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn zyzy(self) -> I32x4 { I32x4([self[2], self[1], self[2], self[1]]) } /// Constructs a new vector from the fourth, second, third, and second /// lanes in this vector, respectively. #[inline] pub fn wyzy(self) -> I32x4 { I32x4([self[3], self[1], self[2], self[1]]) } /// Constructs a new vector from the first, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn xzzy(self) -> I32x4 { I32x4([self[0], self[2], self[2], self[1]]) } /// Constructs a new vector from the second, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn yzzy(self) -> I32x4 { I32x4([self[1], self[2], self[2], self[1]]) } /// Constructs a new vector from the third, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn zzzy(self) -> I32x4 { I32x4([self[2], self[2], self[2], self[1]]) } /// Constructs a new vector from the fourth, third, third, and second /// lanes in this vector, respectively. #[inline] pub fn wzzy(self) -> I32x4 { I32x4([self[3], self[2], self[2], self[1]]) } /// Constructs a new vector from the first, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn xwzy(self) -> I32x4 { I32x4([self[0], self[3], self[2], self[1]]) } /// Constructs a new vector from the second, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn ywzy(self) -> I32x4 { I32x4([self[1], self[3], self[2], self[1]]) } /// Constructs a new vector from the third, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn zwzy(self) -> I32x4 { I32x4([self[2], self[3], self[2], self[1]]) } /// Constructs a new vector from the fourth, fourth, third, and second /// lanes in this vector, respectively. #[inline] pub fn wwzy(self) -> I32x4 { I32x4([self[3], self[3], self[2], self[1]]) } /// Constructs a new vector from the first, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xxwy(self) -> I32x4 { I32x4([self[0], self[0], self[3], self[1]]) } /// Constructs a new vector from the second, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yxwy(self) -> I32x4 { I32x4([self[1], self[0], self[3], self[1]]) } /// Constructs a new vector from the third, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zxwy(self) -> I32x4 { I32x4([self[2], self[0], self[3], self[1]]) } /// Constructs a new vector from the fourth, first, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wxwy(self) -> I32x4 { I32x4([self[3], self[0], self[3], self[1]]) } /// Constructs a new vector from the first, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xywy(self) -> I32x4 { I32x4([self[0], self[1], self[3], self[1]]) } /// Constructs a new vector from the second, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yywy(self) -> I32x4 { I32x4([self[1], self[1], self[3], self[1]]) } /// Constructs a new vector from the third, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zywy(self) -> I32x4 { I32x4([self[2], self[1], self[3], self[1]]) } /// Constructs a new vector from the fourth, second, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wywy(self) -> I32x4 { I32x4([self[3], self[1], self[3], self[1]]) } /// Constructs a new vector from the first, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xzwy(self) -> I32x4 { I32x4([self[0], self[2], self[3], self[1]]) } /// Constructs a new vector from the second, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn yzwy(self) -> I32x4 { I32x4([self[1], self[2], self[3], self[1]]) } /// Constructs a new vector from the third, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zzwy(self) -> I32x4 { I32x4([self[2], self[2], self[3], self[1]]) } /// Constructs a new vector from the fourth, third, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wzwy(self) -> I32x4 { I32x4([self[3], self[2], self[3], self[1]]) } /// Constructs a new vector from the first, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn xwwy(self) -> I32x4 { I32x4([self[0], self[3], self[3], self[1]]) } /// Constructs a new vector from the second, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn ywwy(self) -> I32x4 { I32x4([self[1], self[3], self[3], self[1]]) } /// Constructs a new vector from the third, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn zwwy(self) -> I32x4 { I32x4([self[2], self[3], self[3], self[1]]) } /// Constructs a new vector from the fourth, fourth, fourth, and second /// lanes in this vector, respectively. #[inline] pub fn wwwy(self) -> I32x4 { I32x4([self[3], self[3], self[3], self[1]]) } /// Constructs a new vector from the first, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn xxxz(self) -> I32x4 { I32x4([self[0], self[0], self[0], self[2]]) } /// Constructs a new vector from the second, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn yxxz(self) -> I32x4 { I32x4([self[1], self[0], self[0], self[2]]) } /// Constructs a new vector from the third, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn zxxz(self) -> I32x4 { I32x4([self[2], self[0], self[0], self[2]]) } /// Constructs a new vector from the fourth, first, first, and third /// lanes in this vector, respectively. #[inline] pub fn wxxz(self) -> I32x4 { I32x4([self[3], self[0], self[0], self[2]]) } /// Constructs a new vector from the first, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn xyxz(self) -> I32x4 { I32x4([self[0], self[1], self[0], self[2]]) } /// Constructs a new vector from the second, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn yyxz(self) -> I32x4 { I32x4([self[1], self[1], self[0], self[2]]) } /// Constructs a new vector from the third, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn zyxz(self) -> I32x4 { I32x4([self[2], self[1], self[0], self[2]]) } /// Constructs a new vector from the fourth, second, first, and third /// lanes in this vector, respectively. #[inline] pub fn wyxz(self) -> I32x4 { I32x4([self[3], self[1], self[0], self[2]]) } /// Constructs a new vector from the first, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn xzxz(self) -> I32x4 { I32x4([self[0], self[2], self[0], self[2]]) } /// Constructs a new vector from the second, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn yzxz(self) -> I32x4 { I32x4([self[1], self[2], self[0], self[2]]) } /// Constructs a new vector from the third, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn zzxz(self) -> I32x4 { I32x4([self[2], self[2], self[0], self[2]]) } /// Constructs a new vector from the fourth, third, first, and third /// lanes in this vector, respectively. #[inline] pub fn wzxz(self) -> I32x4 { I32x4([self[3], self[2], self[0], self[2]]) } /// Constructs a new vector from the first, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn xwxz(self) -> I32x4 { I32x4([self[0], self[3], self[0], self[2]]) } /// Constructs a new vector from the second, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn ywxz(self) -> I32x4 { I32x4([self[1], self[3], self[0], self[2]]) } /// Constructs a new vector from the third, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn zwxz(self) -> I32x4 { I32x4([self[2], self[3], self[0], self[2]]) } /// Constructs a new vector from the fourth, fourth, first, and third /// lanes in this vector, respectively. #[inline] pub fn wwxz(self) -> I32x4 { I32x4([self[3], self[3], self[0], self[2]]) } /// Constructs a new vector from the first, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn xxyz(self) -> I32x4 { I32x4([self[0], self[0], self[1], self[2]]) } /// Constructs a new vector from the second, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn yxyz(self) -> I32x4 { I32x4([self[1], self[0], self[1], self[2]]) } /// Constructs a new vector from the third, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn zxyz(self) -> I32x4 { I32x4([self[2], self[0], self[1], self[2]]) } /// Constructs a new vector from the fourth, first, second, and third /// lanes in this vector, respectively. #[inline] pub fn wxyz(self) -> I32x4 { I32x4([self[3], self[0], self[1], self[2]]) } /// Constructs a new vector from the first, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn xyyz(self) -> I32x4 { I32x4([self[0], self[1], self[1], self[2]]) } /// Constructs a new vector from the second, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn yyyz(self) -> I32x4 { I32x4([self[1], self[1], self[1], self[2]]) } /// Constructs a new vector from the third, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn zyyz(self) -> I32x4 { I32x4([self[2], self[1], self[1], self[2]]) } /// Constructs a new vector from the fourth, second, second, and third /// lanes in this vector, respectively. #[inline] pub fn wyyz(self) -> I32x4 { I32x4([self[3], self[1], self[1], self[2]]) } /// Constructs a new vector from the first, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn xzyz(self) -> I32x4 { I32x4([self[0], self[2], self[1], self[2]]) } /// Constructs a new vector from the second, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn yzyz(self) -> I32x4 { I32x4([self[1], self[2], self[1], self[2]]) } /// Constructs a new vector from the third, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn zzyz(self) -> I32x4 { I32x4([self[2], self[2], self[1], self[2]]) } /// Constructs a new vector from the fourth, third, second, and third /// lanes in this vector, respectively. #[inline] pub fn wzyz(self) -> I32x4 { I32x4([self[3], self[2], self[1], self[2]]) } /// Constructs a new vector from the first, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn xwyz(self) -> I32x4 { I32x4([self[0], self[3], self[1], self[2]]) } /// Constructs a new vector from the second, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn ywyz(self) -> I32x4 { I32x4([self[1], self[3], self[1], self[2]]) } /// Constructs a new vector from the third, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn zwyz(self) -> I32x4 { I32x4([self[2], self[3], self[1], self[2]]) } /// Constructs a new vector from the fourth, fourth, second, and third /// lanes in this vector, respectively. #[inline] pub fn wwyz(self) -> I32x4 { I32x4([self[3], self[3], self[1], self[2]]) } /// Constructs a new vector from the first, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn xxzz(self) -> I32x4 { I32x4([self[0], self[0], self[2], self[2]]) } /// Constructs a new vector from the second, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn yxzz(self) -> I32x4 { I32x4([self[1], self[0], self[2], self[2]]) } /// Constructs a new vector from the third, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn zxzz(self) -> I32x4 { I32x4([self[2], self[0], self[2], self[2]]) } /// Constructs a new vector from the fourth, first, third, and third /// lanes in this vector, respectively. #[inline] pub fn wxzz(self) -> I32x4 { I32x4([self[3], self[0], self[2], self[2]]) } /// Constructs a new vector from the first, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn xyzz(self) -> I32x4 { I32x4([self[0], self[1], self[2], self[2]]) } /// Constructs a new vector from the second, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn yyzz(self) -> I32x4 { I32x4([self[1], self[1], self[2], self[2]]) } /// Constructs a new vector from the third, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn zyzz(self) -> I32x4 { I32x4([self[2], self[1], self[2], self[2]]) } /// Constructs a new vector from the fourth, second, third, and third /// lanes in this vector, respectively. #[inline] pub fn wyzz(self) -> I32x4 { I32x4([self[3], self[1], self[2], self[2]]) } /// Constructs a new vector from the first, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn xzzz(self) -> I32x4 { I32x4([self[0], self[2], self[2], self[2]]) } /// Constructs a new vector from the second, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn yzzz(self) -> I32x4 { I32x4([self[1], self[2], self[2], self[2]]) } /// Constructs a new vector from the third, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn zzzz(self) -> I32x4 { I32x4([self[2], self[2], self[2], self[2]]) } /// Constructs a new vector from the fourth, third, third, and third /// lanes in this vector, respectively. #[inline] pub fn wzzz(self) -> I32x4 { I32x4([self[3], self[2], self[2], self[2]]) } /// Constructs a new vector from the first, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn xwzz(self) -> I32x4 { I32x4([self[0], self[3], self[2], self[2]]) } /// Constructs a new vector from the second, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn ywzz(self) -> I32x4 { I32x4([self[1], self[3], self[2], self[2]]) } /// Constructs a new vector from the third, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn zwzz(self) -> I32x4 { I32x4([self[2], self[3], self[2], self[2]]) } /// Constructs a new vector from the fourth, fourth, third, and third /// lanes in this vector, respectively. #[inline] pub fn wwzz(self) -> I32x4 { I32x4([self[3], self[3], self[2], self[2]]) } /// Constructs a new vector from the first, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xxwz(self) -> I32x4 { I32x4([self[0], self[0], self[3], self[2]]) } /// Constructs a new vector from the second, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yxwz(self) -> I32x4 { I32x4([self[1], self[0], self[3], self[2]]) } /// Constructs a new vector from the third, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zxwz(self) -> I32x4 { I32x4([self[2], self[0], self[3], self[2]]) } /// Constructs a new vector from the fourth, first, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wxwz(self) -> I32x4 { I32x4([self[3], self[0], self[3], self[2]]) } /// Constructs a new vector from the first, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xywz(self) -> I32x4 { I32x4([self[0], self[1], self[3], self[2]]) } /// Constructs a new vector from the second, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yywz(self) -> I32x4 { I32x4([self[1], self[1], self[3], self[2]]) } /// Constructs a new vector from the third, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zywz(self) -> I32x4 { I32x4([self[2], self[1], self[3], self[2]]) } /// Constructs a new vector from the fourth, second, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wywz(self) -> I32x4 { I32x4([self[3], self[1], self[3], self[2]]) } /// Constructs a new vector from the first, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xzwz(self) -> I32x4 { I32x4([self[0], self[2], self[3], self[2]]) } /// Constructs a new vector from the second, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn yzwz(self) -> I32x4 { I32x4([self[1], self[2], self[3], self[2]]) } /// Constructs a new vector from the third, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zzwz(self) -> I32x4 { I32x4([self[2], self[2], self[3], self[2]]) } /// Constructs a new vector from the fourth, third, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wzwz(self) -> I32x4 { I32x4([self[3], self[2], self[3], self[2]]) } /// Constructs a new vector from the first, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn xwwz(self) -> I32x4 { I32x4([self[0], self[3], self[3], self[2]]) } /// Constructs a new vector from the second, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn ywwz(self) -> I32x4 { I32x4([self[1], self[3], self[3], self[2]]) } /// Constructs a new vector from the third, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn zwwz(self) -> I32x4 { I32x4([self[2], self[3], self[3], self[2]]) } /// Constructs a new vector from the fourth, fourth, fourth, and third /// lanes in this vector, respectively. #[inline] pub fn wwwz(self) -> I32x4 { I32x4([self[3], self[3], self[3], self[2]]) } /// Constructs a new vector from the first, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxxw(self) -> I32x4 { I32x4([self[0], self[0], self[0], self[3]]) } /// Constructs a new vector from the second, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxxw(self) -> I32x4 { I32x4([self[1], self[0], self[0], self[3]]) } /// Constructs a new vector from the third, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxxw(self) -> I32x4 { I32x4([self[2], self[0], self[0], self[3]]) } /// Constructs a new vector from the fourth, first, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxxw(self) -> I32x4 { I32x4([self[3], self[0], self[0], self[3]]) } /// Constructs a new vector from the first, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyxw(self) -> I32x4 { I32x4([self[0], self[1], self[0], self[3]]) } /// Constructs a new vector from the second, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyxw(self) -> I32x4 { I32x4([self[1], self[1], self[0], self[3]]) } /// Constructs a new vector from the third, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyxw(self) -> I32x4 { I32x4([self[2], self[1], self[0], self[3]]) } /// Constructs a new vector from the fourth, second, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyxw(self) -> I32x4 { I32x4([self[3], self[1], self[0], self[3]]) } /// Constructs a new vector from the first, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzxw(self) -> I32x4 { I32x4([self[0], self[2], self[0], self[3]]) } /// Constructs a new vector from the second, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzxw(self) -> I32x4 { I32x4([self[1], self[2], self[0], self[3]]) } /// Constructs a new vector from the third, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzxw(self) -> I32x4 { I32x4([self[2], self[2], self[0], self[3]]) } /// Constructs a new vector from the fourth, third, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzxw(self) -> I32x4 { I32x4([self[3], self[2], self[0], self[3]]) } /// Constructs a new vector from the first, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwxw(self) -> I32x4 { I32x4([self[0], self[3], self[0], self[3]]) } /// Constructs a new vector from the second, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywxw(self) -> I32x4 { I32x4([self[1], self[3], self[0], self[3]]) } /// Constructs a new vector from the third, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwxw(self) -> I32x4 { I32x4([self[2], self[3], self[0], self[3]]) } /// Constructs a new vector from the fourth, fourth, first, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwxw(self) -> I32x4 { I32x4([self[3], self[3], self[0], self[3]]) } /// Constructs a new vector from the first, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxyw(self) -> I32x4 { I32x4([self[0], self[0], self[1], self[3]]) } /// Constructs a new vector from the second, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxyw(self) -> I32x4 { I32x4([self[1], self[0], self[1], self[3]]) } /// Constructs a new vector from the third, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxyw(self) -> I32x4 { I32x4([self[2], self[0], self[1], self[3]]) } /// Constructs a new vector from the fourth, first, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxyw(self) -> I32x4 { I32x4([self[3], self[0], self[1], self[3]]) } /// Constructs a new vector from the first, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyyw(self) -> I32x4 { I32x4([self[0], self[1], self[1], self[3]]) } /// Constructs a new vector from the second, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyyw(self) -> I32x4 { I32x4([self[1], self[1], self[1], self[3]]) } /// Constructs a new vector from the third, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyyw(self) -> I32x4 { I32x4([self[2], self[1], self[1], self[3]]) } /// Constructs a new vector from the fourth, second, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyyw(self) -> I32x4 { I32x4([self[3], self[1], self[1], self[3]]) } /// Constructs a new vector from the first, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzyw(self) -> I32x4 { I32x4([self[0], self[2], self[1], self[3]]) } /// Constructs a new vector from the second, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzyw(self) -> I32x4 { I32x4([self[1], self[2], self[1], self[3]]) } /// Constructs a new vector from the third, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzyw(self) -> I32x4 { I32x4([self[2], self[2], self[1], self[3]]) } /// Constructs a new vector from the fourth, third, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzyw(self) -> I32x4 { I32x4([self[3], self[2], self[1], self[3]]) } /// Constructs a new vector from the first, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwyw(self) -> I32x4 { I32x4([self[0], self[3], self[1], self[3]]) } /// Constructs a new vector from the second, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywyw(self) -> I32x4 { I32x4([self[1], self[3], self[1], self[3]]) } /// Constructs a new vector from the third, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwyw(self) -> I32x4 { I32x4([self[2], self[3], self[1], self[3]]) } /// Constructs a new vector from the fourth, fourth, second, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwyw(self) -> I32x4 { I32x4([self[3], self[3], self[1], self[3]]) } /// Constructs a new vector from the first, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxzw(self) -> I32x4 { I32x4([self[0], self[0], self[2], self[3]]) } /// Constructs a new vector from the second, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxzw(self) -> I32x4 { I32x4([self[1], self[0], self[2], self[3]]) } /// Constructs a new vector from the third, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxzw(self) -> I32x4 { I32x4([self[2], self[0], self[2], self[3]]) } /// Constructs a new vector from the fourth, first, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxzw(self) -> I32x4 { I32x4([self[3], self[0], self[2], self[3]]) } /// Constructs a new vector from the first, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyzw(self) -> I32x4 { I32x4([self[0], self[1], self[2], self[3]]) } /// Constructs a new vector from the second, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyzw(self) -> I32x4 { I32x4([self[1], self[1], self[2], self[3]]) } /// Constructs a new vector from the third, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyzw(self) -> I32x4 { I32x4([self[2], self[1], self[2], self[3]]) } /// Constructs a new vector from the fourth, second, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyzw(self) -> I32x4 { I32x4([self[3], self[1], self[2], self[3]]) } /// Constructs a new vector from the first, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzzw(self) -> I32x4 { I32x4([self[0], self[2], self[2], self[3]]) } /// Constructs a new vector from the second, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzzw(self) -> I32x4 { I32x4([self[1], self[2], self[2], self[3]]) } /// Constructs a new vector from the third, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzzw(self) -> I32x4 { I32x4([self[2], self[2], self[2], self[3]]) } /// Constructs a new vector from the fourth, third, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzzw(self) -> I32x4 { I32x4([self[3], self[2], self[2], self[3]]) } /// Constructs a new vector from the first, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwzw(self) -> I32x4 { I32x4([self[0], self[3], self[2], self[3]]) } /// Constructs a new vector from the second, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywzw(self) -> I32x4 { I32x4([self[1], self[3], self[2], self[3]]) } /// Constructs a new vector from the third, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwzw(self) -> I32x4 { I32x4([self[2], self[3], self[2], self[3]]) } /// Constructs a new vector from the fourth, fourth, third, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwzw(self) -> I32x4 { I32x4([self[3], self[3], self[2], self[3]]) } /// Constructs a new vector from the first, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xxww(self) -> I32x4 { I32x4([self[0], self[0], self[3], self[3]]) } /// Constructs a new vector from the second, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yxww(self) -> I32x4 { I32x4([self[1], self[0], self[3], self[3]]) } /// Constructs a new vector from the third, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zxww(self) -> I32x4 { I32x4([self[2], self[0], self[3], self[3]]) } /// Constructs a new vector from the fourth, first, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wxww(self) -> I32x4 { I32x4([self[3], self[0], self[3], self[3]]) } /// Constructs a new vector from the first, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xyww(self) -> I32x4 { I32x4([self[0], self[1], self[3], self[3]]) } /// Constructs a new vector from the second, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yyww(self) -> I32x4 { I32x4([self[1], self[1], self[3], self[3]]) } /// Constructs a new vector from the third, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zyww(self) -> I32x4 { I32x4([self[2], self[1], self[3], self[3]]) } /// Constructs a new vector from the fourth, second, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wyww(self) -> I32x4 { I32x4([self[3], self[1], self[3], self[3]]) } /// Constructs a new vector from the first, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xzww(self) -> I32x4 { I32x4([self[0], self[2], self[3], self[3]]) } /// Constructs a new vector from the second, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn yzww(self) -> I32x4 { I32x4([self[1], self[2], self[3], self[3]]) } /// Constructs a new vector from the third, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zzww(self) -> I32x4 { I32x4([self[2], self[2], self[3], self[3]]) } /// Constructs a new vector from the fourth, third, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wzww(self) -> I32x4 { I32x4([self[3], self[2], self[3], self[3]]) } /// Constructs a new vector from the first, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn xwww(self) -> I32x4 { I32x4([self[0], self[3], self[3], self[3]]) } /// Constructs a new vector from the second, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn ywww(self) -> I32x4 { I32x4([self[1], self[3], self[3], self[3]]) } /// Constructs a new vector from the third, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn zwww(self) -> I32x4 { I32x4([self[2], self[3], self[3], self[3]]) } /// Constructs a new vector from the fourth, fourth, fourth, and fourth /// lanes in this vector, respectively. #[inline] pub fn wwww(self) -> I32x4 { I32x4([self[3], self[3], self[3], self[3]]) } } pathfinder_simd-0.5.2/src/test.rs000064400000000000000000001001511046102023000151020ustar 00000000000000// pathfinder/simd/src/test.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::default::{F32x4, I32x4, U32x4}; use crate::scalar::F32x4 as F32x4S; // F32x4 #[test] fn test_f32x4_constructors() { let a = F32x4::new(1.0, 2.0, 3.0, 4.0); assert_eq!((a[0], a[1], a[2], a[3]), (1.0, 2.0, 3.0, 4.0)); let b = F32x4::splat(10.0); assert_eq!(b, F32x4::new(10.0, 10.0, 10.0, 10.0)); } #[test] fn test_f32x4_accessors_and_mutators() { let a = F32x4::new(5.0, 6.0, 7.0, 8.0); assert_eq!((a.x(), a.y(), a.z(), a.w()), (5.0, 6.0, 7.0, 8.0)); let mut b = F32x4::new(10.0, 11.0, 12.0, 13.0); b.set_x(20.0); b.set_y(30.0); b.set_z(40.0); b.set_w(50.0); assert_eq!(b, F32x4::new(20.0, 30.0, 40.0, 50.0)); } #[test] fn test_f32x4_basic_ops() { let a = F32x4::new(1.0, 3.0, 5.0, 7.0); let b = F32x4::new(2.0, 2.0, 6.0, 6.0); assert_eq!(a.approx_recip(), F32x4::new(0.99975586, 0.33325195, 0.19995117, 0.14282227)); assert_eq!(a.min(b), F32x4::new(1.0, 2.0, 5.0, 6.0)); assert_eq!(a.max(b), F32x4::new(2.0, 3.0, 6.0, 7.0)); let c = F32x4::new(-1.0, 1.3, -20.0, 3.6); assert_eq!(c.clamp(a, b), F32x4::new(1.0, 2.0, 5.0, 6.0)); assert_eq!(c.abs(), F32x4::new(1.0, 1.3, 20.0, 3.6)); assert_eq!(c.floor(), F32x4::new(-1.0, 1.0, -20.0, 3.0)); assert_eq!(c.ceil(), F32x4::new(-1.0, 2.0, -20.0, 4.0)); assert_eq!(c.to_i32x4().to_f32x4(), F32x4::new(-1.0, 1.0, -20.0, 4.0)); let d = F32x4::new(1.0, 2.0, 3.0, 4.0); assert_eq!(d.sqrt(), F32x4::new(1.0, 1.4142135, 1.7320508, 2.0)); } #[test] fn test_f32x4_packed_comparisons() { let a = F32x4::new(7.0, 3.0, 6.0, -2.0); let b = F32x4::new(10.0, 3.0, 5.0, -2.0); assert_eq!(a.packed_eq(b), U32x4::new(0, !0, 0, !0)); assert_eq!(a.packed_gt(b), U32x4::new(0, 0, !0, 0)); assert_eq!(a.packed_le(b), U32x4::new(!0, !0, 0, !0)); } #[test] fn test_f32x4_swizzles() { let a = F32x4::new(1.0, 2.0, 3.0, 4.0); assert_eq!(a.xxxx(), F32x4::splat(1.0)); assert_eq!(a.yyyy(), F32x4::splat(2.0)); assert_eq!(a.zzzz(), F32x4::splat(3.0)); assert_eq!(a.wwww(), F32x4::splat(4.0)); assert_eq!(a.yxxx(), F32x4::new(2.0, 1.0, 1.0, 1.0)); assert_eq!(a.zxxx(), F32x4::new(3.0, 1.0, 1.0, 1.0)); assert_eq!(a.wxxx(), F32x4::new(4.0, 1.0, 1.0, 1.0)); assert_eq!(a.xyxx(), F32x4::new(1.0, 2.0, 1.0, 1.0)); assert_eq!(a.yyxx(), F32x4::new(2.0, 2.0, 1.0, 1.0)); assert_eq!(a.zyxx(), F32x4::new(3.0, 2.0, 1.0, 1.0)); assert_eq!(a.wyxx(), F32x4::new(4.0, 2.0, 1.0, 1.0)); assert_eq!(a.xzxx(), F32x4::new(1.0, 3.0, 1.0, 1.0)); assert_eq!(a.yzxx(), F32x4::new(2.0, 3.0, 1.0, 1.0)); assert_eq!(a.zzxx(), F32x4::new(3.0, 3.0, 1.0, 1.0)); assert_eq!(a.wzxx(), F32x4::new(4.0, 3.0, 1.0, 1.0)); assert_eq!(a.xwxx(), F32x4::new(1.0, 4.0, 1.0, 1.0)); assert_eq!(a.ywxx(), F32x4::new(2.0, 4.0, 1.0, 1.0)); assert_eq!(a.zwxx(), F32x4::new(3.0, 4.0, 1.0, 1.0)); assert_eq!(a.wwxx(), F32x4::new(4.0, 4.0, 1.0, 1.0)); assert_eq!(a.xxyx(), F32x4::new(1.0, 1.0, 2.0, 1.0)); assert_eq!(a.yxyx(), F32x4::new(2.0, 1.0, 2.0, 1.0)); assert_eq!(a.zxyx(), F32x4::new(3.0, 1.0, 2.0, 1.0)); assert_eq!(a.wxyx(), F32x4::new(4.0, 1.0, 2.0, 1.0)); assert_eq!(a.xyyx(), F32x4::new(1.0, 2.0, 2.0, 1.0)); assert_eq!(a.yyyx(), F32x4::new(2.0, 2.0, 2.0, 1.0)); assert_eq!(a.zyyx(), F32x4::new(3.0, 2.0, 2.0, 1.0)); assert_eq!(a.wyyx(), F32x4::new(4.0, 2.0, 2.0, 1.0)); assert_eq!(a.xzyx(), F32x4::new(1.0, 3.0, 2.0, 1.0)); assert_eq!(a.yzyx(), F32x4::new(2.0, 3.0, 2.0, 1.0)); assert_eq!(a.zzyx(), F32x4::new(3.0, 3.0, 2.0, 1.0)); assert_eq!(a.wzyx(), F32x4::new(4.0, 3.0, 2.0, 1.0)); assert_eq!(a.xwyx(), F32x4::new(1.0, 4.0, 2.0, 1.0)); assert_eq!(a.ywyx(), F32x4::new(2.0, 4.0, 2.0, 1.0)); assert_eq!(a.zwyx(), F32x4::new(3.0, 4.0, 2.0, 1.0)); assert_eq!(a.wwyx(), F32x4::new(4.0, 4.0, 2.0, 1.0)); assert_eq!(a.xxzx(), F32x4::new(1.0, 1.0, 3.0, 1.0)); assert_eq!(a.yxzx(), F32x4::new(2.0, 1.0, 3.0, 1.0)); assert_eq!(a.zxzx(), F32x4::new(3.0, 1.0, 3.0, 1.0)); assert_eq!(a.wxzx(), F32x4::new(4.0, 1.0, 3.0, 1.0)); assert_eq!(a.xyzx(), F32x4::new(1.0, 2.0, 3.0, 1.0)); assert_eq!(a.yyzx(), F32x4::new(2.0, 2.0, 3.0, 1.0)); assert_eq!(a.zyzx(), F32x4::new(3.0, 2.0, 3.0, 1.0)); assert_eq!(a.wyzx(), F32x4::new(4.0, 2.0, 3.0, 1.0)); assert_eq!(a.xzzx(), F32x4::new(1.0, 3.0, 3.0, 1.0)); assert_eq!(a.yzzx(), F32x4::new(2.0, 3.0, 3.0, 1.0)); assert_eq!(a.zzzx(), F32x4::new(3.0, 3.0, 3.0, 1.0)); assert_eq!(a.wzzx(), F32x4::new(4.0, 3.0, 3.0, 1.0)); assert_eq!(a.xwzx(), F32x4::new(1.0, 4.0, 3.0, 1.0)); assert_eq!(a.ywzx(), F32x4::new(2.0, 4.0, 3.0, 1.0)); assert_eq!(a.zwzx(), F32x4::new(3.0, 4.0, 3.0, 1.0)); assert_eq!(a.wwzx(), F32x4::new(4.0, 4.0, 3.0, 1.0)); assert_eq!(a.xxwx(), F32x4::new(1.0, 1.0, 4.0, 1.0)); assert_eq!(a.yxwx(), F32x4::new(2.0, 1.0, 4.0, 1.0)); assert_eq!(a.zxwx(), F32x4::new(3.0, 1.0, 4.0, 1.0)); assert_eq!(a.wxwx(), F32x4::new(4.0, 1.0, 4.0, 1.0)); assert_eq!(a.xywx(), F32x4::new(1.0, 2.0, 4.0, 1.0)); assert_eq!(a.yywx(), F32x4::new(2.0, 2.0, 4.0, 1.0)); assert_eq!(a.zywx(), F32x4::new(3.0, 2.0, 4.0, 1.0)); assert_eq!(a.wywx(), F32x4::new(4.0, 2.0, 4.0, 1.0)); assert_eq!(a.xzwx(), F32x4::new(1.0, 3.0, 4.0, 1.0)); assert_eq!(a.yzwx(), F32x4::new(2.0, 3.0, 4.0, 1.0)); assert_eq!(a.zzwx(), F32x4::new(3.0, 3.0, 4.0, 1.0)); assert_eq!(a.wzwx(), F32x4::new(4.0, 3.0, 4.0, 1.0)); assert_eq!(a.xwwx(), F32x4::new(1.0, 4.0, 4.0, 1.0)); assert_eq!(a.ywwx(), F32x4::new(2.0, 4.0, 4.0, 1.0)); assert_eq!(a.zwwx(), F32x4::new(3.0, 4.0, 4.0, 1.0)); assert_eq!(a.wwwx(), F32x4::new(4.0, 4.0, 4.0, 1.0)); assert_eq!(a.xxxy(), F32x4::new(1.0, 1.0, 1.0, 2.0)); assert_eq!(a.yxxy(), F32x4::new(2.0, 1.0, 1.0, 2.0)); assert_eq!(a.zxxy(), F32x4::new(3.0, 1.0, 1.0, 2.0)); assert_eq!(a.wxxy(), F32x4::new(4.0, 1.0, 1.0, 2.0)); assert_eq!(a.xyxy(), F32x4::new(1.0, 2.0, 1.0, 2.0)); assert_eq!(a.yyxy(), F32x4::new(2.0, 2.0, 1.0, 2.0)); assert_eq!(a.zyxy(), F32x4::new(3.0, 2.0, 1.0, 2.0)); assert_eq!(a.wyxy(), F32x4::new(4.0, 2.0, 1.0, 2.0)); assert_eq!(a.xzxy(), F32x4::new(1.0, 3.0, 1.0, 2.0)); assert_eq!(a.yzxy(), F32x4::new(2.0, 3.0, 1.0, 2.0)); assert_eq!(a.zzxy(), F32x4::new(3.0, 3.0, 1.0, 2.0)); assert_eq!(a.wzxy(), F32x4::new(4.0, 3.0, 1.0, 2.0)); assert_eq!(a.xwxy(), F32x4::new(1.0, 4.0, 1.0, 2.0)); assert_eq!(a.ywxy(), F32x4::new(2.0, 4.0, 1.0, 2.0)); assert_eq!(a.zwxy(), F32x4::new(3.0, 4.0, 1.0, 2.0)); assert_eq!(a.wwxy(), F32x4::new(4.0, 4.0, 1.0, 2.0)); assert_eq!(a.xxyy(), F32x4::new(1.0, 1.0, 2.0, 2.0)); assert_eq!(a.yxyy(), F32x4::new(2.0, 1.0, 2.0, 2.0)); assert_eq!(a.zxyy(), F32x4::new(3.0, 1.0, 2.0, 2.0)); assert_eq!(a.wxyy(), F32x4::new(4.0, 1.0, 2.0, 2.0)); assert_eq!(a.xyyy(), F32x4::new(1.0, 2.0, 2.0, 2.0)); assert_eq!(a.zyyy(), F32x4::new(3.0, 2.0, 2.0, 2.0)); assert_eq!(a.wyyy(), F32x4::new(4.0, 2.0, 2.0, 2.0)); assert_eq!(a.xzyy(), F32x4::new(1.0, 3.0, 2.0, 2.0)); assert_eq!(a.yzyy(), F32x4::new(2.0, 3.0, 2.0, 2.0)); assert_eq!(a.zzyy(), F32x4::new(3.0, 3.0, 2.0, 2.0)); assert_eq!(a.wzyy(), F32x4::new(4.0, 3.0, 2.0, 2.0)); assert_eq!(a.xwyy(), F32x4::new(1.0, 4.0, 2.0, 2.0)); assert_eq!(a.ywyy(), F32x4::new(2.0, 4.0, 2.0, 2.0)); assert_eq!(a.zwyy(), F32x4::new(3.0, 4.0, 2.0, 2.0)); assert_eq!(a.wwyy(), F32x4::new(4.0, 4.0, 2.0, 2.0)); assert_eq!(a.xxzy(), F32x4::new(1.0, 1.0, 3.0, 2.0)); assert_eq!(a.yxzy(), F32x4::new(2.0, 1.0, 3.0, 2.0)); assert_eq!(a.zxzy(), F32x4::new(3.0, 1.0, 3.0, 2.0)); assert_eq!(a.wxzy(), F32x4::new(4.0, 1.0, 3.0, 2.0)); assert_eq!(a.xyzy(), F32x4::new(1.0, 2.0, 3.0, 2.0)); assert_eq!(a.yyzy(), F32x4::new(2.0, 2.0, 3.0, 2.0)); assert_eq!(a.zyzy(), F32x4::new(3.0, 2.0, 3.0, 2.0)); assert_eq!(a.wyzy(), F32x4::new(4.0, 2.0, 3.0, 2.0)); assert_eq!(a.xzzy(), F32x4::new(1.0, 3.0, 3.0, 2.0)); assert_eq!(a.yzzy(), F32x4::new(2.0, 3.0, 3.0, 2.0)); assert_eq!(a.zzzy(), F32x4::new(3.0, 3.0, 3.0, 2.0)); assert_eq!(a.wzzy(), F32x4::new(4.0, 3.0, 3.0, 2.0)); assert_eq!(a.xwzy(), F32x4::new(1.0, 4.0, 3.0, 2.0)); assert_eq!(a.ywzy(), F32x4::new(2.0, 4.0, 3.0, 2.0)); assert_eq!(a.zwzy(), F32x4::new(3.0, 4.0, 3.0, 2.0)); assert_eq!(a.wwzy(), F32x4::new(4.0, 4.0, 3.0, 2.0)); assert_eq!(a.xxwy(), F32x4::new(1.0, 1.0, 4.0, 2.0)); assert_eq!(a.yxwy(), F32x4::new(2.0, 1.0, 4.0, 2.0)); assert_eq!(a.zxwy(), F32x4::new(3.0, 1.0, 4.0, 2.0)); assert_eq!(a.wxwy(), F32x4::new(4.0, 1.0, 4.0, 2.0)); assert_eq!(a.xywy(), F32x4::new(1.0, 2.0, 4.0, 2.0)); assert_eq!(a.yywy(), F32x4::new(2.0, 2.0, 4.0, 2.0)); assert_eq!(a.zywy(), F32x4::new(3.0, 2.0, 4.0, 2.0)); assert_eq!(a.wywy(), F32x4::new(4.0, 2.0, 4.0, 2.0)); assert_eq!(a.xzwy(), F32x4::new(1.0, 3.0, 4.0, 2.0)); assert_eq!(a.yzwy(), F32x4::new(2.0, 3.0, 4.0, 2.0)); assert_eq!(a.zzwy(), F32x4::new(3.0, 3.0, 4.0, 2.0)); assert_eq!(a.wzwy(), F32x4::new(4.0, 3.0, 4.0, 2.0)); assert_eq!(a.xwwy(), F32x4::new(1.0, 4.0, 4.0, 2.0)); assert_eq!(a.ywwy(), F32x4::new(2.0, 4.0, 4.0, 2.0)); assert_eq!(a.zwwy(), F32x4::new(3.0, 4.0, 4.0, 2.0)); assert_eq!(a.wwwy(), F32x4::new(4.0, 4.0, 4.0, 2.0)); assert_eq!(a.xxxw(), F32x4::new(1.0, 1.0, 1.0, 4.0)); assert_eq!(a.yxxw(), F32x4::new(2.0, 1.0, 1.0, 4.0)); assert_eq!(a.zxxw(), F32x4::new(3.0, 1.0, 1.0, 4.0)); assert_eq!(a.wxxw(), F32x4::new(4.0, 1.0, 1.0, 4.0)); assert_eq!(a.xyxw(), F32x4::new(1.0, 2.0, 1.0, 4.0)); assert_eq!(a.yyxw(), F32x4::new(2.0, 2.0, 1.0, 4.0)); assert_eq!(a.zyxw(), F32x4::new(3.0, 2.0, 1.0, 4.0)); assert_eq!(a.wyxw(), F32x4::new(4.0, 2.0, 1.0, 4.0)); assert_eq!(a.xzxw(), F32x4::new(1.0, 3.0, 1.0, 4.0)); assert_eq!(a.yzxw(), F32x4::new(2.0, 3.0, 1.0, 4.0)); assert_eq!(a.zzxw(), F32x4::new(3.0, 3.0, 1.0, 4.0)); assert_eq!(a.wzxw(), F32x4::new(4.0, 3.0, 1.0, 4.0)); assert_eq!(a.xwxw(), F32x4::new(1.0, 4.0, 1.0, 4.0)); assert_eq!(a.ywxw(), F32x4::new(2.0, 4.0, 1.0, 4.0)); assert_eq!(a.zwxw(), F32x4::new(3.0, 4.0, 1.0, 4.0)); assert_eq!(a.wwxw(), F32x4::new(4.0, 4.0, 1.0, 4.0)); assert_eq!(a.xxyw(), F32x4::new(1.0, 1.0, 2.0, 4.0)); assert_eq!(a.yxyw(), F32x4::new(2.0, 1.0, 2.0, 4.0)); assert_eq!(a.zxyw(), F32x4::new(3.0, 1.0, 2.0, 4.0)); assert_eq!(a.wxyw(), F32x4::new(4.0, 1.0, 2.0, 4.0)); assert_eq!(a.xyyw(), F32x4::new(1.0, 2.0, 2.0, 4.0)); assert_eq!(a.yyyw(), F32x4::new(2.0, 2.0, 2.0, 4.0)); assert_eq!(a.zyyw(), F32x4::new(3.0, 2.0, 2.0, 4.0)); assert_eq!(a.wyyw(), F32x4::new(4.0, 2.0, 2.0, 4.0)); assert_eq!(a.xzyw(), F32x4::new(1.0, 3.0, 2.0, 4.0)); assert_eq!(a.yzyw(), F32x4::new(2.0, 3.0, 2.0, 4.0)); assert_eq!(a.zzyw(), F32x4::new(3.0, 3.0, 2.0, 4.0)); assert_eq!(a.wzyw(), F32x4::new(4.0, 3.0, 2.0, 4.0)); assert_eq!(a.xwyw(), F32x4::new(1.0, 4.0, 2.0, 4.0)); assert_eq!(a.ywyw(), F32x4::new(2.0, 4.0, 2.0, 4.0)); assert_eq!(a.zwyw(), F32x4::new(3.0, 4.0, 2.0, 4.0)); assert_eq!(a.wwyw(), F32x4::new(4.0, 4.0, 2.0, 4.0)); assert_eq!(a.xxzw(), F32x4::new(1.0, 1.0, 3.0, 4.0)); assert_eq!(a.yxzw(), F32x4::new(2.0, 1.0, 3.0, 4.0)); assert_eq!(a.zxzw(), F32x4::new(3.0, 1.0, 3.0, 4.0)); assert_eq!(a.wxzw(), F32x4::new(4.0, 1.0, 3.0, 4.0)); assert_eq!(a.xyzw(), F32x4::new(1.0, 2.0, 3.0, 4.0)); assert_eq!(a.yyzw(), F32x4::new(2.0, 2.0, 3.0, 4.0)); assert_eq!(a.zyzw(), F32x4::new(3.0, 2.0, 3.0, 4.0)); assert_eq!(a.wyzw(), F32x4::new(4.0, 2.0, 3.0, 4.0)); assert_eq!(a.xzzw(), F32x4::new(1.0, 3.0, 3.0, 4.0)); assert_eq!(a.yzzw(), F32x4::new(2.0, 3.0, 3.0, 4.0)); assert_eq!(a.zzzw(), F32x4::new(3.0, 3.0, 3.0, 4.0)); assert_eq!(a.wzzw(), F32x4::new(4.0, 3.0, 3.0, 4.0)); assert_eq!(a.xwzw(), F32x4::new(1.0, 4.0, 3.0, 4.0)); assert_eq!(a.ywzw(), F32x4::new(2.0, 4.0, 3.0, 4.0)); assert_eq!(a.zwzw(), F32x4::new(3.0, 4.0, 3.0, 4.0)); assert_eq!(a.wwzw(), F32x4::new(4.0, 4.0, 3.0, 4.0)); assert_eq!(a.xxww(), F32x4::new(1.0, 1.0, 4.0, 4.0)); assert_eq!(a.yxww(), F32x4::new(2.0, 1.0, 4.0, 4.0)); assert_eq!(a.zxww(), F32x4::new(3.0, 1.0, 4.0, 4.0)); assert_eq!(a.wxww(), F32x4::new(4.0, 1.0, 4.0, 4.0)); assert_eq!(a.xyww(), F32x4::new(1.0, 2.0, 4.0, 4.0)); assert_eq!(a.yyww(), F32x4::new(2.0, 2.0, 4.0, 4.0)); assert_eq!(a.zyww(), F32x4::new(3.0, 2.0, 4.0, 4.0)); assert_eq!(a.wzww(), F32x4::new(4.0, 3.0, 4.0, 4.0)); assert_eq!(a.xzww(), F32x4::new(1.0, 3.0, 4.0, 4.0)); assert_eq!(a.yzww(), F32x4::new(2.0, 3.0, 4.0, 4.0)); assert_eq!(a.zzww(), F32x4::new(3.0, 3.0, 4.0, 4.0)); assert_eq!(a.wzww(), F32x4::new(4.0, 3.0, 4.0, 4.0)); assert_eq!(a.xwww(), F32x4::new(1.0, 4.0, 4.0, 4.0)); assert_eq!(a.ywww(), F32x4::new(2.0, 4.0, 4.0, 4.0)); assert_eq!(a.zwww(), F32x4::new(3.0, 4.0, 4.0, 4.0)); assert_eq!(a.xxxz(), F32x4::new(1.0, 1.0, 1.0, 3.0)); assert_eq!(a.yxxz(), F32x4::new(2.0, 1.0, 1.0, 3.0)); assert_eq!(a.zxxz(), F32x4::new(3.0, 1.0, 1.0, 3.0)); assert_eq!(a.wxxz(), F32x4::new(4.0, 1.0, 1.0, 3.0)); assert_eq!(a.xyxz(), F32x4::new(1.0, 2.0, 1.0, 3.0)); assert_eq!(a.yyxz(), F32x4::new(2.0, 2.0, 1.0, 3.0)); assert_eq!(a.zyxz(), F32x4::new(3.0, 2.0, 1.0, 3.0)); assert_eq!(a.wyxz(), F32x4::new(4.0, 2.0, 1.0, 3.0)); assert_eq!(a.xzxz(), F32x4::new(1.0, 3.0, 1.0, 3.0)); assert_eq!(a.yzxz(), F32x4::new(2.0, 3.0, 1.0, 3.0)); assert_eq!(a.zzxz(), F32x4::new(3.0, 3.0, 1.0, 3.0)); assert_eq!(a.wzxz(), F32x4::new(4.0, 3.0, 1.0, 3.0)); assert_eq!(a.xwxz(), F32x4::new(1.0, 4.0, 1.0, 3.0)); assert_eq!(a.ywxz(), F32x4::new(2.0, 4.0, 1.0, 3.0)); assert_eq!(a.zwxz(), F32x4::new(3.0, 4.0, 1.0, 3.0)); assert_eq!(a.wwxz(), F32x4::new(4.0, 4.0, 1.0, 3.0)); assert_eq!(a.xxyz(), F32x4::new(1.0, 1.0, 2.0, 3.0)); assert_eq!(a.yxyz(), F32x4::new(2.0, 1.0, 2.0, 3.0)); assert_eq!(a.zxyz(), F32x4::new(3.0, 1.0, 2.0, 3.0)); assert_eq!(a.wxyz(), F32x4::new(4.0, 1.0, 2.0, 3.0)); assert_eq!(a.xyyz(), F32x4::new(1.0, 2.0, 2.0, 3.0)); assert_eq!(a.yyyz(), F32x4::new(2.0, 2.0, 2.0, 3.0)); assert_eq!(a.zyyz(), F32x4::new(3.0, 2.0, 2.0, 3.0)); assert_eq!(a.wyyz(), F32x4::new(4.0, 2.0, 2.0, 3.0)); assert_eq!(a.xzyz(), F32x4::new(1.0, 3.0, 2.0, 3.0)); assert_eq!(a.yzyz(), F32x4::new(2.0, 3.0, 2.0, 3.0)); assert_eq!(a.zzyz(), F32x4::new(3.0, 3.0, 2.0, 3.0)); assert_eq!(a.wzyz(), F32x4::new(4.0, 3.0, 2.0, 3.0)); assert_eq!(a.xwyz(), F32x4::new(1.0, 4.0, 2.0, 3.0)); assert_eq!(a.ywyz(), F32x4::new(2.0, 4.0, 2.0, 3.0)); assert_eq!(a.zwyz(), F32x4::new(3.0, 4.0, 2.0, 3.0)); assert_eq!(a.wwyz(), F32x4::new(4.0, 4.0, 2.0, 3.0)); assert_eq!(a.xxzz(), F32x4::new(1.0, 1.0, 3.0, 3.0)); assert_eq!(a.yxzz(), F32x4::new(2.0, 1.0, 3.0, 3.0)); assert_eq!(a.zxzz(), F32x4::new(3.0, 1.0, 3.0, 3.0)); assert_eq!(a.wxzz(), F32x4::new(4.0, 1.0, 3.0, 3.0)); assert_eq!(a.xyzz(), F32x4::new(1.0, 2.0, 3.0, 3.0)); assert_eq!(a.yyzz(), F32x4::new(2.0, 2.0, 3.0, 3.0)); assert_eq!(a.zyzz(), F32x4::new(3.0, 2.0, 3.0, 3.0)); assert_eq!(a.wyzz(), F32x4::new(4.0, 2.0, 3.0, 3.0)); assert_eq!(a.xzzz(), F32x4::new(1.0, 3.0, 3.0, 3.0)); assert_eq!(a.yzzz(), F32x4::new(2.0, 3.0, 3.0, 3.0)); assert_eq!(a.wzzz(), F32x4::new(4.0, 3.0, 3.0, 3.0)); assert_eq!(a.xwzz(), F32x4::new(1.0, 4.0, 3.0, 3.0)); assert_eq!(a.ywzz(), F32x4::new(2.0, 4.0, 3.0, 3.0)); assert_eq!(a.zwzz(), F32x4::new(3.0, 4.0, 3.0, 3.0)); assert_eq!(a.wwzz(), F32x4::new(4.0, 4.0, 3.0, 3.0)); assert_eq!(a.xxwz(), F32x4::new(1.0, 1.0, 4.0, 3.0)); assert_eq!(a.yxwz(), F32x4::new(2.0, 1.0, 4.0, 3.0)); assert_eq!(a.zxwz(), F32x4::new(3.0, 1.0, 4.0, 3.0)); assert_eq!(a.wxwz(), F32x4::new(4.0, 1.0, 4.0, 3.0)); assert_eq!(a.xywz(), F32x4::new(1.0, 2.0, 4.0, 3.0)); assert_eq!(a.yywz(), F32x4::new(2.0, 2.0, 4.0, 3.0)); assert_eq!(a.zywz(), F32x4::new(3.0, 2.0, 4.0, 3.0)); assert_eq!(a.wywz(), F32x4::new(4.0, 2.0, 4.0, 3.0)); assert_eq!(a.xzwz(), F32x4::new(1.0, 3.0, 4.0, 3.0)); assert_eq!(a.yzwz(), F32x4::new(2.0, 3.0, 4.0, 3.0)); assert_eq!(a.zzwz(), F32x4::new(3.0, 3.0, 4.0, 3.0)); assert_eq!(a.wzwz(), F32x4::new(4.0, 3.0, 4.0, 3.0)); assert_eq!(a.xwwz(), F32x4::new(1.0, 4.0, 4.0, 3.0)); assert_eq!(a.ywwz(), F32x4::new(2.0, 4.0, 4.0, 3.0)); assert_eq!(a.zwwz(), F32x4::new(3.0, 4.0, 4.0, 3.0)); assert_eq!(a.wwwz(), F32x4::new(4.0, 4.0, 4.0, 3.0)); } #[test] fn test_f32x4_concatenations() { let a = F32x4::new(4.0, 2.0, 6.0, -1.0); let b = F32x4::new(10.0, -3.0, 15.0, 41.0); assert_eq!(a.concat_xy_xy(b), F32x4::new(4.0, 2.0, 10.0, -3.0)); assert_eq!(a.concat_xy_zw(b), F32x4::new(4.0, 2.0, 15.0, 41.0)); assert_eq!(a.concat_zw_zw(b), F32x4::new(6.0, -1.0, 15.0, 41.0)); assert_eq!(a.concat_wz_yx(b), F32x4::new(-1.0, 6.0, -3.0, 10.0)); } #[test] fn test_f32x4_arithmetic_overloads() { let a = F32x4::new(4.0, -1.0, 6.0, -32.0); let b = F32x4::new(0.5, 0.5, 10.0, 3.0); let a_plus_b = F32x4::new(4.5, -0.5, 16.0, -29.0); let a_minus_b = F32x4::new(3.5, -1.5, -4.0, -35.0); let a_times_b = F32x4::new(2.0, -0.5, 60.0, -96.0); assert_eq!(a + b, a_plus_b); assert_eq!(a - b, a_minus_b); assert_eq!(a * b, a_times_b); let mut c = a; c += b; assert_eq!(c, a_plus_b); c = a; c -= b; assert_eq!(c, a_minus_b); c = a; c *= b; assert_eq!(c, a_times_b); assert_eq!(-a, F32x4::new(-4.0, 1.0, -6.0, 32.0)); } #[test] fn test_f32x4_index_overloads() { let mut a = F32x4::new(4.0, 1.0, -32.5, 75.0); assert_eq!(a[2], -32.5); a[3] = 300.0; assert_eq!(a[3], 300.0); a[0] *= 0.5; assert_eq!(a[0], 2.0); } #[test] fn test_f32x4_conversions() { let a = F32x4::new(48.0, -4.0, 200.0, 7.0); assert_eq!(a.to_i32x4(), I32x4::new(48, -4, 200, 7)); } #[test] fn test_f32x4_debug() { let a = F32x4::new(48.0, -4.0, 200.0, 7.0); assert_eq!("<48, -4, 200, 7>", format!("{:?}", a)); } // I32x4 #[test] fn test_i32x4_constructors() { let a = I32x4::new(3, 58, 10, 4); assert_eq!((a[0], a[1], a[2], a[3]), (3, 58, 10, 4)); let b = I32x4::splat(39); assert_eq!(b, I32x4::new(39, 39, 39, 39)); } #[test] fn test_i32x4_basic_ops() { let a = I32x4::new(6, 29, -40, 2); let b = I32x4::new(10, -5, 10, 46); assert_eq!(a.min(b), I32x4::new(6, -5, -40, 2)); } #[test] fn test_i32x4_packed_comparisons() { let a = I32x4::new(59, 1, 5, 63); let b = I32x4::new(-59, 1, 5, 104); assert_eq!(a.packed_eq(b), U32x4::new(0, !0, !0, 0)); } #[test] fn test_i32x4_swizzles() { let a = I32x4::new(1, 2, 3, 4); assert_eq!(a.xxxx(), I32x4::splat(1)); assert_eq!(a.yyyy(), I32x4::splat(2)); assert_eq!(a.zzzz(), I32x4::splat(3)); assert_eq!(a.wwww(), I32x4::splat(4)); assert_eq!(a.yxxx(), I32x4::new(2, 1, 1, 1)); assert_eq!(a.zxxx(), I32x4::new(3, 1, 1, 1)); assert_eq!(a.wxxx(), I32x4::new(4, 1, 1, 1)); assert_eq!(a.xyxx(), I32x4::new(1, 2, 1, 1)); assert_eq!(a.yyxx(), I32x4::new(2, 2, 1, 1)); assert_eq!(a.zyxx(), I32x4::new(3, 2, 1, 1)); assert_eq!(a.wyxx(), I32x4::new(4, 2, 1, 1)); assert_eq!(a.xzxx(), I32x4::new(1, 3, 1, 1)); assert_eq!(a.yzxx(), I32x4::new(2, 3, 1, 1)); assert_eq!(a.zzxx(), I32x4::new(3, 3, 1, 1)); assert_eq!(a.wzxx(), I32x4::new(4, 3, 1, 1)); assert_eq!(a.xwxx(), I32x4::new(1, 4, 1, 1)); assert_eq!(a.ywxx(), I32x4::new(2, 4, 1, 1)); assert_eq!(a.zwxx(), I32x4::new(3, 4, 1, 1)); assert_eq!(a.wwxx(), I32x4::new(4, 4, 1, 1)); assert_eq!(a.xxyx(), I32x4::new(1, 1, 2, 1)); assert_eq!(a.yxyx(), I32x4::new(2, 1, 2, 1)); assert_eq!(a.zxyx(), I32x4::new(3, 1, 2, 1)); assert_eq!(a.wxyx(), I32x4::new(4, 1, 2, 1)); assert_eq!(a.xyyx(), I32x4::new(1, 2, 2, 1)); assert_eq!(a.yyyx(), I32x4::new(2, 2, 2, 1)); assert_eq!(a.zyyx(), I32x4::new(3, 2, 2, 1)); assert_eq!(a.wyyx(), I32x4::new(4, 2, 2, 1)); assert_eq!(a.xzyx(), I32x4::new(1, 3, 2, 1)); assert_eq!(a.yzyx(), I32x4::new(2, 3, 2, 1)); assert_eq!(a.zzyx(), I32x4::new(3, 3, 2, 1)); assert_eq!(a.wzyx(), I32x4::new(4, 3, 2, 1)); assert_eq!(a.xwyx(), I32x4::new(1, 4, 2, 1)); assert_eq!(a.ywyx(), I32x4::new(2, 4, 2, 1)); assert_eq!(a.zwyx(), I32x4::new(3, 4, 2, 1)); assert_eq!(a.wwyx(), I32x4::new(4, 4, 2, 1)); assert_eq!(a.xxzx(), I32x4::new(1, 1, 3, 1)); assert_eq!(a.yxzx(), I32x4::new(2, 1, 3, 1)); assert_eq!(a.zxzx(), I32x4::new(3, 1, 3, 1)); assert_eq!(a.wxzx(), I32x4::new(4, 1, 3, 1)); assert_eq!(a.xyzx(), I32x4::new(1, 2, 3, 1)); assert_eq!(a.yyzx(), I32x4::new(2, 2, 3, 1)); assert_eq!(a.zyzx(), I32x4::new(3, 2, 3, 1)); assert_eq!(a.wyzx(), I32x4::new(4, 2, 3, 1)); assert_eq!(a.xzzx(), I32x4::new(1, 3, 3, 1)); assert_eq!(a.yzzx(), I32x4::new(2, 3, 3, 1)); assert_eq!(a.zzzx(), I32x4::new(3, 3, 3, 1)); assert_eq!(a.wzzx(), I32x4::new(4, 3, 3, 1)); assert_eq!(a.xwzx(), I32x4::new(1, 4, 3, 1)); assert_eq!(a.ywzx(), I32x4::new(2, 4, 3, 1)); assert_eq!(a.zwzx(), I32x4::new(3, 4, 3, 1)); assert_eq!(a.wwzx(), I32x4::new(4, 4, 3, 1)); assert_eq!(a.xxwx(), I32x4::new(1, 1, 4, 1)); assert_eq!(a.yxwx(), I32x4::new(2, 1, 4, 1)); assert_eq!(a.zxwx(), I32x4::new(3, 1, 4, 1)); assert_eq!(a.wxwx(), I32x4::new(4, 1, 4, 1)); assert_eq!(a.xywx(), I32x4::new(1, 2, 4, 1)); assert_eq!(a.yywx(), I32x4::new(2, 2, 4, 1)); assert_eq!(a.zywx(), I32x4::new(3, 2, 4, 1)); assert_eq!(a.wywx(), I32x4::new(4, 2, 4, 1)); assert_eq!(a.xzwx(), I32x4::new(1, 3, 4, 1)); assert_eq!(a.yzwx(), I32x4::new(2, 3, 4, 1)); assert_eq!(a.zzwx(), I32x4::new(3, 3, 4, 1)); assert_eq!(a.wzwx(), I32x4::new(4, 3, 4, 1)); assert_eq!(a.xwwx(), I32x4::new(1, 4, 4, 1)); assert_eq!(a.ywwx(), I32x4::new(2, 4, 4, 1)); assert_eq!(a.zwwx(), I32x4::new(3, 4, 4, 1)); assert_eq!(a.wwwx(), I32x4::new(4, 4, 4, 1)); assert_eq!(a.xxxy(), I32x4::new(1, 1, 1, 2)); assert_eq!(a.yxxy(), I32x4::new(2, 1, 1, 2)); assert_eq!(a.zxxy(), I32x4::new(3, 1, 1, 2)); assert_eq!(a.wxxy(), I32x4::new(4, 1, 1, 2)); assert_eq!(a.xyxy(), I32x4::new(1, 2, 1, 2)); assert_eq!(a.yyxy(), I32x4::new(2, 2, 1, 2)); assert_eq!(a.zyxy(), I32x4::new(3, 2, 1, 2)); assert_eq!(a.wyxy(), I32x4::new(4, 2, 1, 2)); assert_eq!(a.xzxy(), I32x4::new(1, 3, 1, 2)); assert_eq!(a.yzxy(), I32x4::new(2, 3, 1, 2)); assert_eq!(a.zzxy(), I32x4::new(3, 3, 1, 2)); assert_eq!(a.wzxy(), I32x4::new(4, 3, 1, 2)); assert_eq!(a.xwxy(), I32x4::new(1, 4, 1, 2)); assert_eq!(a.ywxy(), I32x4::new(2, 4, 1, 2)); assert_eq!(a.zwxy(), I32x4::new(3, 4, 1, 2)); assert_eq!(a.wwxy(), I32x4::new(4, 4, 1, 2)); assert_eq!(a.xxyy(), I32x4::new(1, 1, 2, 2)); assert_eq!(a.yxyy(), I32x4::new(2, 1, 2, 2)); assert_eq!(a.zxyy(), I32x4::new(3, 1, 2, 2)); assert_eq!(a.wxyy(), I32x4::new(4, 1, 2, 2)); assert_eq!(a.xyyy(), I32x4::new(1, 2, 2, 2)); assert_eq!(a.zyyy(), I32x4::new(3, 2, 2, 2)); assert_eq!(a.wyyy(), I32x4::new(4, 2, 2, 2)); assert_eq!(a.xzyy(), I32x4::new(1, 3, 2, 2)); assert_eq!(a.yzyy(), I32x4::new(2, 3, 2, 2)); assert_eq!(a.zzyy(), I32x4::new(3, 3, 2, 2)); assert_eq!(a.wzyy(), I32x4::new(4, 3, 2, 2)); assert_eq!(a.xwyy(), I32x4::new(1, 4, 2, 2)); assert_eq!(a.ywyy(), I32x4::new(2, 4, 2, 2)); assert_eq!(a.zwyy(), I32x4::new(3, 4, 2, 2)); assert_eq!(a.wwyy(), I32x4::new(4, 4, 2, 2)); assert_eq!(a.xxzy(), I32x4::new(1, 1, 3, 2)); assert_eq!(a.yxzy(), I32x4::new(2, 1, 3, 2)); assert_eq!(a.zxzy(), I32x4::new(3, 1, 3, 2)); assert_eq!(a.wxzy(), I32x4::new(4, 1, 3, 2)); assert_eq!(a.xyzy(), I32x4::new(1, 2, 3, 2)); assert_eq!(a.yyzy(), I32x4::new(2, 2, 3, 2)); assert_eq!(a.zyzy(), I32x4::new(3, 2, 3, 2)); assert_eq!(a.wyzy(), I32x4::new(4, 2, 3, 2)); assert_eq!(a.xzzy(), I32x4::new(1, 3, 3, 2)); assert_eq!(a.yzzy(), I32x4::new(2, 3, 3, 2)); assert_eq!(a.zzzy(), I32x4::new(3, 3, 3, 2)); assert_eq!(a.wzzy(), I32x4::new(4, 3, 3, 2)); assert_eq!(a.xwzy(), I32x4::new(1, 4, 3, 2)); assert_eq!(a.ywzy(), I32x4::new(2, 4, 3, 2)); assert_eq!(a.zwzy(), I32x4::new(3, 4, 3, 2)); assert_eq!(a.wwzy(), I32x4::new(4, 4, 3, 2)); assert_eq!(a.xxwy(), I32x4::new(1, 1, 4, 2)); assert_eq!(a.yxwy(), I32x4::new(2, 1, 4, 2)); assert_eq!(a.zxwy(), I32x4::new(3, 1, 4, 2)); assert_eq!(a.wxwy(), I32x4::new(4, 1, 4, 2)); assert_eq!(a.xywy(), I32x4::new(1, 2, 4, 2)); assert_eq!(a.yywy(), I32x4::new(2, 2, 4, 2)); assert_eq!(a.zywy(), I32x4::new(3, 2, 4, 2)); assert_eq!(a.wywy(), I32x4::new(4, 2, 4, 2)); assert_eq!(a.xzwy(), I32x4::new(1, 3, 4, 2)); assert_eq!(a.yzwy(), I32x4::new(2, 3, 4, 2)); assert_eq!(a.zzwy(), I32x4::new(3, 3, 4, 2)); assert_eq!(a.wzwy(), I32x4::new(4, 3, 4, 2)); assert_eq!(a.xwwy(), I32x4::new(1, 4, 4, 2)); assert_eq!(a.ywwy(), I32x4::new(2, 4, 4, 2)); assert_eq!(a.zwwy(), I32x4::new(3, 4, 4, 2)); assert_eq!(a.wwwy(), I32x4::new(4, 4, 4, 2)); assert_eq!(a.xxxz(), I32x4::new(1, 1, 1, 3)); assert_eq!(a.yxxz(), I32x4::new(2, 1, 1, 3)); assert_eq!(a.zxxz(), I32x4::new(3, 1, 1, 3)); assert_eq!(a.wxxz(), I32x4::new(4, 1, 1, 3)); assert_eq!(a.xyxz(), I32x4::new(1, 2, 1, 3)); assert_eq!(a.yyxz(), I32x4::new(2, 2, 1, 3)); assert_eq!(a.zyxz(), I32x4::new(3, 2, 1, 3)); assert_eq!(a.wyxz(), I32x4::new(4, 2, 1, 3)); assert_eq!(a.xzxz(), I32x4::new(1, 3, 1, 3)); assert_eq!(a.yzxz(), I32x4::new(2, 3, 1, 3)); assert_eq!(a.zzxz(), I32x4::new(3, 3, 1, 3)); assert_eq!(a.wzxz(), I32x4::new(4, 3, 1, 3)); assert_eq!(a.xwxz(), I32x4::new(1, 4, 1, 3)); assert_eq!(a.ywxz(), I32x4::new(2, 4, 1, 3)); assert_eq!(a.zwxz(), I32x4::new(3, 4, 1, 3)); assert_eq!(a.wwxz(), I32x4::new(4, 4, 1, 3)); assert_eq!(a.xxyz(), I32x4::new(1, 1, 2, 3)); assert_eq!(a.yxyz(), I32x4::new(2, 1, 2, 3)); assert_eq!(a.zxyz(), I32x4::new(3, 1, 2, 3)); assert_eq!(a.wxyz(), I32x4::new(4, 1, 2, 3)); assert_eq!(a.xyyz(), I32x4::new(1, 2, 2, 3)); assert_eq!(a.yyyz(), I32x4::new(2, 2, 2, 3)); assert_eq!(a.zyyz(), I32x4::new(3, 2, 2, 3)); assert_eq!(a.wyyz(), I32x4::new(4, 2, 2, 3)); assert_eq!(a.xzyz(), I32x4::new(1, 3, 2, 3)); assert_eq!(a.yzyz(), I32x4::new(2, 3, 2, 3)); assert_eq!(a.zzyz(), I32x4::new(3, 3, 2, 3)); assert_eq!(a.wzyz(), I32x4::new(4, 3, 2, 3)); assert_eq!(a.xwyz(), I32x4::new(1, 4, 2, 3)); assert_eq!(a.ywyz(), I32x4::new(2, 4, 2, 3)); assert_eq!(a.zwyz(), I32x4::new(3, 4, 2, 3)); assert_eq!(a.wwyz(), I32x4::new(4, 4, 2, 3)); assert_eq!(a.xxzz(), I32x4::new(1, 1, 3, 3)); assert_eq!(a.yxzz(), I32x4::new(2, 1, 3, 3)); assert_eq!(a.zxzz(), I32x4::new(3, 1, 3, 3)); assert_eq!(a.wxzz(), I32x4::new(4, 1, 3, 3)); assert_eq!(a.xyzz(), I32x4::new(1, 2, 3, 3)); assert_eq!(a.yyzz(), I32x4::new(2, 2, 3, 3)); assert_eq!(a.zyzz(), I32x4::new(3, 2, 3, 3)); assert_eq!(a.wyzz(), I32x4::new(4, 2, 3, 3)); assert_eq!(a.xzzz(), I32x4::new(1, 3, 3, 3)); assert_eq!(a.yzzz(), I32x4::new(2, 3, 3, 3)); assert_eq!(a.wzzz(), I32x4::new(4, 3, 3, 3)); assert_eq!(a.xwzz(), I32x4::new(1, 4, 3, 3)); assert_eq!(a.ywzz(), I32x4::new(2, 4, 3, 3)); assert_eq!(a.zwzz(), I32x4::new(3, 4, 3, 3)); assert_eq!(a.wwzz(), I32x4::new(4, 4, 3, 3)); assert_eq!(a.xxwz(), I32x4::new(1, 1, 4, 3)); assert_eq!(a.yxwz(), I32x4::new(2, 1, 4, 3)); assert_eq!(a.zxwz(), I32x4::new(3, 1, 4, 3)); assert_eq!(a.wxwz(), I32x4::new(4, 1, 4, 3)); assert_eq!(a.xywz(), I32x4::new(1, 2, 4, 3)); assert_eq!(a.yywz(), I32x4::new(2, 2, 4, 3)); assert_eq!(a.zywz(), I32x4::new(3, 2, 4, 3)); assert_eq!(a.wywz(), I32x4::new(4, 2, 4, 3)); assert_eq!(a.xzwz(), I32x4::new(1, 3, 4, 3)); assert_eq!(a.yzwz(), I32x4::new(2, 3, 4, 3)); assert_eq!(a.zzwz(), I32x4::new(3, 3, 4, 3)); assert_eq!(a.wzwz(), I32x4::new(4, 3, 4, 3)); assert_eq!(a.xwwz(), I32x4::new(1, 4, 4, 3)); assert_eq!(a.ywwz(), I32x4::new(2, 4, 4, 3)); assert_eq!(a.zwwz(), I32x4::new(3, 4, 4, 3)); assert_eq!(a.wwwz(), I32x4::new(4, 4, 4, 3)); assert_eq!(a.xxxw(), I32x4::new(1, 1, 1, 4)); assert_eq!(a.yxxw(), I32x4::new(2, 1, 1, 4)); assert_eq!(a.zxxw(), I32x4::new(3, 1, 1, 4)); assert_eq!(a.wxxw(), I32x4::new(4, 1, 1, 4)); assert_eq!(a.xyxw(), I32x4::new(1, 2, 1, 4)); assert_eq!(a.yyxw(), I32x4::new(2, 2, 1, 4)); assert_eq!(a.zyxw(), I32x4::new(3, 2, 1, 4)); assert_eq!(a.wyxw(), I32x4::new(4, 2, 1, 4)); assert_eq!(a.xzxw(), I32x4::new(1, 3, 1, 4)); assert_eq!(a.yzxw(), I32x4::new(2, 3, 1, 4)); assert_eq!(a.zzxw(), I32x4::new(3, 3, 1, 4)); assert_eq!(a.wzxw(), I32x4::new(4, 3, 1, 4)); assert_eq!(a.xwxw(), I32x4::new(1, 4, 1, 4)); assert_eq!(a.ywxw(), I32x4::new(2, 4, 1, 4)); assert_eq!(a.zwxw(), I32x4::new(3, 4, 1, 4)); assert_eq!(a.wwxw(), I32x4::new(4, 4, 1, 4)); assert_eq!(a.xxyw(), I32x4::new(1, 1, 2, 4)); assert_eq!(a.yxyw(), I32x4::new(2, 1, 2, 4)); assert_eq!(a.zxyw(), I32x4::new(3, 1, 2, 4)); assert_eq!(a.wxyw(), I32x4::new(4, 1, 2, 4)); assert_eq!(a.xyyw(), I32x4::new(1, 2, 2, 4)); assert_eq!(a.yyyw(), I32x4::new(2, 2, 2, 4)); assert_eq!(a.zyyw(), I32x4::new(3, 2, 2, 4)); assert_eq!(a.wyyw(), I32x4::new(4, 2, 2, 4)); assert_eq!(a.xzyw(), I32x4::new(1, 3, 2, 4)); assert_eq!(a.yzyw(), I32x4::new(2, 3, 2, 4)); assert_eq!(a.zzyw(), I32x4::new(3, 3, 2, 4)); assert_eq!(a.wzyw(), I32x4::new(4, 3, 2, 4)); assert_eq!(a.xwyw(), I32x4::new(1, 4, 2, 4)); assert_eq!(a.ywyw(), I32x4::new(2, 4, 2, 4)); assert_eq!(a.zwyw(), I32x4::new(3, 4, 2, 4)); assert_eq!(a.wwyw(), I32x4::new(4, 4, 2, 4)); assert_eq!(a.xxzw(), I32x4::new(1, 1, 3, 4)); assert_eq!(a.yxzw(), I32x4::new(2, 1, 3, 4)); assert_eq!(a.zxzw(), I32x4::new(3, 1, 3, 4)); assert_eq!(a.wxzw(), I32x4::new(4, 1, 3, 4)); assert_eq!(a.xyzw(), I32x4::new(1, 2, 3, 4)); assert_eq!(a.yyzw(), I32x4::new(2, 2, 3, 4)); assert_eq!(a.zyzw(), I32x4::new(3, 2, 3, 4)); assert_eq!(a.wyzw(), I32x4::new(4, 2, 3, 4)); assert_eq!(a.xzzw(), I32x4::new(1, 3, 3, 4)); assert_eq!(a.yzzw(), I32x4::new(2, 3, 3, 4)); assert_eq!(a.zzzw(), I32x4::new(3, 3, 3, 4)); assert_eq!(a.wzzw(), I32x4::new(4, 3, 3, 4)); assert_eq!(a.xwzw(), I32x4::new(1, 4, 3, 4)); assert_eq!(a.ywzw(), I32x4::new(2, 4, 3, 4)); assert_eq!(a.zwzw(), I32x4::new(3, 4, 3, 4)); assert_eq!(a.wwzw(), I32x4::new(4, 4, 3, 4)); assert_eq!(a.xxww(), I32x4::new(1, 1, 4, 4)); assert_eq!(a.yxww(), I32x4::new(2, 1, 4, 4)); assert_eq!(a.zxww(), I32x4::new(3, 1, 4, 4)); assert_eq!(a.wxww(), I32x4::new(4, 1, 4, 4)); assert_eq!(a.xyww(), I32x4::new(1, 2, 4, 4)); assert_eq!(a.yyww(), I32x4::new(2, 2, 4, 4)); assert_eq!(a.zyww(), I32x4::new(3, 2, 4, 4)); assert_eq!(a.wzww(), I32x4::new(4, 3, 4, 4)); assert_eq!(a.xzww(), I32x4::new(1, 3, 4, 4)); assert_eq!(a.yzww(), I32x4::new(2, 3, 4, 4)); assert_eq!(a.zzww(), I32x4::new(3, 3, 4, 4)); assert_eq!(a.wzww(), I32x4::new(4, 3, 4, 4)); assert_eq!(a.xwww(), I32x4::new(1, 4, 4, 4)); assert_eq!(a.ywww(), I32x4::new(2, 4, 4, 4)); assert_eq!(a.zwww(), I32x4::new(3, 4, 4, 4)); } // Scalar F32x4 #[test] fn test_f32x4s_constructors() { let a = F32x4S::new(1.0, 2.0, 3.0, 4.0); assert_eq!((a[0], a[1], a[2], a[3]), (1.0, 2.0, 3.0, 4.0)); let b = F32x4S::splat(10.0); assert_eq!(b, F32x4S::new(10.0, 10.0, 10.0, 10.0)); } #[test] fn test_f32x4s_basic_ops() { let a = F32x4S::new(1.0, 3.0, 5.0, 7.0); let b = F32x4S::new(2.0, 2.0, 6.0, 6.0); assert_eq!(a.min(b), F32x4S::new(1.0, 2.0, 5.0, 6.0)); assert_eq!(a.max(b), F32x4S::new(2.0, 3.0, 6.0, 7.0)); let c = F32x4S::new(-1.0, 1.3, -20.0, 3.6); assert_eq!(c.abs(), F32x4S::new(1.0, 1.3, 20.0, 3.6)); assert_eq!(c.floor(), F32x4S::new(-1.0, 1.0, -20.0, 3.0)); assert_eq!(c.ceil(), F32x4S::new(-1.0, 2.0, -20.0, 4.0)); assert_eq!(c.to_i32x4().to_f32x4(), F32x4S::new(-1.0, 1.0, -20.0, 4.0)); } pathfinder_simd-0.5.2/src/x86/mod.rs000064400000000000000000000536321046102023000153420ustar 00000000000000// pathfinder/simd/src/x86.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::cmp::PartialEq; use std::fmt::{self, Debug, Formatter}; use std::mem; use std::ops::{Add, BitAnd, BitOr, BitXor, Div, Index, IndexMut, Mul, Not, Shr, Sub}; #[cfg(target_pointer_width = "32")] use std::arch::x86::{__m128, __m128i}; #[cfg(target_pointer_width = "32")] use std::arch::x86; #[cfg(target_pointer_width = "64")] use std::arch::x86_64::{__m128, __m128i}; #[cfg(target_pointer_width = "64")] use std::arch::x86_64 as x86; mod swizzle_f32x4; mod swizzle_i32x4; // Two 32-bit floats #[derive(Clone, Copy)] pub struct F32x2(pub u64); impl F32x2 { // Constructors #[inline] pub fn new(a: f32, b: f32) -> F32x2 { unsafe { let a = mem::transmute::<*const f32, *const u32>(&a); let b = mem::transmute::<*const f32, *const u32>(&b); F32x2((*a as u64) | ((*b as u64) << 32)) } } #[inline] pub fn splat(x: f32) -> F32x2 { F32x2::new(x, x) } // Basic operations #[inline] pub fn approx_recip(self) -> F32x2 { self.to_f32x4().approx_recip().xy() } #[inline] pub fn min(self, other: F32x2) -> F32x2 { self.to_f32x4().min(other.to_f32x4()).xy() } #[inline] pub fn max(self, other: F32x2) -> F32x2 { self.to_f32x4().max(other.to_f32x4()).xy() } #[inline] pub fn clamp(self, min: F32x2, max: F32x2) -> F32x2 { self.to_f32x4().clamp(min.to_f32x4(), max.to_f32x4()).xy() } #[inline] pub fn abs(self) -> F32x2 { self.to_f32x4().abs().xy() } #[inline] pub fn floor(self) -> F32x2 { self.to_f32x4().floor().xy() } #[inline] pub fn ceil(self) -> F32x2 { self.to_f32x4().ceil().xy() } #[inline] pub fn sqrt(self) -> F32x2 { self.to_f32x4().sqrt().xy() } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x2) -> U32x2 { self.to_f32x4().packed_eq(other.to_f32x4()).xy() } #[inline] pub fn packed_gt(self, other: F32x2) -> U32x2 { self.to_f32x4().packed_gt(other.to_f32x4()).xy() } #[inline] pub fn packed_lt(self, other: F32x2) -> U32x2 { self.to_f32x4().packed_lt(other.to_f32x4()).xy() } #[inline] pub fn packed_le(self, other: F32x2) -> U32x2 { self.to_f32x4().packed_le(other.to_f32x4()).xy() } // Conversions #[inline] pub fn to_f32x4(self) -> F32x4 { unsafe { let mut result = F32x4::default(); *mem::transmute::<&mut __m128, &mut u64>(&mut result.0) = self.0; result } } #[inline] pub fn to_i32x2(self) -> I32x2 { self.to_i32x4().xy() } #[inline] pub fn to_i32x4(self) -> I32x4 { self.to_f32x4().to_i32x4() } // Swizzle #[inline] pub fn yx(self) -> F32x2 { self.to_f32x4().yx() } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x2) -> F32x4 { self.to_f32x4().concat_xy_xy(other.to_f32x4()) } } impl Default for F32x2 { #[inline] fn default() -> F32x2 { F32x2(0) } } impl Index for F32x2 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { unsafe { &mem::transmute::<&u64, &[f32; 2]>(&self.0)[index] } } } impl IndexMut for F32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { unsafe { &mut mem::transmute::<&mut u64, &mut [f32; 2]>(&mut self.0)[index] } } } impl Debug for F32x2 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}>", self[0], self[1]) } } impl PartialEq for F32x2 { #[inline] fn eq(&self, other: &F32x2) -> bool { self.packed_eq(*other).all_true() } } impl Add for F32x2 { type Output = F32x2; #[inline] fn add(self, other: F32x2) -> F32x2 { (self.to_f32x4() + other.to_f32x4()).xy() } } impl Div for F32x2 { type Output = F32x2; #[inline] fn div(self, other: F32x2) -> F32x2 { (self.to_f32x4() / other.to_f32x4()).xy() } } impl Mul for F32x2 { type Output = F32x2; #[inline] fn mul(self, other: F32x2) -> F32x2 { (self.to_f32x4() * other.to_f32x4()).xy() } } impl Sub for F32x2 { type Output = F32x2; #[inline] fn sub(self, other: F32x2) -> F32x2 { (self.to_f32x4() - other.to_f32x4()).xy() } } // Four 32-bit floats #[derive(Clone, Copy)] pub struct F32x4(pub __m128); impl F32x4 { // Constructors #[inline] pub fn new(a: f32, b: f32, c: f32, d: f32) -> F32x4 { unsafe { let vector = [a, b, c, d]; F32x4(x86::_mm_loadu_ps(vector.as_ptr())) } } #[inline] pub fn splat(x: f32) -> F32x4 { unsafe { F32x4(x86::_mm_set1_ps(x)) } } // Basic operations #[inline] pub fn approx_recip(self) -> F32x4 { unsafe { F32x4(x86::_mm_rcp_ps(self.0)) } } #[inline] pub fn min(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_min_ps(self.0, other.0)) } } #[inline] pub fn max(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_max_ps(self.0, other.0)) } } #[inline] pub fn clamp(self, min: F32x4, max: F32x4) -> F32x4 { self.max(min).min(max) } #[inline] pub fn abs(self) -> F32x4 { unsafe { let tmp = x86::_mm_srli_epi32(I32x4::splat(-1).0, 1); F32x4(x86::_mm_and_ps(x86::_mm_castsi128_ps(tmp), self.0)) } } #[inline] pub fn floor(self) -> F32x4 { unsafe { F32x4(x86::_mm_floor_ps(self.0)) } } #[inline] pub fn ceil(self) -> F32x4 { unsafe { F32x4(x86::_mm_ceil_ps(self.0)) } } #[inline] pub fn sqrt(self) -> F32x4 { unsafe { F32x4(x86::_mm_sqrt_ps(self.0)) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: F32x4) -> U32x4 { unsafe { U32x4(x86::_mm_castps_si128(x86::_mm_cmpeq_ps( self.0, other.0, ))) } } #[inline] pub fn packed_gt(self, other: F32x4) -> U32x4 { unsafe { U32x4(x86::_mm_castps_si128(x86::_mm_cmpgt_ps( self.0, other.0, ))) } } #[inline] pub fn packed_lt(self, other: F32x4) -> U32x4 { other.packed_gt(self) } #[inline] pub fn packed_le(self, other: F32x4) -> U32x4 { !self.packed_gt(other) } // Conversions /// Converts these packed floats to integers via rounding. #[inline] pub fn to_i32x4(self) -> I32x4 { unsafe { I32x4(x86::_mm_cvtps_epi32(self.0)) } } // Extraction #[inline] pub fn xy(self) -> F32x2 { unsafe { let swizzled = self.0; F32x2(*mem::transmute::<&__m128, &u64>(&swizzled)) } } #[inline] pub fn xw(self) -> F32x2 { self.xwyz().xy() } #[inline] pub fn yx(self) -> F32x2 { self.yxwz().xy() } #[inline] pub fn zy(self) -> F32x2 { self.zyxw().xy() } #[inline] pub fn zw(self) -> F32x2 { self.zwxy().xy() } // Concatenations #[inline] pub fn concat_xy_xy(self, other: F32x4) -> F32x4 { unsafe { let this = x86::_mm_castps_pd(self.0); let other = x86::_mm_castps_pd(other.0); let result = x86::_mm_unpacklo_pd(this, other); F32x4(x86::_mm_castpd_ps(result)) } } #[inline] pub fn concat_xy_zw(self, other: F32x4) -> F32x4 { unsafe { let this = x86::_mm_castps_pd(self.0); let other = x86::_mm_castps_pd(other.0); let result = x86::_mm_shuffle_pd(this, other, 0b10); F32x4(x86::_mm_castpd_ps(result)) } } #[inline] pub fn concat_zw_zw(self, other: F32x4) -> F32x4 { unsafe { let this = x86::_mm_castps_pd(self.0); let other = x86::_mm_castps_pd(other.0); let result = x86::_mm_unpackhi_pd(this, other); F32x4(x86::_mm_castpd_ps(result)) } } #[inline] pub fn concat_wz_yx(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, other.0, 0b0001_1011)) } } } impl Default for F32x4 { #[inline] fn default() -> F32x4 { unsafe { F32x4(x86::_mm_setzero_ps()) } } } impl Index for F32x4 { type Output = f32; #[inline] fn index(&self, index: usize) -> &f32 { unsafe { &mem::transmute::<&__m128, &[f32; 4]>(&self.0)[index] } } } impl IndexMut for F32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut f32 { unsafe { &mut mem::transmute::<&mut __m128, &mut [f32; 4]>(&mut self.0)[index] } } } impl Debug for F32x4 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}, {}, {}>", self[0], self[1], self[2], self[3]) } } impl PartialEq for F32x4 { #[inline] fn eq(&self, other: &F32x4) -> bool { self.packed_eq(*other).all_true() } } impl Add for F32x4 { type Output = F32x4; #[inline] fn add(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_add_ps(self.0, other.0)) } } } impl Div for F32x4 { type Output = F32x4; #[inline] fn div(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_div_ps(self.0, other.0)) } } } impl Mul for F32x4 { type Output = F32x4; #[inline] fn mul(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_mul_ps(self.0, other.0)) } } } impl Sub for F32x4 { type Output = F32x4; #[inline] fn sub(self, other: F32x4) -> F32x4 { unsafe { F32x4(x86::_mm_sub_ps(self.0, other.0)) } } } // Two 32-bit signed integers #[derive(Clone, Copy)] pub struct I32x2(pub u64); impl I32x2 { // Constructors #[inline] pub fn new(a: i32, b: i32) -> I32x2 { unsafe { let a = mem::transmute::<*const i32, *const u32>(&a); let b = mem::transmute::<*const i32, *const u32>(&b); I32x2((*a as u64) | ((*b as u64) << 32)) } } #[inline] pub fn splat(x: i32) -> I32x2 { I32x2::new(x, x) } // Accessors #[inline] pub fn x(self) -> i32 { self[0] } #[inline] pub fn y(self) -> i32 { self[1] } // Concatenations #[inline] pub fn concat_xy_xy(self, other: I32x2) -> I32x4 { self.to_i32x4().concat_xy_xy(other.to_i32x4()) } // Conversions #[inline] pub fn to_i32x4(self) -> I32x4 { unsafe { let mut result = I32x4::default(); *mem::transmute::<&mut __m128i, &mut u64>(&mut result.0) = self.0; result } } #[inline] pub fn to_f32x4(self) -> F32x4 { self.to_i32x4().to_f32x4() } /// Converts these packed integers to floats. #[inline] pub fn to_f32x2(self) -> F32x2 { self.to_f32x4().xy() } // Basic operations #[inline] pub fn max(self, other: I32x2) -> I32x2 { self.to_i32x4().max(other.to_i32x4()).xy() } #[inline] pub fn min(self, other: I32x2) -> I32x2 { self.to_i32x4().min(other.to_i32x4()).xy() } // Comparisons // TODO(pcwalton): Use the `U32x2` type! #[inline] pub fn packed_eq(self, other: I32x2) -> U32x4 { self.to_i32x4().packed_eq(other.to_i32x4()) } #[inline] pub fn packed_gt(self, other: I32x2) -> U32x4 { self.to_i32x4().packed_gt(other.to_i32x4()) } #[inline] pub fn packed_le(self, other: I32x2) -> U32x4 { self.to_i32x4().packed_le(other.to_i32x4()) } } impl Default for I32x2 { #[inline] fn default() -> I32x2 { I32x2(0) } } impl Index for I32x2 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { unsafe { &mem::transmute::<&u64, &[i32; 2]>(&self.0)[index] } } } impl IndexMut for I32x2 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { unsafe { &mut mem::transmute::<&mut u64, &mut [i32; 2]>(&mut self.0)[index] } } } impl Add for I32x2 { type Output = I32x2; #[inline] fn add(self, other: I32x2) -> I32x2 { (self.to_i32x4() + other.to_i32x4()).xy() } } impl Sub for I32x2 { type Output = I32x2; #[inline] fn sub(self, other: I32x2) -> I32x2 { (self.to_i32x4() - other.to_i32x4()).xy() } } impl Mul for I32x2 { type Output = I32x2; #[inline] fn mul(self, other: I32x2) -> I32x2 { (self.to_i32x4() * other.to_i32x4()).xy() } } impl Debug for I32x2 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}>", self[0], self[1]) } } impl PartialEq for I32x2 { #[inline] fn eq(&self, other: &I32x2) -> bool { self.packed_eq(*other).all_true() } } // Four 32-bit signed integers #[derive(Clone, Copy)] pub struct I32x4(pub __m128i); impl I32x4 { // Constructors #[inline] pub fn new(a: i32, b: i32, c: i32, d: i32) -> I32x4 { unsafe { let vector = [a, b, c, d]; I32x4(x86::_mm_loadu_si128(vector.as_ptr() as *const __m128i)) } } #[inline] pub fn splat(x: i32) -> I32x4 { unsafe { I32x4(x86::_mm_set1_epi32(x)) } } // Extraction #[inline] pub fn xy(self) -> I32x2 { unsafe { let swizzled = self.0; I32x2(*mem::transmute::<&__m128i, &u64>(&swizzled)) } } #[inline] pub fn xw(self) -> I32x2 { self.xwyz().xy() } #[inline] pub fn yx(self) -> I32x2 { self.yxwz().xy() } #[inline] pub fn zy(self) -> I32x2 { self.zyxw().xy() } #[inline] pub fn zw(self) -> I32x2 { self.zwxy().xy() } // Concatenations #[inline] pub fn concat_xy_xy(self, other: I32x4) -> I32x4 { unsafe { let this = x86::_mm_castsi128_pd(self.0); let other = x86::_mm_castsi128_pd(other.0); let result = x86::_mm_unpacklo_pd(this, other); I32x4(x86::_mm_castpd_si128(result)) } } #[inline] pub fn concat_zw_zw(self, other: I32x4) -> I32x4 { unsafe { let this = x86::_mm_castsi128_pd(self.0); let other = x86::_mm_castsi128_pd(other.0); let result = x86::_mm_unpackhi_pd(this, other); I32x4(x86::_mm_castpd_si128(result)) } } // Conversions /// Converts these packed integers to floats. #[inline] pub fn to_f32x4(self) -> F32x4 { unsafe { F32x4(x86::_mm_cvtepi32_ps(self.0)) } } /// Converts these packed signed integers to unsigned integers. /// /// Overflowing values will wrap around. #[inline] pub fn to_u32x4(self) -> U32x4 { U32x4(self.0) } // Basic operations #[inline] pub fn max(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_max_epi32(self.0, other.0)) } } #[inline] pub fn min(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_min_epi32(self.0, other.0)) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: I32x4) -> U32x4 { unsafe { U32x4(x86::_mm_cmpeq_epi32(self.0, other.0)) } } // Comparisons #[inline] pub fn packed_gt(self, other: I32x4) -> U32x4 { unsafe { U32x4(x86::_mm_cmpgt_epi32(self.0, other.0)) } } #[inline] pub fn packed_lt(self, other: I32x4) -> U32x4 { other.packed_gt(self) } #[inline] pub fn packed_le(self, other: I32x4) -> U32x4 { !self.packed_gt(other) } } impl Default for I32x4 { #[inline] fn default() -> I32x4 { unsafe { I32x4(x86::_mm_setzero_si128()) } } } impl Index for I32x4 { type Output = i32; #[inline] fn index(&self, index: usize) -> &i32 { unsafe { &mem::transmute::<&__m128i, &[i32; 4]>(&self.0)[index] } } } impl IndexMut for I32x4 { #[inline] fn index_mut(&mut self, index: usize) -> &mut i32 { unsafe { &mut mem::transmute::<&mut __m128i, &mut [i32; 4]>(&mut self.0)[index] } } } impl Add for I32x4 { type Output = I32x4; #[inline] fn add(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_add_epi32(self.0, other.0)) } } } impl Sub for I32x4 { type Output = I32x4; #[inline] fn sub(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_sub_epi32(self.0, other.0)) } } } impl Mul for I32x4 { type Output = I32x4; #[inline] fn mul(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_mullo_epi32(self.0, other.0)) } } } impl BitAnd for I32x4 { type Output = I32x4; #[inline] fn bitand(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_and_si128(self.0, other.0)) } } } impl BitOr for I32x4 { type Output = I32x4; #[inline] fn bitor(self, other: I32x4) -> I32x4 { unsafe { I32x4(x86::_mm_or_si128(self.0, other.0)) } } } impl Debug for I32x4 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}, {}, {}>", self[0], self[1], self[2], self[3]) } } impl PartialEq for I32x4 { #[inline] fn eq(&self, other: &I32x4) -> bool { self.packed_eq(*other).all_true() } } // Two 32-bit unsigned integers #[derive(Clone, Copy)] pub struct U32x2(pub u64); impl U32x2 { #[inline] pub fn new(x: u32, y: u32) -> U32x2 { U32x2(x as u64 | ((y as u64) << 32)) } #[inline] pub fn splat(x: u32) -> U32x2 { U32x2::new(x, x) } /// Returns true if both booleans in this vector are true. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(self) -> bool { self.0 == !0 } /// Returns true if both booleans in this vector are false. /// /// The result is *undefined* if both values in this vector are not booleans. A boolean is a /// value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(self) -> bool { self.0 == 0 } #[inline] pub fn to_i32x2(self) -> I32x2 { I32x2(self.0) } } impl Not for U32x2 { type Output = U32x2; #[inline] fn not(self) -> U32x2 { U32x2(!self.0) } } impl BitAnd for U32x2 { type Output = U32x2; #[inline] fn bitand(self, other: U32x2) -> U32x2 { U32x2(self.0 & other.0) } } impl BitOr for U32x2 { type Output = U32x2; #[inline] fn bitor(self, other: U32x2) -> U32x2 { U32x2(self.0 | other.0) } } // Four 32-bit unsigned integers #[derive(Clone, Copy)] pub struct U32x4(pub __m128i); impl U32x4 { // Constructors #[inline] pub fn new(a: u32, b: u32, c: u32, d: u32) -> U32x4 { unsafe { let vector = [a, b, c, d]; U32x4(x86::_mm_loadu_si128(vector.as_ptr() as *const __m128i)) } } #[inline] pub fn splat(x: u32) -> U32x4 { unsafe { U32x4(x86::_mm_set1_epi32(x as i32)) } } // Conversions /// Converts these packed unsigned integers to signed integers. /// /// Overflowing values will wrap around. #[inline] pub fn to_i32x4(self) -> I32x4 { I32x4(self.0) } // Basic operations /// Returns true if all four booleans in this vector are true. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_true(self) -> bool { unsafe { x86::_mm_movemask_ps(x86::_mm_castsi128_ps(self.0)) == 0x0f } } /// Returns true if all four booleans in this vector are false. /// /// The result is *undefined* if all four values in this vector are not booleans. A boolean is /// a value with all bits set or all bits clear (i.e. !0 or 0). #[inline] pub fn all_false(self) -> bool { unsafe { x86::_mm_movemask_ps(x86::_mm_castsi128_ps(self.0)) == 0x00 } } // Extraction #[inline] pub fn xy(self) -> U32x2 { unsafe { let swizzled = self.0; U32x2(*mem::transmute::<&__m128i, &u64>(&swizzled)) } } // Packed comparisons #[inline] pub fn packed_eq(self, other: U32x4) -> U32x4 { unsafe { U32x4(x86::_mm_cmpeq_epi32(self.0, other.0)) } } } impl Debug for U32x4 { #[inline] fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { write!(f, "<{}, {}, {}, {}>", self[0], self[1], self[2], self[3]) } } impl Index for U32x4 { type Output = u32; #[inline] fn index(&self, index: usize) -> &u32 { unsafe { &mem::transmute::<&__m128i, &[u32; 4]>(&self.0)[index] } } } impl PartialEq for U32x4 { #[inline] fn eq(&self, other: &U32x4) -> bool { self.packed_eq(*other).all_true() } } impl Not for U32x4 { type Output = U32x4; #[inline] fn not(self) -> U32x4 { self ^ U32x4::splat(!0) } } impl BitXor for U32x4 { type Output = U32x4; #[inline] fn bitxor(self, other: U32x4) -> U32x4 { unsafe { U32x4(x86::_mm_xor_si128(self.0, other.0)) } } } impl Shr for U32x4 { type Output = U32x4; #[inline] fn shr(self, amount: u32) -> U32x4 { unsafe { U32x4(x86::_mm_srl_epi32(self.0, U32x4::new(amount, 0, 0, 0).0)) } } } pathfinder_simd-0.5.2/src/x86/swizzle_f32x4.rs000064400000000000000000000753121046102023000172170ustar 00000000000000// pathfinder/simd/src/x86/swizzle_f32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::x86::F32x4; #[cfg(target_pointer_width = "32")] use std::arch::x86; #[cfg(target_pointer_width = "64")] use std::arch::x86_64 as x86; impl F32x4 { #[inline] pub fn xxxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 0)) } } #[inline] pub fn yxxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 1)) } } #[inline] pub fn zxxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 2)) } } #[inline] pub fn wxxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 3)) } } #[inline] pub fn xyxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 4)) } } #[inline] pub fn yyxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 5)) } } #[inline] pub fn zyxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 6)) } } #[inline] pub fn wyxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 7)) } } #[inline] pub fn xzxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 8)) } } #[inline] pub fn yzxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 9)) } } #[inline] pub fn zzxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 10)) } } #[inline] pub fn wzxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 11)) } } #[inline] pub fn xwxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 12)) } } #[inline] pub fn ywxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 13)) } } #[inline] pub fn zwxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 14)) } } #[inline] pub fn wwxx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 15)) } } #[inline] pub fn xxyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 16)) } } #[inline] pub fn yxyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 17)) } } #[inline] pub fn zxyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 18)) } } #[inline] pub fn wxyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 19)) } } #[inline] pub fn xyyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 20)) } } #[inline] pub fn yyyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 21)) } } #[inline] pub fn zyyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 22)) } } #[inline] pub fn wyyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 23)) } } #[inline] pub fn xzyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 24)) } } #[inline] pub fn yzyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 25)) } } #[inline] pub fn zzyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 26)) } } #[inline] pub fn wzyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 27)) } } #[inline] pub fn xwyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 28)) } } #[inline] pub fn ywyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 29)) } } #[inline] pub fn zwyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 30)) } } #[inline] pub fn wwyx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 31)) } } #[inline] pub fn xxzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 32)) } } #[inline] pub fn yxzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 33)) } } #[inline] pub fn zxzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 34)) } } #[inline] pub fn wxzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 35)) } } #[inline] pub fn xyzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 36)) } } #[inline] pub fn yyzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 37)) } } #[inline] pub fn zyzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 38)) } } #[inline] pub fn wyzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 39)) } } #[inline] pub fn xzzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 40)) } } #[inline] pub fn yzzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 41)) } } #[inline] pub fn zzzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 42)) } } #[inline] pub fn wzzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 43)) } } #[inline] pub fn xwzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 44)) } } #[inline] pub fn ywzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 45)) } } #[inline] pub fn zwzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 46)) } } #[inline] pub fn wwzx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 47)) } } #[inline] pub fn xxwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 48)) } } #[inline] pub fn yxwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 49)) } } #[inline] pub fn zxwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 50)) } } #[inline] pub fn wxwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 51)) } } #[inline] pub fn xywx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 52)) } } #[inline] pub fn yywx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 53)) } } #[inline] pub fn zywx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 54)) } } #[inline] pub fn wywx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 55)) } } #[inline] pub fn xzwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 56)) } } #[inline] pub fn yzwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 57)) } } #[inline] pub fn zzwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 58)) } } #[inline] pub fn wzwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 59)) } } #[inline] pub fn xwwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 60)) } } #[inline] pub fn ywwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 61)) } } #[inline] pub fn zwwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 62)) } } #[inline] pub fn wwwx(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 63)) } } #[inline] pub fn xxxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 64)) } } #[inline] pub fn yxxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 65)) } } #[inline] pub fn zxxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 66)) } } #[inline] pub fn wxxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 67)) } } #[inline] pub fn xyxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 68)) } } #[inline] pub fn yyxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 69)) } } #[inline] pub fn zyxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 70)) } } #[inline] pub fn wyxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 71)) } } #[inline] pub fn xzxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 72)) } } #[inline] pub fn yzxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 73)) } } #[inline] pub fn zzxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 74)) } } #[inline] pub fn wzxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 75)) } } #[inline] pub fn xwxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 76)) } } #[inline] pub fn ywxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 77)) } } #[inline] pub fn zwxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 78)) } } #[inline] pub fn wwxy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 79)) } } #[inline] pub fn xxyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 80)) } } #[inline] pub fn yxyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 81)) } } #[inline] pub fn zxyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 82)) } } #[inline] pub fn wxyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 83)) } } #[inline] pub fn xyyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 84)) } } #[inline] pub fn yyyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 85)) } } #[inline] pub fn zyyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 86)) } } #[inline] pub fn wyyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 87)) } } #[inline] pub fn xzyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 88)) } } #[inline] pub fn yzyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 89)) } } #[inline] pub fn zzyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 90)) } } #[inline] pub fn wzyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 91)) } } #[inline] pub fn xwyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 92)) } } #[inline] pub fn ywyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 93)) } } #[inline] pub fn zwyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 94)) } } #[inline] pub fn wwyy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 95)) } } #[inline] pub fn xxzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 96)) } } #[inline] pub fn yxzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 97)) } } #[inline] pub fn zxzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 98)) } } #[inline] pub fn wxzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 99)) } } #[inline] pub fn xyzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 100)) } } #[inline] pub fn yyzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 101)) } } #[inline] pub fn zyzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 102)) } } #[inline] pub fn wyzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 103)) } } #[inline] pub fn xzzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 104)) } } #[inline] pub fn yzzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 105)) } } #[inline] pub fn zzzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 106)) } } #[inline] pub fn wzzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 107)) } } #[inline] pub fn xwzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 108)) } } #[inline] pub fn ywzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 109)) } } #[inline] pub fn zwzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 110)) } } #[inline] pub fn wwzy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 111)) } } #[inline] pub fn xxwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 112)) } } #[inline] pub fn yxwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 113)) } } #[inline] pub fn zxwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 114)) } } #[inline] pub fn wxwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 115)) } } #[inline] pub fn xywy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 116)) } } #[inline] pub fn yywy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 117)) } } #[inline] pub fn zywy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 118)) } } #[inline] pub fn wywy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 119)) } } #[inline] pub fn xzwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 120)) } } #[inline] pub fn yzwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 121)) } } #[inline] pub fn zzwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 122)) } } #[inline] pub fn wzwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 123)) } } #[inline] pub fn xwwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 124)) } } #[inline] pub fn ywwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 125)) } } #[inline] pub fn zwwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 126)) } } #[inline] pub fn wwwy(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 127)) } } #[inline] pub fn xxxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 128)) } } #[inline] pub fn yxxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 129)) } } #[inline] pub fn zxxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 130)) } } #[inline] pub fn wxxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 131)) } } #[inline] pub fn xyxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 132)) } } #[inline] pub fn yyxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 133)) } } #[inline] pub fn zyxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 134)) } } #[inline] pub fn wyxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 135)) } } #[inline] pub fn xzxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 136)) } } #[inline] pub fn yzxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 137)) } } #[inline] pub fn zzxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 138)) } } #[inline] pub fn wzxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 139)) } } #[inline] pub fn xwxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 140)) } } #[inline] pub fn ywxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 141)) } } #[inline] pub fn zwxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 142)) } } #[inline] pub fn wwxz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 143)) } } #[inline] pub fn xxyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 144)) } } #[inline] pub fn yxyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 145)) } } #[inline] pub fn zxyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 146)) } } #[inline] pub fn wxyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 147)) } } #[inline] pub fn xyyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 148)) } } #[inline] pub fn yyyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 149)) } } #[inline] pub fn zyyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 150)) } } #[inline] pub fn wyyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 151)) } } #[inline] pub fn xzyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 152)) } } #[inline] pub fn yzyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 153)) } } #[inline] pub fn zzyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 154)) } } #[inline] pub fn wzyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 155)) } } #[inline] pub fn xwyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 156)) } } #[inline] pub fn ywyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 157)) } } #[inline] pub fn zwyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 158)) } } #[inline] pub fn wwyz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 159)) } } #[inline] pub fn xxzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 160)) } } #[inline] pub fn yxzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 161)) } } #[inline] pub fn zxzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 162)) } } #[inline] pub fn wxzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 163)) } } #[inline] pub fn xyzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 164)) } } #[inline] pub fn yyzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 165)) } } #[inline] pub fn zyzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 166)) } } #[inline] pub fn wyzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 167)) } } #[inline] pub fn xzzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 168)) } } #[inline] pub fn yzzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 169)) } } #[inline] pub fn zzzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 170)) } } #[inline] pub fn wzzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 171)) } } #[inline] pub fn xwzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 172)) } } #[inline] pub fn ywzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 173)) } } #[inline] pub fn zwzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 174)) } } #[inline] pub fn wwzz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 175)) } } #[inline] pub fn xxwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 176)) } } #[inline] pub fn yxwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 177)) } } #[inline] pub fn zxwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 178)) } } #[inline] pub fn wxwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 179)) } } #[inline] pub fn xywz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 180)) } } #[inline] pub fn yywz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 181)) } } #[inline] pub fn zywz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 182)) } } #[inline] pub fn wywz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 183)) } } #[inline] pub fn xzwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 184)) } } #[inline] pub fn yzwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 185)) } } #[inline] pub fn zzwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 186)) } } #[inline] pub fn wzwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 187)) } } #[inline] pub fn xwwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 188)) } } #[inline] pub fn ywwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 189)) } } #[inline] pub fn zwwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 190)) } } #[inline] pub fn wwwz(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 191)) } } #[inline] pub fn xxxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 192)) } } #[inline] pub fn yxxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 193)) } } #[inline] pub fn zxxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 194)) } } #[inline] pub fn wxxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 195)) } } #[inline] pub fn xyxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 196)) } } #[inline] pub fn yyxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 197)) } } #[inline] pub fn zyxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 198)) } } #[inline] pub fn wyxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 199)) } } #[inline] pub fn xzxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 200)) } } #[inline] pub fn yzxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 201)) } } #[inline] pub fn zzxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 202)) } } #[inline] pub fn wzxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 203)) } } #[inline] pub fn xwxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 204)) } } #[inline] pub fn ywxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 205)) } } #[inline] pub fn zwxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 206)) } } #[inline] pub fn wwxw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 207)) } } #[inline] pub fn xxyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 208)) } } #[inline] pub fn yxyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 209)) } } #[inline] pub fn zxyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 210)) } } #[inline] pub fn wxyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 211)) } } #[inline] pub fn xyyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 212)) } } #[inline] pub fn yyyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 213)) } } #[inline] pub fn zyyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 214)) } } #[inline] pub fn wyyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 215)) } } #[inline] pub fn xzyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 216)) } } #[inline] pub fn yzyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 217)) } } #[inline] pub fn zzyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 218)) } } #[inline] pub fn wzyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 219)) } } #[inline] pub fn xwyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 220)) } } #[inline] pub fn ywyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 221)) } } #[inline] pub fn zwyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 222)) } } #[inline] pub fn wwyw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 223)) } } #[inline] pub fn xxzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 224)) } } #[inline] pub fn yxzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 225)) } } #[inline] pub fn zxzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 226)) } } #[inline] pub fn wxzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 227)) } } #[inline] pub fn xyzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 228)) } } #[inline] pub fn yyzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 229)) } } #[inline] pub fn zyzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 230)) } } #[inline] pub fn wyzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 231)) } } #[inline] pub fn xzzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 232)) } } #[inline] pub fn yzzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 233)) } } #[inline] pub fn zzzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 234)) } } #[inline] pub fn wzzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 235)) } } #[inline] pub fn xwzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 236)) } } #[inline] pub fn ywzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 237)) } } #[inline] pub fn zwzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 238)) } } #[inline] pub fn wwzw(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 239)) } } #[inline] pub fn xxww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 240)) } } #[inline] pub fn yxww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 241)) } } #[inline] pub fn zxww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 242)) } } #[inline] pub fn wxww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 243)) } } #[inline] pub fn xyww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 244)) } } #[inline] pub fn yyww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 245)) } } #[inline] pub fn zyww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 246)) } } #[inline] pub fn wyww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 247)) } } #[inline] pub fn xzww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 248)) } } #[inline] pub fn yzww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 249)) } } #[inline] pub fn zzww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 250)) } } #[inline] pub fn wzww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 251)) } } #[inline] pub fn xwww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 252)) } } #[inline] pub fn ywww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 253)) } } #[inline] pub fn zwww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 254)) } } #[inline] pub fn wwww(self) -> F32x4 { unsafe { F32x4(x86::_mm_shuffle_ps(self.0, self.0, 255)) } } } pathfinder_simd-0.5.2/src/x86/swizzle_i32x4.rs000064400000000000000000001733121046102023000172210ustar 00000000000000// pathfinder/simd/src/x86/swizzle_i32x4.rs // // Copyright © 2019 The Pathfinder Project Developers. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use crate::x86::I32x4; #[cfg(target_pointer_width = "32")] use std::arch::x86; #[cfg(target_pointer_width = "64")] use std::arch::x86_64 as x86; impl I32x4 { #[inline] pub fn xxxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 0, ))) } } #[inline] pub fn yxxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 1, ))) } } #[inline] pub fn zxxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 2, ))) } } #[inline] pub fn wxxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 3, ))) } } #[inline] pub fn xyxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 4, ))) } } #[inline] pub fn yyxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 5, ))) } } #[inline] pub fn zyxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 6, ))) } } #[inline] pub fn wyxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 7, ))) } } #[inline] pub fn xzxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 8, ))) } } #[inline] pub fn yzxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 9, ))) } } #[inline] pub fn zzxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 10, ))) } } #[inline] pub fn wzxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 11, ))) } } #[inline] pub fn xwxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 12, ))) } } #[inline] pub fn ywxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 13, ))) } } #[inline] pub fn zwxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 14, ))) } } #[inline] pub fn wwxx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 15, ))) } } #[inline] pub fn xxyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 16, ))) } } #[inline] pub fn yxyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 17, ))) } } #[inline] pub fn zxyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 18, ))) } } #[inline] pub fn wxyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 19, ))) } } #[inline] pub fn xyyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 20, ))) } } #[inline] pub fn yyyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 21, ))) } } #[inline] pub fn zyyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 22, ))) } } #[inline] pub fn wyyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 23, ))) } } #[inline] pub fn xzyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 24, ))) } } #[inline] pub fn yzyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 25, ))) } } #[inline] pub fn zzyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 26, ))) } } #[inline] pub fn wzyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 27, ))) } } #[inline] pub fn xwyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 28, ))) } } #[inline] pub fn ywyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 29, ))) } } #[inline] pub fn zwyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 30, ))) } } #[inline] pub fn wwyx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 31, ))) } } #[inline] pub fn xxzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 32, ))) } } #[inline] pub fn yxzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 33, ))) } } #[inline] pub fn zxzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 34, ))) } } #[inline] pub fn wxzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 35, ))) } } #[inline] pub fn xyzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 36, ))) } } #[inline] pub fn yyzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 37, ))) } } #[inline] pub fn zyzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 38, ))) } } #[inline] pub fn wyzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 39, ))) } } #[inline] pub fn xzzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 40, ))) } } #[inline] pub fn yzzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 41, ))) } } #[inline] pub fn zzzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 42, ))) } } #[inline] pub fn wzzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 43, ))) } } #[inline] pub fn xwzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 44, ))) } } #[inline] pub fn ywzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 45, ))) } } #[inline] pub fn zwzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 46, ))) } } #[inline] pub fn wwzx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 47, ))) } } #[inline] pub fn xxwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 48, ))) } } #[inline] pub fn yxwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 49, ))) } } #[inline] pub fn zxwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 50, ))) } } #[inline] pub fn wxwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 51, ))) } } #[inline] pub fn xywx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 52, ))) } } #[inline] pub fn yywx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 53, ))) } } #[inline] pub fn zywx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 54, ))) } } #[inline] pub fn wywx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 55, ))) } } #[inline] pub fn xzwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 56, ))) } } #[inline] pub fn yzwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 57, ))) } } #[inline] pub fn zzwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 58, ))) } } #[inline] pub fn wzwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 59, ))) } } #[inline] pub fn xwwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 60, ))) } } #[inline] pub fn ywwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 61, ))) } } #[inline] pub fn zwwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 62, ))) } } #[inline] pub fn wwwx(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 63, ))) } } #[inline] pub fn xxxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 64, ))) } } #[inline] pub fn yxxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 65, ))) } } #[inline] pub fn zxxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 66, ))) } } #[inline] pub fn wxxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 67, ))) } } #[inline] pub fn xyxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 68, ))) } } #[inline] pub fn yyxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 69, ))) } } #[inline] pub fn zyxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 70, ))) } } #[inline] pub fn wyxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 71, ))) } } #[inline] pub fn xzxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 72, ))) } } #[inline] pub fn yzxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 73, ))) } } #[inline] pub fn zzxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 74, ))) } } #[inline] pub fn wzxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 75, ))) } } #[inline] pub fn xwxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 76, ))) } } #[inline] pub fn ywxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 77, ))) } } #[inline] pub fn zwxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 78, ))) } } #[inline] pub fn wwxy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 79, ))) } } #[inline] pub fn xxyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 80, ))) } } #[inline] pub fn yxyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 81, ))) } } #[inline] pub fn zxyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 82, ))) } } #[inline] pub fn wxyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 83, ))) } } #[inline] pub fn xyyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 84, ))) } } #[inline] pub fn yyyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 85, ))) } } #[inline] pub fn zyyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 86, ))) } } #[inline] pub fn wyyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 87, ))) } } #[inline] pub fn xzyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 88, ))) } } #[inline] pub fn yzyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 89, ))) } } #[inline] pub fn zzyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 90, ))) } } #[inline] pub fn wzyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 91, ))) } } #[inline] pub fn xwyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 92, ))) } } #[inline] pub fn ywyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 93, ))) } } #[inline] pub fn zwyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 94, ))) } } #[inline] pub fn wwyy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 95, ))) } } #[inline] pub fn xxzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 96, ))) } } #[inline] pub fn yxzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 97, ))) } } #[inline] pub fn zxzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 98, ))) } } #[inline] pub fn wxzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 99, ))) } } #[inline] pub fn xyzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 100, ))) } } #[inline] pub fn yyzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 101, ))) } } #[inline] pub fn zyzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 102, ))) } } #[inline] pub fn wyzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 103, ))) } } #[inline] pub fn xzzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 104, ))) } } #[inline] pub fn yzzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 105, ))) } } #[inline] pub fn zzzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 106, ))) } } #[inline] pub fn wzzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 107, ))) } } #[inline] pub fn xwzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 108, ))) } } #[inline] pub fn ywzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 109, ))) } } #[inline] pub fn zwzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 110, ))) } } #[inline] pub fn wwzy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 111, ))) } } #[inline] pub fn xxwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 112, ))) } } #[inline] pub fn yxwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 113, ))) } } #[inline] pub fn zxwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 114, ))) } } #[inline] pub fn wxwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 115, ))) } } #[inline] pub fn xywy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 116, ))) } } #[inline] pub fn yywy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 117, ))) } } #[inline] pub fn zywy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 118, ))) } } #[inline] pub fn wywy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 119, ))) } } #[inline] pub fn xzwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 120, ))) } } #[inline] pub fn yzwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 121, ))) } } #[inline] pub fn zzwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 122, ))) } } #[inline] pub fn wzwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 123, ))) } } #[inline] pub fn xwwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 124, ))) } } #[inline] pub fn ywwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 125, ))) } } #[inline] pub fn zwwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 126, ))) } } #[inline] pub fn wwwy(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 127, ))) } } #[inline] pub fn xxxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 128, ))) } } #[inline] pub fn yxxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 129, ))) } } #[inline] pub fn zxxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 130, ))) } } #[inline] pub fn wxxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 131, ))) } } #[inline] pub fn xyxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 132, ))) } } #[inline] pub fn yyxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 133, ))) } } #[inline] pub fn zyxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 134, ))) } } #[inline] pub fn wyxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 135, ))) } } #[inline] pub fn xzxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 136, ))) } } #[inline] pub fn yzxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 137, ))) } } #[inline] pub fn zzxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 138, ))) } } #[inline] pub fn wzxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 139, ))) } } #[inline] pub fn xwxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 140, ))) } } #[inline] pub fn ywxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 141, ))) } } #[inline] pub fn zwxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 142, ))) } } #[inline] pub fn wwxz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 143, ))) } } #[inline] pub fn xxyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 144, ))) } } #[inline] pub fn yxyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 145, ))) } } #[inline] pub fn zxyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 146, ))) } } #[inline] pub fn wxyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 147, ))) } } #[inline] pub fn xyyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 148, ))) } } #[inline] pub fn yyyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 149, ))) } } #[inline] pub fn zyyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 150, ))) } } #[inline] pub fn wyyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 151, ))) } } #[inline] pub fn xzyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 152, ))) } } #[inline] pub fn yzyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 153, ))) } } #[inline] pub fn zzyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 154, ))) } } #[inline] pub fn wzyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 155, ))) } } #[inline] pub fn xwyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 156, ))) } } #[inline] pub fn ywyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 157, ))) } } #[inline] pub fn zwyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 158, ))) } } #[inline] pub fn wwyz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 159, ))) } } #[inline] pub fn xxzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 160, ))) } } #[inline] pub fn yxzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 161, ))) } } #[inline] pub fn zxzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 162, ))) } } #[inline] pub fn wxzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 163, ))) } } #[inline] pub fn xyzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 164, ))) } } #[inline] pub fn yyzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 165, ))) } } #[inline] pub fn zyzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 166, ))) } } #[inline] pub fn wyzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 167, ))) } } #[inline] pub fn xzzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 168, ))) } } #[inline] pub fn yzzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 169, ))) } } #[inline] pub fn zzzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 170, ))) } } #[inline] pub fn wzzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 171, ))) } } #[inline] pub fn xwzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 172, ))) } } #[inline] pub fn ywzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 173, ))) } } #[inline] pub fn zwzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 174, ))) } } #[inline] pub fn wwzz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 175, ))) } } #[inline] pub fn xxwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 176, ))) } } #[inline] pub fn yxwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 177, ))) } } #[inline] pub fn zxwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 178, ))) } } #[inline] pub fn wxwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 179, ))) } } #[inline] pub fn xywz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 180, ))) } } #[inline] pub fn yywz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 181, ))) } } #[inline] pub fn zywz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 182, ))) } } #[inline] pub fn wywz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 183, ))) } } #[inline] pub fn xzwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 184, ))) } } #[inline] pub fn yzwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 185, ))) } } #[inline] pub fn zzwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 186, ))) } } #[inline] pub fn wzwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 187, ))) } } #[inline] pub fn xwwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 188, ))) } } #[inline] pub fn ywwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 189, ))) } } #[inline] pub fn zwwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 190, ))) } } #[inline] pub fn wwwz(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 191, ))) } } #[inline] pub fn xxxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 192, ))) } } #[inline] pub fn yxxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 193, ))) } } #[inline] pub fn zxxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 194, ))) } } #[inline] pub fn wxxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 195, ))) } } #[inline] pub fn xyxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 196, ))) } } #[inline] pub fn yyxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 197, ))) } } #[inline] pub fn zyxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 198, ))) } } #[inline] pub fn wyxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 199, ))) } } #[inline] pub fn xzxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 200, ))) } } #[inline] pub fn yzxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 201, ))) } } #[inline] pub fn zzxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 202, ))) } } #[inline] pub fn wzxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 203, ))) } } #[inline] pub fn xwxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 204, ))) } } #[inline] pub fn ywxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 205, ))) } } #[inline] pub fn zwxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 206, ))) } } #[inline] pub fn wwxw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 207, ))) } } #[inline] pub fn xxyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 208, ))) } } #[inline] pub fn yxyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 209, ))) } } #[inline] pub fn zxyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 210, ))) } } #[inline] pub fn wxyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 211, ))) } } #[inline] pub fn xyyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 212, ))) } } #[inline] pub fn yyyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 213, ))) } } #[inline] pub fn zyyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 214, ))) } } #[inline] pub fn wyyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 215, ))) } } #[inline] pub fn xzyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 216, ))) } } #[inline] pub fn yzyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 217, ))) } } #[inline] pub fn zzyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 218, ))) } } #[inline] pub fn wzyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 219, ))) } } #[inline] pub fn xwyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 220, ))) } } #[inline] pub fn ywyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 221, ))) } } #[inline] pub fn zwyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 222, ))) } } #[inline] pub fn wwyw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 223, ))) } } #[inline] pub fn xxzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 224, ))) } } #[inline] pub fn yxzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 225, ))) } } #[inline] pub fn zxzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 226, ))) } } #[inline] pub fn wxzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 227, ))) } } #[inline] pub fn xyzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 228, ))) } } #[inline] pub fn yyzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 229, ))) } } #[inline] pub fn zyzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 230, ))) } } #[inline] pub fn wyzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 231, ))) } } #[inline] pub fn xzzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 232, ))) } } #[inline] pub fn yzzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 233, ))) } } #[inline] pub fn zzzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 234, ))) } } #[inline] pub fn wzzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 235, ))) } } #[inline] pub fn xwzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 236, ))) } } #[inline] pub fn ywzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 237, ))) } } #[inline] pub fn zwzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 238, ))) } } #[inline] pub fn wwzw(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 239, ))) } } #[inline] pub fn xxww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 240, ))) } } #[inline] pub fn yxww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 241, ))) } } #[inline] pub fn zxww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 242, ))) } } #[inline] pub fn wxww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 243, ))) } } #[inline] pub fn xyww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 244, ))) } } #[inline] pub fn yyww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 245, ))) } } #[inline] pub fn zyww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 246, ))) } } #[inline] pub fn wyww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 247, ))) } } #[inline] pub fn xzww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 248, ))) } } #[inline] pub fn yzww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 249, ))) } } #[inline] pub fn zzww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 250, ))) } } #[inline] pub fn wzww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 251, ))) } } #[inline] pub fn xwww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 252, ))) } } #[inline] pub fn ywww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 253, ))) } } #[inline] pub fn zwww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 254, ))) } } #[inline] pub fn wwww(self) -> I32x4 { unsafe { let this = x86::_mm_castsi128_ps(self.0); I32x4(x86::_mm_castps_si128(x86::_mm_shuffle_ps( this, this, 255, ))) } } }