Searched defs:seed (Results 1 - 4 of 4) sorted by relevance

/bionic/libc/upstream-netbsd/lib/libc/stdlib/
H A Drand_r.c46 rand_r(unsigned int *seed) argument
48 _DIAGASSERT(seed != NULL);
50 return ((*seed = *seed * 1103515245 + 12345) & RAND_MAX);
/bionic/libc/bionic/
H A Drand.cpp27 void srand(unsigned int seed) { argument
28 return srandom(seed);
/bionic/tests/
H A Dstdlib_test.cpp31 // The random number generator tests all set the seed, get four values, reset the seed and check
32 // that they get the first two values repeated, and then reset the seed and check two more values
51 const unsigned short seed[3] = { 0x330e, 0xabcd, 0x1234 }; local
53 memcpy(xsubi, seed, sizeof(seed));
58 memcpy(xsubi, seed, sizeof(seed));
61 memcpy(xsubi, seed, sizeof(seed));
[all...]
/bionic/libc/upstream-netbsd/common/lib/libc/stdlib/
H A Drandom.c77 * interface. The initstate() routine is called with a seed, an array of
257 * Initialize the random number generator based on the given seed. If the
258 * type is the trivial no-state-information type, just remember the seed.
259 * Otherwise, initializes state[] based on the given "seed" via a linear
338 unsigned int seed, /* seed for R.N.G. */
380 srandom_unlocked(seed);
337 initstate( unsigned int seed, char *arg_state, size_t n) argument

Completed in 98 milliseconds