Home
last modified time | relevance | path

Searched refs:rnd (Results 1 – 25 of 313) sorted by relevance

12345678910>>...13

/external/deqp/framework/delibs/debase/
DdeRandom.c36 void deRandom_init (deRandom* rnd, deUint32 seed) in deRandom_init() argument
38 rnd->x = (deUint32)(-(int)seed ^ 123456789); in deRandom_init()
39 rnd->y = (deUint32)(362436069 * seed); in deRandom_init()
40 rnd->z = (deUint32)(521288629 ^ (seed >> 7)); in deRandom_init()
41 rnd->w = (deUint32)(88675123 ^ (seed << 3)); in deRandom_init()
49 deUint32 deRandom_getUint32 (deRandom* rnd) in deRandom_getUint32() argument
51 deUint32 w = rnd->w; in deRandom_getUint32()
54 t = rnd->x ^ (rnd->x << 11); in deRandom_getUint32()
55 rnd->x = rnd->y; in deRandom_getUint32()
56 rnd->y = rnd->z; in deRandom_getUint32()
[all …]
DdeRandom.h47 void deRandom_init (deRandom* rnd, deUint32 seed);
48 deUint32 deRandom_getUint32 (deRandom* rnd);
49 deUint64 deRandom_getUint64 (deRandom* rnd);
50 float deRandom_getFloat (deRandom* rnd);
51 double deRandom_getDouble (deRandom* rnd);
52 deBool deRandom_getBool (deRandom* rnd);
/external/deqp/modules/glshared/
DglsInteractionTestUtil.cpp44 static Vec4 getRandomColor (de::Random& rnd) in getRandomColor() argument
47 float r = rnd.choose<float>(DE_ARRAY_BEGIN(components), DE_ARRAY_END(components)); in getRandomColor()
48 float g = rnd.choose<float>(DE_ARRAY_BEGIN(components), DE_ARRAY_END(components)); in getRandomColor()
49 float b = rnd.choose<float>(DE_ARRAY_BEGIN(components), DE_ARRAY_END(components)); in getRandomColor()
50 float a = rnd.choose<float>(DE_ARRAY_BEGIN(components), DE_ARRAY_END(components)); in getRandomColor()
54 void computeRandomRenderState (de::Random& rnd, RenderState& state, glu::ApiType apiType, int targe… in computeRandomRenderState() argument
149 state.scissorTestEnabled = rnd.getFloat() < scissorTestProbability; in computeRandomRenderState()
150 state.stencilTestEnabled = rnd.getFloat() < stencilTestProbability; in computeRandomRenderState()
151 state.depthTestEnabled = rnd.getFloat() < depthTestProbability; in computeRandomRenderState()
152 state.blendEnabled = rnd.getFloat() < blendProbability; in computeRandomRenderState()
[all …]
DglsRandomUniformBlockCase.cpp66 de::Random rnd(m_seed); in init() local
68 int numShared = m_maxSharedBlocks > 0 ? rnd.getInt(1, m_maxSharedBlocks) : 0; in init()
69 …int numVtxBlocks = m_maxVertexBlocks-numShared > 0 ? rnd.getInt(1, m_maxVertexBlocks-numShared) : … in init()
70 …int numFragBlocks = m_maxFragmentBlocks-numShared > 0 ? rnd.getInt(1, m_maxFragmentBlocks-numShare… in init()
73 generateBlock(rnd, DECLARE_VERTEX|DECLARE_FRAGMENT); in init()
76 generateBlock(rnd, DECLARE_VERTEX); in init()
79 generateBlock(rnd, DECLARE_FRAGMENT); in init()
82 void RandomUniformBlockCase::generateBlock (de::Random& rnd, deUint32 layoutFlags) in generateBlock() argument
88 …int numInstances = (m_maxInstances > 0 && rnd.getFloat() < instanceArrayWeight) ? rnd.getInt(0… in generateBlock()
89 int numUniforms = rnd.getInt(1, m_maxBlockMembers); in generateBlock()
[all …]
/external/deqp/framework/delibs/decpp/
DdeRandom.cpp55 Random rnd(4789); in Random_selfTest() local
57 DE_TEST_ASSERT(expected[i] == rnd.getBool()); in Random_selfTest()
64 Random rnd(4789); in Random_selfTest() local
66 DE_TEST_ASSERT(expected[i] == rnd.getInt(-10000, 10000)); in Random_selfTest()
73 Random rnd(4789); in Random_selfTest() local
75 DE_TEST_ASSERT(expected[i] == rnd.getUint32()); in Random_selfTest()
82 Random rnd(4789); in Random_selfTest() local
84 DE_TEST_ASSERT(expected[i] == rnd.getUint64()); in Random_selfTest()
92 Random rnd(4789); in Random_selfTest() local
94 DE_TEST_ASSERT(de::abs(expected[i] - rnd.getFloat()) < epsilon); in Random_selfTest()
[all …]
DdeBlockBuffer.cpp71 Random rnd ((deUint32)m_lastPayload.size()); in run() local
77 int numToRead = rnd.getInt(1, DE_LENGTH_OF_ARRAY(tmpBuf)); in run()
137 Random rnd (m_threadId); in run() local
143 int writeSize = rnd.getInt(1, de::min(m_numMessages-msgNdx, DE_LENGTH_OF_ARRAY(tmpBuf))); in run()
148 if (rnd.getBool()) in run()
164 Random rnd (iterNdx); in runTest() local
165 int numBlocks = rnd.getInt(2, 128); in runTest()
166 int blockSize = rnd.getInt(1, 16); in runTest()
167 int numProducers = rnd.getInt(1, 16); in runTest()
168 int numConsumers = rnd.getInt(1, 16); in runTest()
[all …]
DdeRingBuffer.cpp40 Random rnd (iterNdx); in RingBuffer_selfTest() local
41 int bufSize = rnd.getInt(1, 2048); in RingBuffer_selfTest()
42 int dataSize = rnd.getInt(100, 10000); in RingBuffer_selfTest()
56 bool doRead = canRead && (!canWrite || rnd.getBool()); in RingBuffer_selfTest()
63 int numBytes = rnd.getInt(1, buffer.getNumElements()); in RingBuffer_selfTest()
77 int numBytes = rnd.getInt(1, de::min(dataSize-writePos, buffer.getNumFree())); in RingBuffer_selfTest()
/external/deqp/framework/common/
DtcuRandomValueIterator.hpp33 T getRandomValue (de::Random& rnd) in getRandomValue() argument
40 deUint32 rval = rnd.getUint32(); in getRandomValue()
48 template <> inline deUint8 getRandomValue<deUint8> (de::Random& rnd) { return (deUint8)rnd.getUint… in getRandomValue() argument
49 template <> inline deUint16 getRandomValue<deUint16> (de::Random& rnd) { return (deUint16)rnd.getUi… in getRandomValue() argument
50 template <> inline deUint32 getRandomValue<deUint32> (de::Random& rnd) { return rnd.getUint32(); … in getRandomValue() argument
51 template <> inline deUint64 getRandomValue<deUint64> (de::Random& rnd) { return rnd.getUint64(); … in getRandomValue() argument
52 template <> inline deInt8 getRandomValue<deInt8> (de::Random& rnd) { return (deInt8)rnd.getUint32(… in getRandomValue() argument
53 template <> inline deInt16 getRandomValue<deInt16> (de::Random& rnd) { return (deInt16)rnd.getUint… in getRandomValue() argument
54 template <> inline deInt32 getRandomValue<deInt32> (de::Random& rnd) { return (deInt32)rnd.getUint… in getRandomValue() argument
55 template <> inline deInt64 getRandomValue<deInt64> (de::Random& rnd) { return (deInt64)rnd.getUint… in getRandomValue() argument
/external/owasp/sanitizer/src/tests/org/owasp/html/
DHtmlPolicyBuilderFuzzerTest.java97 int r = rnd.nextInt(3); in testFuzzedOutput()
101 if (rnd.nextBoolean()) { in testFuzzedOutput()
102 for (int k = rnd.nextInt(4); --k >= 0;) { in testFuzzedOutput()
103 attributes.add(pick(rnd, ATTR_NAMES)); in testFuzzedOutput()
104 attributes.add(pickChunk(rnd)); in testFuzzedOutput()
107 policy.openTag(pick(rnd, ELEMENT_NAMES), attributes); in testFuzzedOutput()
110 policy.closeTag(pick(rnd, ELEMENT_NAMES)); in testFuzzedOutput()
113 policy.text(pickChunk(rnd)); in testFuzzedOutput()
162 private static String pick(Random rnd, String[] choices) { in pick() argument
163 return choices[rnd.nextInt(choices.length)]; in pick()
[all …]
DHtmlSanitizerFuzzerTest.java80 for (int fuzz = 1 + rnd.nextInt(25); --fuzz >= 0;) { in testFuzzHtmlParser()
81 if (rnd.nextBoolean()) { in testFuzzHtmlParser()
82 fuzzyHtml0[rnd.nextInt(length)] = (char) rnd.nextInt(0x10000); in testFuzzHtmlParser()
85 int s0 = rnd.nextInt(length - 1); in testFuzzHtmlParser()
86 double d = Math.abs(rnd.nextGaussian()) / 3.0d; in testFuzzHtmlParser()
87 int e0 = s0 + (int) (rnd.nextInt(length - s0) * d); in testFuzzHtmlParser()
90 int s1 = rnd.nextInt(length - 1); in testFuzzHtmlParser()
91 d = Math.abs(rnd.nextGaussian()) / 3.0d; in testFuzzHtmlParser()
92 int e1 = s1 + (int) (rnd.nextInt(length - s1) * d); in testFuzzHtmlParser()
/external/deqp/modules/gles3/functional/
Des3fPrerequisiteTests.cpp131 deRandom rnd; in iterate()
132 deRandom_init(&rnd, deInt32Hash(m_curIter)); in iterate()
133 r = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
134 g = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
135 b = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
136 a = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
185 deRandom rnd; in iterate() local
186 deRandom_init(&rnd, deInt32Hash(m_curIter)); in iterate()
212 x = deRandom_getUint32(&rnd) % (targetWidth - 1); in iterate()
213 y = deRandom_getUint32(&rnd) % (targetHeight - 1); in iterate()
[all …]
/external/deqp/modules/gles2/functional/
Des2fPrerequisiteTests.cpp131 deRandom rnd; in iterate()
132 deRandom_init(&rnd, deInt32Hash(m_curIter)); in iterate()
133 r = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
134 g = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
135 b = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
136 a = (int)(deRandom_getUint32(&rnd) & 0xFF); in iterate()
185 deRandom rnd; in iterate() local
186 deRandom_init(&rnd, deInt32Hash(m_curIter)); in iterate()
212 x = deRandom_getUint32(&rnd) % (targetWidth - 1); in iterate()
213 y = deRandom_getUint32(&rnd) % (targetHeight - 1); in iterate()
[all …]
/external/libvpx/libvpx/test/
Dvp9_boolcoder_test.cc30 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST() local
41 (method == 3) ? rnd.Rand8() : in TEST()
44 (method == 5) ? (parity ? rnd(128) : 255 - rnd(128)) : in TEST()
46 (parity ? rnd(64) : 255 - rnd(64)) : in TEST()
47 (parity ? rnd(32) : 255 - rnd(32)); in TEST()
Dvp8_boolcoder_test.cc57 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST() local
68 (method == 3) ? rnd.Rand8() : in TEST()
71 (method == 5) ? (parity ? rnd(128) : 255 - rnd(128)) : in TEST()
73 (parity ? rnd(64) : 255 - rnd(64)) : in TEST()
74 (parity ? rnd(32) : 255 - rnd(32)); in TEST()
/external/chromium_org/third_party/libvpx/source/libvpx/test/
Dvp9_boolcoder_test.cc30 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST() local
41 (method == 3) ? rnd.Rand8() : in TEST()
44 (method == 5) ? (parity ? rnd(128) : 255 - rnd(128)) : in TEST()
46 (parity ? rnd(64) : 255 - rnd(64)) : in TEST()
47 (parity ? rnd(32) : 255 - rnd(32)); in TEST()
Dvp8_boolcoder_test.cc57 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST() local
68 (method == 3) ? rnd.Rand8() : in TEST()
71 (method == 5) ? (parity ? rnd(128) : 255 - rnd(128)) : in TEST()
73 (parity ? rnd(64) : 255 - rnd(64)) : in TEST()
74 (parity ? rnd(32) : 255 - rnd(32)); in TEST()
Ddct32x32_test.cc114 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST_P() local
131 src[j] = rnd.Rand8(); in TEST_P()
132 dst[j] = rnd.Rand8(); in TEST_P()
136 src16[j] = rnd.Rand16() & mask_; in TEST_P()
137 dst16[j] = rnd.Rand16() & mask_; in TEST_P()
180 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST_P() local
189 input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_); in TEST_P()
208 ACMRandom rnd(ACMRandom::DeterministicSeed()); in TEST_P() local
219 input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_); in TEST_P()
220 input_extreme_block[j] = rnd.Rand8() & 1 ? mask_ : -mask_; in TEST_P()
[all …]
/external/openssl/crypto/bn/
Dbn_prime.c131 static int probable_prime(BIGNUM *rnd, int bits);
132 static int probable_prime_dh(BIGNUM *rnd, int bits,
134 static int probable_prime_dh_safe(BIGNUM *rnd, int bits,
377 static int probable_prime(BIGNUM *rnd, int bits) in probable_prime() argument
384 if (!BN_rand(rnd,bits,1,1)) return(0); in probable_prime()
387 mods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]); in probable_prime()
401 if (!BN_add_word(rnd,delta)) return(0); in probable_prime()
402 bn_check_top(rnd); in probable_prime()
406 static int probable_prime_dh(BIGNUM *rnd, int bits, in probable_prime_dh() argument
415 if (!BN_rand(rnd,bits,0,1)) goto err; in probable_prime_dh()
[all …]
Dbn_depr.c73 BIGNUM *rnd=NULL; in BN_generate_prime() local
80 if ((rnd=BN_new()) == NULL) goto err; in BN_generate_prime()
83 rnd=ret; in BN_generate_prime()
84 if(!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb)) in BN_generate_prime()
90 if (!found && (ret == NULL) && (rnd != NULL)) BN_free(rnd); in BN_generate_prime()
91 return(found ? rnd : NULL); in BN_generate_prime()
Dbn_rand.c119 static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) in bnrand() argument
127 BN_zero(rnd); in bnrand()
200 if (!BN_bin2bn(buf,bytes,rnd)) goto err; in bnrand()
208 bn_check_top(rnd); in bnrand()
212 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_rand() argument
214 return bnrand(0, rnd, bits, top, bottom); in BN_rand()
217 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_pseudo_rand() argument
219 return bnrand(1, rnd, bits, top, bottom); in BN_pseudo_rand()
223 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_bntest_rand() argument
225 return bnrand(2, rnd, bits, top, bottom); in BN_bntest_rand()
/external/chromium_org/third_party/boringssl/src/crypto/bn/
Dprime.c147 static int probable_prime(BIGNUM *rnd, int bits);
148 static int probable_prime_dh(BIGNUM *rnd, int bits, const BIGNUM *add,
150 static int probable_prime_dh_safe(BIGNUM *rnd, int bits, const BIGNUM *add,
456 static int probable_prime(BIGNUM *rnd, int bits) { in probable_prime() argument
464 if (!BN_rand(rnd, bits, 1, 1)) { in probable_prime()
470 mods[i] = (uint16_t)BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime()
475 BN_ULONG size_limit = (((BN_ULONG)1) << bits) - get_word(rnd) - 1; in probable_prime()
484 BN_ULONG rnd_word = get_word(rnd); in probable_prime()
516 if (!BN_add_word(rnd, delta)) { in probable_prime()
519 if (BN_num_bits(rnd) != bits) { in probable_prime()
[all …]
/external/chromium_org/third_party/leveldatabase/src/db/
Dskiplist_test.cc50 Random rnd(1000); in TEST() local
56 Key key = rnd.Next() % R; in TEST()
173 static Key RandomTarget(Random* rnd) { in RandomTarget() argument
174 switch (rnd->Next() % 10) { in RandomTarget()
183 return MakeKey(rnd->Next() % K, 0); in RandomTarget()
217 void WriteStep(Random* rnd) { in WriteStep() argument
218 const uint32_t k = rnd->Next() % K; in WriteStep()
225 void ReadStep(Random* rnd) { in ReadStep() argument
232 Key pos = RandomTarget(rnd); in ReadStep()
271 if (rnd->Next() % 2) { in ReadStep()
[all …]
/external/deqp/modules/egl/
DteglChooseConfigTests.cpp250 de::Random rnd(0); in getValue() local
251 …return m_eglTestCtx.getConfigs()[rnd.getInt(0, (int)(m_eglTestCtx.getConfigs().size()-1))].configI… in getValue()
314 de::Random rnd(m_iterNdx); in iterate() local
315 const int numAttribs = rnd.getInt(0, (int)m_attribSet.size()*2); in iterate()
317 …vector<std::pair<EGLenum, EGLint> > attributes = genRandomAttributes(m_attribSet, numAttribs, rnd); in iterate()
325 template <int MinVal, int MaxVal> static EGLint getInt (de::Random& rnd) in getInt() argument
327 return rnd.getInt(MinVal, MaxVal); in getInt()
330 static EGLint getBool (de::Random& rnd) in getBool() argument
332 return rnd.getBool() ? EGL_TRUE : EGL_FALSE; in getBool()
335 static EGLint getBufferType (de::Random& rnd) in getBufferType() argument
[all …]
/external/chromium_org/third_party/leveldatabase/src/util/
Darena_test.cc23 Random rnd(301); in TEST() local
29 s = rnd.OneIn(4000) ? rnd.Uniform(6000) : in TEST()
30 (rnd.OneIn(10) ? rnd.Uniform(100) : rnd.Uniform(20)); in TEST()
37 if (rnd.OneIn(10)) { in TEST()
Dtestutil.cc12 Slice RandomString(Random* rnd, int len, std::string* dst) { in RandomString() argument
15 (*dst)[i] = static_cast<char>(' ' + rnd->Uniform(95)); // ' ' .. '~' in RandomString()
20 std::string RandomKey(Random* rnd, int len) { in RandomKey() argument
28 result += kTestChars[rnd->Uniform(sizeof(kTestChars))]; in RandomKey()
34 extern Slice CompressibleString(Random* rnd, double compressed_fraction, in CompressibleString() argument
39 RandomString(rnd, raw, &raw_data); in CompressibleString()

12345678910>>...13