search for: psudorandom

Displaying 3 results from an estimated 3 matches for "psudorandom".

Did you mean: pseudorandom
2010 Oct 09
3
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
Hello, does LLVM already have a Random Number Generator built into it's library somewhere? I know code generation is suppose to be deterministic, but when producing a random number can be deterministic if the random number generator is also deterministic. - Thanks - Jeff Kunkel
2010 Oct 09
0
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
I am plugging this into my code. If someone wants to take it out and add it to the llvm library, it's a simple Linear Congruential Generator, but here it is: typedef struct random_number_gen { unsigned a, c, seed, m; random_number_gen( unsigned seed, unsigned modulo ) : seed(seed), m(modulo) { unsigned primes[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 };
2010 Oct 09
0
[LLVMdev] [LLVMDev] Does LLVM have a random number generator?
...; programming approaches or the iterative approaches. Second, the > problem instances going into this algorithm are fairly small. I have > cut down the problem instances to a very few variables which are > required for such hard algorithms. > >> >> I have no opinion on using psudorandom numbers, but you have to be >> careful to keep the results the same across platforms. Quite a few >> stdlib algorithms don't say exactly how many times any given function >> will be called. > > Hence, a register allocator class where the user can specify the seed > wo...