Ignore:
Timestamp:
Jun 13, 2018 6:40:37 AM (6 years ago)
Author:
trnielsen
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
Message:

C99 compliant

Changes to be committed:

modified: sld2i.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/calculator/c_extensions/sld2i.c

    r3010f68 re6f2009  
    7272 
    7373        // Loop over q-values and multiply apply matrix 
    74  
    75         for(int i=0; i<npoints; i++){ 
     74        int i; 
     75        for(i=0; i<npoints; i++){ 
    7676                //I_out[i] = 0.0; 
    7777                sumj_uu = cassign(0.0, 0.0); 
     
    8181                //printf ("%d ", i); 
    8282                //q = sqrt(qx[i]*qx[i] + qy[i]*qy[i]); // + qz[i]*qz[i]); 
    83  
    84                 for(int j=0; j<this->n_pix; j++){ 
     83                int j; 
     84                for(j=0; j<this->n_pix; j++){ 
    8585                        if (this->sldn_val[j]!=0.0 
    8686                                ||this->mx_val[j]!=0.0 
     
    158158        //Assume that pixel volumes are given in vol_pix in A^3 unit 
    159159        // 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++){ 
    161162                sumj =0.0; 
    162                 for(int j=0; j<n_pix; j++){ 
     163                int j; 
     164                for(j=0; j<n_pix; j++){ 
    163165                        //Isotropic: Assumes all slds are real (no magnetic) 
    164166                        //Also assumes there is no polarization: No dependency on spin 
     
    177179                                //full calculation 
    178180                                //pragma omp parallel for 
    179                                 for(int k=0; k<n_pix; k++){ 
     181                                int k; 
     182                                for(k=0; k<n_pix; k++){ 
    180183                                        sld_j =  this->sldn_val[j] * this->sldn_val[k] * this->vol_pix[j] * this->vol_pix[k]; 
    181184                                        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.