Ignore:
Timestamp:
Nov 26, 2008 2:56:05 PM (14 years ago)
Author:
srkline
Message:

Added poor man's threading to the MonteCarlo? calculation.

My guess is that the ran() function from NR is not thread safe (it is non-reentrant). So I simply duplicated Monte_SANSX to Monte_SANSX2, where each incarnation uses a different random number generator, either ran1() or ran3(). This means that currently only two processors are supported. Not a big deal. At least it works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/XOP_Dev/MonteCarlo/MonteCarlo.h

    r435 r458  
    5151// function prototypes 
    5252int Monte_SANSX(MC_ParamsPtr p); 
     53int Monte_SANSX2(MC_ParamsPtr p); 
    5354int FindPixel(double testQ, double testPhi, double lam, double sdd, double pixSize, double xCtr, double yCtr, long *xPixel, long *yPixel); 
    5455int NewDirection(double *vx, double *vy, double *vz, double theta, double phi); 
Note: See TracChangeset for help on using the changeset viewer.