Changeset e6f2009 in sasview for src/sas/sascalc/calculator/c_extensions/sld2i.c
- Timestamp:
- Jun 13, 2018 8:40:37 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- f00d3fd
- Parents:
- 3597f07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/c_extensions/sld2i.c
r3010f68 re6f2009 72 72 73 73 // Loop over q-values and multiply apply matrix 74 75 for(i nt i=0; i<npoints; i++){74 int i; 75 for(i=0; i<npoints; i++){ 76 76 //I_out[i] = 0.0; 77 77 sumj_uu = cassign(0.0, 0.0); … … 81 81 //printf ("%d ", i); 82 82 //q = sqrt(qx[i]*qx[i] + qy[i]*qy[i]); // + qz[i]*qz[i]); 83 84 for( intj=0; j<this->n_pix; j++){83 int j; 84 for(j=0; j<this->n_pix; j++){ 85 85 if (this->sldn_val[j]!=0.0 86 86 ||this->mx_val[j]!=0.0 … … 158 158 //Assume that pixel volumes are given in vol_pix in A^3 unit 159 159 // Loop over q-values and multiply apply matrix 160 for(int i=0; i<npoints; i++){ 160 int i; 161 for(i=0; i<npoints; i++){ 161 162 sumj =0.0; 162 for(int j=0; j<n_pix; j++){ 163 int j; 164 for(j=0; j<n_pix; j++){ 163 165 //Isotropic: Assumes all slds are real (no magnetic) 164 166 //Also assumes there is no polarization: No dependency on spin … … 177 179 //full calculation 178 180 //pragma omp parallel for 179 for(int k=0; k<n_pix; k++){ 181 int k; 182 for(k=0; k<n_pix; k++){ 180 183 sld_j = this->sldn_val[j] * this->sldn_val[k] * this->vol_pix[j] * this->vol_pix[k]; 181 184 qr = (this->x_val[j]-this->x_val[k])*(this->x_val[j]-this->x_val[k])+
Note: See TracChangeset
for help on using the changeset viewer.