Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

I would like to propose the following patch to Ivar as I am not sure of the right patch submission process. The patch adds a new function: ranluxcl_init(ulong ins, global ranluxcl_state_t *ranluxcltab) ranluxcl_init allows to an explicit value for what in ranluxcl_initialization is defined by. ulong x = (ulong)RANLUXCL_MYID + (ulong)ins * ((ulong)UINT_MAX + 1); The first argument of ranluxcl_init is the value of x. This allows creation of multiple random number generators with a state unique associated to this initialization parameter, independently on the value of RANLUXCL_MYID. I need this because I have a large lattice and I need one PRNG per lattice site. The state of the PRNGs must not depend on the device of the parallelization of the problem. The algorithm is designed in such a way that each site only uses its own local PRNG. The PRNGs must be independent. I work on Lattice QCD which is the same field Martin Luscher works on and I believe this how this generator is originally intended to be used. I tried to write the patch with minimal changes and avoiding duplication of code. I have no attachment to the new function name.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.