From 5c665fc631783a39110157bf876fd87d138d1a92 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Mon, 5 Feb 2024 08:41:04 +1300 Subject: [PATCH] WIP --- codegen/src/outputs.rs | 5 + src/swizzles/coresimd/vec3a_impl.rs | 328 +++++++++--------- src/swizzles/coresimd/vec4a_impl.rs | 516 +++++++--------------------- src/swizzles/scalar/vec3a_impl.rs | 328 +++++++++--------- src/swizzles/scalar/vec4a_impl.rs | 260 +++++++------- src/swizzles/sse2/vec3a_impl.rs | 328 +++++++++--------- src/swizzles/sse2/vec4a_impl.rs | 516 +++++++--------------------- src/swizzles/wasm32/vec3a_impl.rs | 328 +++++++++--------- src/swizzles/wasm32/vec4a_impl.rs | 516 +++++++--------------------- 9 files changed, 1181 insertions(+), 1944 deletions(-) diff --git a/codegen/src/outputs.rs b/codegen/src/outputs.rs index 98a7407b..d3ed6c5d 100644 --- a/codegen/src/outputs.rs +++ b/codegen/src/outputs.rs @@ -25,6 +25,7 @@ impl ContextBuilder { .with_key_val("vec4_t", &format!("{prefix}Vec4")) .with_self_t(&format!("{prefix}Vec{dim}")) .with_dimension(dim) + .with_is_align(false) } pub fn new_vec2_swizzle_impl() -> Self { @@ -38,7 +39,9 @@ impl ContextBuilder { pub fn new_vec3a_swizzle_impl() -> Self { Self::new_vec3_swizzle_impl() .with_key_val("vec3_t", "Vec3A") + .with_key_val("vec4_t", "Vec4A") .with_self_t("Vec3A") + .with_is_align(true) } pub fn new_vec4_swizzle_impl() -> Self { @@ -47,8 +50,10 @@ impl ContextBuilder { pub fn new_vec4a_swizzle_impl() -> Self { Self::new_vec4_swizzle_impl() + .with_key_val("vec3_t", "Vec3A") .with_key_val("vec4_t", "Vec4A") .with_self_t("Vec4A") + .with_is_align(true) } pub fn new_dvec2_swizzle_impl() -> Self { diff --git a/src/swizzles/coresimd/vec3a_impl.rs b/src/swizzles/coresimd/vec3a_impl.rs index 36cb9aec..1e052d7b 100644 --- a/src/swizzles/coresimd/vec3a_impl.rs +++ b/src/swizzles/coresimd/vec3a_impl.rs @@ -2,14 +2,14 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4}; +use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4A}; use core::simd::*; impl Vec3Swizzles for Vec3A { type Vec2 = Vec2; - type Vec4 = Vec4; + type Vec4 = Vec4A; #[inline] #[must_use] @@ -256,487 +256,487 @@ impl Vec3Swizzles for Vec3A { #[inline] #[must_use] - fn xxxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 0, 0])) + fn xxxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 0, 0])) } #[inline] #[must_use] - fn xxxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 0, 1])) + fn xxxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 0, 1])) } #[inline] #[must_use] - fn xxxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 0, 2])) + fn xxxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 0, 2])) } #[inline] #[must_use] - fn xxyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 1, 0])) + fn xxyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 1, 0])) } #[inline] #[must_use] - fn xxyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 1, 1])) + fn xxyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 1, 1])) } #[inline] #[must_use] - fn xxyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 1, 2])) + fn xxyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 1, 2])) } #[inline] #[must_use] - fn xxzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 2, 0])) + fn xxzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 2, 0])) } #[inline] #[must_use] - fn xxzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 2, 1])) + fn xxzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 2, 1])) } #[inline] #[must_use] - fn xxzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 0, 2, 2])) + fn xxzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 0, 2, 2])) } #[inline] #[must_use] - fn xyxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 0, 0])) + fn xyxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 0, 0])) } #[inline] #[must_use] - fn xyxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 0, 1])) + fn xyxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 0, 1])) } #[inline] #[must_use] - fn xyxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 0, 2])) + fn xyxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 0, 2])) } #[inline] #[must_use] - fn xyyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 1, 0])) + fn xyyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 1, 0])) } #[inline] #[must_use] - fn xyyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 1, 1])) + fn xyyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 1, 1])) } #[inline] #[must_use] - fn xyyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 1, 2])) + fn xyyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 1, 2])) } #[inline] #[must_use] - fn xyzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 2, 0])) + fn xyzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 2, 0])) } #[inline] #[must_use] - fn xyzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 2, 1])) + fn xyzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 2, 1])) } #[inline] #[must_use] - fn xyzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 1, 2, 2])) + fn xyzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 1, 2, 2])) } #[inline] #[must_use] - fn xzxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 0, 0])) + fn xzxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 0, 0])) } #[inline] #[must_use] - fn xzxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 0, 1])) + fn xzxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 0, 1])) } #[inline] #[must_use] - fn xzxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 0, 2])) + fn xzxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 0, 2])) } #[inline] #[must_use] - fn xzyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 1, 0])) + fn xzyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 1, 0])) } #[inline] #[must_use] - fn xzyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 1, 1])) + fn xzyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 1, 1])) } #[inline] #[must_use] - fn xzyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 1, 2])) + fn xzyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 1, 2])) } #[inline] #[must_use] - fn xzzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 2, 0])) + fn xzzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 2, 0])) } #[inline] #[must_use] - fn xzzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 2, 1])) + fn xzzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 2, 1])) } #[inline] #[must_use] - fn xzzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [0, 2, 2, 2])) + fn xzzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [0, 2, 2, 2])) } #[inline] #[must_use] - fn yxxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 0, 0])) + fn yxxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 0, 0])) } #[inline] #[must_use] - fn yxxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 0, 1])) + fn yxxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 0, 1])) } #[inline] #[must_use] - fn yxxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 0, 2])) + fn yxxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 0, 2])) } #[inline] #[must_use] - fn yxyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 1, 0])) + fn yxyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 1, 0])) } #[inline] #[must_use] - fn yxyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 1, 1])) + fn yxyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 1, 1])) } #[inline] #[must_use] - fn yxyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 1, 2])) + fn yxyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 1, 2])) } #[inline] #[must_use] - fn yxzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 2, 0])) + fn yxzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 2, 0])) } #[inline] #[must_use] - fn yxzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 2, 1])) + fn yxzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 2, 1])) } #[inline] #[must_use] - fn yxzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 0, 2, 2])) + fn yxzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 0, 2, 2])) } #[inline] #[must_use] - fn yyxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 0, 0])) + fn yyxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 0, 0])) } #[inline] #[must_use] - fn yyxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 0, 1])) + fn yyxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 0, 1])) } #[inline] #[must_use] - fn yyxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 0, 2])) + fn yyxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 0, 2])) } #[inline] #[must_use] - fn yyyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 1, 0])) + fn yyyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 1, 0])) } #[inline] #[must_use] - fn yyyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 1, 1])) + fn yyyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 1, 1])) } #[inline] #[must_use] - fn yyyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 1, 2])) + fn yyyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 1, 2])) } #[inline] #[must_use] - fn yyzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 2, 0])) + fn yyzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 2, 0])) } #[inline] #[must_use] - fn yyzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 2, 1])) + fn yyzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 2, 1])) } #[inline] #[must_use] - fn yyzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 1, 2, 2])) + fn yyzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 1, 2, 2])) } #[inline] #[must_use] - fn yzxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 0, 0])) + fn yzxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 0, 0])) } #[inline] #[must_use] - fn yzxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 0, 1])) + fn yzxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 0, 1])) } #[inline] #[must_use] - fn yzxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 0, 2])) + fn yzxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 0, 2])) } #[inline] #[must_use] - fn yzyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 1, 0])) + fn yzyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 1, 0])) } #[inline] #[must_use] - fn yzyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 1, 1])) + fn yzyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 1, 1])) } #[inline] #[must_use] - fn yzyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 1, 2])) + fn yzyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 1, 2])) } #[inline] #[must_use] - fn yzzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 2, 0])) + fn yzzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 2, 0])) } #[inline] #[must_use] - fn yzzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 2, 1])) + fn yzzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 2, 1])) } #[inline] #[must_use] - fn yzzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [1, 2, 2, 2])) + fn yzzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [1, 2, 2, 2])) } #[inline] #[must_use] - fn zxxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 0, 0])) + fn zxxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 0, 0])) } #[inline] #[must_use] - fn zxxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 0, 1])) + fn zxxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 0, 1])) } #[inline] #[must_use] - fn zxxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 0, 2])) + fn zxxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 0, 2])) } #[inline] #[must_use] - fn zxyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 1, 0])) + fn zxyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 1, 0])) } #[inline] #[must_use] - fn zxyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 1, 1])) + fn zxyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 1, 1])) } #[inline] #[must_use] - fn zxyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 1, 2])) + fn zxyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 1, 2])) } #[inline] #[must_use] - fn zxzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 2, 0])) + fn zxzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 2, 0])) } #[inline] #[must_use] - fn zxzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 2, 1])) + fn zxzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 2, 1])) } #[inline] #[must_use] - fn zxzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 0, 2, 2])) + fn zxzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 0, 2, 2])) } #[inline] #[must_use] - fn zyxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 0, 0])) + fn zyxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 0, 0])) } #[inline] #[must_use] - fn zyxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 0, 1])) + fn zyxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 0, 1])) } #[inline] #[must_use] - fn zyxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 0, 2])) + fn zyxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 0, 2])) } #[inline] #[must_use] - fn zyyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 1, 0])) + fn zyyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 1, 0])) } #[inline] #[must_use] - fn zyyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 1, 1])) + fn zyyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 1, 1])) } #[inline] #[must_use] - fn zyyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 1, 2])) + fn zyyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 1, 2])) } #[inline] #[must_use] - fn zyzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 2, 0])) + fn zyzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 2, 0])) } #[inline] #[must_use] - fn zyzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 2, 1])) + fn zyzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 2, 1])) } #[inline] #[must_use] - fn zyzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 1, 2, 2])) + fn zyzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 1, 2, 2])) } #[inline] #[must_use] - fn zzxx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 0, 0])) + fn zzxx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 0, 0])) } #[inline] #[must_use] - fn zzxy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 0, 1])) + fn zzxy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 0, 1])) } #[inline] #[must_use] - fn zzxz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 0, 2])) + fn zzxz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 0, 2])) } #[inline] #[must_use] - fn zzyx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 1, 0])) + fn zzyx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 1, 0])) } #[inline] #[must_use] - fn zzyy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 1, 1])) + fn zzyy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 1, 1])) } #[inline] #[must_use] - fn zzyz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 1, 2])) + fn zzyz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 1, 2])) } #[inline] #[must_use] - fn zzzx(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 2, 0])) + fn zzzx(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 2, 0])) } #[inline] #[must_use] - fn zzzy(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 2, 1])) + fn zzzy(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 2, 1])) } #[inline] #[must_use] - fn zzzz(self) -> Vec4 { - Vec4(simd_swizzle!(self.0, [2, 2, 2, 2])) + fn zzzz(self) -> Vec4A { + Vec4A(simd_swizzle!(self.0, [2, 2, 2, 2])) } } diff --git a/src/swizzles/coresimd/vec4a_impl.rs b/src/swizzles/coresimd/vec4a_impl.rs index 7f84b86b..91d31a31 100644 --- a/src/swizzles/coresimd/vec4a_impl.rs +++ b/src/swizzles/coresimd/vec4a_impl.rs @@ -2,14 +2,14 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3, Vec4A, Vec4Swizzles}; +use crate::{Vec2, Vec3A, Vec4A, Vec4Swizzles}; use core::simd::*; impl Vec4Swizzles for Vec4A { type Vec2 = Vec2; - type Vec3 = Vec3; + type Vec3 = Vec3A; #[inline] #[must_use] @@ -157,642 +157,386 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.x, - } + fn xxx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 0, 0, 0]).into()) } #[inline] #[must_use] - fn xxy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.y, - } + fn xxy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 0, 1, 0]).into()) } #[inline] #[must_use] - fn xxz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.z, - } + fn xxz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 0, 2, 0]).into()) } #[inline] #[must_use] - fn xxw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.w, - } + fn xxw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 0, 3, 0]).into()) } #[inline] #[must_use] - fn xyx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.x, - } + fn xyx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 1, 0, 0]).into()) } #[inline] #[must_use] - fn xyy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.y, - } + fn xyy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 1, 1, 0]).into()) } #[inline] #[must_use] - fn xyz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.z, - } + fn xyz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 1, 2, 0]).into()) } #[inline] #[must_use] - fn xyw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.w, - } + fn xyw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 1, 3, 0]).into()) } #[inline] #[must_use] - fn xzx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.x, - } + fn xzx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 2, 0, 0]).into()) } #[inline] #[must_use] - fn xzy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.y, - } + fn xzy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 2, 1, 0]).into()) } #[inline] #[must_use] - fn xzz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.z, - } + fn xzz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 2, 2, 0]).into()) } #[inline] #[must_use] - fn xzw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.w, - } + fn xzw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 2, 3, 0]).into()) } #[inline] #[must_use] - fn xwx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.x, - } + fn xwx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 3, 0, 0]).into()) } #[inline] #[must_use] - fn xwy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.y, - } + fn xwy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 3, 1, 0]).into()) } #[inline] #[must_use] - fn xwz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.z, - } + fn xwz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 3, 2, 0]).into()) } #[inline] #[must_use] - fn xww(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.w, - } + fn xww(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [0, 3, 3, 0]).into()) } #[inline] #[must_use] - fn yxx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.x, - } + fn yxx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 0, 0, 0]).into()) } #[inline] #[must_use] - fn yxy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.y, - } + fn yxy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 0, 1, 0]).into()) } #[inline] #[must_use] - fn yxz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.z, - } + fn yxz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 0, 2, 0]).into()) } #[inline] #[must_use] - fn yxw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.w, - } + fn yxw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 0, 3, 0]).into()) } #[inline] #[must_use] - fn yyx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.x, - } + fn yyx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 1, 0, 0]).into()) } #[inline] #[must_use] - fn yyy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.y, - } + fn yyy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 1, 1, 0]).into()) } #[inline] #[must_use] - fn yyz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.z, - } + fn yyz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 1, 2, 0]).into()) } #[inline] #[must_use] - fn yyw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.w, - } + fn yyw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 1, 3, 0]).into()) } #[inline] #[must_use] - fn yzx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.x, - } + fn yzx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 2, 0, 0]).into()) } #[inline] #[must_use] - fn yzy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.y, - } + fn yzy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 2, 1, 0]).into()) } #[inline] #[must_use] - fn yzz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.z, - } + fn yzz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 2, 2, 0]).into()) } #[inline] #[must_use] - fn yzw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.w, - } + fn yzw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 2, 3, 0]).into()) } #[inline] #[must_use] - fn ywx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.x, - } + fn ywx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 3, 0, 0]).into()) } #[inline] #[must_use] - fn ywy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.y, - } + fn ywy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 3, 1, 0]).into()) } #[inline] #[must_use] - fn ywz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.z, - } + fn ywz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 3, 2, 0]).into()) } #[inline] #[must_use] - fn yww(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.w, - } + fn yww(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [1, 3, 3, 0]).into()) } #[inline] #[must_use] - fn zxx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.x, - } + fn zxx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 0, 0, 0]).into()) } #[inline] #[must_use] - fn zxy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.y, - } + fn zxy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 0, 1, 0]).into()) } #[inline] #[must_use] - fn zxz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.z, - } + fn zxz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 0, 2, 0]).into()) } #[inline] #[must_use] - fn zxw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.w, - } + fn zxw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 0, 3, 0]).into()) } #[inline] #[must_use] - fn zyx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.x, - } + fn zyx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 1, 0, 0]).into()) } #[inline] #[must_use] - fn zyy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.y, - } + fn zyy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 1, 1, 0]).into()) } #[inline] #[must_use] - fn zyz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.z, - } + fn zyz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 1, 2, 0]).into()) } #[inline] #[must_use] - fn zyw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.w, - } + fn zyw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 1, 3, 0]).into()) } #[inline] #[must_use] - fn zzx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.x, - } + fn zzx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 2, 0, 0]).into()) } #[inline] #[must_use] - fn zzy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.y, - } + fn zzy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 2, 1, 0]).into()) } #[inline] #[must_use] - fn zzz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.z, - } + fn zzz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 2, 2, 0]).into()) } #[inline] #[must_use] - fn zzw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.w, - } + fn zzw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 2, 3, 0]).into()) } #[inline] #[must_use] - fn zwx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.x, - } + fn zwx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 3, 0, 0]).into()) } #[inline] #[must_use] - fn zwy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.y, - } + fn zwy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 3, 1, 0]).into()) } #[inline] #[must_use] - fn zwz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.z, - } + fn zwz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 3, 2, 0]).into()) } #[inline] #[must_use] - fn zww(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.w, - } + fn zww(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [2, 3, 3, 0]).into()) } #[inline] #[must_use] - fn wxx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.x, - } + fn wxx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 0, 0, 0]).into()) } #[inline] #[must_use] - fn wxy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.y, - } + fn wxy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 0, 1, 0]).into()) } #[inline] #[must_use] - fn wxz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.z, - } + fn wxz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 0, 2, 0]).into()) } #[inline] #[must_use] - fn wxw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.w, - } + fn wxw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 0, 3, 0]).into()) } #[inline] #[must_use] - fn wyx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.x, - } + fn wyx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 1, 0, 0]).into()) } #[inline] #[must_use] - fn wyy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.y, - } + fn wyy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 1, 1, 0]).into()) } #[inline] #[must_use] - fn wyz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.z, - } + fn wyz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 1, 2, 0]).into()) } #[inline] #[must_use] - fn wyw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.w, - } + fn wyw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 1, 3, 0]).into()) } #[inline] #[must_use] - fn wzx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.x, - } + fn wzx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 2, 0, 0]).into()) } #[inline] #[must_use] - fn wzy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.y, - } + fn wzy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 2, 1, 0]).into()) } #[inline] #[must_use] - fn wzz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.z, - } + fn wzz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 2, 2, 0]).into()) } #[inline] #[must_use] - fn wzw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.w, - } + fn wzw(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 2, 3, 0]).into()) } #[inline] #[must_use] - fn wwx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.x, - } + fn wwx(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 3, 0, 0]).into()) } #[inline] #[must_use] - fn wwy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.y, - } + fn wwy(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 3, 1, 0]).into()) } #[inline] #[must_use] - fn wwz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.z, - } + fn wwz(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 3, 2, 0]).into()) } #[inline] #[must_use] - fn www(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.w, - } + fn www(self) -> Vec3A { + Vec3A(simd_swizzle!(self.0, [3, 3, 3, 0]).into()) } #[inline] diff --git a/src/swizzles/scalar/vec3a_impl.rs b/src/swizzles/scalar/vec3a_impl.rs index 9b7d3bd1..33fb81f6 100644 --- a/src/swizzles/scalar/vec3a_impl.rs +++ b/src/swizzles/scalar/vec3a_impl.rs @@ -1,11 +1,11 @@ // Generated from swizzle_impl.rs.tera template. Edit the template, not the generated file. -use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4}; +use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4A}; impl Vec3Swizzles for Vec3A { type Vec2 = Vec2; - type Vec4 = Vec4; + type Vec4 = Vec4A; #[inline] #[must_use] @@ -360,487 +360,487 @@ impl Vec3Swizzles for Vec3A { #[inline] #[must_use] - fn xxxx(self) -> Vec4 { - Vec4::new(self.x, self.x, self.x, self.x) + fn xxxx(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.x, self.x) } #[inline] #[must_use] - fn xxxy(self) -> Vec4 { - Vec4::new(self.x, self.x, self.x, self.y) + fn xxxy(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.x, self.y) } #[inline] #[must_use] - fn xxxz(self) -> Vec4 { - Vec4::new(self.x, self.x, self.x, self.z) + fn xxxz(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.x, self.z) } #[inline] #[must_use] - fn xxyx(self) -> Vec4 { - Vec4::new(self.x, self.x, self.y, self.x) + fn xxyx(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.y, self.x) } #[inline] #[must_use] - fn xxyy(self) -> Vec4 { - Vec4::new(self.x, self.x, self.y, self.y) + fn xxyy(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.y, self.y) } #[inline] #[must_use] - fn xxyz(self) -> Vec4 { - Vec4::new(self.x, self.x, self.y, self.z) + fn xxyz(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.y, self.z) } #[inline] #[must_use] - fn xxzx(self) -> Vec4 { - Vec4::new(self.x, self.x, self.z, self.x) + fn xxzx(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.z, self.x) } #[inline] #[must_use] - fn xxzy(self) -> Vec4 { - Vec4::new(self.x, self.x, self.z, self.y) + fn xxzy(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.z, self.y) } #[inline] #[must_use] - fn xxzz(self) -> Vec4 { - Vec4::new(self.x, self.x, self.z, self.z) + fn xxzz(self) -> Vec4A { + Vec4A::new(self.x, self.x, self.z, self.z) } #[inline] #[must_use] - fn xyxx(self) -> Vec4 { - Vec4::new(self.x, self.y, self.x, self.x) + fn xyxx(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.x, self.x) } #[inline] #[must_use] - fn xyxy(self) -> Vec4 { - Vec4::new(self.x, self.y, self.x, self.y) + fn xyxy(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.x, self.y) } #[inline] #[must_use] - fn xyxz(self) -> Vec4 { - Vec4::new(self.x, self.y, self.x, self.z) + fn xyxz(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.x, self.z) } #[inline] #[must_use] - fn xyyx(self) -> Vec4 { - Vec4::new(self.x, self.y, self.y, self.x) + fn xyyx(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.y, self.x) } #[inline] #[must_use] - fn xyyy(self) -> Vec4 { - Vec4::new(self.x, self.y, self.y, self.y) + fn xyyy(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.y, self.y) } #[inline] #[must_use] - fn xyyz(self) -> Vec4 { - Vec4::new(self.x, self.y, self.y, self.z) + fn xyyz(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.y, self.z) } #[inline] #[must_use] - fn xyzx(self) -> Vec4 { - Vec4::new(self.x, self.y, self.z, self.x) + fn xyzx(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.z, self.x) } #[inline] #[must_use] - fn xyzy(self) -> Vec4 { - Vec4::new(self.x, self.y, self.z, self.y) + fn xyzy(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.z, self.y) } #[inline] #[must_use] - fn xyzz(self) -> Vec4 { - Vec4::new(self.x, self.y, self.z, self.z) + fn xyzz(self) -> Vec4A { + Vec4A::new(self.x, self.y, self.z, self.z) } #[inline] #[must_use] - fn xzxx(self) -> Vec4 { - Vec4::new(self.x, self.z, self.x, self.x) + fn xzxx(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.x, self.x) } #[inline] #[must_use] - fn xzxy(self) -> Vec4 { - Vec4::new(self.x, self.z, self.x, self.y) + fn xzxy(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.x, self.y) } #[inline] #[must_use] - fn xzxz(self) -> Vec4 { - Vec4::new(self.x, self.z, self.x, self.z) + fn xzxz(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.x, self.z) } #[inline] #[must_use] - fn xzyx(self) -> Vec4 { - Vec4::new(self.x, self.z, self.y, self.x) + fn xzyx(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.y, self.x) } #[inline] #[must_use] - fn xzyy(self) -> Vec4 { - Vec4::new(self.x, self.z, self.y, self.y) + fn xzyy(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.y, self.y) } #[inline] #[must_use] - fn xzyz(self) -> Vec4 { - Vec4::new(self.x, self.z, self.y, self.z) + fn xzyz(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.y, self.z) } #[inline] #[must_use] - fn xzzx(self) -> Vec4 { - Vec4::new(self.x, self.z, self.z, self.x) + fn xzzx(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.z, self.x) } #[inline] #[must_use] - fn xzzy(self) -> Vec4 { - Vec4::new(self.x, self.z, self.z, self.y) + fn xzzy(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.z, self.y) } #[inline] #[must_use] - fn xzzz(self) -> Vec4 { - Vec4::new(self.x, self.z, self.z, self.z) + fn xzzz(self) -> Vec4A { + Vec4A::new(self.x, self.z, self.z, self.z) } #[inline] #[must_use] - fn yxxx(self) -> Vec4 { - Vec4::new(self.y, self.x, self.x, self.x) + fn yxxx(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.x, self.x) } #[inline] #[must_use] - fn yxxy(self) -> Vec4 { - Vec4::new(self.y, self.x, self.x, self.y) + fn yxxy(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.x, self.y) } #[inline] #[must_use] - fn yxxz(self) -> Vec4 { - Vec4::new(self.y, self.x, self.x, self.z) + fn yxxz(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.x, self.z) } #[inline] #[must_use] - fn yxyx(self) -> Vec4 { - Vec4::new(self.y, self.x, self.y, self.x) + fn yxyx(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.y, self.x) } #[inline] #[must_use] - fn yxyy(self) -> Vec4 { - Vec4::new(self.y, self.x, self.y, self.y) + fn yxyy(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.y, self.y) } #[inline] #[must_use] - fn yxyz(self) -> Vec4 { - Vec4::new(self.y, self.x, self.y, self.z) + fn yxyz(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.y, self.z) } #[inline] #[must_use] - fn yxzx(self) -> Vec4 { - Vec4::new(self.y, self.x, self.z, self.x) + fn yxzx(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.z, self.x) } #[inline] #[must_use] - fn yxzy(self) -> Vec4 { - Vec4::new(self.y, self.x, self.z, self.y) + fn yxzy(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.z, self.y) } #[inline] #[must_use] - fn yxzz(self) -> Vec4 { - Vec4::new(self.y, self.x, self.z, self.z) + fn yxzz(self) -> Vec4A { + Vec4A::new(self.y, self.x, self.z, self.z) } #[inline] #[must_use] - fn yyxx(self) -> Vec4 { - Vec4::new(self.y, self.y, self.x, self.x) + fn yyxx(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.x, self.x) } #[inline] #[must_use] - fn yyxy(self) -> Vec4 { - Vec4::new(self.y, self.y, self.x, self.y) + fn yyxy(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.x, self.y) } #[inline] #[must_use] - fn yyxz(self) -> Vec4 { - Vec4::new(self.y, self.y, self.x, self.z) + fn yyxz(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.x, self.z) } #[inline] #[must_use] - fn yyyx(self) -> Vec4 { - Vec4::new(self.y, self.y, self.y, self.x) + fn yyyx(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.y, self.x) } #[inline] #[must_use] - fn yyyy(self) -> Vec4 { - Vec4::new(self.y, self.y, self.y, self.y) + fn yyyy(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.y, self.y) } #[inline] #[must_use] - fn yyyz(self) -> Vec4 { - Vec4::new(self.y, self.y, self.y, self.z) + fn yyyz(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.y, self.z) } #[inline] #[must_use] - fn yyzx(self) -> Vec4 { - Vec4::new(self.y, self.y, self.z, self.x) + fn yyzx(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.z, self.x) } #[inline] #[must_use] - fn yyzy(self) -> Vec4 { - Vec4::new(self.y, self.y, self.z, self.y) + fn yyzy(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.z, self.y) } #[inline] #[must_use] - fn yyzz(self) -> Vec4 { - Vec4::new(self.y, self.y, self.z, self.z) + fn yyzz(self) -> Vec4A { + Vec4A::new(self.y, self.y, self.z, self.z) } #[inline] #[must_use] - fn yzxx(self) -> Vec4 { - Vec4::new(self.y, self.z, self.x, self.x) + fn yzxx(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.x, self.x) } #[inline] #[must_use] - fn yzxy(self) -> Vec4 { - Vec4::new(self.y, self.z, self.x, self.y) + fn yzxy(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.x, self.y) } #[inline] #[must_use] - fn yzxz(self) -> Vec4 { - Vec4::new(self.y, self.z, self.x, self.z) + fn yzxz(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.x, self.z) } #[inline] #[must_use] - fn yzyx(self) -> Vec4 { - Vec4::new(self.y, self.z, self.y, self.x) + fn yzyx(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.y, self.x) } #[inline] #[must_use] - fn yzyy(self) -> Vec4 { - Vec4::new(self.y, self.z, self.y, self.y) + fn yzyy(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.y, self.y) } #[inline] #[must_use] - fn yzyz(self) -> Vec4 { - Vec4::new(self.y, self.z, self.y, self.z) + fn yzyz(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.y, self.z) } #[inline] #[must_use] - fn yzzx(self) -> Vec4 { - Vec4::new(self.y, self.z, self.z, self.x) + fn yzzx(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.z, self.x) } #[inline] #[must_use] - fn yzzy(self) -> Vec4 { - Vec4::new(self.y, self.z, self.z, self.y) + fn yzzy(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.z, self.y) } #[inline] #[must_use] - fn yzzz(self) -> Vec4 { - Vec4::new(self.y, self.z, self.z, self.z) + fn yzzz(self) -> Vec4A { + Vec4A::new(self.y, self.z, self.z, self.z) } #[inline] #[must_use] - fn zxxx(self) -> Vec4 { - Vec4::new(self.z, self.x, self.x, self.x) + fn zxxx(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.x, self.x) } #[inline] #[must_use] - fn zxxy(self) -> Vec4 { - Vec4::new(self.z, self.x, self.x, self.y) + fn zxxy(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.x, self.y) } #[inline] #[must_use] - fn zxxz(self) -> Vec4 { - Vec4::new(self.z, self.x, self.x, self.z) + fn zxxz(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.x, self.z) } #[inline] #[must_use] - fn zxyx(self) -> Vec4 { - Vec4::new(self.z, self.x, self.y, self.x) + fn zxyx(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.y, self.x) } #[inline] #[must_use] - fn zxyy(self) -> Vec4 { - Vec4::new(self.z, self.x, self.y, self.y) + fn zxyy(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.y, self.y) } #[inline] #[must_use] - fn zxyz(self) -> Vec4 { - Vec4::new(self.z, self.x, self.y, self.z) + fn zxyz(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.y, self.z) } #[inline] #[must_use] - fn zxzx(self) -> Vec4 { - Vec4::new(self.z, self.x, self.z, self.x) + fn zxzx(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.z, self.x) } #[inline] #[must_use] - fn zxzy(self) -> Vec4 { - Vec4::new(self.z, self.x, self.z, self.y) + fn zxzy(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.z, self.y) } #[inline] #[must_use] - fn zxzz(self) -> Vec4 { - Vec4::new(self.z, self.x, self.z, self.z) + fn zxzz(self) -> Vec4A { + Vec4A::new(self.z, self.x, self.z, self.z) } #[inline] #[must_use] - fn zyxx(self) -> Vec4 { - Vec4::new(self.z, self.y, self.x, self.x) + fn zyxx(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.x, self.x) } #[inline] #[must_use] - fn zyxy(self) -> Vec4 { - Vec4::new(self.z, self.y, self.x, self.y) + fn zyxy(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.x, self.y) } #[inline] #[must_use] - fn zyxz(self) -> Vec4 { - Vec4::new(self.z, self.y, self.x, self.z) + fn zyxz(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.x, self.z) } #[inline] #[must_use] - fn zyyx(self) -> Vec4 { - Vec4::new(self.z, self.y, self.y, self.x) + fn zyyx(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.y, self.x) } #[inline] #[must_use] - fn zyyy(self) -> Vec4 { - Vec4::new(self.z, self.y, self.y, self.y) + fn zyyy(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.y, self.y) } #[inline] #[must_use] - fn zyyz(self) -> Vec4 { - Vec4::new(self.z, self.y, self.y, self.z) + fn zyyz(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.y, self.z) } #[inline] #[must_use] - fn zyzx(self) -> Vec4 { - Vec4::new(self.z, self.y, self.z, self.x) + fn zyzx(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.z, self.x) } #[inline] #[must_use] - fn zyzy(self) -> Vec4 { - Vec4::new(self.z, self.y, self.z, self.y) + fn zyzy(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.z, self.y) } #[inline] #[must_use] - fn zyzz(self) -> Vec4 { - Vec4::new(self.z, self.y, self.z, self.z) + fn zyzz(self) -> Vec4A { + Vec4A::new(self.z, self.y, self.z, self.z) } #[inline] #[must_use] - fn zzxx(self) -> Vec4 { - Vec4::new(self.z, self.z, self.x, self.x) + fn zzxx(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.x, self.x) } #[inline] #[must_use] - fn zzxy(self) -> Vec4 { - Vec4::new(self.z, self.z, self.x, self.y) + fn zzxy(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.x, self.y) } #[inline] #[must_use] - fn zzxz(self) -> Vec4 { - Vec4::new(self.z, self.z, self.x, self.z) + fn zzxz(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.x, self.z) } #[inline] #[must_use] - fn zzyx(self) -> Vec4 { - Vec4::new(self.z, self.z, self.y, self.x) + fn zzyx(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.y, self.x) } #[inline] #[must_use] - fn zzyy(self) -> Vec4 { - Vec4::new(self.z, self.z, self.y, self.y) + fn zzyy(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.y, self.y) } #[inline] #[must_use] - fn zzyz(self) -> Vec4 { - Vec4::new(self.z, self.z, self.y, self.z) + fn zzyz(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.y, self.z) } #[inline] #[must_use] - fn zzzx(self) -> Vec4 { - Vec4::new(self.z, self.z, self.z, self.x) + fn zzzx(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.z, self.x) } #[inline] #[must_use] - fn zzzy(self) -> Vec4 { - Vec4::new(self.z, self.z, self.z, self.y) + fn zzzy(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.z, self.y) } #[inline] #[must_use] - fn zzzz(self) -> Vec4 { - Vec4::new(self.z, self.z, self.z, self.z) + fn zzzz(self) -> Vec4A { + Vec4A::new(self.z, self.z, self.z, self.z) } } diff --git a/src/swizzles/scalar/vec4a_impl.rs b/src/swizzles/scalar/vec4a_impl.rs index 58456c4f..9607ec2e 100644 --- a/src/swizzles/scalar/vec4a_impl.rs +++ b/src/swizzles/scalar/vec4a_impl.rs @@ -1,11 +1,11 @@ // Generated from swizzle_impl.rs.tera template. Edit the template, not the generated file. -use crate::{Vec2, Vec3, Vec4A, Vec4Swizzles}; +use crate::{Vec2, Vec3A, Vec4A, Vec4Swizzles}; impl Vec4Swizzles for Vec4A { type Vec2 = Vec2; - type Vec3 = Vec3; + type Vec3 = Vec3A; #[inline] #[must_use] @@ -153,8 +153,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxx(self) -> Vec3 { - Vec3 { + fn xxx(self) -> Vec3A { + Vec3A { x: self.x, y: self.x, z: self.x, @@ -163,8 +163,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxy(self) -> Vec3 { - Vec3 { + fn xxy(self) -> Vec3A { + Vec3A { x: self.x, y: self.x, z: self.y, @@ -173,8 +173,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxz(self) -> Vec3 { - Vec3 { + fn xxz(self) -> Vec3A { + Vec3A { x: self.x, y: self.x, z: self.z, @@ -183,8 +183,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxw(self) -> Vec3 { - Vec3 { + fn xxw(self) -> Vec3A { + Vec3A { x: self.x, y: self.x, z: self.w, @@ -193,8 +193,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xyx(self) -> Vec3 { - Vec3 { + fn xyx(self) -> Vec3A { + Vec3A { x: self.x, y: self.y, z: self.x, @@ -203,8 +203,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xyy(self) -> Vec3 { - Vec3 { + fn xyy(self) -> Vec3A { + Vec3A { x: self.x, y: self.y, z: self.y, @@ -213,8 +213,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xyz(self) -> Vec3 { - Vec3 { + fn xyz(self) -> Vec3A { + Vec3A { x: self.x, y: self.y, z: self.z, @@ -223,8 +223,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xyw(self) -> Vec3 { - Vec3 { + fn xyw(self) -> Vec3A { + Vec3A { x: self.x, y: self.y, z: self.w, @@ -233,8 +233,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xzx(self) -> Vec3 { - Vec3 { + fn xzx(self) -> Vec3A { + Vec3A { x: self.x, y: self.z, z: self.x, @@ -243,8 +243,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xzy(self) -> Vec3 { - Vec3 { + fn xzy(self) -> Vec3A { + Vec3A { x: self.x, y: self.z, z: self.y, @@ -253,8 +253,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xzz(self) -> Vec3 { - Vec3 { + fn xzz(self) -> Vec3A { + Vec3A { x: self.x, y: self.z, z: self.z, @@ -263,8 +263,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xzw(self) -> Vec3 { - Vec3 { + fn xzw(self) -> Vec3A { + Vec3A { x: self.x, y: self.z, z: self.w, @@ -273,8 +273,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xwx(self) -> Vec3 { - Vec3 { + fn xwx(self) -> Vec3A { + Vec3A { x: self.x, y: self.w, z: self.x, @@ -283,8 +283,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xwy(self) -> Vec3 { - Vec3 { + fn xwy(self) -> Vec3A { + Vec3A { x: self.x, y: self.w, z: self.y, @@ -293,8 +293,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xwz(self) -> Vec3 { - Vec3 { + fn xwz(self) -> Vec3A { + Vec3A { x: self.x, y: self.w, z: self.z, @@ -303,8 +303,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xww(self) -> Vec3 { - Vec3 { + fn xww(self) -> Vec3A { + Vec3A { x: self.x, y: self.w, z: self.w, @@ -313,8 +313,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yxx(self) -> Vec3 { - Vec3 { + fn yxx(self) -> Vec3A { + Vec3A { x: self.y, y: self.x, z: self.x, @@ -323,8 +323,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yxy(self) -> Vec3 { - Vec3 { + fn yxy(self) -> Vec3A { + Vec3A { x: self.y, y: self.x, z: self.y, @@ -333,8 +333,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yxz(self) -> Vec3 { - Vec3 { + fn yxz(self) -> Vec3A { + Vec3A { x: self.y, y: self.x, z: self.z, @@ -343,8 +343,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yxw(self) -> Vec3 { - Vec3 { + fn yxw(self) -> Vec3A { + Vec3A { x: self.y, y: self.x, z: self.w, @@ -353,8 +353,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yyx(self) -> Vec3 { - Vec3 { + fn yyx(self) -> Vec3A { + Vec3A { x: self.y, y: self.y, z: self.x, @@ -363,8 +363,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yyy(self) -> Vec3 { - Vec3 { + fn yyy(self) -> Vec3A { + Vec3A { x: self.y, y: self.y, z: self.y, @@ -373,8 +373,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yyz(self) -> Vec3 { - Vec3 { + fn yyz(self) -> Vec3A { + Vec3A { x: self.y, y: self.y, z: self.z, @@ -383,8 +383,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yyw(self) -> Vec3 { - Vec3 { + fn yyw(self) -> Vec3A { + Vec3A { x: self.y, y: self.y, z: self.w, @@ -393,8 +393,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yzx(self) -> Vec3 { - Vec3 { + fn yzx(self) -> Vec3A { + Vec3A { x: self.y, y: self.z, z: self.x, @@ -403,8 +403,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yzy(self) -> Vec3 { - Vec3 { + fn yzy(self) -> Vec3A { + Vec3A { x: self.y, y: self.z, z: self.y, @@ -413,8 +413,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yzz(self) -> Vec3 { - Vec3 { + fn yzz(self) -> Vec3A { + Vec3A { x: self.y, y: self.z, z: self.z, @@ -423,8 +423,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yzw(self) -> Vec3 { - Vec3 { + fn yzw(self) -> Vec3A { + Vec3A { x: self.y, y: self.z, z: self.w, @@ -433,8 +433,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn ywx(self) -> Vec3 { - Vec3 { + fn ywx(self) -> Vec3A { + Vec3A { x: self.y, y: self.w, z: self.x, @@ -443,8 +443,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn ywy(self) -> Vec3 { - Vec3 { + fn ywy(self) -> Vec3A { + Vec3A { x: self.y, y: self.w, z: self.y, @@ -453,8 +453,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn ywz(self) -> Vec3 { - Vec3 { + fn ywz(self) -> Vec3A { + Vec3A { x: self.y, y: self.w, z: self.z, @@ -463,8 +463,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn yww(self) -> Vec3 { - Vec3 { + fn yww(self) -> Vec3A { + Vec3A { x: self.y, y: self.w, z: self.w, @@ -473,8 +473,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zxx(self) -> Vec3 { - Vec3 { + fn zxx(self) -> Vec3A { + Vec3A { x: self.z, y: self.x, z: self.x, @@ -483,8 +483,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zxy(self) -> Vec3 { - Vec3 { + fn zxy(self) -> Vec3A { + Vec3A { x: self.z, y: self.x, z: self.y, @@ -493,8 +493,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zxz(self) -> Vec3 { - Vec3 { + fn zxz(self) -> Vec3A { + Vec3A { x: self.z, y: self.x, z: self.z, @@ -503,8 +503,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zxw(self) -> Vec3 { - Vec3 { + fn zxw(self) -> Vec3A { + Vec3A { x: self.z, y: self.x, z: self.w, @@ -513,8 +513,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zyx(self) -> Vec3 { - Vec3 { + fn zyx(self) -> Vec3A { + Vec3A { x: self.z, y: self.y, z: self.x, @@ -523,8 +523,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zyy(self) -> Vec3 { - Vec3 { + fn zyy(self) -> Vec3A { + Vec3A { x: self.z, y: self.y, z: self.y, @@ -533,8 +533,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zyz(self) -> Vec3 { - Vec3 { + fn zyz(self) -> Vec3A { + Vec3A { x: self.z, y: self.y, z: self.z, @@ -543,8 +543,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zyw(self) -> Vec3 { - Vec3 { + fn zyw(self) -> Vec3A { + Vec3A { x: self.z, y: self.y, z: self.w, @@ -553,8 +553,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zzx(self) -> Vec3 { - Vec3 { + fn zzx(self) -> Vec3A { + Vec3A { x: self.z, y: self.z, z: self.x, @@ -563,8 +563,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zzy(self) -> Vec3 { - Vec3 { + fn zzy(self) -> Vec3A { + Vec3A { x: self.z, y: self.z, z: self.y, @@ -573,8 +573,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zzz(self) -> Vec3 { - Vec3 { + fn zzz(self) -> Vec3A { + Vec3A { x: self.z, y: self.z, z: self.z, @@ -583,8 +583,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zzw(self) -> Vec3 { - Vec3 { + fn zzw(self) -> Vec3A { + Vec3A { x: self.z, y: self.z, z: self.w, @@ -593,8 +593,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zwx(self) -> Vec3 { - Vec3 { + fn zwx(self) -> Vec3A { + Vec3A { x: self.z, y: self.w, z: self.x, @@ -603,8 +603,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zwy(self) -> Vec3 { - Vec3 { + fn zwy(self) -> Vec3A { + Vec3A { x: self.z, y: self.w, z: self.y, @@ -613,8 +613,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zwz(self) -> Vec3 { - Vec3 { + fn zwz(self) -> Vec3A { + Vec3A { x: self.z, y: self.w, z: self.z, @@ -623,8 +623,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn zww(self) -> Vec3 { - Vec3 { + fn zww(self) -> Vec3A { + Vec3A { x: self.z, y: self.w, z: self.w, @@ -633,8 +633,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wxx(self) -> Vec3 { - Vec3 { + fn wxx(self) -> Vec3A { + Vec3A { x: self.w, y: self.x, z: self.x, @@ -643,8 +643,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wxy(self) -> Vec3 { - Vec3 { + fn wxy(self) -> Vec3A { + Vec3A { x: self.w, y: self.x, z: self.y, @@ -653,8 +653,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wxz(self) -> Vec3 { - Vec3 { + fn wxz(self) -> Vec3A { + Vec3A { x: self.w, y: self.x, z: self.z, @@ -663,8 +663,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wxw(self) -> Vec3 { - Vec3 { + fn wxw(self) -> Vec3A { + Vec3A { x: self.w, y: self.x, z: self.w, @@ -673,8 +673,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wyx(self) -> Vec3 { - Vec3 { + fn wyx(self) -> Vec3A { + Vec3A { x: self.w, y: self.y, z: self.x, @@ -683,8 +683,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wyy(self) -> Vec3 { - Vec3 { + fn wyy(self) -> Vec3A { + Vec3A { x: self.w, y: self.y, z: self.y, @@ -693,8 +693,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wyz(self) -> Vec3 { - Vec3 { + fn wyz(self) -> Vec3A { + Vec3A { x: self.w, y: self.y, z: self.z, @@ -703,8 +703,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wyw(self) -> Vec3 { - Vec3 { + fn wyw(self) -> Vec3A { + Vec3A { x: self.w, y: self.y, z: self.w, @@ -713,8 +713,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wzx(self) -> Vec3 { - Vec3 { + fn wzx(self) -> Vec3A { + Vec3A { x: self.w, y: self.z, z: self.x, @@ -723,8 +723,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wzy(self) -> Vec3 { - Vec3 { + fn wzy(self) -> Vec3A { + Vec3A { x: self.w, y: self.z, z: self.y, @@ -733,8 +733,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wzz(self) -> Vec3 { - Vec3 { + fn wzz(self) -> Vec3A { + Vec3A { x: self.w, y: self.z, z: self.z, @@ -743,8 +743,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wzw(self) -> Vec3 { - Vec3 { + fn wzw(self) -> Vec3A { + Vec3A { x: self.w, y: self.z, z: self.w, @@ -753,8 +753,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wwx(self) -> Vec3 { - Vec3 { + fn wwx(self) -> Vec3A { + Vec3A { x: self.w, y: self.w, z: self.x, @@ -763,8 +763,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wwy(self) -> Vec3 { - Vec3 { + fn wwy(self) -> Vec3A { + Vec3A { x: self.w, y: self.w, z: self.y, @@ -773,8 +773,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn wwz(self) -> Vec3 { - Vec3 { + fn wwz(self) -> Vec3A { + Vec3A { x: self.w, y: self.w, z: self.z, @@ -783,8 +783,8 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn www(self) -> Vec3 { - Vec3 { + fn www(self) -> Vec3A { + Vec3A { x: self.w, y: self.w, z: self.w, diff --git a/src/swizzles/sse2/vec3a_impl.rs b/src/swizzles/sse2/vec3a_impl.rs index 7ae63795..40407340 100644 --- a/src/swizzles/sse2/vec3a_impl.rs +++ b/src/swizzles/sse2/vec3a_impl.rs @@ -2,7 +2,7 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4}; +use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4A}; #[cfg(target_arch = "x86")] use core::arch::x86::*; @@ -12,7 +12,7 @@ use core::arch::x86_64::*; impl Vec3Swizzles for Vec3A { type Vec2 = Vec2; - type Vec4 = Vec4; + type Vec4 = Vec4A; #[inline] #[must_use] @@ -259,487 +259,487 @@ impl Vec3Swizzles for Vec3A { #[inline] #[must_use] - fn xxxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }) + fn xxxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }) } #[inline] #[must_use] - fn xxxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_00) }) + fn xxxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_00) }) } #[inline] #[must_use] - fn xxxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_00) }) + fn xxxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_00) }) } #[inline] #[must_use] - fn xxyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }) + fn xxyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }) } #[inline] #[must_use] - fn xxyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_00) }) + fn xxyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_00) }) } #[inline] #[must_use] - fn xxyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_00) }) + fn xxyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_00) }) } #[inline] #[must_use] - fn xxzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }) + fn xxzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }) } #[inline] #[must_use] - fn xxzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_00) }) + fn xxzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_00) }) } #[inline] #[must_use] - fn xxzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_00) }) + fn xxzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_00) }) } #[inline] #[must_use] - fn xyxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }) + fn xyxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }) } #[inline] #[must_use] - fn xyxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_00) }) + fn xyxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_00) }) } #[inline] #[must_use] - fn xyxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_00) }) + fn xyxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_00) }) } #[inline] #[must_use] - fn xyyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }) + fn xyyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }) } #[inline] #[must_use] - fn xyyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_00) }) + fn xyyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_00) }) } #[inline] #[must_use] - fn xyyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_00) }) + fn xyyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_00) }) } #[inline] #[must_use] - fn xyzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) }) + fn xyzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) }) } #[inline] #[must_use] - fn xyzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_00) }) + fn xyzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_00) }) } #[inline] #[must_use] - fn xyzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_00) }) + fn xyzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_00) }) } #[inline] #[must_use] - fn xzxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }) + fn xzxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }) } #[inline] #[must_use] - fn xzxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_00) }) + fn xzxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_00) }) } #[inline] #[must_use] - fn xzxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_00) }) + fn xzxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_00) }) } #[inline] #[must_use] - fn xzyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }) + fn xzyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }) } #[inline] #[must_use] - fn xzyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_00) }) + fn xzyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_00) }) } #[inline] #[must_use] - fn xzyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_00) }) + fn xzyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_00) }) } #[inline] #[must_use] - fn xzzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }) + fn xzzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }) } #[inline] #[must_use] - fn xzzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_00) }) + fn xzzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_00) }) } #[inline] #[must_use] - fn xzzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_00) }) + fn xzzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_00) }) } #[inline] #[must_use] - fn yxxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }) + fn yxxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }) } #[inline] #[must_use] - fn yxxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_01) }) + fn yxxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_01) }) } #[inline] #[must_use] - fn yxxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_01) }) + fn yxxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_01) }) } #[inline] #[must_use] - fn yxyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }) + fn yxyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }) } #[inline] #[must_use] - fn yxyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_01) }) + fn yxyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_01) }) } #[inline] #[must_use] - fn yxyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_01) }) + fn yxyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_01) }) } #[inline] #[must_use] - fn yxzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }) + fn yxzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }) } #[inline] #[must_use] - fn yxzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_01) }) + fn yxzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_01) }) } #[inline] #[must_use] - fn yxzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_01) }) + fn yxzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_01) }) } #[inline] #[must_use] - fn yyxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }) + fn yyxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }) } #[inline] #[must_use] - fn yyxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_01) }) + fn yyxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_01) }) } #[inline] #[must_use] - fn yyxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_01) }) + fn yyxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_01) }) } #[inline] #[must_use] - fn yyyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }) + fn yyyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }) } #[inline] #[must_use] - fn yyyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_01) }) + fn yyyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_01) }) } #[inline] #[must_use] - fn yyyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_01) }) + fn yyyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_01) }) } #[inline] #[must_use] - fn yyzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }) + fn yyzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }) } #[inline] #[must_use] - fn yyzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_01) }) + fn yyzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_01) }) } #[inline] #[must_use] - fn yyzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_01) }) + fn yyzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_01) }) } #[inline] #[must_use] - fn yzxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }) + fn yzxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }) } #[inline] #[must_use] - fn yzxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_01) }) + fn yzxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_01) }) } #[inline] #[must_use] - fn yzxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_01) }) + fn yzxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_01) }) } #[inline] #[must_use] - fn yzyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }) + fn yzyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }) } #[inline] #[must_use] - fn yzyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_01) }) + fn yzyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_01) }) } #[inline] #[must_use] - fn yzyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_01) }) + fn yzyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_01) }) } #[inline] #[must_use] - fn yzzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }) + fn yzzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }) } #[inline] #[must_use] - fn yzzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_01) }) + fn yzzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_01) }) } #[inline] #[must_use] - fn yzzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_01) }) + fn yzzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_01) }) } #[inline] #[must_use] - fn zxxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }) + fn zxxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }) } #[inline] #[must_use] - fn zxxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_10) }) + fn zxxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_00_10) }) } #[inline] #[must_use] - fn zxxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_10) }) + fn zxxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_00_10) }) } #[inline] #[must_use] - fn zxyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }) + fn zxyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }) } #[inline] #[must_use] - fn zxyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_10) }) + fn zxyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_00_10) }) } #[inline] #[must_use] - fn zxyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_10) }) + fn zxyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_00_10) }) } #[inline] #[must_use] - fn zxzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }) + fn zxzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }) } #[inline] #[must_use] - fn zxzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_10) }) + fn zxzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_00_10) }) } #[inline] #[must_use] - fn zxzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_10) }) + fn zxzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_00_10) }) } #[inline] #[must_use] - fn zyxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }) + fn zyxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }) } #[inline] #[must_use] - fn zyxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_10) }) + fn zyxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_01_10) }) } #[inline] #[must_use] - fn zyxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_10) }) + fn zyxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_01_10) }) } #[inline] #[must_use] - fn zyyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }) + fn zyyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }) } #[inline] #[must_use] - fn zyyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_10) }) + fn zyyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_01_10) }) } #[inline] #[must_use] - fn zyyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_10) }) + fn zyyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_01_10) }) } #[inline] #[must_use] - fn zyzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }) + fn zyzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }) } #[inline] #[must_use] - fn zyzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_10) }) + fn zyzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_01_10) }) } #[inline] #[must_use] - fn zyzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_10) }) + fn zyzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_01_10) }) } #[inline] #[must_use] - fn zzxx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }) + fn zzxx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }) } #[inline] #[must_use] - fn zzxy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_10) }) + fn zzxy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_00_10_10) }) } #[inline] #[must_use] - fn zzxz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_10) }) + fn zzxz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_00_10_10) }) } #[inline] #[must_use] - fn zzyx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }) + fn zzyx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }) } #[inline] #[must_use] - fn zzyy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_10) }) + fn zzyy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_01_10_10) }) } #[inline] #[must_use] - fn zzyz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_10) }) + fn zzyz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_01_10_10) }) } #[inline] #[must_use] - fn zzzx(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }) + fn zzzx(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }) } #[inline] #[must_use] - fn zzzy(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_10) }) + fn zzzy(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b01_10_10_10) }) } #[inline] #[must_use] - fn zzzz(self) -> Vec4 { - Vec4(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_10) }) + fn zzzz(self) -> Vec4A { + Vec4A(unsafe { _mm_shuffle_ps(self.0, self.0, 0b10_10_10_10) }) } } diff --git a/src/swizzles/sse2/vec4a_impl.rs b/src/swizzles/sse2/vec4a_impl.rs index 095430a7..9019be3d 100644 --- a/src/swizzles/sse2/vec4a_impl.rs +++ b/src/swizzles/sse2/vec4a_impl.rs @@ -2,7 +2,7 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3, Vec4A, Vec4Swizzles}; +use crate::{Vec2, Vec3A, Vec4A, Vec4Swizzles}; #[cfg(target_arch = "x86")] use core::arch::x86::*; @@ -12,7 +12,7 @@ use core::arch::x86_64::*; impl Vec4Swizzles for Vec4A { type Vec2 = Vec2; - type Vec3 = Vec3; + type Vec3 = Vec3A; #[inline] #[must_use] @@ -160,642 +160,386 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.x, - } + fn xxx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_00) }).into()) } #[inline] #[must_use] - fn xxy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.y, - } + fn xxy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_00) }).into()) } #[inline] #[must_use] - fn xxz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.z, - } + fn xxz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_00) }).into()) } #[inline] #[must_use] - fn xxw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.w, - } + fn xxw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_00) }).into()) } #[inline] #[must_use] - fn xyx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.x, - } + fn xyx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_00) }).into()) } #[inline] #[must_use] - fn xyy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.y, - } + fn xyy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_00) }).into()) } #[inline] #[must_use] - fn xyz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.z, - } + fn xyz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_00) }).into()) } #[inline] #[must_use] - fn xyw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.w, - } + fn xyw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_00) }).into()) } #[inline] #[must_use] - fn xzx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.x, - } + fn xzx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_00) }).into()) } #[inline] #[must_use] - fn xzy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.y, - } + fn xzy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_00) }).into()) } #[inline] #[must_use] - fn xzz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.z, - } + fn xzz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_00) }).into()) } #[inline] #[must_use] - fn xzw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.w, - } + fn xzw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_00) }).into()) } #[inline] #[must_use] - fn xwx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.x, - } + fn xwx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_00) }).into()) } #[inline] #[must_use] - fn xwy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.y, - } + fn xwy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_00) }).into()) } #[inline] #[must_use] - fn xwz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.z, - } + fn xwz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_00) }).into()) } #[inline] #[must_use] - fn xww(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.w, - } + fn xww(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_00) }).into()) } #[inline] #[must_use] - fn yxx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.x, - } + fn yxx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_01) }).into()) } #[inline] #[must_use] - fn yxy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.y, - } + fn yxy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_01) }).into()) } #[inline] #[must_use] - fn yxz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.z, - } + fn yxz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_01) }).into()) } #[inline] #[must_use] - fn yxw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.w, - } + fn yxw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_01) }).into()) } #[inline] #[must_use] - fn yyx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.x, - } + fn yyx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_01) }).into()) } #[inline] #[must_use] - fn yyy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.y, - } + fn yyy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_01) }).into()) } #[inline] #[must_use] - fn yyz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.z, - } + fn yyz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_01) }).into()) } #[inline] #[must_use] - fn yyw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.w, - } + fn yyw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_01) }).into()) } #[inline] #[must_use] - fn yzx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.x, - } + fn yzx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_01) }).into()) } #[inline] #[must_use] - fn yzy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.y, - } + fn yzy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_01) }).into()) } #[inline] #[must_use] - fn yzz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.z, - } + fn yzz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_01) }).into()) } #[inline] #[must_use] - fn yzw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.w, - } + fn yzw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_01) }).into()) } #[inline] #[must_use] - fn ywx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.x, - } + fn ywx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_01) }).into()) } #[inline] #[must_use] - fn ywy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.y, - } + fn ywy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_01) }).into()) } #[inline] #[must_use] - fn ywz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.z, - } + fn ywz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_01) }).into()) } #[inline] #[must_use] - fn yww(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.w, - } + fn yww(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_01) }).into()) } #[inline] #[must_use] - fn zxx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.x, - } + fn zxx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_10) }).into()) } #[inline] #[must_use] - fn zxy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.y, - } + fn zxy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_10) }).into()) } #[inline] #[must_use] - fn zxz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.z, - } + fn zxz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_10) }).into()) } #[inline] #[must_use] - fn zxw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.w, - } + fn zxw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_10) }).into()) } #[inline] #[must_use] - fn zyx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.x, - } + fn zyx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_10) }).into()) } #[inline] #[must_use] - fn zyy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.y, - } + fn zyy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_10) }).into()) } #[inline] #[must_use] - fn zyz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.z, - } + fn zyz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_10) }).into()) } #[inline] #[must_use] - fn zyw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.w, - } + fn zyw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_10) }).into()) } #[inline] #[must_use] - fn zzx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.x, - } + fn zzx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_10) }).into()) } #[inline] #[must_use] - fn zzy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.y, - } + fn zzy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_10) }).into()) } #[inline] #[must_use] - fn zzz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.z, - } + fn zzz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_10) }).into()) } #[inline] #[must_use] - fn zzw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.w, - } + fn zzw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_10) }).into()) } #[inline] #[must_use] - fn zwx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.x, - } + fn zwx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_10) }).into()) } #[inline] #[must_use] - fn zwy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.y, - } + fn zwy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_10) }).into()) } #[inline] #[must_use] - fn zwz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.z, - } + fn zwz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_10) }).into()) } #[inline] #[must_use] - fn zww(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.w, - } + fn zww(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_10) }).into()) } #[inline] #[must_use] - fn wxx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.x, - } + fn wxx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_00_11) }).into()) } #[inline] #[must_use] - fn wxy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.y, - } + fn wxy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_00_11) }).into()) } #[inline] #[must_use] - fn wxz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.z, - } + fn wxz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_00_11) }).into()) } #[inline] #[must_use] - fn wxw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.w, - } + fn wxw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_00_11) }).into()) } #[inline] #[must_use] - fn wyx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.x, - } + fn wyx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_01_11) }).into()) } #[inline] #[must_use] - fn wyy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.y, - } + fn wyy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_01_11) }).into()) } #[inline] #[must_use] - fn wyz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.z, - } + fn wyz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_01_11) }).into()) } #[inline] #[must_use] - fn wyw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.w, - } + fn wyw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_01_11) }).into()) } #[inline] #[must_use] - fn wzx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.x, - } + fn wzx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_10_11) }).into()) } #[inline] #[must_use] - fn wzy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.y, - } + fn wzy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_10_11) }).into()) } #[inline] #[must_use] - fn wzz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.z, - } + fn wzz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_10_11) }).into()) } #[inline] #[must_use] - fn wzw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.w, - } + fn wzw(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_10_11) }).into()) } #[inline] #[must_use] - fn wwx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.x, - } + fn wwx(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_00_11_11) }).into()) } #[inline] #[must_use] - fn wwy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.y, - } + fn wwy(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_01_11_11) }).into()) } #[inline] #[must_use] - fn wwz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.z, - } + fn wwz(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_10_11_11) }).into()) } #[inline] #[must_use] - fn www(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.w, - } + fn www(self) -> Vec3A { + Vec3A((unsafe { _mm_shuffle_ps(self.0, self.0, 0b00_11_11_11) }).into()) } #[inline] diff --git a/src/swizzles/wasm32/vec3a_impl.rs b/src/swizzles/wasm32/vec3a_impl.rs index 7bfe7cca..ecaf0d61 100644 --- a/src/swizzles/wasm32/vec3a_impl.rs +++ b/src/swizzles/wasm32/vec3a_impl.rs @@ -2,14 +2,14 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4}; +use crate::{Vec2, Vec3A, Vec3Swizzles, Vec4A}; use core::arch::wasm32::*; impl Vec3Swizzles for Vec3A { type Vec2 = Vec2; - type Vec4 = Vec4; + type Vec4 = Vec4A; #[inline] #[must_use] @@ -256,487 +256,487 @@ impl Vec3Swizzles for Vec3A { #[inline] #[must_use] - fn xxxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0)) + fn xxxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xxxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 4, 5>(self.0, self.0)) + fn xxxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xxxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 4, 6>(self.0, self.0)) + fn xxxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xxyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0)) + fn xxyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xxyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 5, 5>(self.0, self.0)) + fn xxyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xxyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 5, 6>(self.0, self.0)) + fn xxyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xxzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0)) + fn xxzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xxzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 6, 5>(self.0, self.0)) + fn xxzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xxzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 0, 6, 6>(self.0, self.0)) + fn xxzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 0, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xyxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0)) + fn xyxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xyxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 4, 5>(self.0, self.0)) + fn xyxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xyxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 4, 6>(self.0, self.0)) + fn xyxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xyyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0)) + fn xyyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xyyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 5, 5>(self.0, self.0)) + fn xyyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xyyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 5, 6>(self.0, self.0)) + fn xyyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xyzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 6, 4>(self.0, self.0)) + fn xyzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xyzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 6, 5>(self.0, self.0)) + fn xyzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xyzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 1, 6, 6>(self.0, self.0)) + fn xyzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 1, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xzxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0)) + fn xzxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xzxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 4, 5>(self.0, self.0)) + fn xzxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xzxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 4, 6>(self.0, self.0)) + fn xzxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xzyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0)) + fn xzyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xzyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 5, 5>(self.0, self.0)) + fn xzyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xzyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 5, 6>(self.0, self.0)) + fn xzyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn xzzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0)) + fn xzzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn xzzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 6, 5>(self.0, self.0)) + fn xzzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn xzzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<0, 2, 6, 6>(self.0, self.0)) + fn xzzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<0, 2, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yxxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0)) + fn yxxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yxxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 4, 5>(self.0, self.0)) + fn yxxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yxxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 4, 6>(self.0, self.0)) + fn yxxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yxyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0)) + fn yxyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yxyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 5, 5>(self.0, self.0)) + fn yxyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yxyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 5, 6>(self.0, self.0)) + fn yxyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yxzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0)) + fn yxzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yxzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 6, 5>(self.0, self.0)) + fn yxzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yxzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 0, 6, 6>(self.0, self.0)) + fn yxzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 0, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yyxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0)) + fn yyxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yyxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 4, 5>(self.0, self.0)) + fn yyxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yyxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 4, 6>(self.0, self.0)) + fn yyxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yyyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0)) + fn yyyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yyyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 5, 5>(self.0, self.0)) + fn yyyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yyyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 5, 6>(self.0, self.0)) + fn yyyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yyzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0)) + fn yyzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yyzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 6, 5>(self.0, self.0)) + fn yyzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yyzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 1, 6, 6>(self.0, self.0)) + fn yyzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 1, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yzxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0)) + fn yzxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yzxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 4, 5>(self.0, self.0)) + fn yzxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yzxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 4, 6>(self.0, self.0)) + fn yzxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yzyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0)) + fn yzyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yzyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 5, 5>(self.0, self.0)) + fn yzyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yzyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 5, 6>(self.0, self.0)) + fn yzyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn yzzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0)) + fn yzzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn yzzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 6, 5>(self.0, self.0)) + fn yzzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn yzzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<1, 2, 6, 6>(self.0, self.0)) + fn yzzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<1, 2, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zxxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0)) + fn zxxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zxxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 4, 5>(self.0, self.0)) + fn zxxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zxxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 4, 6>(self.0, self.0)) + fn zxxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zxyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0)) + fn zxyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zxyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 5, 5>(self.0, self.0)) + fn zxyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zxyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 5, 6>(self.0, self.0)) + fn zxyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zxzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0)) + fn zxzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zxzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 6, 5>(self.0, self.0)) + fn zxzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zxzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 0, 6, 6>(self.0, self.0)) + fn zxzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 0, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zyxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0)) + fn zyxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zyxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 4, 5>(self.0, self.0)) + fn zyxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zyxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 4, 6>(self.0, self.0)) + fn zyxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zyyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0)) + fn zyyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zyyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 5, 5>(self.0, self.0)) + fn zyyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zyyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 5, 6>(self.0, self.0)) + fn zyyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zyzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0)) + fn zyzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zyzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 6, 5>(self.0, self.0)) + fn zyzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zyzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 1, 6, 6>(self.0, self.0)) + fn zyzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 1, 6, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zzxx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0)) + fn zzxx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zzxy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 4, 5>(self.0, self.0)) + fn zzxy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 4, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zzxz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 4, 6>(self.0, self.0)) + fn zzxz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 4, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zzyx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0)) + fn zzyx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zzyy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 5, 5>(self.0, self.0)) + fn zzyy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 5, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zzyz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 5, 6>(self.0, self.0)) + fn zzyz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 5, 6>(self.0, self.0)) } #[inline] #[must_use] - fn zzzx(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0)) + fn zzzx(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0)) } #[inline] #[must_use] - fn zzzy(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 6, 5>(self.0, self.0)) + fn zzzy(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 6, 5>(self.0, self.0)) } #[inline] #[must_use] - fn zzzz(self) -> Vec4 { - Vec4(i32x4_shuffle::<2, 2, 6, 6>(self.0, self.0)) + fn zzzz(self) -> Vec4A { + Vec4A(i32x4_shuffle::<2, 2, 6, 6>(self.0, self.0)) } } diff --git a/src/swizzles/wasm32/vec4a_impl.rs b/src/swizzles/wasm32/vec4a_impl.rs index 22017d69..6803bc4e 100644 --- a/src/swizzles/wasm32/vec4a_impl.rs +++ b/src/swizzles/wasm32/vec4a_impl.rs @@ -2,14 +2,14 @@ #![allow(clippy::useless_conversion)] -use crate::{Vec2, Vec3, Vec4A, Vec4Swizzles}; +use crate::{Vec2, Vec3A, Vec4A, Vec4Swizzles}; use core::arch::wasm32::*; impl Vec4Swizzles for Vec4A { type Vec2 = Vec2; - type Vec3 = Vec3; + type Vec3 = Vec3A; #[inline] #[must_use] @@ -157,642 +157,386 @@ impl Vec4Swizzles for Vec4A { #[inline] #[must_use] - fn xxx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.x, - } + fn xxx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 0, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xxy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.y, - } + fn xxy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 0, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xxz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.z, - } + fn xxz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 0, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xxw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.x, - z: self.w, - } + fn xxw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 0, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xyx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.x, - } + fn xyx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 1, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xyy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.y, - } + fn xyy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 1, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xyz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.z, - } + fn xyz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 1, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xyw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.y, - z: self.w, - } + fn xyw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 1, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xzx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.x, - } + fn xzx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 2, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xzy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.y, - } + fn xzy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 2, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xzz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.z, - } + fn xzz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 2, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xzw(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.z, - z: self.w, - } + fn xzw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 2, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xwx(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.x, - } + fn xwx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 3, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xwy(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.y, - } + fn xwy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 3, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xwz(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.z, - } + fn xwz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 3, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn xww(self) -> Vec3 { - Vec3 { - x: self.x, - y: self.w, - z: self.w, - } + fn xww(self) -> Vec3A { + Vec3A(i32x4_shuffle::<0, 3, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yxx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.x, - } + fn yxx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 0, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yxy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.y, - } + fn yxy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 0, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yxz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.z, - } + fn yxz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 0, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yxw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.x, - z: self.w, - } + fn yxw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 0, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yyx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.x, - } + fn yyx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 1, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yyy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.y, - } + fn yyy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 1, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yyz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.z, - } + fn yyz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 1, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yyw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.y, - z: self.w, - } + fn yyw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 1, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yzx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.x, - } + fn yzx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 2, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yzy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.y, - } + fn yzy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 2, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yzz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.z, - } + fn yzz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 2, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yzw(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.z, - z: self.w, - } + fn yzw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 2, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn ywx(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.x, - } + fn ywx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 3, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn ywy(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.y, - } + fn ywy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 3, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn ywz(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.z, - } + fn ywz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 3, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn yww(self) -> Vec3 { - Vec3 { - x: self.y, - y: self.w, - z: self.w, - } + fn yww(self) -> Vec3A { + Vec3A(i32x4_shuffle::<1, 3, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zxx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.x, - } + fn zxx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 0, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zxy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.y, - } + fn zxy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 0, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zxz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.z, - } + fn zxz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 0, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zxw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.x, - z: self.w, - } + fn zxw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 0, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zyx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.x, - } + fn zyx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 1, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zyy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.y, - } + fn zyy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 1, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zyz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.z, - } + fn zyz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 1, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zyw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.y, - z: self.w, - } + fn zyw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 1, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zzx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.x, - } + fn zzx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 2, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zzy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.y, - } + fn zzy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 2, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zzz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.z, - } + fn zzz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 2, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zzw(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.z, - z: self.w, - } + fn zzw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 2, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zwx(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.x, - } + fn zwx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 3, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zwy(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.y, - } + fn zwy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 3, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zwz(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.z, - } + fn zwz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 3, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn zww(self) -> Vec3 { - Vec3 { - x: self.z, - y: self.w, - z: self.w, - } + fn zww(self) -> Vec3A { + Vec3A(i32x4_shuffle::<2, 3, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wxx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.x, - } + fn wxx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 0, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wxy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.y, - } + fn wxy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 0, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wxz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.z, - } + fn wxz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 0, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wxw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.x, - z: self.w, - } + fn wxw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 0, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wyx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.x, - } + fn wyx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 1, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wyy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.y, - } + fn wyy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 1, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wyz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.z, - } + fn wyz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 1, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wyw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.y, - z: self.w, - } + fn wyw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 1, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wzx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.x, - } + fn wzx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 2, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wzy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.y, - } + fn wzy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 2, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wzz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.z, - } + fn wzz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 2, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wzw(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.z, - z: self.w, - } + fn wzw(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 2, 7, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wwx(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.x, - } + fn wwx(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 3, 4, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wwy(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.y, - } + fn wwy(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 3, 5, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn wwz(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.z, - } + fn wwz(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 3, 6, 4>(self.0, self.0).into()) } #[inline] #[must_use] - fn www(self) -> Vec3 { - Vec3 { - x: self.w, - y: self.w, - z: self.w, - } + fn www(self) -> Vec3A { + Vec3A(i32x4_shuffle::<3, 3, 7, 4>(self.0, self.0).into()) } #[inline]