Changeset 4a72d1a in sasmodels
- Timestamp:
- Mar 21, 2016 4:18:16 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- e1bdc7e, 3a45c2c
- Parents:
- 303d8d6
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r303d8d6 r4a72d1a 651 651 652 652 def 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 673 669 return mono 674 670 -
sasmodels/kerneldll.py
r303d8d6 r4a72d1a 61 61 if sys.platform == 'darwin': 62 62 #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" 64 64 elif os.name == 'nt': 65 65 # call vcvarsall.bat before compiling to set path, headers, libs, etc. … … 81 81 if "SAS_OPENMP" in os.environ: 82 82 COMPILE += " -fopenmp" 83 else:84 COMPILE += " -fWno-unknown-pragmas"85 83 else: 86 84 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.