Home
last modified time | relevance | path

Searched refs:Rand (Results 1 – 25 of 182) sorted by relevance

12345678

/external/llvm-project/compiler-rt/lib/fuzzer/
DFuzzerMutate.cpp27 MutationDispatcher::MutationDispatcher(Random &Rand, in MutationDispatcher() argument
29 : Rand(Rand), Options(Options) { in MutationDispatcher()
63 static char RandCh(Random &Rand) { in RandCh() argument
64 if (Rand.RandBool()) return Rand(256); in RandCh()
66 return Special[Rand(sizeof(Special) - 1)]; in RandCh()
71 return EF->LLVMFuzzerCustomMutator(Data, Size, MaxSize, Rand.Rand()); in Mutate_Custom()
85 Data, Size, Other.data(), Other.size(), U.data(), U.size(), Rand.Rand()); in Mutate_CustomCrossOver()
97 Rand(std::min(Size, (size_t)8)) + 1; // [1,8] and <= Size. in Mutate_ShuffleBytes()
98 size_t ShuffleStart = Rand(Size - ShuffleAmount); in Mutate_ShuffleBytes()
100 std::shuffle(Data + ShuffleStart, Data + ShuffleStart + ShuffleAmount, Rand); in Mutate_ShuffleBytes()
[all …]
/external/rust/crates/libfuzzer-sys/libfuzzer/
DFuzzerMutate.cpp27 MutationDispatcher::MutationDispatcher(Random &Rand, in MutationDispatcher() argument
29 : Rand(Rand), Options(Options) { in MutationDispatcher()
63 static char RandCh(Random &Rand) { in RandCh() argument
64 if (Rand.RandBool()) return Rand(256); in RandCh()
66 return Special[Rand(sizeof(Special) - 1)]; in RandCh()
71 return EF->LLVMFuzzerCustomMutator(Data, Size, MaxSize, Rand.Rand()); in Mutate_Custom()
85 Data, Size, Other.data(), Other.size(), U.data(), U.size(), Rand.Rand()); in Mutate_CustomCrossOver()
97 Rand(std::min(Size, (size_t)8)) + 1; // [1,8] and <= Size. in Mutate_ShuffleBytes()
98 size_t ShuffleStart = Rand(Size - ShuffleAmount); in Mutate_ShuffleBytes()
100 std::shuffle(Data + ShuffleStart, Data + ShuffleStart + ShuffleAmount, Rand); in Mutate_ShuffleBytes()
[all …]
/external/webrtc/logging/rtc_event_log/
Drtc_event_log_unittest_helper.cc75 uint32_t other = prng->Rand(i, static_cast<uint32_t>(array.size() - 1)); in ShuffleInPlace()
92 return std::make_unique<RtcEventAlrState>(prng_.Rand<bool>()); in NewAlrState()
105 config->bitrate_bps = prng_.Rand(0, 3000000); in NewAudioNetworkAdaptation()
106 config->enable_fec = prng_.Rand<bool>(); in NewAudioNetworkAdaptation()
107 config->enable_dtx = prng_.Rand<bool>(); in NewAudioNetworkAdaptation()
108 config->frame_length_ms = prng_.Rand(10, 120); in NewAudioNetworkAdaptation()
109 config->num_channels = prng_.Rand(1, 2); in NewAudioNetworkAdaptation()
110 config->uplink_packet_loss_fraction = prng_.Rand<float>(); in NewAudioNetworkAdaptation()
118 int32_t bitrate_bps = prng_.Rand(0, kMaxBweBps); in NewBweUpdateDelayBased()
120 prng_.Rand(static_cast<uint32_t>(BandwidthUsage::kLast) - 1)); in NewBweUpdateDelayBased()
[all …]
/external/llvm/lib/Fuzzer/
DFuzzerMutate.cpp21 MutationDispatcher::MutationDispatcher(Random &Rand, in MutationDispatcher() argument
23 : Rand(Rand), Options(Options) { in MutationDispatcher()
52 static char FlipRandomBit(char X, Random &Rand) { in FlipRandomBit() argument
53 int Bit = Rand(8); in FlipRandomBit()
64 static char RandCh(Random &Rand) { in RandCh() argument
65 if (Rand.RandBool()) return Rand(256); in RandCh()
67 return Special[Rand(sizeof(Special) - 1)]; in RandCh()
72 return EF->LLVMFuzzerCustomMutator(Data, Size, MaxSize, Rand.Rand()); in Mutate_Custom()
79 size_t Idx = Rand(Corpus->size()); in Mutate_CustomCrossOver()
86 Data, Size, Other.data(), Other.size(), U.data(), U.size(), Rand.Rand()); in Mutate_CustomCrossOver()
[all …]
/external/webrtc/modules/rtp_rtcp/source/rtcp_packet/
Dextended_reports_unittest.cc52 T Rand() { in Rand() function in webrtc::RtcpPacketExtendedReportsTest
53 return random_.Rand<T>(); in Rand()
61 ReceiveTimeInfo RtcpPacketExtendedReportsTest::Rand<ReceiveTimeInfo>() { in Rand() function in webrtc::RtcpPacketExtendedReportsTest
62 uint32_t ssrc = Rand<uint32_t>(); in Rand()
63 uint32_t last_rr = Rand<uint32_t>(); in Rand()
64 uint32_t delay_since_last_rr = Rand<uint32_t>(); in Rand()
69 NtpTime RtcpPacketExtendedReportsTest::Rand<NtpTime>() { in Rand() function in webrtc::RtcpPacketExtendedReportsTest
70 uint32_t secs = Rand<uint32_t>(); in Rand()
71 uint32_t frac = Rand<uint32_t>(); in Rand()
76 Rrtr RtcpPacketExtendedReportsTest::Rand<Rrtr>() { in Rand() function in webrtc::RtcpPacketExtendedReportsTest
[all …]
/external/webrtc/rtc_base/
Drandom.cc24 uint32_t Random::Rand(uint32_t t) { in Rand() function in webrtc::Random
37 uint32_t Random::Rand(uint32_t low, uint32_t high) { in Rand() function in webrtc::Random
39 return Rand(high - low) + low; in Rand()
42 int32_t Random::Rand(int32_t low, int32_t high) { in Rand() function in webrtc::Random
46 Rand(rtc::dchecked_cast<uint32_t>(high - low_i64)) + low_i64); in Rand()
50 float Random::Rand<float>() { in Rand() function in webrtc::Random
57 double Random::Rand<double>() { in Rand() function in webrtc::Random
64 bool Random::Rand<bool>() { in Rand() function in webrtc::Random
65 return Rand(0, 1) == 1; in Rand()
81 double uniform = Rand<double>(); in Exponential()
Drandom.h41 T Rand() { in Rand() function
51 uint32_t Rand(uint32_t t);
54 uint32_t Rand(uint32_t low, uint32_t high);
57 int32_t Rand(int32_t low, int32_t high);
82 float Random::Rand<float>();
86 double Random::Rand<double>();
90 bool Random::Rand<bool>();
Drandom_unittest.cc56 sample = prng->Rand<T>(); in UniformBucketTest()
136 int32_t sample = prng->Rand(low, high); in BucketTestSignedInterval()
176 uint32_t sample = prng->Rand(low, high); in BucketTestUnsignedInterval()
228 uint32_t sample = bucket_count * prng->Rand<float>(); in BucketTestFloat()
254 signed int s = prng_signed.Rand<signed int>(); in TEST()
255 unsigned int u = prng_unsigned.Rand<unsigned int>(); in TEST()
260 int16_t s = prng_signed.Rand<int16_t>(); in TEST()
261 uint16_t u = prng_unsigned.Rand<uint16_t>(); in TEST()
266 signed char s = prng_signed.Rand<signed char>(); in TEST()
267 unsigned char u = prng_unsigned.Rand<unsigned char>(); in TEST()
/external/webrtc/modules/video_coding/
Dframe_buffer2_unittest.cc236 uint32_t Rand() { return rand_.Rand<uint32_t>(); } in Rand() function in webrtc::video_coding::TestFrameBuffer2
259 uint16_t pid = Rand(); in TEST_F()
260 uint32_t ts = Rand(); in TEST_F()
269 uint16_t pid = Rand(); in TEST_F()
270 uint32_t ts = Rand(); in TEST_F()
295 uint16_t pid = Rand(); in TEST_F()
296 uint32_t ts = Rand(); in TEST_F()
308 uint16_t pid = Rand(); in TEST_F()
309 uint32_t ts = Rand(); in TEST_F()
334 uint16_t pid = Rand(); in TEST_F()
[all …]
Drtp_frame_reference_finder_unittest.cc72 uint16_t Rand() { return rand_.Rand<uint16_t>(); } in Rand() function in webrtc::video_coding::TestRtpFrameReferenceFinder
246 uint16_t sn = Rand(); in TEST_F()
256 uint16_t sn = Rand(); in TEST_F()
269 uint16_t sn = Rand(); in TEST_F()
284 uint16_t sn = Rand(); in TEST_F()
303 uint16_t sn = Rand(); in TEST_F()
321 uint16_t sn = Rand(); in TEST_F()
393 uint16_t sn = Rand(); in TEST_F()
401 uint16_t pid = Rand(); in TEST_F()
402 uint16_t sn = Rand(); in TEST_F()
[all …]
/external/llvm-project/llvm/unittests/FuzzMutate/
DReservoirSamplerTest.cpp16 std::mt19937 Rand; in TEST() local
17 auto Sampler = makeSampler(Rand, 7, 1); in TEST()
23 std::mt19937 Rand; in TEST() local
24 auto Sampler = makeSampler(Rand, 7, 0); in TEST()
29 std::mt19937 Rand; in TEST() local
43 auto Sampler = makeSampler(Rand, Items); in TEST()
/external/llvm/tools/llvm-stress/
Dllvm-stress.cpp91 uint32_t Rand() { in Rand() function in llvm::__anon35362e5a0111::Random
100 uint32_t Val = Rand(); in Rand32()
102 return Val | (Rand() << 16); in Rand32()
167 return PT->at(Ran->Rand() % PT->size()); in getRandomVal()
172 if (Ran->Rand() & 1) in getRandomConstant()
176 if (Ran->Rand() & 1) in getRandomConstant()
185 unsigned index = Ran->Rand(); in getRandomValue()
194 if (Ran->Rand() & 1) in getRandomValue()
198 if (Ran->Rand() & 1) in getRandomValue()
218 unsigned index = Ran->Rand(); in getRandomPointerValue()
[all …]
/external/webrtc/modules/desktop_capture/
Dscreen_drawer_unittest.cc126 int left = random.Rand(rect.left(), rect.right() - 2); in TEST()
127 int top = random.Rand(rect.top(), rect.bottom() - 2); in TEST()
129 DesktopRect::MakeLTRB(left, top, random.Rand(left + 1, rect.right()), in TEST()
130 random.Rand(top + 1, rect.bottom())), in TEST()
131 RgbaColor(random.Rand<uint8_t>(), random.Rand<uint8_t>(), in TEST()
132 random.Rand<uint8_t>(), random.Rand<uint8_t>())); in TEST()
Ddesktop_frame_generator.cc44 rect.Extend(random.Rand(enlarge_range), random.Rand(enlarge_range), in SetUpdatedRegion()
45 random.Rand(enlarge_range), random.Rand(enlarge_range)); in SetUpdatedRegion()
52 for (int i = random.Rand(10); i >= 0; i--) { in SetUpdatedRegion()
54 const int left = random.Rand(0, frame->size().width() - 2); in SetUpdatedRegion()
55 const int top = random.Rand(0, frame->size().height() - 2); in SetUpdatedRegion()
56 const int right = random.Rand(left + 1, frame->size().width()); in SetUpdatedRegion()
57 const int bottom = random.Rand(top + 1, frame->size().height()); in SetUpdatedRegion()
Ddesktop_capturer_differ_wrapper_unittest.cc206 frame_generator.set_enlarge_range(random.Rand(1, 50)); in ExecuteDifferWrapperTest()
208 frame_generator.size()->set(random.Rand(500, 2000), random.Rand(500, 2000)); in ExecuteDifferWrapperTest()
211 for (int j = random.Rand(50); j >= 0; j--) { in ExecuteDifferWrapperTest()
213 const int left = random.Rand(0, frame_generator.size()->width() - 2); in ExecuteDifferWrapperTest()
214 const int top = random.Rand(0, frame_generator.size()->height() - 2); in ExecuteDifferWrapperTest()
215 const int right = random.Rand(left + 1, frame_generator.size()->width()); in ExecuteDifferWrapperTest()
216 const int bottom = random.Rand(top + 1, frame_generator.size()->height()); in ExecuteDifferWrapperTest()
/external/webrtc/modules/rtp_rtcp/test/testFec/
Dtest_fec.cc52 float random_variable = random->Rand<float>(); in ReceivePackets()
59 random_variable = random->Rand<float>(); in ReceivePackets()
67 random_variable = random->Rand<float>(); in ReceivePackets()
76 random_variable = random->Rand<float>(); in ReceivePackets()
134 uint32_t timestamp = random.Rand<uint32_t>(); in RunTest()
135 const uint32_t media_ssrc = random.Rand(1u, 0xfffffffe); in RunTest()
139 fec_ssrc = random.Rand(1u, 0xfffffffe); in RunTest()
140 fec_seq_num_offset = random.Rand(0, 1 << 15); in RunTest()
254 random.Rand(kMinPacketSize, kMaxPacketSize); in RunTest()
259 data[0] = random.Rand<uint8_t>(); in RunTest()
[all …]
/external/webrtc/test/
Dframe_generator.cc106 x_(random_generator_.Rand(0, width)), in Square()
107 y_(random_generator_.Rand(0, height)), in Square()
108 length_(random_generator_.Rand(1, width > 4 ? width / 4 : 1)), in Square()
109 yuv_y_(random_generator_.Rand(0, 255)), in Square()
110 yuv_u_(random_generator_.Rand(0, 255)), in Square()
111 yuv_v_(random_generator_.Rand(0, 255)), in Square()
112 yuv_a_(random_generator_.Rand(0, 255)) {} in Square()
121 x_ = (x_ + random_generator_.Rand(0, 4)) % (buffer->width() - length); in Draw()
122 y_ = (y_ + random_generator_.Rand(0, 4)) % (buffer->height() - length); in Draw()
235 const int kSquareNum = 1 << (4 + (random_generator_.Rand(0, 3) * 2)); in GenerateNewFrame()
[all …]
/external/llvm/lib/Fuzzer/test/
DFuzzerUnittest.cpp24 Random Rand(0); in TEST() local
25 MutationDispatcher MD(Rand, {}); in TEST()
102 Random Rand(0); in TestEraseByte() local
103 MutationDispatcher MD(Rand, {}); in TestEraseByte()
130 Random Rand(0); in TestInsertByte() local
131 MutationDispatcher MD(Rand, {}); in TestInsertByte()
166 Random Rand(0); in TestChangeByte() local
167 MutationDispatcher MD(Rand, {}); in TestChangeByte()
202 Random Rand(0); in TestChangeBit() local
203 MutationDispatcher MD(Rand, {}); in TestChangeBit()
[all …]
/external/rust/crates/rand/
DREADME.md1 # Rand chapter
43 - [The Rust Rand Book](https://rust-random.github.io/book)
57 To get started using Rand, see [The Book](https://rust-random.github.io/book).
62 Rand is *mature* (suitable for general usage, with infrequent breaking releases
66 Current Rand versions are:
78 Rand has not yet reached 1.0 implying some breaking changes may arrive in the
83 Rand libs have inter-dependencies and make use of the
94 Some versions of Rand crates have been yanked ("unreleased"). Where this occurs,
100 Since version 0.8, Rand requires **Rustc version 1.36 or greater**.
101 Rand 0.7 requires Rustc 1.32 or greater while versions 0.5 require Rustc 1.22 or
[all …]
DCOPYRIGHT1 Copyrights in the Rand project are retained by their contributors. No
2 copyright assignment is required to contribute to the Rand project.
6 Except as otherwise noted (below and/or in individual files), Rand is
11 The Rand project includes code from the Rust project
/external/webrtc/call/
Dreceive_time_calculator_unittest.cc32 : random_(seed), clock_us_(random_.Rand<uint32_t>()), drift_(drift) {} in EmulatedClock()
77 if (random_.Rand<double>() < kChanceOfStallPerUs) { in Query()
79 static_cast<int64_t>(random_.Rand<float>() * kMaxStallDurationUs); in Query()
89 static_cast<int64_t>(random_.Rand<float>() * kMaxStallDurationUs); in ForceStallUs()
124 if (random_.Rand<double>() < kChanceOfResetPerUs) { in Pregenerate()
125 reset_us = static_cast<int64_t>(2 * random_.Rand<float>() * in Pregenerate()
193 time_us += static_cast<int64_t>(random.Rand<float>() * in TEST()
197 2 * random.Rand<float>() * monotone_noise_us - in TEST()
/external/rust/crates/rand_chacha/
DCOPYRIGHT1 Copyrights in the Rand project are retained by their contributors. No
2 copyright assignment is required to contribute to the Rand project.
6 Except as otherwise noted (below and/or in individual files), Rand is
11 The Rand project includes code from the Rust project
/external/rust/crates/rand_core/
DCOPYRIGHT1 Copyrights in the Rand project are retained by their contributors. No
2 copyright assignment is required to contribute to the Rand project.
6 Except as otherwise noted (below and/or in individual files), Rand is
11 The Rand project includes code from the Rust project
/external/rust/crates/rand_xorshift/
DCOPYRIGHT1 Copyrights in the Rand project are retained by their contributors. No
2 copyright assignment is required to contribute to the Rand project.
6 Except as otherwise noted (below and/or in individual files), Rand is
11 The Rand project includes code from the Rust project
/external/llvm-project/llvm/lib/FuzzMutate/
DIRMutator.cpp39 auto RS = makeSampler<Function *>(IB.Rand); in mutate()
47 mutate(*makeSampler(IB.Rand, make_pointer_range(F)).getSelection(), IB); in mutate()
51 mutate(*makeSampler(IB.Rand, make_pointer_range(BB)).getSelection(), IB); in mutate()
61 auto RS = makeSampler<IRMutationStrategy *>(IB.Rand); in mutateModule()
100 auto RS = makeSampler(IB.Rand, make_filter_range(Operations, OpMatchesPred)); in chooseOperation()
114 size_t IP = uniform<size_t>(IB.Rand, 0, Insts.size() - 1); in mutate()
154 auto RS = makeSampler<Instruction *>(IB.Rand); in mutate()
185 auto RS = makeSampler<Value *>(IB.Rand); in mutate()

12345678