cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dravisher
Journeyman III

The RANLUX pseudorandom number generator implemented in OpenCL

Originally posted by: MicahVillmow dravisher, If you can provide a small test case that hits the issue, we can get it fixed for SDK 2.4.


Thanks, I'm still trying to pin down the issue.

0 Likes
dravisher
Journeyman III

The RANLUX pseudorandom number generator implemented in OpenCL

I wasn't able to figure out precisely what was wrong, however switching to vectorized (float4) memory operations eliminated the issue. I've also made many other improvements particularly to ease of use and the documentation (i.e. comments). The initialization is now in ranluxcl.h (host code initialization function ranluxcl_initialization) which should work well both with C and C++ and ranluxcl.cl which implements the actual generator in OpenCL C.

Code is posted on bitbucket.

0 Likes
spectral
Adept II

The RANLUX pseudorandom number generator implemented in OpenCL (updated)

Thanks for your open source project,

 

But why using a RNG and not a QMRNG like halton sequence, van der corput ... ?

They have lower discrepency than any RNG ? And they are very fast and simple ! Right ?

0 Likes
dravisher
Journeyman III

The RANLUX pseudorandom number generator implemented in OpenCL (updated)

Well quasi-random sequences can be very useful of course, but only if you know that they are suitable. Their usefulness is not at all universal, and so they are not as broadly usable as a pseudo-random sequence like RANLUX generates. Quasi-random sequences are for example not generally used for Markov Chain / Metropolis Monte Carlo methods (which is what I've been using the generator for).

This article talks a little about when quasi-random numbers are useful in section 5.

0 Likes
luluxiu
Journeyman III

The RANLUX pseudorandom number generator implemented in OpenCL

Recently I wrote some code that does not have a natural carrier of nature, but the use of INT4 vector sacrifice readability, I can get better throughput....
0 Likes