"platforms/vscode:/vscode.git/clone" did not exist on "f36f2dba36020dca80f45f358221dffb7ed5a3eb"
Commit d422c306 authored by Jason Swails's avatar Jason Swails
Browse files

Change comments so that it does not reference generating seeds from the clock.

parent 118aab89
......@@ -115,9 +115,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -100,9 +100,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -445,9 +445,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -100,9 +100,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -168,9 +168,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -124,9 +124,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -221,9 +221,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -122,9 +122,9 @@ public:
* In particular, Platforms are permitted to use non-deterministic algorithms which produce different
* results on successive runs, even if those runs were initialized identically.
*
* If seed is set to 0 (which is the default value assigned), a new seed is generated from the system
* clock when a Context is created from this Force. This is done to ensure that each Context receives
* unique random seeds without you needing to set them explicitly.
* If seed is set to 0 (which is the default value assigned), a unique seed is chosen when a Context
* is created from this Force. This is done to ensure that each Context receives unique random seeds
* without you needing to set them explicitly.
*/
void setRandomNumberSeed(int seed) {
randomNumberSeed = seed;
......
......@@ -62,7 +62,7 @@ void MonteCarloAnisotropicBarostatImpl::initialize(ContextImpl& context) {
numAccepted[i] = 0;
}
int randSeed = owner.getRandomNumberSeed();
// A random seed of 0 means pull a new one from the clock
// A random seed of 0 means use a unique one
if (randSeed == 0) randSeed = osrngseed();
init_gen_rand(randSeed, random);
}
......
......@@ -60,7 +60,7 @@ void MonteCarloBarostatImpl::initialize(ContextImpl& context) {
numAttempted = 0;
numAccepted = 0;
int randSeed = owner.getRandomNumberSeed();
// A random seed of 0 means pull a new one from the clock
// A random seed of 0 means use a unique one
if (randSeed == 0) randSeed = osrngseed();
init_gen_rand(randSeed, random);
}
......
......@@ -62,7 +62,7 @@ void MonteCarloMembraneBarostatImpl::initialize(ContextImpl& context) {
numAccepted[i] = 0;
}
int randSeed = owner.getRandomNumberSeed();
// A random seed of 0 means pull a new one from the clock
// A random seed of 0 means use a unique one
if (randSeed == 0) randSeed = osrngseed();
init_gen_rand(randSeed, random);
}
......
......@@ -51,7 +51,7 @@ void CpuRandom::initialize(int seed, int numThreads) {
nextGaussianIsValid.resize(numThreads, false);
/* Use a quick and dirty RNG to pick seeds for the real random number generator.
* A random seed of 0 means pick a new random seed based on wall clock
* A random seed of 0 means pick a unique seed
*/
unsigned int r = (unsigned int) seed;
......
......@@ -5969,7 +5969,7 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
randomSeed = CudaArray::create<int4>(cu, cu.getNumThreadBlocks()*CudaContext::ThreadBlockSize, "randomSeed");
vector<int4> seed(randomSeed->getSize());
int rseed = integrator.getRandomNumberSeed();
// A random seed of 0 means generate a new one from the wall clock
// A random seed of 0 means use a unique one
if (rseed == 0)
rseed = osrngseed();
unsigned int r = (unsigned int) (rseed+1);
......
......@@ -1004,7 +1004,7 @@ void OpenCLIntegrationUtilities::initRandomNumberGenerator(unsigned int randomNu
vector<mm_int4> seed(randomSeed->getSize());
unsigned int r = randomNumberSeed;
// A seed of 0 means pull one from the clock
// A seed of 0 means use a unique one
if (r == 0) r = (unsigned int) osrngseed();
for (int i = 0; i < randomSeed->getSize(); i++) {
seed[i].x = r = (1664525*r + 1013904223) & 0xFFFFFFFF;
......
......@@ -6202,7 +6202,7 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
randomSeed = OpenCLArray::create<mm_int4>(cl, cl.getNumThreadBlocks()*OpenCLContext::ThreadBlockSize, "randomSeed");
vector<mm_int4> seed(randomSeed->getSize());
int rseed = integrator.getRandomNumberSeed();
// A random seed of 0 means generate a new one from the wall clock
// A random seed of 0 means use a unique one
if (rseed == 0)
rseed = osrngseed();
unsigned int r = (unsigned int) (rseed+1);
......
......@@ -362,7 +362,7 @@ void SimTKOpenMMUtilities::setRandomNumberSeed( uint32_t seed ) {
// ---------------------------------------------------------------------------------------
// If the seed is 0, generate one from the clock
// If the seed is 0, use a unique seed
if (seed == 0)
_randomNumberSeed = (uint32_t) osrngseed();
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment