Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions fearless_simd/src/generated/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,14 @@ impl Simd for Avx2 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x4(self, a: f32x4<Self>) -> mask32x4<Self> {
a.simd_ne(a)
}
Expand Down Expand Up @@ -5252,6 +5260,14 @@ impl Simd for Avx2 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x2(self, a: f64x2<Self>) -> mask64x2<Self> {
a.simd_ne(a)
}
Expand Down Expand Up @@ -7192,6 +7208,14 @@ impl Simd for Avx2 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x8(self, a: f32x8<Self>) -> mask32x8<Self> {
a.simd_ne(a)
}
Expand Down Expand Up @@ -11544,6 +11568,14 @@ impl Simd for Avx2 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x4(self, a: f64x4<Self>) -> mask64x4<Self> {
a.simd_ne(a)
}
Expand Down
48 changes: 48 additions & 0 deletions fearless_simd/src/generated/avx512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x4(self, a: f32x4<Self>) -> mask32x4<Self> {
crate::kernel!(
#[inline(always)]
Expand Down Expand Up @@ -5300,6 +5308,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x2(self, a: f64x2<Self>) -> mask64x2<Self> {
crate::kernel!(
#[inline(always)]
Expand Down Expand Up @@ -7097,6 +7113,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x8(self, a: f32x8<Self>) -> mask32x8<Self> {
crate::kernel!(
#[inline(always)]
Expand Down Expand Up @@ -11409,6 +11433,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x4(self, a: f64x4<Self>) -> mask64x4<Self> {
crate::kernel!(
#[inline(always)]
Expand Down Expand Up @@ -13204,6 +13236,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x16(self, a: f32x16<Self>) -> f32x16<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x16(self, a: f32x16<Self>) -> f32x16<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x16(self, a: f32x16<Self>) -> mask32x16<Self> {
crate::kernel!(
#[inline(always)]
Expand Down Expand Up @@ -17576,6 +17616,14 @@ impl Simd for Avx512 {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x8(self, a: f64x8<Self>) -> f64x8<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x8(self, a: f64x8<Self>) -> f64x8<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x8(self, a: f64x8<Self>) -> mask64x8<Self> {
crate::kernel!(
#[inline(always)]
Expand Down
28 changes: 28 additions & 0 deletions fearless_simd/src/generated/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,26 @@ impl Simd for Fallback {
.simd_into(self)
}
#[inline(always)]
fn to_degrees_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
[
f32::to_degrees(a[0usize]),
f32::to_degrees(a[1usize]),
f32::to_degrees(a[2usize]),
f32::to_degrees(a[3usize]),
]
.simd_into(self)
}
#[inline(always)]
fn to_radians_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
[
f32::to_radians(a[0usize]),
f32::to_radians(a[1usize]),
f32::to_radians(a[2usize]),
f32::to_radians(a[3usize]),
]
.simd_into(self)
}
#[inline(always)]
fn is_nan_f32x4(self, a: f32x4<Self>) -> mask32x4<Self> {
a.simd_ne(a)
}
Expand Down Expand Up @@ -5725,6 +5745,14 @@ impl Simd for Fallback {
[f64::trunc(a[0usize]), f64::trunc(a[1usize])].simd_into(self)
}
#[inline(always)]
fn to_degrees_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
[f64::to_degrees(a[0usize]), f64::to_degrees(a[1usize])].simd_into(self)
}
#[inline(always)]
fn to_radians_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
[f64::to_radians(a[0usize]), f64::to_radians(a[1usize])].simd_into(self)
}
#[inline(always)]
fn is_nan_f64x2(self, a: f64x2<Self>) -> mask64x2<Self> {
a.simd_ne(a)
}
Expand Down
16 changes: 16 additions & 0 deletions fearless_simd/src/generated/neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,14 @@ impl Simd for Neon {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f32x4(self, a: f32x4<Self>) -> f32x4<Self> {
a * const { f32::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f32x4(self, a: f32x4<Self>) -> mask32x4<Self> {
a.simd_ne(a)
}
Expand Down Expand Up @@ -4302,6 +4310,14 @@ impl Simd for Neon {
kernel(self, a)
}
#[inline(always)]
fn to_degrees_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_degrees(1.0) }
}
#[inline(always)]
fn to_radians_f64x2(self, a: f64x2<Self>) -> f64x2<Self> {
a * const { f64::to_radians(1.0) }
}
#[inline(always)]
fn is_nan_f64x2(self, a: f64x2<Self>) -> mask64x2<Self> {
a.simd_ne(a)
}
Expand Down
60 changes: 60 additions & 0 deletions fearless_simd/src/generated/simd_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ pub trait Simd:
fn fract_f32x4(self, a: f32x4<Self>) -> f32x4<Self>;
#[doc = "Return the integer part of each element, rounding towards zero."]
fn trunc_f32x4(self, a: f32x4<Self>) -> f32x4<Self>;
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_degrees_f32x4(self, a: f32x4<Self>) -> f32x4<Self>;
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_radians_f32x4(self, a: f32x4<Self>) -> f32x4<Self>;
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f32x4(self, a: f32x4<Self>) -> mask32x4<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -1662,6 +1666,10 @@ pub trait Simd:
fn fract_f64x2(self, a: f64x2<Self>) -> f64x2<Self>;
#[doc = "Return the integer part of each element, rounding towards zero."]
fn trunc_f64x2(self, a: f64x2<Self>) -> f64x2<Self>;
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_degrees_f64x2(self, a: f64x2<Self>) -> f64x2<Self>;
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_radians_f64x2(self, a: f64x2<Self>) -> f64x2<Self>;
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f64x2(self, a: f64x2<Self>) -> mask64x2<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -2455,6 +2463,18 @@ pub trait Simd:
let (a0, a1) = self.split_f32x8(a);
self.combine_f32x4(self.trunc_f32x4(a0), self.trunc_f32x4(a1))
}
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_degrees_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
let (a0, a1) = self.split_f32x8(a);
self.combine_f32x4(self.to_degrees_f32x4(a0), self.to_degrees_f32x4(a1))
}
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_radians_f32x8(self, a: f32x8<Self>) -> f32x8<Self> {
let (a0, a1) = self.split_f32x8(a);
self.combine_f32x4(self.to_radians_f32x4(a0), self.to_radians_f32x4(a1))
}
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f32x8(self, a: f32x8<Self>) -> mask32x8<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -5436,6 +5456,18 @@ pub trait Simd:
let (a0, a1) = self.split_f64x4(a);
self.combine_f64x2(self.trunc_f64x2(a0), self.trunc_f64x2(a1))
}
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_degrees_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
let (a0, a1) = self.split_f64x4(a);
self.combine_f64x2(self.to_degrees_f64x2(a0), self.to_degrees_f64x2(a1))
}
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_radians_f64x4(self, a: f64x4<Self>) -> f64x4<Self> {
let (a0, a1) = self.split_f64x4(a);
self.combine_f64x2(self.to_radians_f64x2(a0), self.to_radians_f64x2(a1))
}
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f64x4(self, a: f64x4<Self>) -> mask64x4<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -6761,6 +6793,18 @@ pub trait Simd:
let (a0, a1) = self.split_f32x16(a);
self.combine_f32x8(self.trunc_f32x8(a0), self.trunc_f32x8(a1))
}
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_degrees_f32x16(self, a: f32x16<Self>) -> f32x16<Self> {
let (a0, a1) = self.split_f32x16(a);
self.combine_f32x8(self.to_degrees_f32x8(a0), self.to_degrees_f32x8(a1))
}
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_radians_f32x16(self, a: f32x16<Self>) -> f32x16<Self> {
let (a0, a1) = self.split_f32x16(a);
self.combine_f32x8(self.to_radians_f32x8(a0), self.to_radians_f32x8(a1))
}
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f32x16(self, a: f32x16<Self>) -> mask32x16<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -9745,6 +9789,18 @@ pub trait Simd:
let (a0, a1) = self.split_f64x8(a);
self.combine_f64x4(self.trunc_f64x4(a0), self.trunc_f64x4(a1))
}
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_degrees_f64x8(self, a: f64x8<Self>) -> f64x8<Self> {
let (a0, a1) = self.split_f64x8(a);
self.combine_f64x4(self.to_degrees_f64x4(a0), self.to_degrees_f64x4(a1))
}
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
#[inline(always)]
fn to_radians_f64x8(self, a: f64x8<Self>) -> f64x8<Self> {
let (a0, a1) = self.split_f64x8(a);
self.combine_f64x4(self.to_radians_f64x4(a0), self.to_radians_f64x4(a1))
}
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan_f64x8(self, a: f64x8<Self>) -> mask64x8<Self>;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down Expand Up @@ -11353,6 +11409,10 @@ pub trait SimdFloat<S: Simd>:
fn fract(self) -> Self;
#[doc = "Return the integer part of each element, rounding towards zero."]
fn trunc(self) -> Self;
#[doc = "Converts radians to degrees.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_degrees(self) -> Self;
#[doc = "Converts degrees to radians.\n\nThe precision of this function is non-deterministic. This means it varies by platform, Rust version, and can even differ within the same execution from one invocation to the next."]
fn to_radians(self) -> Self;
#[doc = "Return a mask indicating which elements are NaN."]
fn is_nan(self) -> Self::Mask;
#[doc = "Return a mask indicating which elements are positive or negative infinite."]
Expand Down
Loading
Loading