- Timestamp:
- Feb 16, 2011 5:39:25 PM (12 years ago)
- Location:
- sans/XOP_Dev/MonteCarlo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/XOP_Dev/MonteCarlo/DebyeSpheres.c
r789 r790 241 241 int npt,numBins,binIndex; 242 242 double grid,binWidth,val; 243 int p1,p2; 243 244 244 245 … … 283 284 npt = (int) WavePoints(p->xwavH); //wavePoints returns long, number of XYZ points 284 285 numBins = (int) WavePoints(p->bwavH); //wavePoints returns long, number of points in bin wave 286 p1 = (int) p->p1; 287 p2 = (int) p->p2; 288 285 289 286 290 xv = WaveData(p->xwavH); //xyz locations … … 293 297 294 298 //do the i!=j double loop, 295 for(i= 0;i<npt;i+=1) {299 for(i=p1;i<p2;i+=1) { 296 300 for(j=(i+1);j<npt;j+=1) { 297 301 val = XYZDistance(xv[i],xv[j],yv[i],yv[j],zv[i],zv[j])*grid; … … 329 333 int npt,numBins,binIndex; 330 334 double grid,binWidth,val,retVal; 335 int p1,p2; 336 331 337 332 338 // for accessing the 2D wave data to write the results … … 418 424 PSFid = WaveData(p->PSFidH); //this one is 2D 419 425 426 p1 = (int) p->p1; 427 p2 = (int) p->p2; 428 420 429 grid = p->grid; 421 430 binWidth = p->binWidth; 422 431 423 432 //do the i!=j double loop, 424 for(i= 0;i<npt;i+=1) {433 for(i=p1;i<p2;i+=1) { 425 434 for(j=(i+1);j<npt;j+=1) { 426 435 val = XYZDistance(xv[i],xv[j],yv[i],yv[j],zv[i],zv[j])*grid; -
sans/XOP_Dev/MonteCarlo/DebyeSpheres.h
r789 r790 40 40 // result is the last parameter, always. 41 41 typedef struct BinParam { 42 double p2; 43 double p1; // start and stop of the outer index 42 44 double binWidth; 43 45 double grid; … … 46 48 waveHndl ywavH; // y coordinate. 47 49 waveHndl xwavH; // x coordinate. 48 //void* tp; //unused void for threadsafe functions50 void* tp; //unused void for threadsafe functions 49 51 double result; 50 52 }BinParam, *BinParamPtr; … … 53 55 // result is the last parameter, always. 54 56 typedef struct BinSLDParam { 57 double p2; 58 double p1; // start and stop of the outer index 55 59 double binWidth; 56 60 double grid; … … 62 66 waveHndl ywavH; // y coordinate. 63 67 waveHndl xwavH; // x coordinate. 64 //void* tp; //unused void for threadsafe functions68 void* tp; //unused void for threadsafe functions 65 69 double result; 66 70 }BinSLDParam, *BinSLDParamPtr; -
sans/XOP_Dev/MonteCarlo/MonteCarlo.r
r789 r790 114 114 115 115 "binDistanceX", /* function name */ 116 F_UTIL | F_ EXTERNAL, /* function category == UTILITY */116 F_UTIL | F_THREADSAFE | F_EXTERNAL, /* function category == UTILITY */ 117 117 NT_FP64, /* return value type */ 118 118 { … … 123 123 NT_FP64, // grid 124 124 NT_FP64, // bin width 125 NT_FP64, // start index 126 NT_FP64, // stop index 125 127 }, 126 128 … … 134 136 135 137 "binSLDDistanceX", /* function name */ 136 F_UTIL | F_ EXTERNAL, /* function category == UTILITY */138 F_UTIL | F_THREADSAFE | F_EXTERNAL, /* function category == UTILITY */ 137 139 NT_FP64, /* return value type */ 138 140 { … … 146 148 NT_FP64, // grid 147 149 NT_FP64, // bin width 150 NT_FP64, // start index 151 NT_FP64, // stop index 148 152 }, 149 153
Note: See TracChangeset
for help on using the changeset viewer.