libxmp/libxmpf in Omni Compiler  1.3.4
xmp_loop.c File Reference
#include "xmp_internal.h"
#include "xmp_math_function.h"
Include dependency graph for xmp_loop.c:

Macros

#define _XMP_SM_GTOL_BLOCK(_i, _m, _w)   (((_i) - (_m)) % (_w))
 
#define _XMP_SM_GTOL_CYCLIC(_i, _m, _P)   (((_i) - (_m)) / (_P))
 
#define _XMP_SM_GTOL_BLOCK_CYCLIC(_b, _i, _m, _P)   (((((_i) - (_m)) / (((_P) * (_b)))) * (_b)) + (((_i) - (_m)) % (_b)))
 
#define _XMP_SM_GTOL_GBLOCK(_i, _g)   ((_i) - (_g))
 
#define _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
 
#define _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter)
 

Functions

int _XMP_sched_loop_template_width_1 (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, int template_lower, int template_upper, int template_stride)
 
int _XMP_sched_loop_template_width_N (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, int template_lower, int template_upper, int template_stride, int width, int template_ser_lower, int template_ser_upper)
 
void _XMP_sched_loop_template_DUPLICATION (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
 
void _XMP_sched_loop_template_BLOCK (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
 
void _XMP_sched_loop_template_CYCLIC (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
 
void _XMP_sched_loop_template_BLOCK_CYCLIC (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
 
void _XMP_sched_loop_template_GBLOCK (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
 
void xmpc_loop_sched (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *t_desc, int t_idx, int expand_type, int lwidth, int uwidth, int unbound_flag)
 
void _XMP_sched_loop_nodes (int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_nodes_t *nodes, int nodes_index)
 

Macro Definition Documentation

◆ _XMP_SM_FINALIZE_ITER

#define _XMP_SM_FINALIZE_ITER (   par_init,
  par_cond,
  par_step,
  reverse_iter 
)
Value:
{ \
if (reverse_iter) { \
int temp = *par_init; \
*par_init = *par_cond; \
*par_cond = temp - 1; \
*par_step = -(*par_step); \
} else { \
(*par_cond)++; \
} \
}

◆ _XMP_SM_GTOL_BLOCK

#define _XMP_SM_GTOL_BLOCK (   _i,
  _m,
  _w 
)    (((_i) - (_m)) % (_w))

◆ _XMP_SM_GTOL_BLOCK_CYCLIC

#define _XMP_SM_GTOL_BLOCK_CYCLIC (   _b,
  _i,
  _m,
  _P 
)    (((((_i) - (_m)) / (((_P) * (_b)))) * (_b)) + (((_i) - (_m)) % (_b)))

◆ _XMP_SM_GTOL_CYCLIC

#define _XMP_SM_GTOL_CYCLIC (   _i,
  _m,
  _P 
)    (((_i) - (_m)) / (_P))

◆ _XMP_SM_GTOL_GBLOCK

#define _XMP_SM_GTOL_GBLOCK (   _i,
  _g 
)    ((_i) - (_g))

◆ _XMP_SM_NORM_SCHED_PARAMS

#define _XMP_SM_NORM_SCHED_PARAMS (   ser_init,
  ser_cond,
  ser_step,
  reverse_iter 
)
Value:
{ \
if (ser_step == 0) _XMP_fatal("loop step is 0"); \
if (ser_step == 1) ser_cond--; \
else { \
if (ser_step > 0){ \
ser_cond--; \
ser_cond -= ((ser_cond - ser_init) % ser_step); \
} \
else { \
if(reverse_iter != _XMP_N_INT_TRUE) /* This branch hides warning in _XMP_sched_loop_nodes() */ \
reverse_iter = _XMP_N_INT_TRUE; \
\
ser_step = -ser_step; \
ser_cond++; \
ser_cond += ((ser_init - ser_cond) % ser_step); \
int swap_temp = ser_init; \
ser_init = ser_cond; \
ser_cond = swap_temp; \
} \
} \
}

Function Documentation

◆ _XMP_sched_loop_nodes()

void _XMP_sched_loop_nodes ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_nodes_t nodes,
int  nodes_index 
)
534  {
535  if (!nodes->is_member){
536  *par_init = 0;
537  *par_cond = 0;
538  *par_step = 1;
539  return;
540  }
541 
542  int reverse_iter = _XMP_N_INT_TRUE; // reverse_iter is not used in this function
543  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
544 
545  int rank1O = ((nodes->info[nodes_index].rank) + 1);
546  if ((rank1O < ser_init) || (rank1O > ser_cond)) {
547  *par_init = 0;
548  *par_cond = 0;
549  *par_step = 1;
550  return;
551  }
552 
553  if (((rank1O - ser_init) % ser_step) == 0) {
554  *par_init = rank1O;
555  *par_cond = rank1O + 1;
556  *par_step = ser_step;
557  } else {
558  *par_init = 0;
559  *par_cond = 0;
560  *par_step = 1;
561  }
562 }

◆ _XMP_sched_loop_template_BLOCK()

void _XMP_sched_loop_template_BLOCK ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t template,
int  template_index 
)
198  {
199  _XMP_ASSERT(template->is_distributed);
200 
201  if (!template->is_owner) {
202  *par_init = 0;
203  *par_cond = 0;
204  *par_step = 1;
205  return;
206  }
207 
208  _XMP_template_info_t *template_info = &(template->info[template_index]);
209  int template_ser_lower = template_info->ser_lower;
210 
211  _XMP_template_chunk_t *template_chunk = &(template->chunk[template_index]);
212  int template_lower = template_chunk->par_lower;
213  int template_upper = template_chunk->par_upper;
214  int template_stride = template_chunk->par_stride;
215  int chunk_width = template_chunk->par_chunk_width;
216 
217  int reverse_iter = _XMP_N_INT_FALSE;
218  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
219 
220  // calc par_init, par_cond, par_step
221  if (_XMP_sched_loop_template_width_1(ser_init, ser_cond, ser_step, par_init, par_cond, par_step,
222  template_lower, template_upper, template_stride)) {
223  *par_init = _XMP_SM_GTOL_BLOCK(*par_init, template_ser_lower, chunk_width);
224  *par_cond = _XMP_SM_GTOL_BLOCK(*par_cond, template_ser_lower, chunk_width);
225  *par_step = ser_step;
226 
227  // finalize iter
228  _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter);
229  } else {
230  *par_init = 0;
231  *par_cond = 0;
232  *par_step = 1;
233  }
234 
235  /* // */
236  /* // for EXPAND/MARGIN */
237  /* // */
238 
239  /* if (expand_type == _XMP_LOOP_NONE){ */
240  /* return; */
241  /* } */
242  /* else if (expand_type == _XMP_LOOP_EXPAND){ */
243 
244  /* if ((*par_init) <= (*par_cond)){ // iterates at least once */
245  /* (*par_init) -= lwidth; */
246  /* (*par_cond) += uwidth; */
247  /* } */
248 
249  /* } */
250  /* else if (expand_type == _XMP_LOOP_MARGIN){ */
251 
252  /* if ((*par_init) <= (*par_cond)){ // iterates at least once */
253 
254  /* if (lwidth > 0){ */
255  /* (*par_init) -= lwidth; */
256  /* (*par_cond) = (*par_init) + lwidth; */
257  /* } */
258  /* else if (lwidth < 0){ */
259  /* (*par_cond) = (*par_init) - lwidth; */
260  /* // (*par_init) */
261  /* } */
262  /* else if (uwidth > 0){ */
263  /* (*par_cond) += uwidth; */
264  /* (*par_init) = (*par_cond) - uwidth; */
265  /* } */
266  /* else if (uwidth < 0){ */
267  /* (*par_init) = (*par_cond) + uwidth; */
268  /* // (*par_cond) */
269  /* } */
270 
271  /* } */
272 
273  /* } */
274 
275  /* if (unbound_flag == 0){ */
276 
277  /* long long int ser_init2; */
278  /* _XMP_L2G(*par_init, &ser_init2, template, template_index); */
279  /* if (ser_init2 < ser_init){ */
280  /* (*par_init) += lwidth; */
281  /* } */
282 
283  /* long long int ser_cond2; */
284  /* _XMP_L2G(*par_cond-1, &ser_cond2, template, template_index); */
285  /* // because (*par_cond) is (upper_bound + 1). */
286  /* if (ser_cond2 > ser_cond){ */
287  /* (*par_cond) -= uwidth; */
288  /* } */
289  /* } */
290 
291 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_BLOCK_CYCLIC()

void _XMP_sched_loop_template_BLOCK_CYCLIC ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t template,
int  template_index 
)
337  {
338  _XMP_ASSERT(template->is_distributed);
339 
340  if (!template->is_owner) {
341  *par_init = 0;
342  *par_cond = 0;
343  *par_step = 1;
344  return;
345  }
346 
347  _XMP_template_info_t *template_info = &(template->info[template_index]);
348  int template_ser_lower = template_info->ser_lower;
349  int template_ser_upper = template_info->ser_upper;
350 
351  _XMP_template_chunk_t *template_chunk = &(template->chunk[template_index]);
352  int nodes_size = (template_chunk->onto_nodes_info)->size;
353  int template_lower = template_chunk->par_lower;
354  int template_upper = template_chunk->par_upper;
355  int template_stride = template_chunk->par_stride;
356  int width = template_chunk->par_width;
357 
358  int reverse_iter = _XMP_N_INT_FALSE;
359  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
360 
361  // calc par_init, par_cond, par_step
362  if (_XMP_sched_loop_template_width_N(ser_init, ser_cond, ser_step, par_init, par_cond, par_step,
363  template_lower, template_upper, template_stride,
364  width, template_ser_lower, template_ser_upper)) {
365  *par_init = _XMP_SM_GTOL_BLOCK_CYCLIC(width, *par_init, template_ser_lower, nodes_size);
366  *par_cond = _XMP_SM_GTOL_BLOCK_CYCLIC(width, *par_cond, template_ser_lower, nodes_size);
367  *par_step = 1;
368 
369  // finalize iter
370  _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter);
371  } else {
372  *par_init = 0;
373  *par_cond = 0;
374  *par_step = 1;
375  }
376 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_CYCLIC()

void _XMP_sched_loop_template_CYCLIC ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t template,
int  template_index 
)
296  {
297  _XMP_ASSERT(template->is_distributed);
298 
299  if (!template->is_owner) {
300  *par_init = 0;
301  *par_cond = 0;
302  *par_step = 1;
303  return;
304  }
305 
306  _XMP_template_info_t *template_info = &(template->info[template_index]);
307  int template_ser_lower = template_info->ser_lower;
308 
309  _XMP_template_chunk_t *template_chunk = &(template->chunk[template_index]);
310  int nodes_size = (template_chunk->onto_nodes_info)->size;
311  int template_lower = template_chunk->par_lower;
312  int template_upper = template_chunk->par_upper;
313  int template_stride = template_chunk->par_stride;
314 
315  int reverse_iter = _XMP_N_INT_FALSE;
316  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
317 
318  // calc par_init, par_cond, par_step
319  if (_XMP_sched_loop_template_width_1(ser_init, ser_cond, ser_step, par_init, par_cond, par_step,
320  template_lower, template_upper, template_stride)) {
321  *par_init = _XMP_SM_GTOL_CYCLIC(*par_init, template_ser_lower, nodes_size);
322  *par_cond = _XMP_SM_GTOL_CYCLIC(*par_cond, template_ser_lower, nodes_size);
323  *par_step = 1;
324 
325  // finalize iter
326  _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter);
327  } else {
328  *par_init = 0;
329  *par_cond = 0;
330  *par_step = 1;
331  }
332 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_DUPLICATION()

void _XMP_sched_loop_template_DUPLICATION ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t template,
int  template_index 
)
165  {
166  _XMP_ASSERT(template->is_distributed); // FIXME too strict?
167 
168  if (!template->is_owner) {
169  *par_init = 0;
170  *par_cond = 0;
171  *par_step = 1;
172  return;
173  }
174 
175  _XMP_template_chunk_t *template_chunk = &(template->chunk[template_index]);
176  int template_lower = template_chunk->par_lower;
177  int template_upper = template_chunk->par_upper;
178  int template_stride = template_chunk->par_stride;
179 
180  int reverse_iter = _XMP_N_INT_FALSE;
181  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
182 
183  // calc par_init, par_cond, par_step
184  if (_XMP_sched_loop_template_width_1(ser_init, ser_cond, ser_step, par_init, par_cond, par_step,
185  template_lower, template_upper, template_stride)) {
186  // finalize iter
187  _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter);
188  } else {
189  *par_init = 0;
190  *par_cond = 0;
191  *par_step = 1;
192  }
193 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_GBLOCK()

void _XMP_sched_loop_template_GBLOCK ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t template,
int  template_index 
)
381  {
382 
383  _XMP_ASSERT(template->is_distributed);
384 
385  if (!template->is_owner) {
386  *par_init = 0;
387  *par_cond = 0;
388  *par_step = 1;
389  return;
390  }
391 
392  _XMP_template_chunk_t *template_chunk = &(template->chunk[template_index]);
393  int rank = template_chunk->onto_nodes_info->rank;
394  int template_lower = template_chunk->par_lower;
395  int template_upper = template_chunk->par_upper;
396  int template_stride = template_chunk->par_stride;
397  long long *mapping_array = template_chunk->mapping_array;
398 
399  int reverse_iter = _XMP_N_INT_FALSE;
400  _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
401 
402  // calc par_init, par_cond, par_step
403  if (_XMP_sched_loop_template_width_1(ser_init, ser_cond, ser_step, par_init, par_cond, par_step,
404  template_lower, template_upper, template_stride)) {
405 
406  *par_init = _XMP_SM_GTOL_GBLOCK(*par_init, mapping_array[rank]);
407  *par_cond = _XMP_SM_GTOL_GBLOCK(*par_cond, mapping_array[rank]);
408  *par_step = ser_step;
409 
410  // finalize iter
411  _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter);
412  } else {
413  *par_init = 0;
414  *par_cond = 0;
415  *par_step = 1;
416  }
417 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_width_1()

int _XMP_sched_loop_template_width_1 ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
int  template_lower,
int  template_upper,
int  template_stride 
)
55  {
56  int x, x_max = _XMP_floori((template_upper - template_lower), template_stride);
57  if (ser_step == 1) {
58  // calc par_init
59  x = _XMP_ceili((ser_init - template_lower), template_stride);
60  if (x < 0) {
61  *par_init = template_lower;
62  } else if (x > x_max) {
63  return _XMP_N_INT_FALSE;
64  } else {
65  *par_init = (x * template_stride) + template_lower;
66  }
67 
68  // calc par_cond
69  x = _XMP_floori((ser_cond - template_lower), template_stride);
70  if (x < 0) {
71  return _XMP_N_INT_FALSE;
72  } else if (x > x_max) {
73  *par_cond = template_upper;
74  } else {
75  *par_cond = (x * template_stride) + template_lower;
76  }
77 
78  // calc par_step
79  *par_step = template_stride;
80  } else {
81  if ((template_upper < ser_init) || (ser_cond < template_lower)) {
82  return _XMP_N_INT_FALSE;
83  }
84 
85  // calc par_init
86  for (int i = template_lower; i <= template_upper; i += template_stride) {
87  if (i < ser_init) {
88  continue;
89  } else if (((i - ser_init) % ser_step) == 0) {
90  *par_init = i;
91  goto calc_par_cond;
92  }
93  }
94  return _XMP_N_INT_FALSE;
95 
96 calc_par_cond:
97  // calc par_cond
98  for (int i = template_upper; i >= template_lower; i -= template_stride) {
99  if (i > ser_cond) {
100  continue;
101  } else if (((i - ser_init) % ser_step) == 0) {
102  *par_cond = i;
103  goto calc_par_step;
104  }
105  }
106  return _XMP_N_INT_FALSE;
107 
108 calc_par_step:
109  // calc par_step
110  *par_step = _XMP_lcm(ser_step, template_stride);
111  }
112 
113  return _XMP_N_INT_TRUE;
114 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_sched_loop_template_width_N()

int _XMP_sched_loop_template_width_N ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
int  template_lower,
int  template_upper,
int  template_stride,
int  width,
int  template_ser_lower,
int  template_ser_upper 
)
119  {
120  int si = ((ser_init - template_ser_lower) / width) + template_ser_lower;
121  int sc = ((ser_cond - template_ser_lower) / width) + template_ser_lower;
122  int tl = ((template_lower - template_ser_lower) / width) + template_ser_lower;
123  int tu = ((template_upper - template_ser_lower) / width) + template_ser_lower;
124  int ts = template_stride / width;
125 
126  /* FIXME HOW IMPLEMENT??? */
127  if (ser_step != 1) {
128  _XMP_fatal("loop step is not 1, -1: unsupported case");
129  }
130 
131  if (_XMP_sched_loop_template_width_1(si, sc, 1, par_init, par_cond, par_step, tl, tu, ts)) {
132  // init par_init
133  int par_init_temp = ((*par_init - template_ser_lower) * width) + template_ser_lower;
134  if (par_init_temp < ser_init) {
135  *par_init = ser_init;
136  } else {
137  *par_init = par_init_temp;
138  }
139 
140  // init par_cond
141  int par_cond_temp = ((*par_cond - template_ser_lower) * width) + template_ser_lower + width - 1;
142  if (par_cond_temp > template_ser_upper) {
143  par_cond_temp = template_ser_upper;
144  }
145 
146  if (par_cond_temp > ser_cond) {
147  *par_cond = ser_cond;
148  } else {
149  *par_cond = par_cond_temp;
150  }
151 
152  // init par_step
153  // FIXME how implement???
154 
155  return _XMP_N_INT_TRUE;
156  } else {
157  return _XMP_N_INT_FALSE;
158  }
159 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmpc_loop_sched()

void xmpc_loop_sched ( int  ser_init,
int  ser_cond,
int  ser_step,
int *  par_init,
int *  par_cond,
int *  par_step,
_XMP_template_t t_desc,
int  t_idx,
int  expand_type,
int  lwidth,
int  uwidth,
int  unbound_flag 
)
423 {
424  _XMP_ASSERT(*expand_type != _XMP_LOOP_MARGIN || *lwidth == 0 || *uwidth == 0);
425  _XMP_ASSERT(ser_step != 0);
426 
427  // offset is not supported yet in XMP/C>
428  int off = 0;
429  //int off = rp->REF_OFFSET[*r_idx];
430  switch (t_desc->chunk[t_idx].dist_manner){
431 
433  _XMP_sched_loop_template_DUPLICATION(ser_init + off, ser_cond + off, ser_step,
434  par_init, par_cond, par_step,
435  t_desc, t_idx);
436  break;
437 
438  case _XMP_N_DIST_BLOCK:
439  _XMP_sched_loop_template_BLOCK(ser_init + off, ser_cond + off, ser_step,
440  par_init, par_cond, par_step,
441  t_desc, t_idx);
442  break;
443 
444  case _XMP_N_DIST_CYCLIC:
445  _XMP_sched_loop_template_CYCLIC(ser_init + off, ser_cond + off, ser_step,
446  par_init, par_cond, par_step,
447  t_desc, t_idx);
448  break;
449 
451  _XMP_sched_loop_template_BLOCK_CYCLIC(ser_init + off, ser_cond + off, ser_step,
452  par_init, par_cond, par_step,
453  t_desc, t_idx);
454  break;
455 
456  case _XMP_N_DIST_GBLOCK:
457  _XMP_sched_loop_template_GBLOCK(ser_init + off, ser_cond + off, ser_step,
458  par_init, par_cond, par_step,
459  t_desc, t_idx);
460  break;
461 
462  default:
463  _XMP_fatal("xmpc_loop_sched: unknown chunk dist_manner");
464 
465  }
466 
467  //
468  // for EXPAND/MARGIN
469  //
470 
471  //xmp_dbg_printf("before %d : %d\n", *par_init, *par_cond);
472 
473  if (expand_type == _XMP_LOOP_NONE){
474  return;
475  }
476  else if (expand_type == _XMP_LOOP_EXPAND){
477 
478  if ((*par_init) < (*par_cond)){ // iterates at least once
479  (*par_init) -= lwidth;
480  (*par_cond) += uwidth;
481  }
482 
483  }
484  else if (expand_type == _XMP_LOOP_MARGIN){
485 
486  if ((*par_init) < (*par_cond)){ // iterates at least once
487 
488  if (lwidth > 0){
489  (*par_init) -= lwidth;
490  (*par_cond) = (*par_init) + lwidth;
491  }
492  else if (lwidth < 0){
493  (*par_cond) = (*par_init) - lwidth;
494  // (*par_init)
495  }
496  else if (uwidth > 0){
497  (*par_cond) += uwidth;
498  (*par_init) = (*par_cond) - uwidth;
499  }
500  else if (uwidth < 0){
501  (*par_init) = (*par_cond) + uwidth;
502  // (*par_cond)
503  }
504 
505  }
506 
507  }
508 
509  if (unbound_flag == 0){
510 
511  long long int glb;
512  _XMP_L2G(*par_init, &glb, t_desc, t_idx);
513  if (glb < ser_init){
514  (*par_init) += lwidth;
515  }
516 
517  long long int gub;
518  _XMP_L2G(*par_cond, &gub, t_desc, t_idx);
519  if (gub > ser_cond){
520  (*par_cond) -= uwidth;
521  }
522 
523  }
524 
525  //xmp_dbg_printf("after %d : %d\n", *par_init, *par_cond);
526 
527  return;
528 
529 }
Here is the call graph for this function:
_XMP_template_chunk_type::par_upper
long long par_upper
Definition: xmp_data_struct.h:81
_XMP_SM_GTOL_BLOCK_CYCLIC
#define _XMP_SM_GTOL_BLOCK_CYCLIC(_b, _i, _m, _P)
Definition: xmp_loop.c:11
_XMP_nodes_type::info
_XMP_nodes_info_t info[1]
Definition: xmp_data_struct.h:60
_XMP_L2G
void _XMP_L2G(int local_idx, long long int *global_idx, _XMP_template_t *template, int template_index)
Definition: xmp_index.c:4
_XMP_N_DIST_BLOCK
#define _XMP_N_DIST_BLOCK
Definition: xmp_constant.h:29
_XMP_template_info_type::ser_lower
long long ser_lower
Definition: xmp_data_struct.h:72
_XMP_nodes_type::is_member
int is_member
Definition: xmp_data_struct.h:46
_XMP_SM_FINALIZE_ITER
#define _XMP_SM_FINALIZE_ITER(par_init, par_cond, par_step, reverse_iter)
Definition: xmp_loop.c:40
_XMP_template_type::chunk
_XMP_template_chunk_t * chunk
Definition: xmp_data_struct.h:112
_XMP_SM_GTOL_GBLOCK
#define _XMP_SM_GTOL_GBLOCK(_i, _g)
Definition: xmp_loop.c:14
_XMP_SM_GTOL_CYCLIC
#define _XMP_SM_GTOL_CYCLIC(_i, _m, _P)
Definition: xmp_loop.c:8
_XMP_sched_loop_template_BLOCK_CYCLIC
void _XMP_sched_loop_template_BLOCK_CYCLIC(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
Definition: xmp_loop.c:335
_XMP_template_chunk_type::par_lower
long long par_lower
Definition: xmp_data_struct.h:80
_XMP_SM_NORM_SCHED_PARAMS
#define _XMP_SM_NORM_SCHED_PARAMS(ser_init, ser_cond, ser_step, reverse_iter)
Definition: xmp_loop.c:17
_XMP_sched_loop_template_width_1
int _XMP_sched_loop_template_width_1(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, int template_lower, int template_upper, int template_stride)
Definition: xmp_loop.c:53
_XMP_template_chunk_type::onto_nodes_info
_XMP_nodes_info_t * onto_nodes_info
Definition: xmp_data_struct.h:94
_XMP_template_info_type
Definition: xmp_data_struct.h:70
_XMP_LOOP_EXPAND
#define _XMP_LOOP_EXPAND
Definition: xmp_constant.h:74
_XMP_sched_loop_template_width_N
int _XMP_sched_loop_template_width_N(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, int template_lower, int template_upper, int template_stride, int width, int template_ser_lower, int template_ser_upper)
Definition: xmp_loop.c:116
_XMP_template_chunk_type::par_chunk_width
unsigned long long par_chunk_width
Definition: xmp_data_struct.h:86
_XMP_N_INT_FALSE
#define _XMP_N_INT_FALSE
Definition: xmp_constant.h:5
_XMP_N_DIST_CYCLIC
#define _XMP_N_DIST_CYCLIC
Definition: xmp_constant.h:30
_XMP_sched_loop_template_CYCLIC
void _XMP_sched_loop_template_CYCLIC(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
Definition: xmp_loop.c:294
_XMP_template_chunk_type
Definition: xmp_data_struct.h:78
_XMP_template_info_type::ser_upper
long long ser_upper
Definition: xmp_data_struct.h:73
_XMP_N_DIST_BLOCK_CYCLIC
#define _XMP_N_DIST_BLOCK_CYCLIC
Definition: xmp_constant.h:31
_XMP_N_DIST_GBLOCK
#define _XMP_N_DIST_GBLOCK
Definition: xmp_constant.h:32
_XMP_N_DIST_DUPLICATION
#define _XMP_N_DIST_DUPLICATION
Definition: xmp_constant.h:28
_XMP_SM_GTOL_BLOCK
#define _XMP_SM_GTOL_BLOCK(_i, _m, _w)
Definition: xmp_loop.c:5
_XMP_template_chunk_type::par_stride
int par_stride
Definition: xmp_data_struct.h:85
_XMP_nodes_info_type::rank
int rank
Definition: xmp_data_struct.h:35
_XMP_template_chunk_type::dist_manner
int dist_manner
Definition: xmp_data_struct.h:87
_XMP_ASSERT
#define _XMP_ASSERT(_flag)
Definition: xmp_internal.h:34
_XMP_LOOP_NONE
#define _XMP_LOOP_NONE
Definition: xmp_constant.h:77
_XMP_sched_loop_template_GBLOCK
void _XMP_sched_loop_template_GBLOCK(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
Definition: xmp_loop.c:379
_XMP_sched_loop_template_DUPLICATION
void _XMP_sched_loop_template_DUPLICATION(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
Definition: xmp_loop.c:163
_XMP_lcm
int _XMP_lcm(int a, int b)
Definition: xmp_math_function.c:66
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
_XMP_floori
int _XMP_floori(int a, int b)
Definition: xmp_math_function.c:43
_XMP_template_chunk_type::par_width
unsigned long long par_width
Definition: xmp_data_struct.h:82
_XMP_template_type::is_distributed
_Bool is_distributed
Definition: xmp_data_struct.h:105
_XMP_sched_loop_template_BLOCK
void _XMP_sched_loop_template_BLOCK(int ser_init, int ser_cond, int ser_step, int *par_init, int *par_cond, int *par_step, _XMP_template_t *template, int template_index)
Definition: xmp_loop.c:196
_XMP_N_INT_TRUE
#define _XMP_N_INT_TRUE
Definition: xmp_constant.h:4
_XMP_template_chunk_type::mapping_array
long long * mapping_array
Definition: xmp_data_struct.h:88
_XMP_LOOP_MARGIN
#define _XMP_LOOP_MARGIN
Definition: xmp_constant.h:75
_XMP_template_type::is_owner
_Bool is_owner
Definition: xmp_data_struct.h:106
_XMP_ceili
int _XMP_ceili(int a, int b)
Definition: xmp_math_function.c:29