- Timestamp:
- 09/23/19 15:49:04 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/mesh_generation/scvt/sphere_fast.h
r974 r975 28 28 static inline void circum_main(int N) 29 29 { 30 int i; 30 31 // Any decent compiler should vectorize this 31 for(i nt i=0 ; i<N ; i++)32 for(i=0 ; i<N ; i++) 32 33 { 33 34 // b,c = B-A, C-A … … 67 68 static inline void circum_copyin(int N, long *ind, double *points) 68 69 { 69 for(int n=0 ; n<N ; n++) 70 int n; 71 for(n=0 ; n<N ; n++) 70 72 { 71 73 int i; const double *ptr; … … 87 89 static inline void circum_copyout(int N, double *circ) 88 90 { 89 for(int i=0 ; i<N ; i++) 91 int i; 92 for(i=0 ; i<N ; i++) 90 93 { 91 94 *circ++ = Dx[i]; … … 97 100 static inline void circum_batch(double *points, double *circ) 98 101 { 99 for(int i=0 ; i<batchsize ; i++) 102 int i; 103 for(i=0 ; i<batchsize ; i++) 100 104 { 101 105 Ax[i]=*points++; … … 186 190 double *bary) 187 191 { 192 int cell; 188 193 double A=0; // total area 189 194 // loop over voronoi cells 190 for( intcell=0; cell<N ; cell++)195 for(cell=0; cell<N ; cell++) 191 196 { 192 197 double aw,ax,ay,az; // weight and xyz coordinates of generator of voronoi cell 193 int deg ;198 int deg, edge; 194 199 double gx=0., gy=0., gz=0.; // barycenter of current voronoi cell 195 200 aw=*w_i++; … … 200 205 // if(cell<10) printf("deg[%d]=%d\n", cell, deg); 201 206 202 for( intedge=0; edge<deg ; edge++) // loop over edges of voronoi cell207 for(edge=0; edge<deg ; edge++) // loop over edges of voronoi cell 203 208 { 204 209 int i,j; const double *ptr;
Note: See TracChangeset
for help on using the changeset viewer.