Home
last modified time | relevance | path

Searched refs:rng (Results 1 – 25 of 897) sorted by relevance

12345678910>>...36

/external/tensorflow/tensorflow/compiler/xla/service/
Drng_expander.cc30 static std::mt19937_64 rng{42}; in GlobalRandomValue() local
32 return rng(); in GlobalRandomValue()
42 StatusOr<HloInstruction*> ConvertSmallFpRngToF32Rng(HloInstruction* rng) { in ConvertSmallFpRngToF32Rng() argument
43 CHECK_EQ(rng->opcode(), HloOpcode::kRng); in ConvertSmallFpRngToF32Rng()
44 PrimitiveType primitive_type = rng->shape().element_type(); in ConvertSmallFpRngToF32Rng()
48 absl::c_transform(rng->operands(), std::back_inserter(new_operands), in ConvertSmallFpRngToF32Rng()
54 Shape shape = ShapeUtil::ChangeElementType(rng->shape(), F32); in ConvertSmallFpRngToF32Rng()
55 HloComputation* computation = rng->parent(); in ConvertSmallFpRngToF32Rng()
58 rng->CloneWithNewOperands(shape, new_operands, &context)); in ConvertSmallFpRngToF32Rng()
59 TF_RETURN_IF_ERROR(new_rng->CopyAllControlDepsFrom(rng)); in ConvertSmallFpRngToF32Rng()
[all …]
/external/catch2/projects/SelfTest/IntrospectiveTests/
DRandomNumberGeneration.tests.cpp13 Catch::SimplePcg32 rng; variable
15 REQUIRE(rng() == 0xfcdb943b);
16 REQUIRE(rng() == 0x6f55b921);
17 REQUIRE(rng() == 0x4c17a916);
18 REQUIRE(rng() == 0x71eae25f);
19 REQUIRE(rng() == 0x6ce7909c);
22 rng.seed(0xabcd1234);
23 REQUIRE(rng() == 0x57c08495);
24 REQUIRE(rng() == 0x33c956ac);
25 REQUIRE(rng() == 0x2206fd76);
[all …]
/external/tensorflow/tensorflow/lite/delegates/xnnpack/
Dconv_2d_test.cc34 auto rng = std::mt19937(random_device()); variable
36 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng));
38 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng));
40 std::bind(std::uniform_int_distribution<int32_t>(2, 16), std::ref(rng));
60 auto rng = std::mt19937(random_device()); variable
62 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng));
64 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng));
66 std::bind(std::uniform_int_distribution<int32_t>(2, 16), std::ref(rng));
86 auto rng = std::mt19937(random_device()); variable
88 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng));
[all …]
Ddepthwise_conv_2d_test.cc34 auto rng = std::mt19937(random_device()); variable
36 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng));
38 std::bind(std::uniform_int_distribution<int32_t>(3, 32), std::ref(rng));
55 auto rng = std::mt19937(random_device()); variable
57 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng));
59 std::bind(std::uniform_int_distribution<int32_t>(3, 32), std::ref(rng));
77 auto rng = std::mt19937(random_device()); variable
79 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng));
81 std::bind(std::uniform_int_distribution<int32_t>(3, 32), std::ref(rng));
99 auto rng = std::mt19937(random_device()); variable
[all …]
Dmax_pool_2d_test.cc34 auto rng = std::mt19937(random_device()); in TEST() local
36 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
38 std::bind(std::uniform_int_distribution<int32_t>(10, 25), std::ref(rng)); in TEST()
40 std::bind(std::uniform_int_distribution<int32_t>(5, 16), std::ref(rng)); in TEST()
61 auto rng = std::mt19937(random_device()); in TEST() local
63 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
65 std::bind(std::uniform_int_distribution<int32_t>(10, 25), std::ref(rng)); in TEST()
67 std::bind(std::uniform_int_distribution<int32_t>(5, 16), std::ref(rng)); in TEST()
88 auto rng = std::mt19937(random_device()); in TEST() local
90 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
[all …]
Daverage_pool_2d_test.cc34 auto rng = std::mt19937(random_device()); in TEST() local
36 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
38 std::bind(std::uniform_int_distribution<int32_t>(10, 25), std::ref(rng)); in TEST()
40 std::bind(std::uniform_int_distribution<int32_t>(5, 16), std::ref(rng)); in TEST()
61 auto rng = std::mt19937(random_device()); in TEST() local
63 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
65 std::bind(std::uniform_int_distribution<int32_t>(10, 25), std::ref(rng)); in TEST()
67 std::bind(std::uniform_int_distribution<int32_t>(5, 16), std::ref(rng)); in TEST()
88 auto rng = std::mt19937(random_device()); in TEST() local
90 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
[all …]
Dpad_test.cc34 auto rng = std::mt19937(random_device()); in TEST() local
36 std::bind(std::uniform_int_distribution<int32_t>(1, 3), std::ref(rng)); in TEST()
38 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
53 auto rng = std::mt19937(random_device()); in TEST() local
55 std::bind(std::uniform_int_distribution<int32_t>(1, 3), std::ref(rng)); in TEST()
57 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
72 auto rng = std::mt19937(random_device()); in TEST() local
74 std::bind(std::uniform_int_distribution<int32_t>(1, 3), std::ref(rng)); in TEST()
76 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
91 auto rng = std::mt19937(random_device()); in TEST() local
[all …]
Ddepth_to_space_test.cc35 auto rng = std::mt19937(random_device()); in TEST() local
37 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
39 std::bind(std::uniform_int_distribution<int32_t>(2, 3), std::ref(rng)); in TEST()
41 std::bind(std::uniform_int_distribution<int32_t>(2, 16), std::ref(rng)); in TEST()
58 auto rng = std::mt19937(random_device()); in TEST() local
60 std::bind(std::uniform_int_distribution<int32_t>(2, 4), std::ref(rng)); in TEST()
62 std::bind(std::uniform_int_distribution<int32_t>(5, 25), std::ref(rng)); in TEST()
64 std::bind(std::uniform_int_distribution<int32_t>(2, 3), std::ref(rng)); in TEST()
66 std::bind(std::uniform_int_distribution<int32_t>(2, 16), std::ref(rng)); in TEST()
83 auto rng = std::mt19937(random_device()); in TEST() local
[all …]
Dfully_connected_test.cc34 auto rng = std::mt19937(random_device()); variable
36 std::bind(std::uniform_int_distribution<int32_t>(2, 9), std::ref(rng));
53 auto rng = std::mt19937(random_device()); variable
55 std::bind(std::uniform_int_distribution<int32_t>(2, 9), std::ref(rng));
73 auto rng = std::mt19937(random_device()); variable
75 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng));
77 std::bind(std::uniform_int_distribution<int32_t>(2, 9), std::ref(rng));
95 auto rng = std::mt19937(random_device()); variable
97 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng));
99 std::bind(std::uniform_int_distribution<int32_t>(2, 9), std::ref(rng));
[all …]
Dprelu_test.cc35 auto rng = std::mt19937(random_device()); in TEST() local
37 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
55 auto rng = std::mt19937(random_device()); variable
57 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng));
76 auto rng = std::mt19937(random_device()); in TEST() local
78 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
97 auto rng = std::mt19937(random_device()); in TEST() local
99 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
118 auto rng = std::mt19937(random_device()); in TEST() local
120 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
[all …]
Dmean_test.cc34 auto rng = std::mt19937(random_device()); in TEST() local
36 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
55 auto rng = std::mt19937(random_device()); in TEST() local
57 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
76 auto rng = std::mt19937(random_device()); in TEST() local
78 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
97 auto rng = std::mt19937(random_device()); in TEST() local
99 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
118 auto rng = std::mt19937(random_device()); in TEST() local
120 std::bind(std::uniform_int_distribution<int32_t>(2, 5), std::ref(rng)); in TEST()
[all …]
Dreshape_test.cc35 auto rng = std::mt19937(random_device()); variable
37 std::bind(std::uniform_int_distribution<int32_t>(2, 10), std::ref(rng));
41 std::shuffle(output_shape.begin(), output_shape.end(), rng);
56 auto rng = std::mt19937(random_device()); variable
58 std::bind(std::uniform_int_distribution<int32_t>(2, 10), std::ref(rng));
62 std::shuffle(output_shape.begin(), output_shape.end(), rng);
77 auto rng = std::mt19937(random_device()); variable
79 std::bind(std::uniform_int_distribution<int32_t>(2, 10), std::ref(rng));
83 std::shuffle(output_shape.begin(), output_shape.end(), rng);
98 auto rng = std::mt19937(random_device()); variable
[all …]
/external/rust/crates/rand/src/distributions/
Dinteger.rs23 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u8 { in sample()
24 rng.next_u32() as u8 in sample()
30 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u16 { in sample()
31 rng.next_u32() as u16 in sample()
37 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u32 { in sample()
38 rng.next_u32() in sample()
44 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u64 { in sample()
45 rng.next_u64() in sample()
52 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u128 { in sample()
54 let x = u128::from(rng.next_u64()); in sample()
[all …]
Dother.rs66 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> char { in sample()
77 let mut n = range.sample(rng); in sample()
86 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> u8 { in sample()
96 let var = rng.next_u32() >> (32 - 6); in sample()
106 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> bool { in sample()
111 (rng.next_u32() as i32) < 0 in sample()
185 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Option<T> { in sample()
187 if rng.gen::<bool>() { in sample()
188 Some(rng.gen()) in sample()
199 fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Wrapping<T> { in sample()
[all …]
/external/libxml2/test/relaxng/
Dtutor1_4.rng1 <rng:element name="addressBook" xmlns:rng="http://relaxng.org/ns/structure/1.0">
2 <rng:zeroOrMore>
3 <rng:element name="card">
4 <rng:element name="name">
5 <rng:text/>
6 </rng:element>
7 <rng:element name="email">
8 <rng:text/>
9 </rng:element>
10 </rng:element>
[all …]
/external/rust/crates/rand_chacha/src/
Dchacha.rs150 rng: BlockRng<$ChaChaXCore>,
159 rng: BlockRng::new(core),
167 self.rng.next_u32()
171 self.rng.next_u64()
175 self.rng.fill_bytes(bytes)
179 self.rng.try_fill_bytes(bytes)
196 let buf_end_block = self.rng.core.state.get_stream_param(STREAM_PARAM_BLOCK);
200 let buf_offset_words = self.rng.index() as u64;
218 self.rng
222 self.rng.generate_and_set((word_offset % u128::from(BLOCK_WORDS)) as usize);
[all …]
/external/rust/crates/rand/src/rngs/
Dthread.rs63 rng: Rc<UnsafeCell<ReseedingRng<Core, OsRng>>>, field
72 let rng = ReseedingRng::new(r, localVariable
75 Rc::new(UnsafeCell::new(rng))
88 let rng = THREAD_RNG_KEY.with(|t| t.clone()); in thread_rng() localVariable
89 ThreadRng { rng } in thread_rng()
103 let rng = unsafe { &mut *self.rng.get() }; in next_u32() localVariable
104 rng.next_u32() in next_u32()
111 let rng = unsafe { &mut *self.rng.get() }; in next_u64() localVariable
112 rng.next_u64() in next_u64()
118 let rng = unsafe { &mut *self.rng.get() }; in fill_bytes() localVariable
[all …]
/external/rust/crates/rand/src/
Drng.rs314 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>; in try_fill()
321 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error> {
323 *elt = rng.gen();
338 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error> { in try_fill()
339 rng.try_fill_bytes(self) in try_fill()
348 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error> {
350 rng.try_fill_bytes(unsafe {
366 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error> {
368 rng.try_fill_bytes(unsafe {
401 fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error> {
[all …]
/external/bc/src/
Drand.c262 static void bc_rand_seedZeroes(BcRNG *r, BcRNGData *rng, size_t idx) { in bc_rand_seedZeroes() argument
273 bc_rand_copy(bc_vec_item_rev(&r->v, i), rng); in bc_rand_seedZeroes()
277 void bc_rand_srand(BcRNGData *rng) { in bc_rand_srand() argument
287 bc_rand_fill(rng, bc_rand_frand, &fd); in bc_rand_srand()
295 bc_rand_fill(rng, bc_rand_frand, &fd); in bc_rand_srand()
300 bc_rand_fill(rng, bc_rand_winrand, NULL); in bc_rand_srand()
303 while (BC_ERR(BC_RAND_ZERO(rng))) bc_rand_fill(rng, bc_rand_rand, NULL); in bc_rand_srand()
308 static void bc_rand_propagate(BcRNG *r, BcRNGData *rng) { in bc_rand_propagate() argument
312 if (BC_RAND_NOTMODIFIED(rng)) { in bc_rand_propagate()
320 bc_rand_copy(rng2, rng); in bc_rand_propagate()
[all …]
/external/angle/src/tests/gl_tests/gles1/
DLightsTest.cpp214 angle::RNG rng(0); in TEST_P() local
229 const GLColor32F lightModelAmbient(rng.randomFloat(), rng.randomFloat(), rng.randomFloat(), in TEST_P()
230 rng.randomFloat()); in TEST_P()
231 const GLfloat lightModelTwoSide = rng.randomBool() ? 1.0f : 0.0f; in TEST_P()
248 const GLColor32F ambient(rng.randomFloat(), rng.randomFloat(), rng.randomFloat(), in TEST_P()
249 rng.randomFloat()); in TEST_P()
250 const GLColor32F diffuse(rng.randomFloat(), rng.randomFloat(), rng.randomFloat(), in TEST_P()
251 rng.randomFloat()); in TEST_P()
252 const GLColor32F specular(rng.randomFloat(), rng.randomFloat(), rng.randomFloat(), in TEST_P()
253 rng.randomFloat()); in TEST_P()
[all …]
/external/llvm-project/libcxx/test/std/containers/sequences/deque/deque.modifiers/
Dpush_back.pass.cpp46 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049}; in test() local
47 const int N = sizeof(rng)/sizeof(rng[0]); in test()
50 C c = make<C>(size, rng[j]); in test()
60 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
61 const int N = sizeof(rng)/sizeof(rng[0]); in main()
63 test<std::deque<int> >(rng[j]); in main()
67 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
68 const int N = sizeof(rng)/sizeof(rng[0]); in main()
70 test<std::deque<int, min_allocator<int>> >(rng[j]); in main()
Dpush_back_rvalue.pass.cpp50 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049}; in test() local
51 const int N = sizeof(rng)/sizeof(rng[0]); in test()
54 C c = make<C>(size, rng[j]); in test()
65 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
66 const int N = sizeof(rng)/sizeof(rng[0]); in main()
68 test<std::deque<MoveOnly> >(rng[j]); in main()
71 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
72 const int N = sizeof(rng)/sizeof(rng[0]); in main()
74 test<std::deque<MoveOnly, min_allocator<MoveOnly>> >(rng[j]); in main()
/external/libcxx/test/std/containers/sequences/deque/deque.modifiers/
Dpush_back.pass.cpp46 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049}; in test() local
47 const int N = sizeof(rng)/sizeof(rng[0]); in test()
50 C c = make<C>(size, rng[j]); in test()
60 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
61 const int N = sizeof(rng)/sizeof(rng[0]); in main()
63 test<std::deque<int> >(rng[j]); in main()
67 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
68 const int N = sizeof(rng)/sizeof(rng[0]); in main()
70 test<std::deque<int, min_allocator<int>> >(rng[j]); in main()
Dpush_back_rvalue.pass.cpp50 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049}; in test() local
51 const int N = sizeof(rng)/sizeof(rng[0]); in test()
54 C c = make<C>(size, rng[j]); in test()
65 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
66 const int N = sizeof(rng)/sizeof(rng[0]); in main()
68 test<std::deque<MoveOnly> >(rng[j]); in main()
71 int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2046, 2047, 2048, 2049, 4094, 4095, 4096}; in main() local
72 const int N = sizeof(rng)/sizeof(rng[0]); in main()
74 test<std::deque<MoveOnly, min_allocator<MoveOnly>> >(rng[j]); in main()
/external/rust/crates/rand/src/seq/
Dmod.rs79 fn choose<R>(&self, rng: &mut R) -> Option<&Self::Item> in choose()
86 fn choose_mut<R>(&mut self, rng: &mut R) -> Option<&mut Self::Item> in choose_mut()
115 fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Item> in choose_multiple()
144 &self, rng: &mut R, weight: F, in choose_weighted()
172 &mut self, rng: &mut R, weight: F, in choose_weighted_mut()
221 &self, rng: &mut R, amount: usize, weight: F, in choose_multiple_weighted()
244 fn shuffle<R>(&mut self, rng: &mut R) in shuffle()
265 &mut self, rng: &mut R, amount: usize, in partial_shuffle()
304 fn choose<R>(mut self, rng: &mut R) -> Option<Self::Item> in choose()
317 self.nth(gen_index(rng, lower)) in choose()
[all …]

12345678910>>...36