Changes in / [c2e4be1:2e613f3] in sasmodels


Ignore:
Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    r303d8d6 r4a72d1a  
    651651 
    652652def mono_details(max_pd, npars): 
    653     par_offset = 5*max_pd 
    654     const_offset = par_offset + 3*npars 
    655  
    656     mono = np.zeros(const_offset + 3, 'i') 
    657     mono[0] = 0                # pd_par: arbitrary order; use first 
    658     mono[1*max_pd] = 1         # pd_length: only one element 
    659     mono[2*max_pd] = 2         # pd_offset: skip scale and background 
    660     mono[3*max_pd] = 1         # pd_stride: vectors of length 1 
    661     mono[4*max_pd-1] = 1       # pd_stride[-1]: only one element in set 
    662     mono[4*max_pd] = 0         # pd_isvol: doens't matter if no norm 
    663     mono[par_offset:par_offset+npars] = np.arange(2, npars+2, dtype='i') 
    664     # par_offset: copied in order 
    665     mono[par_offset+npars:par_offset+2*npars] = 0 
    666     # par_coord: no coordinated parameters 
    667     mono[par_offset+npars] = 1 # par_coord[0]: except par 0 
    668     mono[par_offset+2*npars:par_offset+3*npars] = 0 
    669     # fast coord with 0 
    670     mono[const_offset] = 1     # fast_coord_count: one fast index 
    671     mono[const_offset+1] = -1  # theta_var: None 
    672     mono[const_offset+2] = 0   # fast_theta: False 
     653    p = 5*max_pd 
     654    c = p + 3*npars 
     655 
     656    mono = np.zeros(c + 3, 'i') 
     657    mono[0*max_pd:1*max_pd] = range(max_pd)       # pd_par: arbitrary order; use first 
     658    mono[1*max_pd:2*max_pd] = [1]*max_pd          # pd_length: only one element 
     659    mono[2*max_pd:3*max_pd] = range(2, max_pd+2)  # pd_offset: skip scale and background 
     660    mono[3*max_pd:4*max_pd] = [1]*max_pd          # pd_stride: vectors of length 1 
     661    mono[4*max_pd:5*max_pd] = [0]*max_pd          # pd_isvol: doens't matter if no norm 
     662    mono[p+0*npars:p+1*npars] = range(2, npars+2) # par_offset 
     663    mono[p+1*npars:p+2*npars] = [0]*npars         # no coordination 
     664    #mono[p+npars] = 1 # par_coord[0] is coordinated with the first par? 
     665    mono[p+2*npars:p+3*npars] = 0 # fast coord with 0 
     666    mono[c]   = 1     # fast_coord_count: one fast index 
     667    mono[c+1] = -1  # theta_var: None 
     668    mono[c+2] = 0   # fast_theta: False 
    673669    return mono 
    674670 
  • sasmodels/kerneldll.py

    r303d8d6 r4a72d1a  
    6161if sys.platform == 'darwin': 
    6262    #COMPILE = "gcc-mp-4.7 -shared -fPIC -std=c99 -fopenmp -O2 -Wall %s -o %s -lm -lgomp" 
    63     COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm -fno-unknown-pragmas" 
     63    COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    6464elif os.name == 'nt': 
    6565    # call vcvarsall.bat before compiling to set path, headers, libs, etc. 
     
    8181        if "SAS_OPENMP" in os.environ: 
    8282            COMPILE += " -fopenmp" 
    83         else: 
    84             COMPILE += " -fWno-unknown-pragmas" 
    8583else: 
    8684    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
Note: See TracChangeset for help on using the changeset viewer.