Changeset 457 for sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models
- Timestamp:
- Nov 26, 2008 2:37:41 PM (14 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2006/Cylinder_PolyRadius_v40.ipf
r455 r457 294 294 295 295 ///////NON-THREADED VERSION /////// 296 #if exists("Cyl_PolyRadiusX") 297 yw = Cyl_PolyRadiusX(cw,xw) 296 //#if exists("Cyl_PolyRadiusX") 297 // yw = Cyl_PolyRadiusX(cw,xw) 298 //#else 299 // yw = fCyl_PolyRadius(cw,xw) 300 //#endif 301 302 ///// THREADED VERSION NEEDS Igor 6.10B04 or higher to avoid crashes ////// 303 #if exists("Cyl_PolyRadiusX") 304 305 Variable npt=numpnts(yw) 306 Variable i,nthreads= ThreadProcessorCount 307 variable mt= ThreadGroupCreate(nthreads) 308 309 for(i=0;i<nthreads;i+=1) 310 // Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 311 ThreadStart mt,i,Cyl_PolyRadius_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 312 endfor 313 314 do 315 variable tgs= ThreadGroupWait(mt,100) 316 while( tgs != 0 ) 317 318 variable dummy= ThreadGroupRelease(mt) 319 298 320 #else 299 yw = fCyl_PolyRadius(cw,xw)321 yw = fCyl_PolyRadius(cw,xw) //the Igor, non-XOP, non-threaded calculation, messy to make ThreadSafe 300 322 #endif 301 302 /// THREADED VERSION HAS BEEN REMOVED DUE TO CRASHES //////303 //#if exists("Cyl_PolyRadiusX")304 //305 // Variable npt=numpnts(yw)306 // Variable i,nthreads= ThreadProcessorCount307 // variable mt= ThreadGroupCreate(nthreads)308 //309 // for(i=0;i<nthreads;i+=1)310 // // Print (i*npt/nthreads),((i+1)*npt/nthreads-1)311 // ThreadStart mt,i,Cyl_PolyRadius_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1))312 // endfor313 //314 // do315 // variable tgs= ThreadGroupWait(mt,100)316 // while( tgs != 0 )317 //318 // variable dummy= ThreadGroupRelease(mt)319 //320 //#else321 // yw = fCyl_PolyRadius(cw,xw) //the Igor, non-XOP, non-threaded calculation, messy to make ThreadSafe322 //#endif323 323 324 324 // Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 -
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/BCC_ParaCrystal_v40.ipf
r455 r457 105 105 Wave cw,yw,xw 106 106 107 ///// NO threading ///////// 107 /////// NO threading ///////// 108 //#if exists("BCC_ParaCrystalX") 109 // yw = BCC_ParaCrystalX(cw,xw) 110 //#else 111 // yw = fBCC_ParaCrystal(cw,xw) 112 //#endif 113 114 115 /// THREADING /////// 116 117 // Variable t1=StopMSTimer(-2) 118 108 119 #if exists("BCC_ParaCrystalX") 109 yw = BCC_ParaCrystalX(cw,xw) 120 121 Variable npt=numpnts(yw) 122 Variable i,nthreads= ThreadProcessorCount 123 variable mt= ThreadGroupCreate(nthreads) 124 125 for(i=0;i<nthreads;i+=1) 126 // Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 127 ThreadStart mt,i,BCC_ParaCrystal_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 128 endfor 129 130 do 131 variable tgs= ThreadGroupWait(mt,100) 132 while( tgs != 0 ) 133 134 variable dummy= ThreadGroupRelease(mt) 135 110 136 #else 111 yw = fBCC_ParaCrystal(cw,xw)137 yw = fBCC_ParaCrystal(cw,xw) //the Igor, non-XOP, non-threaded calculation, messy to make ThreadSafe 112 138 #endif 113 139 114 115 /// THREADING /////// 116 117 //// Variable t1=StopMSTimer(-2) 118 // 119 //#if exists("BCC_ParaCrystalX") 120 // 121 // Variable npt=numpnts(yw) 122 // Variable i,nthreads= ThreadProcessorCount 123 // variable mt= ThreadGroupCreate(nthreads) 124 // 125 // for(i=0;i<nthreads;i+=1) 126 // // Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 127 // ThreadStart mt,i,BCC_ParaCrystal_T(cw,yw,xw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 128 // endfor 129 // 130 // do 131 // variable tgs= ThreadGroupWait(mt,100) 132 // while( tgs != 0 ) 133 // 134 // variable dummy= ThreadGroupRelease(mt) 135 // 136 //#else 137 // yw = fBCC_ParaCrystal(cw,xw) //the Igor, non-XOP, non-threaded calculation, messy to make ThreadSafe 138 //#endif 139 // 140 //// Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 140 // Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 141 141 142 142
Note: See TracChangeset
for help on using the changeset viewer.