Ignore:
Timestamp:
Jan 28, 2010 6:09:34 PM (13 years ago)
Author:
srkline
Message:

Updated the MonteCarlo? code to allow 4 processors, but simply copying the function 4 times, and defining 4 different random number generators. Still can't figure out what the problem is with threading a single version, but not worth the effort. Copy/paste is way faster.

Also added some simple (non-optimized) calculations for using Debye's sphere method. These are largely undocumented at this point - so see the code. These are XOP versions of the old ipf code I've used in the past, and stripped of the now-obsolete AltiVec? code (I now lose the 4x speedup from the vectorization...)

File:
1 edited

Legend:

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

    r458 r623  
    4141        waveHndl inputWaveH; 
    4242        void* tp;                               //unused void for ThreadSafe functions 
    43         double result;          // return value is unused, save for error if needed 
     43        double retVal;          // return value is unused, save for error if needed 
    4444}; 
    4545typedef struct MC_Params MC_Params; 
     
    5252int Monte_SANSX(MC_ParamsPtr p); 
    5353int Monte_SANSX2(MC_ParamsPtr p); 
     54int Monte_SANSX3(MC_ParamsPtr p); 
     55int Monte_SANSX4(MC_ParamsPtr p); 
    5456int FindPixel(double testQ, double testPhi, double lam, double sdd, double pixSize, double xCtr, double yCtr, long *xPixel, long *yPixel); 
    5557int NewDirection(double *vx, double *vy, double *vz, double theta, double phi); 
     
    5759float ran1(long *idum); 
    5860float ran3(long *idum); 
     61float ran1a(long *idum); 
     62float ran3a(long *idum); 
    5963double locate_interp(double xx[], long n, double x); 
Note: See TracChangeset for help on using the changeset viewer.