Home
last modified time | relevance | path

Searched refs:thread_rng (Results 1 – 25 of 34) sorted by relevance

12

/external/rust/crates/rand/src/rngs/
Dthread.rs87 pub fn thread_rng() -> ThreadRng { in thread_rng() function
94 crate::prelude::thread_rng() in default()
138 let mut r = crate::thread_rng(); in test_thread_rng()
/external/rust/crates/rayon/src/slice/
Dtest.rs6 use rand::{thread_rng, Rng};
13 let mut rng = thread_rng();
73 v.$f(|_, _| *[Less, Equal, Greater].choose(&mut thread_rng()).unwrap());
105 let mut rng = thread_rng(); in test_par_sort_stability()
Dquicksort.rs765 use rand::{thread_rng, Rng};
769 let rng = thread_rng(); in test_heapsort()
793 heapsort(&mut v, &|_, _| thread_rng().gen()); in test_heapsort()
/external/rust/crates/nix/test/sys/
Dtest_uio.rs3 use rand::{thread_rng, Rng};
17 let s: String = thread_rng().sample_iter(&Alphanumeric).take(128).collect(); in test_writev()
26 … let slice_len = if left <= 64 { left } else { thread_rng().gen_range(64, cmp::min(256, left)) }; in test_writev()
60 let s:String = thread_rng().sample_iter(&Alphanumeric).take(128).collect(); in test_readv()
66 … let vec_len = if left <= 64 { left } else { thread_rng().gen_range(64, cmp::min(256, left)) }; in test_readv()
Dtest_sockopt.rs1 use rand::{thread_rng, Rng};
23 let bufsize: usize = thread_rng().gen_range(4096, 131_072); in test_so_buf()
/external/rust/crates/byteorder/benches/
Dbench.rs265 let mut numbers: Vec<$numty> = rand::thread_rng()
280 let mut numbers: Vec<$numty> = rand::thread_rng()
295 let numbers: Vec<$numty> = rand::thread_rng()
309 let numbers: Vec<$numty> = rand::thread_rng()
/external/rust/crates/rand/src/
Dlib.rs106 pub use crate::rngs::thread::thread_rng;
186 thread_rng().gen() in random()
Dprelude.rs33 pub use crate::{random, thread_rng};
/external/rust/crates/flate2/src/zlib/
Dmod.rs10 use rand::{thread_rng, Rng};
21 let to_write = &v[..thread_rng().gen_range(0, v.len())]; in roundtrip()
50 let to_write = &v[..thread_rng().gen_range(0, v.len())]; in total_in()
/external/rust/crates/flate2/src/deflate/
Dmod.rs9 use rand::{thread_rng, Rng};
20 let to_write = &v[..thread_rng().gen_range(0, v.len())]; in roundtrip()
49 let to_write = &v[..thread_rng().gen_range(0, v.len())]; in total_in()
/external/rust/crates/rayon/tests/
Dsort-panic-safe.rs2 use rand::{thread_rng, Rng};
132 let mut rng = thread_rng(); in sort_panic_safe()
/external/rust/crates/flate2/tests/
Dtokio.rs19 use rand::{thread_rng, Rng};
83 .map(|()| thread_rng().gen::<u8>()) in echo_random()
/external/rust/crates/rand/
DREADME.md16 … and fast, convenient generation via [`thread_rng`](https://docs.rs/rand/*/rand/fn.thread_rng.html)
118 - `std_rng` enables inclusion of `StdRng`, `thread_rng` and `random`
139 unavailable (unless `alloc` is enabled), and `thread_rng` and `random` are
DCHANGELOG.md342 - Switch `StdRng` and `thread_rng` to HC-128. (#277)
344 - Change `thread_rng` reseeding threshold to 32 MiB. (#277)
415 - `thread_rng` uses `JitterRng` if seeding from system time fails
437 - `thread_rng` is seeded from the system time if `OsRng` fails
438 - `weak_rng` now uses `thread_rng` internally
611 - Rename `TaskRng` to `ThreadRng` and `task_rng` to `thread_rng` (since a
/external/rust/crates/crc32fast/benches/
Dbench.rs12 rand::thread_rng().fill(&mut bytes[..]); in bench()
/external/rust/crates/vsock/tests/
Dvsock.rs33 let mut rng = rand::thread_rng(); in test_vsock()
/external/rust/crates/zip/benches/
Dread_entry.rs17 rand::thread_rng().fill_bytes(&mut bytes); in generate_random_archive()
/external/rust/crates/crossbeam-epoch/examples/
Dsanitize.rs11 let mut rng = rand::thread_rng(); in worker()
/external/rust/crates/crossbeam-deque/tests/
Dfifo.rs177 let mut rng = rand::thread_rng(); in stress()
237 let mut rng = rand::thread_rng(); in no_starvation()
Dinjector.rs188 let mut rng = rand::thread_rng(); in stress()
248 let mut rng = rand::thread_rng(); in no_starvation()
Dlifo.rs177 let mut rng = rand::thread_rng(); in stress()
237 let mut rng = rand::thread_rng(); in no_starvation()
/external/rust/crates/flate2/src/gz/
Dmod.rs261 use rand::{thread_rng, Rng};
290 let to_write = &v[..thread_rng().gen_range(0, v.len())]; in roundtrip_big()
/external/rust/crates/flate2/src/
Dlib.rs233 iter::repeat(()).map(|_| rand::thread_rng().gen()) in random_bytes()
/external/rust/crates/crossbeam-channel/tests/
Dzero.rs13 use rand::{thread_rng, Rng};
399 let mut rng = thread_rng(); in drops()
Dlist.rs13 use rand::{thread_rng, Rng};
387 let mut rng = thread_rng(); in drops()

12