]>
git.proxmox.com Git - rustc.git/blob - vendor/packed_simd_2/src/api/math/float/abs.rs
1 //! Implements vertical (lane-wise) floating-point `abs`.
3 macro_rules
! impl_math_float_abs
{
4 ([$elem_ty
:ident
; $elem_count
:expr
]: $id
:ident
| $test_tt
:tt
) => {
8 pub fn abs(self) -> Self {
9 use crate::codegen
::math
::float
::abs
::Abs
;
17 pub mod [<$id _math_abs
>] {
19 #[cfg_attr(not(target_arch = "wasm32"), test)] #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test)]
21 let o
= $id
::splat(1 as $elem_ty
);
22 assert_eq
!(o
, o
.abs());
24 let mo
= $id
::splat(-1 as $elem_ty
);
25 assert_eq
!(o
, mo
.abs());