Changeset 975


Ignore:
Timestamp:
09/23/19 15:49:04 (5 years ago)
Author:
dubos
Message:

mesh_generation : GCC compatibility fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/mesh_generation/scvt/sphere_fast.h

    r974 r975  
    2828static inline void circum_main(int N) 
    2929{ 
     30  int i; 
    3031  // Any decent compiler should vectorize this 
    31   for(int i=0 ; i<N ; i++) 
     32  for(i=0 ; i<N ; i++) 
    3233    { 
    3334      //    b,c = B-A, C-A 
     
    6768static inline void circum_copyin(int N, long *ind, double *points) 
    6869{ 
    69   for(int n=0 ; n<N ; n++) 
     70  int n; 
     71  for(n=0 ; n<N ; n++) 
    7072    { 
    7173      int i; const double *ptr; 
     
    8789static inline void circum_copyout(int N, double *circ) 
    8890{ 
    89   for(int i=0 ; i<N ; i++) 
     91  int i; 
     92  for(i=0 ; i<N ; i++) 
    9093    { 
    9194      *circ++ = Dx[i]; 
     
    97100static inline void circum_batch(double *points, double *circ) 
    98101{ 
    99   for(int i=0 ; i<batchsize ; i++) 
     102  int i; 
     103  for(i=0 ; i<batchsize ; i++) 
    100104    { 
    101105      Ax[i]=*points++; 
     
    186190                                       double *bary) 
    187191{ 
     192  int cell; 
    188193  double A=0; // total area 
    189194  // loop over voronoi cells 
    190   for(int cell=0; cell<N ; cell++) 
     195  for(cell=0; cell<N ; cell++) 
    191196    { 
    192197      double aw,ax,ay,az; // weight and xyz coordinates of generator of voronoi cell 
    193       int deg; 
     198      int deg, edge; 
    194199      double gx=0., gy=0., gz=0.; // barycenter of current voronoi cell 
    195200      aw=*w_i++; 
     
    200205      //      if(cell<10) printf("deg[%d]=%d\n", cell, deg); 
    201206 
    202       for(int edge=0; edge<deg ; edge++) // loop over edges of voronoi cell 
     207      for(edge=0; edge<deg ; edge++) // loop over edges of voronoi cell 
    203208        { 
    204209          int i,j; const double *ptr; 
Note: See TracChangeset for help on using the changeset viewer.