IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2009, 4:53:42 PM (17 years ago)
Author:
Paul Price
Message:

Changing API for psRandomAlloc() to make it easier to be deterministic. psRandomAlloc() now takes only a single argument, which is the generator type (only PS_RANDOM_TAUS is currently supported; others could easily be added). The seed used by the generator is set by psRandomSeed(). This allows us to use the same seed for the random number generator over multiple calls, which means that we can be deterministic by setting the seed. The old API for psRandomAlloc() is available using psRandomAllocSpecific(). Added to the configuration setup in psModules to include recording the random seed, and setting if desired. Updated all our products to use this API. Some fixes and updates to the configuration run-time information dumping. ppImage now dumps the configuration at the end, allowing the list of files in the run-time information to be set.

Location:
trunk/psLib/test/imageops
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/convolutionBench.c

    r17320 r23259  
    6868int main(int argc, char *argv[])
    6969{
    70     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); // Random number generator
     70    psRandom *rng = psRandomAllocSpecific(PS_RANDOM_TAUS, 0); // Random number generator
    7171
    7272    printf("#%14s%16s        %8s        %8s\n", "Image", "Kernel", "Direct", "FFT");
  • trunk/psLib/test/imageops/tap_psImageInterpolate2.c

    r21465 r23259  
    7777    psImage *variance = NULL; // generateVariance(xSize, ySize, type);
    7878    psImage *mask = NULL; // generateMask(xSize, ySize);
    79     psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 12345);
     79    psRandom *rng = psRandomAllocSpecific(PS_RANDOM_TAUS, 12345);
    8080
    8181    psImageInterpolation *interp = psImageInterpolationAlloc(mode, image, variance, mask, 0, NAN, NAN,
Note: See TracChangeset for help on using the changeset viewer.