/external/rust/crates/num-traits/src/ops/ |
D | wrapping.rs | 1 use core::num::Wrapping; 222 impl<T: WrappingAdd> WrappingAdd for Wrapping<T> implementation 224 Wrapping<T>: Add<Output = Wrapping<T>>, 227 Wrapping(self.0.wrapping_add(&v.0)) in wrapping_add() 230 impl<T: WrappingSub> WrappingSub for Wrapping<T> implementation 232 Wrapping<T>: Sub<Output = Wrapping<T>>, 235 Wrapping(self.0.wrapping_sub(&v.0)) in wrapping_sub() 238 impl<T: WrappingMul> WrappingMul for Wrapping<T> implementation 240 Wrapping<T>: Mul<Output = Wrapping<T>>, 243 Wrapping(self.0.wrapping_mul(&v.0)) in wrapping_mul() [all …]
|
/external/rust/crates/ring/src/ |
D | digest.rs | 32 use core::num::Wrapping; 320 Wrapping(0x67452301u32), 321 Wrapping(0xefcdab89u32), 322 Wrapping(0x98badcfeu32), 323 Wrapping(0x10325476u32), 324 Wrapping(0xc3d2e1f0u32), 325 Wrapping(0), 326 Wrapping(0), 327 Wrapping(0), 345 Wrapping(0x6a09e667u32), [all …]
|
D | endian.rs | 1 use core::{convert::TryInto, num::Wrapping}; 111 impl From<Wrapping<$base>> for $endian<$base> { 113 fn from(Wrapping(value): Wrapping<$base>) -> Self {
|
D | limb.rs | 27 use core::num::Wrapping; 277 struct BitIndex(Wrapping<c::size_t>); in fold_5_bit_windows() 279 const WINDOW_BITS: Wrapping<c::size_t> = Wrapping(5); in fold_5_bit_windows() 297 BitIndex(Wrapping(LIMB_BITS - leading_bits)) in fold_5_bit_windows() 315 if window_low_bit.0 > Wrapping(LIMB_BITS) - WINDOW_BITS { in fold_5_bit_windows() 321 while window_low_bit.0 < Wrapping(LIMB_BITS) { in fold_5_bit_windows() 328 window_low_bit.0 += Wrapping(LIMB_BITS); // "Fix" the underflow. in fold_5_bit_windows()
|
/external/rust/crates/zip/src/ |
D | zipcrypto.rs | 6 use std::num::Wrapping; 10 key_0: Wrapping<u32>, 11 key_1: Wrapping<u32>, 12 key_2: Wrapping<u32>, 18 key_0: Wrapping(0x12345678), in new() 19 key_1: Wrapping(0x23456789), in new() 20 key_2: Wrapping(0x34567890), in new() 27 (self.key_1 + (self.key_0 & Wrapping(0xff))) * Wrapping(0x08088405) + Wrapping(1); in update() 32 let temp: Wrapping<u16> = Wrapping(self.key_2.0 as u16) | Wrapping(3); in stream_byte() 33 ((temp * (temp ^ Wrapping(1))) >> 8).0 as u8 in stream_byte() [all …]
|
/external/rust/crates/libm/src/math/ |
D | sqrt.rs | 112 use core::num::Wrapping; in sqrt() 117 let sign: Wrapping<u32> = Wrapping(0x80000000); in sqrt() 124 let mut r: Wrapping<u32>; in sqrt() 125 let mut t1: Wrapping<u32>; in sqrt() 126 let mut s1: Wrapping<u32>; in sqrt() 127 let mut ix1: Wrapping<u32>; in sqrt() 128 let mut q1: Wrapping<u32>; in sqrt() 131 ix1 = Wrapping(x.to_bits() as u32); in sqrt() 177 q1 = Wrapping(0); in sqrt() 179 s1 = Wrapping(0); in sqrt() [all …]
|
/external/rust/crates/num-traits/src/ |
D | identities.rs | 1 use core::num::Wrapping; 65 impl<T: Zero> Zero for Wrapping<T> implementation 67 Wrapping<T>: Add<Output = Wrapping<T>>, 78 Wrapping(T::zero()) in zero() 154 impl<T: One> One for Wrapping<T> implementation 156 Wrapping<T>: Mul<Output = Wrapping<T>>, 163 Wrapping(T::one()) in one() 186 assert_eq!(zero::<$t>(), zero::<Wrapping<$t>>().0); in wrapping_identities() 187 assert_eq!(one::<$t>(), one::<Wrapping<$t>>().0); in wrapping_identities() 188 assert_eq!((0 as $t).is_zero(), Wrapping(0 as $t).is_zero()); in wrapping_identities() [all …]
|
D | sign.rs | 1 use core::num::Wrapping; 80 impl<T: Signed> Signed for Wrapping<T> implementation 82 Wrapping<T>: Num + Neg<Output = Wrapping<T>>, 86 Wrapping(self.0.abs()) in abs() 91 Wrapping(self.0.abs_sub(&other.0)) in abs_sub() 96 Wrapping(self.0.signum()) in signum() 209 impl<T: Unsigned> Unsigned for Wrapping<T> where Wrapping<T>: Num {} implementation 214 require_unsigned(&Wrapping(42_u32)); in unsigned_wrapping_is_unsigned()
|
D | bounds.rs | 1 use core::num::Wrapping; 49 impl<T: Bounded> Bounded for Wrapping<T> { implementation 51 Wrapping(T::min_value()) in min_value() 54 Wrapping(T::max_value()) in max_value() 98 assert_eq!(<Wrapping<$t> as Bounded>::min_value().0, <$t>::min_value()); in wrapping_bounded() 99 assert_eq!(<Wrapping<$t> as Bounded>::max_value().0, <$t>::max_value()); in wrapping_bounded() 113 assert_eq!(<Wrapping<$t> as Bounded>::min_value().0, <$t>::min_value()); in wrapping_bounded_i128() 114 assert_eq!(<Wrapping<$t> as Bounded>::max_value().0, <$t>::max_value()); in wrapping_bounded_i128() 125 require_bounded(&Wrapping(42_u32)); in wrapping_is_bounded() 126 require_bounded(&Wrapping(-42)); in wrapping_is_bounded()
|
D | pow.rs | 1 use core::num::Wrapping; 128 pow_impl!(Wrapping<u8>); 129 pow_impl!(Wrapping<i8>); 130 pow_impl!(Wrapping<u16>); 131 pow_impl!(Wrapping<i16>); 132 pow_impl!(Wrapping<u32>); 133 pow_impl!(Wrapping<i32>); 134 pow_impl!(Wrapping<u64>); 135 pow_impl!(Wrapping<i64>); 137 pow_impl!(Wrapping<u128>); [all …]
|
D | lib.rs | 28 use core::num::Wrapping; 176 impl<T: Num> Num for Wrapping<T> implementation 178 Wrapping<T>: Add<Output = Wrapping<T>> 179 + Sub<Output = Wrapping<T>> 180 + Mul<Output = Wrapping<T>> 181 + Div<Output = Wrapping<T>> 182 + Rem<Output = Wrapping<T>>, 186 T::from_str_radix(str, radix).map(Wrapping) in from_str_radix() 514 require_num(&Wrapping(42_u32)); in wrapping_is_num() 515 require_num(&Wrapping(-42)); in wrapping_is_num() [all …]
|
D | cast.rs | 2 use core::num::Wrapping; 619 impl<T: ToPrimitive> ToPrimitive for Wrapping<T> { implementation 647 T::$method(n).map(Wrapping) 652 impl<T: FromPrimitive> FromPrimitive for Wrapping<T> { implementation 738 impl<T: NumCast> NumCast for Wrapping<T> { implementation 740 T::from(n).map(Wrapping) in from()
|
/external/crosvm/devices/src/virtio/ |
D | queue.rs | 6 use std::num::Wrapping; 224 next_avail: Wrapping<u16>, 225 next_used: Wrapping<u16>, 229 last_used: Wrapping<u16>, 248 next_avail: Wrapping(0), in new() 249 next_used: Wrapping(0), in new() 251 last_used: Wrapping(0), in new() 270 self.next_avail = Wrapping(0); in reset() 271 self.next_used = Wrapping(0); in reset() 273 self.last_used = Wrapping(0); in reset() [all …]
|
/external/rust/crates/ring/src/digest/ |
D | sha2.rs | 17 num::Wrapping, 180 impl Word for Wrapping<u32> { implementation 181 const ZERO: Self = Wrapping(0); 186 Wrapping(u32::from_be_bytes(input)) in from_be_bytes() 191 Wrapping(self.0.rotate_right(count)) in rotr() 196 impl Sha2 for Wrapping<u32> { implementation 272 impl Word for Wrapping<u64> { implementation 273 const ZERO: Self = Wrapping(0); 278 Wrapping(u64::from_be_bytes(input)) in from_be_bytes() 283 Wrapping(self.0.rotate_right(count)) in rotr() [all …]
|
D | sha1.rs | 18 use core::{convert::TryInto, num::Wrapping}; 25 type W32 = Wrapping<u32>; 70 …let (a, b, c, d, e) = step3(a, b, c, d, e, W[ 0..20].try_into().unwrap(), Wrapping(0x5a827999), ch… 71 …let (a, b, c, d, e) = step3(a, b, c, d, e, W[20..40].try_into().unwrap(), Wrapping(0x6ed9eba1), pa… 72 …let (a, b, c, d, e) = step3(a, b, c, d, e, W[40..60].try_into().unwrap(), Wrapping(0x8f1bbcdc), ma… 73 …let (a, b, c, d, e) = step3(a, b, c, d, e, W[60..80].try_into().unwrap(), Wrapping(0xca62c1d6), pa… 110 Wrapping(x.0.rotate_left(n)) in rotl()
|
/external/rust/crates/rand/src/distributions/ |
D | other.rs | 12 use core::num::Wrapping; 195 impl<T> Distribution<Wrapping<T>> for Standard 199 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Wrapping<T> { in sample() 200 Wrapping(rng.gen()) in sample() 279 test_samples(&Standard, Wrapping(0i32), &[ in value_stability() 280 Wrapping(-2074640887), in value_stability() 281 Wrapping(-1719949321), in value_stability() 282 Wrapping(2018088303), in value_stability() 283 Wrapping(-547181756), in value_stability() 284 Wrapping(838957336), in value_stability()
|
/external/llvm-project/clang-tools-extra/clangd/unittests/tweaks/ |
D | TweakTesting.cpp | 39 auto Wrapping = wrapping(Ctx); in wrap() local 40 return (Wrapping.first + Inner + Wrapping.second).str(); in wrap() 44 auto Wrapping = wrapping(Ctx); in unwrap() local 47 if (Outer.startswith(Wrapping.first) && Outer.endswith(Wrapping.second) && in unwrap() 48 Outer.size() >= Wrapping.first.size() + Wrapping.second.size()) in unwrap() 49 return Outer.drop_front(Wrapping.first.size()) in unwrap() 50 .drop_back(Wrapping.second.size()); in unwrap()
|
/external/llvm-project/lldb/include/lldb/Expression/ |
D | ExpressionSourceCode.h | 22 enum Wrapping : bool { enum 34 llvm::StringRef body, Wrapping wrap) in ExpressionSourceCode() 41 Wrapping m_wrap;
|
/external/rust/crates/futures-util/src/async_await/ |
D | random.rs | 5 num::Wrapping, 29 static RNG: Cell<Wrapping<u64>> = Cell::new(Wrapping(prng_seed())); in random()
|
/external/rust/crates/crossbeam-channel/src/ |
D | utils.rs | 4 use std::num::Wrapping; 20 static RNG: Cell<Wrapping<u32>> = Cell::new(Wrapping(1_406_868_647)); in shuffle()
|
/external/rust/crates/rand/src/ |
D | rng.rs | 15 use core::num::Wrapping; 364 impl Fill for [Wrapping<$t>] { 375 *x = Wrapping(x.0.to_le()); 465 let mut warray = [Wrapping(0u32); 2]; in test_fill()
|
/external/rust/crates/libm/ |
D | CONTRIBUTING.md | 74 - Rust code panics on arithmetic overflows when not optimized. You may need to use the [`Wrapping`] 77 [`Wrapping`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html
|
/external/rust/crates/num-traits/tests/ |
D | cast.rs | 22 use core::num::Wrapping; 42 let w = Wrapping(i); in wrapping_to_primitive() 65 require_toprimitive(&Wrapping(42)); in wrapping_is_toprimitive() 71 require_fromprimitive(&Wrapping(42)); in wrapping_is_fromprimitive() 77 require_numcast(&Wrapping(42)); in wrapping_is_numcast()
|
/external/rust/crates/crossbeam-epoch/src/ |
D | internal.rs | 42 use core::num::Wrapping; 373 pin_count: Cell<Wrapping<usize>>, 404 pin_count: Cell::new(Wrapping(0)), in register() 504 self.pin_count.set(count + Wrapping(1)); in pin()
|
/external/llvm-project/clang/lib/Format/ |
D | Format.cpp | 649 static void mapping(IO &IO, FormatStyle::BraceWrappingFlags &Wrapping) { in mapping() 650 IO.mapOptional("AfterCaseLabel", Wrapping.AfterCaseLabel); in mapping() 651 IO.mapOptional("AfterClass", Wrapping.AfterClass); in mapping() 652 IO.mapOptional("AfterControlStatement", Wrapping.AfterControlStatement); in mapping() 653 IO.mapOptional("AfterEnum", Wrapping.AfterEnum); in mapping() 654 IO.mapOptional("AfterFunction", Wrapping.AfterFunction); in mapping() 655 IO.mapOptional("AfterNamespace", Wrapping.AfterNamespace); in mapping() 656 IO.mapOptional("AfterObjCDeclaration", Wrapping.AfterObjCDeclaration); in mapping() 657 IO.mapOptional("AfterStruct", Wrapping.AfterStruct); in mapping() 658 IO.mapOptional("AfterUnion", Wrapping.AfterUnion); in mapping() [all …]
|