Nek5000
SEM for Incompressible NS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
findpts_imp.h
Go to the documentation of this file.
1 
2 #define obbox TOKEN_PASTE(obbox_,D)
3 #define local_hash_data TOKEN_PASTE(findpts_local_hash_data_,D)
4 #define hash_data TOKEN_PASTE(findpts_hash_data_,D)
5 #define hash_index TOKEN_PASTE(hash_index_ ,D)
6 #define hash_setfac TOKEN_PASTE(hash_setfac_ ,D)
7 #define hash_range TOKEN_PASTE(hash_range_ ,D)
8 #define hash_bb TOKEN_PASTE(hash_bb_ ,D)
9 #define set_local_mask TOKEN_PASTE(set_local_mask_ ,D)
10 #define fill_hash TOKEN_PASTE(fill_hash_ ,D)
11 #define table_from_hash TOKEN_PASTE(table_from_hash_ ,D)
12 #define hash_build TOKEN_PASTE(hash_build_ ,D)
13 #define hash_free TOKEN_PASTE(hash_free_ ,D)
14 
15 #define findpts_local_data TOKEN_PASTE(findpts_local_data_,D)
16 #define findpts_local_setup TOKEN_PASTE(PREFIXED_NAME(findpts_local_setup_),D)
17 #define findpts_local_free TOKEN_PASTE(PREFIXED_NAME(findpts_local_free_ ),D)
18 #define findpts_local TOKEN_PASTE(PREFIXED_NAME(findpts_local_ ),D)
19 #define findpts_local_eval TOKEN_PASTE(PREFIXED_NAME(findpts_local_eval_ ),D)
20 #define findpts_data TOKEN_PASTE(findpts_data_,D)
21 #define src_pt TOKEN_PASTE(src_pt_ ,D)
22 #define out_pt TOKEN_PASTE(out_pt_ ,D)
23 #define eval_src_pt TOKEN_PASTE(eval_src_pt_ ,D)
24 #define eval_out_pt TOKEN_PASTE(eval_out_pt_ ,D)
25 #define setup_aux TOKEN_PASTE(setup_aux_,D)
26 #define findpts_setup TOKEN_PASTE(PREFIXED_NAME(findpts_setup_),D)
27 #define findpts_free TOKEN_PASTE(PREFIXED_NAME(findpts_free_ ),D)
28 #define findpts TOKEN_PASTE(PREFIXED_NAME(findpts_ ),D)
29 #define findpts_eval TOKEN_PASTE(PREFIXED_NAME(findpts_eval_ ),D)
30 
31 struct hash_data {
33  struct dbl_range bnd[D];
34  double fac[D];
36 };
37 
38 static ulong hash_index(const struct hash_data *p, const double x[D])
39 {
40  const ulong n = p->hash_n;
41  return ( WHEN_3D( hash_index_aux(p->bnd[2].min,p->fac[2],n,x[2]) *n )
42  +hash_index_aux(p->bnd[1].min,p->fac[1],n,x[1]) )*n
43  +hash_index_aux(p->bnd[0].min,p->fac[0],n,x[0]);
44 }
45 
46 static void hash_setfac(struct hash_data *p, const ulong n)
47 {
48  unsigned d;
49  p->hash_n = n;
50  for(d=0;d<D;++d) p->fac[d] = n/(p->bnd[d].max-p->bnd[d].min);
51 }
52 
53 static struct ulong_range hash_range(const struct hash_data *p, unsigned d,
54  const struct dbl_range r)
55 {
56  struct ulong_range ir;
57  const slong i0 = lfloor( (r.min - p->bnd[d].min) * p->fac[d] );
58  const ulong i1 = lceil ( (r.max - p->bnd[d].min) * p->fac[d] );
59  ir.min = i0<0 ? 0 : i0;
60  ir.max = i1<p->hash_n ? i1 : p->hash_n;
61  if(ir.max==ir.min) ++ir.max;
62  return ir;
63 }
64 
65 static void hash_bb(struct hash_data *p, const struct local_hash_data *lp,
66  const struct comm *comm, uint hash_size)
67 {
68  double x[D], buf[D], ghs;
69  unsigned d;
70  for(d=0;d<D;++d) x[d]=lp->bnd[d].min;
71  comm_allreduce(comm,gs_double,gs_min,x,D,buf);
72  for(d=0;d<D;++d) p->bnd[d].min=x[d];
73 
74  for(d=0;d<D;++d) x[d]=lp->bnd[d].max;
75  comm_allreduce(comm,gs_double,gs_max,x,D,buf);
76  for(d=0;d<D;++d) p->bnd[d].max=x[d];
77 
78  ghs = hash_size; comm_allreduce(comm,gs_double,gs_add,&ghs,1,buf);
79  hash_setfac(p,lceil(pow(ghs,1./D)));
80 
81  #ifdef DIAGNOSTICS
82  if(comm->id==0) {
83  printf("global bounding box (%g^%u):\n",(double)p->hash_n,D);
84  for(d=0;d<D;++d) printf(" [%.17g, %.17g]\n",p->bnd[d].min,p->bnd[d].max);
85  }
86  #endif
87 }
88 
89 static void set_local_mask(unsigned char *const local_mask,
90  const ulong local_base[D], const uint local_n[D],
91  const struct hash_data *const p,
92  const struct obbox *const obb, const uint nel
93  )
94 {
95  uint el;
96  for(el=0;el<nel;++el) {
97  struct ulong_range ir[D]; unsigned d;
98  for(d=0;d<D;++d) ir[d]=hash_range(p,d,obb[el].x[d]);
99  #define FOR_LOOP() do { ulong i,j; WHEN_3D(ulong k;) \
100  WHEN_3D(for(k=ir[2].min;k<ir[2].max;++k)) \
101  for(j=ir[1].min;j<ir[1].max;++j) \
102  for(i=ir[0].min;i<ir[0].max;++i) \
103  set_bit(local_mask, (WHEN_3D((k-local_base[2]) *local_n[1]) \
104  +(j-local_base[1]))*local_n[0] \
105  +(i-local_base[0]) \
106  ); \
107  } while(0)
108  FOR_LOOP();
109  #undef FOR_LOOP
110  }
111 }
112 
113 static void fill_hash(struct array *const hash,
114  const unsigned char *const local_mask,
115  const ulong local_base[D], const uint local_n[D],
116  const ulong hn, const uint np)
117 {
118  struct proc_index *hp = hash->ptr;
119  #define FOR_LOOP() do { uint bit=0,i,j; WHEN_3D(uint k;) \
120  WHEN_3D(for(k=0;k<local_n[2];++k)) \
121  for(j=0;j<local_n[1];++j) \
122  for(i=0;i<local_n[0];++i) { ulong hi; \
123  if(get_bit(local_mask,bit++)==0) continue; \
124  hi = (WHEN_3D( (local_base[2]+k) *hn ) \
125  +(local_base[1]+j))*hn \
126  +(local_base[0]+i); \
127  hp->proc = hi%np, hp->index = hi/np; \
128  ++hp; \
129  } \
130  } while(0)
131  FOR_LOOP();
132  #undef FOR_LOOP
133 }
134 
135 static void table_from_hash(struct hash_data *const p,
136  struct array *const hash,
137  const uint np, buffer *buf)
138 {
139  const ulong hn = p->hash_n;
140  ulong hnd;
141  uint ncell, *offset, i, next_cell;
142  const struct proc_index *const hp = hash->ptr;
143  const uint n = hash->n;
144  hnd = hn*hn; WHEN_3D(hnd*=hn);
145  ncell = (hnd-1)/np+1;
146  p->offset = offset = tmalloc(uint,ncell+1+n);
147  sarray_sort(struct proc_index,hash->ptr,n, index,0, buf);
148  next_cell = 0;
149  for(i=0;i<n;++i) {
150  const uint cell = hp[i].index;
151  const uint off = ncell+1+i;
152  offset[off]=hp[i].proc;
153  while(next_cell<=cell ) offset[next_cell++]=off;
154  }
155  { const uint off = ncell+1+i;
156  while(next_cell<=ncell) offset[next_cell++]=off;
157  }
158 }
159 
160 static void hash_build(struct hash_data *const p,
161  const struct local_hash_data *const lp,
162  const struct obbox *const obb, const uint nel,
163  const uint hash_size,
164  struct crystal *cr)
165 {
166  ulong local_base[D]; uint local_n[D], local_ntot=1;
167  unsigned char *local_mask;
168  struct array hash; uint nc;
169  unsigned d;
170  hash_bb(p,lp,&cr->comm,hash_size);
171  for(d=0;d<D;++d) {
172  struct ulong_range rng=hash_range(p,d,lp->bnd[d]);
173  local_base[d]=rng.min;
174  local_n[d]=rng.max-rng.min;
175  local_ntot*=local_n[d];
176  #ifdef DIAGNOSTICS
177  if(cr->comm.id==0) {
178  printf("local_range %u: %lu to %lu\n",
179  d,(unsigned long)rng.min,(unsigned long)rng.max);
180  }
181  #endif
182  }
183  local_mask = tcalloc(unsigned char, (local_ntot+CHAR_BIT-1)/CHAR_BIT);
184  set_local_mask(local_mask,local_base,local_n,p,obb,nel);
185  nc=count_bits(local_mask,(local_ntot+CHAR_BIT-1)/CHAR_BIT);
186  #ifdef DIAGNOSTICS
187  printf("findpts_hash(%u): local cells : %u / %u\n",cr->comm.id,nc,local_ntot);
188  #endif
189  array_init(struct proc_index,&hash,nc), hash.n=nc;
190  fill_hash(&hash,local_mask,local_base,local_n,p->hash_n,cr->comm.np);
191  free(local_mask);
192  sarray_transfer(struct proc_index,&hash,proc,1,cr);
193  table_from_hash(p,&hash,cr->comm.np,&cr->data);
194  array_free(&hash);
195 }
196 
197 static void hash_free(struct hash_data *p) { free(p->offset); }
198 
199 struct findpts_data {
200  struct crystal cr;
202  struct hash_data hash;
203 };
204 
205 static void setup_aux(
206  struct findpts_data *const fd,
207  const double *const elx[D],
208  const unsigned n[D], const uint nel,
209  const unsigned m[D], const double bbox_tol,
210  const uint local_hash_size, const uint global_hash_size,
211  const unsigned npt_max, const double newt_tol)
212 {
213  findpts_local_setup(&fd->local,elx,n,nel,m,bbox_tol,local_hash_size,
214  npt_max, newt_tol);
215  hash_build(&fd->hash,&fd->local.hd,fd->local.obb,nel,
216  global_hash_size,&fd->cr);
217 }
218 
220  const struct comm *const comm,
221  const double *const elx[D],
222  const unsigned n[D], const uint nel,
223  const unsigned m[D], const double bbox_tol,
224  const uint local_hash_size, const uint global_hash_size,
225  const unsigned npt_max, const double newt_tol)
226 {
227  struct findpts_data *const fd = tmalloc(struct findpts_data, 1);
228  crystal_init(&fd->cr,comm);
229  setup_aux(fd,elx,n,nel,m,bbox_tol,
230  local_hash_size,global_hash_size,npt_max,newt_tol);
231  return fd;
232 }
233 
234 void findpts_free(struct findpts_data *fd)
235 {
236  hash_free(&fd->hash);
238  crystal_free(&fd->cr);
239  free(fd);
240 }
241 
242 struct src_pt { double x[D]; uint index, proc; };
243 struct out_pt { double r[D], dist2; uint index, code, el, proc; };
244 
245 void findpts( uint *const code_base , const unsigned code_stride ,
246  uint *const proc_base , const unsigned proc_stride ,
247  uint *const el_base , const unsigned el_stride ,
248  double *const r_base , const unsigned r_stride ,
249  double *const dist2_base , const unsigned dist2_stride ,
250  const double *const x_base[D], const unsigned x_stride[D],
251  const uint npt, struct findpts_data *const fd)
252 {
253  const uint np = fd->cr.comm.np, id=fd->cr.comm.id;
254  struct array hash_pt, src_pt, out_pt;
255  /* look locally first */
256  if(npt) findpts_local( code_base, code_stride,
257  el_base, el_stride,
258  r_base, r_stride,
259  dist2_base,dist2_stride,
260  x_base, x_stride,
261  npt,&fd->local,&fd->cr.data);
262  /* send unfound and border points to global hash cells */
263  {
264  uint index;
265  uint *code=code_base, *proc=proc_base;
266  const double *xp[D];
267  struct src_pt *pt;
268  unsigned d; for(d=0;d<D;++d) xp[d]=x_base[d];
269  array_init(struct src_pt, &hash_pt, npt), pt=hash_pt.ptr;
270  for(index=0;index<npt;++index) {
271  double x[D]; for(d=0;d<D;++d) x[d]=*xp[d];
272  *proc = id;
273  if(*code!=CODE_INTERNAL) {
274  const uint hi = hash_index(&fd->hash,x);
275  unsigned d;
276  for(d=0;d<D;++d) pt->x[d]=x[d];
277  pt->index=index;
278  pt->proc=hi%np;
279  ++pt;
280  }
281  for(d=0;d<D;++d)
282  xp[d] = (const double*)((const char*)xp[d]+ x_stride[d]);
283  code = (uint*)( (char*)code +code_stride );
284  proc = (uint*)( (char*)proc +proc_stride );
285  }
286  hash_pt.n = pt - (struct src_pt*)hash_pt.ptr;
287  sarray_transfer(struct src_pt,&hash_pt,proc,1,&fd->cr);
288  }
289  /* look up points in hash cells, route to possible procs */
290  {
291  const uint *const hash_offset = fd->hash.offset;
292  uint count=0, *proc, *proc_p;
293  const struct src_pt *p = hash_pt.ptr, *const pe = p+hash_pt.n;
294  struct src_pt *q;
295  for(;p!=pe;++p) {
296  const uint hi = hash_index(&fd->hash,p->x)/np;
297  const uint i = hash_offset[hi], ie = hash_offset[hi+1];
298  count += ie-i;
299  }
300  proc_p = proc = tmalloc(uint,count);
301  array_init(struct src_pt,&src_pt,count), q=src_pt.ptr;
302  for(p=hash_pt.ptr;p!=pe;++p) {
303  const uint hi = hash_index(&fd->hash,p->x)/np;
304  uint i = hash_offset[hi]; const uint ie = hash_offset[hi+1];
305  for(;i!=ie;++i) {
306  const uint pp = hash_offset[i];
307  if(pp==p->proc) continue; /* don't send back to source proc */
308  *proc_p++ = pp;
309  *q++ = *p;
310  }
311  }
312  array_free(&hash_pt);
313  src_pt.n = proc_p-proc;
314  #ifdef DIAGNOSTICS
315  printf("(proc %u) hashed; routing %u/%u\n",id,(unsigned)src_pt.n,count);
316  #endif
317  sarray_transfer_ext(struct src_pt,&src_pt,proc,sizeof(uint),&fd->cr);
318  free(proc);
319  }
320  /* look for other procs' points, send back */
321  {
322  uint n=src_pt.n;
323  const struct src_pt *spt;
324  struct out_pt *opt;
325  array_init(struct out_pt,&out_pt,n), out_pt.n=n;
326  spt=src_pt.ptr, opt=out_pt.ptr;
327  for(;n;--n,++spt,++opt) opt->index=spt->index,opt->proc=spt->proc;
328  spt=src_pt.ptr, opt=out_pt.ptr;
329  if(src_pt.n) {
330  const double *spt_x_base[D]; unsigned spt_x_stride[D];
331  unsigned d; for(d=0;d<D;++d) spt_x_base[d] = spt[0].x+d,
332  spt_x_stride[d] = sizeof(struct src_pt);
333  findpts_local(&opt[0].code ,sizeof(struct out_pt),
334  &opt[0].el ,sizeof(struct out_pt),
335  opt[0].r ,sizeof(struct out_pt),
336  &opt[0].dist2,sizeof(struct out_pt),
337  spt_x_base ,spt_x_stride,
338  src_pt.n,&fd->local,&fd->cr.data);
339  }
340  array_free(&src_pt);
341  /* group by code to eliminate unfound points */
342  sarray_sort(struct out_pt,opt,out_pt.n, code,0, &fd->cr.data);
343  n=out_pt.n; while(n && opt[n-1].code==CODE_NOT_FOUND) --n;
344  out_pt.n=n;
345  #ifdef DIAGNOSTICS
346  printf("(proc %u) sending back %u found points\n",id,(unsigned)out_pt.n);
347  #endif
348  sarray_transfer(struct out_pt,&out_pt,proc,1,&fd->cr);
349  }
350  /* merge remote results with user data */
351  {
352  #define AT(T,var,i) (T*)((char*)var##_base+(i)*var##_stride)
353  uint n=out_pt.n;
354  struct out_pt *opt;
355  for(opt=out_pt.ptr;n;--n,++opt) {
356  const uint index = opt->index;
357  uint *code = AT(uint,code,index);
358  double *dist2 = AT(double,dist2,index);
359  if(*code==CODE_INTERNAL) continue;
360  if(*code==CODE_NOT_FOUND
361  || opt->code==CODE_INTERNAL
362  || opt->dist2<*dist2) {
363  double *r = AT(double,r,index);
364  uint *el = AT(uint,el,index), *proc = AT(uint,proc,index);
365  unsigned d; for(d=0;d<D;++d) r[d]=opt->r[d];
366  *dist2 = opt->dist2;
367  *proc = opt->proc;
368  *el = opt->el;
369  *code = opt->code;
370  }
371  }
372  array_free(&out_pt);
373  #undef AT
374  }
375 }
376 
377 struct eval_src_pt { double r[D]; uint index, proc, el; };
378 struct eval_out_pt { double out; uint index, proc; };
379 
381  double *const out_base, const unsigned out_stride,
382  const uint *const code_base, const unsigned code_stride,
383  const uint *const proc_base, const unsigned proc_stride,
384  const uint *const el_base, const unsigned el_stride,
385  const double *const r_base, const unsigned r_stride,
386  const uint npt,
387  const double *const in, struct findpts_data *const fd)
388 {
389  struct array src, outpt;
390  /* copy user data, weed out unfound points, send out */
391  {
392  uint index;
393  const uint *code=code_base, *proc=proc_base, *el=el_base;
394  const double *r=r_base;
395  struct eval_src_pt *pt;
396  array_init(struct eval_src_pt, &src, npt), pt=src.ptr;
397  for(index=0;index<npt;++index) {
398  if(*code!=CODE_NOT_FOUND) {
399  unsigned d;
400  for(d=0;d<D;++d) pt->r[d]=r[d];
401  pt->index=index;
402  pt->proc=*proc;
403  pt->el=*el;
404  ++pt;
405  }
406  r = (const double*)((const char*)r + r_stride);
407  code = (const uint*)((const char*)code+code_stride);
408  proc = (const uint*)((const char*)proc+proc_stride);
409  el = (const uint*)((const char*)el + el_stride);
410  }
411  src.n = pt - (struct eval_src_pt*)src.ptr;
412  sarray_transfer(struct eval_src_pt,&src,proc,1,&fd->cr);
413  }
414  /* evaluate points, send back */
415  {
416  uint n=src.n;
417  const struct eval_src_pt *spt;
418  struct eval_out_pt *opt;
419  /* group points by element */
420  sarray_sort(struct eval_src_pt,src.ptr,n, el,0, &fd->cr.data);
421  array_init(struct eval_out_pt,&outpt,n), outpt.n=n;
422  spt=src.ptr, opt=outpt.ptr;
423  for(;n;--n,++spt,++opt) opt->index=spt->index,opt->proc=spt->proc;
424  spt=src.ptr, opt=outpt.ptr;
425  findpts_local_eval(&opt->out ,sizeof(struct eval_out_pt),
426  &spt->el ,sizeof(struct eval_src_pt),
427  spt->r ,sizeof(struct eval_src_pt),
428  src.n, in,&fd->local);
429  array_free(&src);
430  sarray_transfer(struct eval_out_pt,&outpt,proc,1,&fd->cr);
431  }
432  /* copy results to user data */
433  {
434  #define AT(T,var,i) (T*)((char*)var##_base+(i)*var##_stride)
435  uint n=outpt.n;
436  struct eval_out_pt *opt;
437  for(opt=outpt.ptr;n;--n,++opt) *AT(double,out,opt->index)=opt->out;
438  array_free(&outpt);
439  #undef AT
440  }
441 }
442 
443 #undef findpts_eval
444 #undef findpts
445 #undef findpts_free
446 #undef findpts_setup
447 #undef setup_aux
448 #undef eval_out_pt
449 #undef eval_src_pt
450 #undef out_pt
451 #undef src_pt
452 #undef findpts_data
453 #undef findpts_local_eval
454 #undef findpts_local
455 #undef findpts_local_free
456 #undef findpts_local_setup
457 #undef findpts_local_data
458 
459 #undef hash_free
460 #undef hash_build
461 #undef table_from_hash
462 #undef fill_hash
463 #undef set_local_mask
464 #undef hash_bb
465 #undef hash_range
466 #undef hash_setfac
467 #undef hash_index
468 #undef hash_data
469 #undef local_hash_data
470 #undef obbox
#define slong
Definition: types.h:74
#define uint
Definition: types.h:70
uint proc
Definition: findpts.c:33
static uint count_bits(unsigned char *p, uint n)
Definition: findpts.c:65
size_t n
Definition: mem.h:111
#define tmalloc(type, count)
Definition: mem.h:91
static slong lfloor(double x)
Definition: findpts.c:35
double r[D]
Definition: findpts_imp.h:243
#define hash_index
Definition: findpts_imp.h:5
#define findpts_local_free
Definition: findpts_imp.h:17
#define findpts_local_setup
Definition: findpts_imp.h:16
ulong min
Definition: findpts.c:32
#define sarray_transfer_ext(T, A, proc, proc_stride, cr)
n
Definition: xxt_test.m:73
struct hash_data hd
double max
Definition: lob_bnd.c:21
#define hash_build
Definition: findpts_imp.h:12
#define crystal_free
Definition: crystal.c:47
double r[D]
Definition: findpts_imp.h:377
void comm_allreduce(const struct comm *com, gs_dom dom, gs_op op, void *v, uint vn, void *buf)
Definition: comm.c:107
#define setup_aux
Definition: findpts_imp.h:25
#define crystal_init
Definition: crystal.c:46
#define fill_hash
Definition: findpts_imp.h:10
#define x
#define findpts_free
Definition: findpts_imp.h:27
double fac[D]
Definition: findpts_imp.h:34
Definition: comm.h:85
#define findpts_setup
Definition: findpts_imp.h:26
#define set_local_mask
Definition: findpts_imp.h:9
#define AT(T, var, i)
#define hash_range
Definition: findpts_imp.h:7
buffer data
Definition: crystal.c:52
#define tcalloc(type, count)
Definition: mem.h:93
#define obbox
Definition: findpts_imp.h:2
uint index
Definition: findpts_imp.h:243
#define hash_setfac
Definition: findpts_imp.h:6
static struct crystal cr
Definition: findpts_test.c:75
#define findpts_local_eval
Definition: findpts_imp.h:19
double x[D]
Definition: findpts_imp.h:242
p
Definition: xxt_test2.m:1
#define WHEN_3D(a)
Definition: findpts.c:79
uint np
Definition: comm.h:86
uint index
Definition: findpts_imp.h:242
#define findpts_local
Definition: findpts_imp.h:18
struct crystal cr
Definition: findpts_imp.h:200
Definition: mem.h:111
#define ulong
Definition: types.h:75
ulong hash_n
Definition: findpts_imp.h:32
#define findpts_eval
Definition: findpts_imp.h:29
uint proc
Definition: findpts_imp.h:243
ulong max
Definition: findpts.c:32
uint proc
Definition: findpts_imp.h:242
struct findpts_local_data local
Definition: findpts_imp.h:201
#define array_init(T, a, max)
Definition: mem.h:136
uint index
Definition: findpts.c:33
#define D
Definition: findpts.c:78
struct hash_data hash
Definition: findpts_imp.h:202
#define table_from_hash
Definition: findpts_imp.h:11
static double elx[NR *NS]
#define findpts
Definition: findpts_imp.h:28
uint * offset
Definition: findpts_imp.h:35
#define FOR_LOOP()
#define sarray_sort(T, A, n, field, is_long, buf)
Definition: sarray_sort.h:55
double out
Definition: findpts_imp.h:378
static ulong hash_index_aux(double low, double fac, ulong n, double x)
Definition: findpts.c:38
for i
Definition: xxt_test.m:74
double dist2
Definition: findpts_imp.h:243
void * ptr
Definition: mem.h:111
static uint id
Definition: findpts_test.c:63
uint el
Definition: findpts_imp.h:243
#define CODE_NOT_FOUND
Definition: findpts.c:30
double min
Definition: lob_bnd.c:21
#define CODE_INTERNAL
Definition: findpts.c:28
#define array_free(a)
Definition: mem.h:135
uint id
Definition: comm.h:86
ulong out[N]
Definition: sort_test2.c:20
#define sarray_transfer(T, A, proc_field, set_src, cr)
static uint np
Definition: findpts_test.c:63
#define hash_bb
Definition: findpts_imp.h:8
#define local_hash_data
Definition: findpts_imp.h:3
#define hash_free
Definition: findpts_imp.h:13
static slong lceil(double x)
Definition: findpts.c:36
uint code
Definition: findpts_imp.h:243
struct comm comm
Definition: crystal.c:51
struct dbl_range bnd[D]
Definition: findpts_imp.h:33