diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/packed_simd_2/src/api/math/float/sin.rs | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/packed_simd_2/src/api/math/float/sin.rs')
-rw-r--r-- | vendor/packed_simd_2/src/api/math/float/sin.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/packed_simd_2/src/api/math/float/sin.rs b/vendor/packed_simd_2/src/api/math/float/sin.rs deleted file mode 100644 index 49908319b..000000000 --- a/vendor/packed_simd_2/src/api/math/float/sin.rs +++ /dev/null @@ -1,50 +0,0 @@ -//! Implements vertical (lane-wise) floating-point `sin`. - -macro_rules! impl_math_float_sin { - ([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => { - impl $id { - /// Sine. - #[inline] - pub fn sin(self) -> Self { - use crate::codegen::math::float::sin::Sin; - Sin::sin(self) - } - - /// Sine of `self * PI`. - #[inline] - pub fn sin_pi(self) -> Self { - use crate::codegen::math::float::sin_pi::SinPi; - SinPi::sin_pi(self) - } - - /// Sine and cosine of `self * PI`. - #[inline] - pub fn sin_cos_pi(self) -> (Self, Self) { - use crate::codegen::math::float::sin_cos_pi::SinCosPi; - SinCosPi::sin_cos_pi(self) - } - } - - test_if!{ - $test_tt: - paste::item! { - pub mod [<$id _math_sin>] { - use super::*; - #[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)] - fn sin() { - use crate::$elem_ty::consts::PI; - let z = $id::splat(0 as $elem_ty); - let p = $id::splat(PI as $elem_ty); - let ph = $id::splat(PI as $elem_ty / 2.); - let o_r = $id::splat((PI as $elem_ty / 2.).sin()); - let z_r = $id::splat((PI as $elem_ty).sin()); - - assert_eq!(z, z.sin()); - assert_eq!(o_r, ph.sin()); - assert_eq!(z_r, p.sin()); - } - } - } - } - }; -} |