Ignore:
Timestamp:
Dec 8, 2010 4:12:18 PM (12 years ago)
Author:
srkline
Message:

Added 2D versions of sphere and GaussPeak? to the package. Probably never need them, but good for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/Models_2D/PeakGauss2D_v40.ipf

    r708 r775  
    133133        Wave cw,zw,xw,yw 
    134134         
    135         Variable npt=numpnts(yw) 
    136         Variable i,nthreads= ThreadProcessorCount 
    137         variable mt= ThreadGroupCreate(nthreads) 
    138  
    139 //      Variable t1=StopMSTimer(-2) 
    140          
    141         for(i=0;i<nthreads;i+=1) 
    142         //      Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 
    143                 ThreadStart mt,i,PeakGauss2D_T(cw,zw,xw,yw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 
    144         endfor 
    145  
    146         do 
    147                 variable tgs= ThreadGroupWait(mt,100) 
    148         while( tgs != 0 ) 
    149  
    150         variable dummy= ThreadGroupRelease(mt) 
    151          
    152 //      Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
     135#if exists("PeakGauss2DX")                      //to hide the function if XOP not installed 
     136        MultiThread zw= PeakGauss2DX(cw,xw,yw) 
     137#else 
     138        MultiThread zw = I_PeakGauss2D(cw,xw,yw) 
     139#endif   
     140         
     141//      Variable npt=numpnts(yw) 
     142//      Variable i,nthreads= ThreadProcessorCount 
     143//      variable mt= ThreadGroupCreate(nthreads) 
     144// 
     145////    Variable t1=StopMSTimer(-2) 
     146//       
     147//      for(i=0;i<nthreads;i+=1) 
     148//      //      Print (i*npt/nthreads),((i+1)*npt/nthreads-1) 
     149//              ThreadStart mt,i,PeakGauss2D_T(cw,zw,xw,yw,(i*npt/nthreads),((i+1)*npt/nthreads-1)) 
     150//      endfor 
     151// 
     152//      do 
     153//              variable tgs= ThreadGroupWait(mt,100) 
     154//      while( tgs != 0 ) 
     155// 
     156//      variable dummy= ThreadGroupRelease(mt) 
     157//       
     158////    Print "elapsed time = ",(StopMSTimer(-2) - t1)/1e6 
    153159         
    154160        return(0) 
Note: See TracChangeset for help on using the changeset viewer.