libxmp/libxmpf in Omni Compiler  1.3.4
xmp.h File Reference
#include <stddef.h>
#include <mpi.h>
Include dependency graph for xmp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _XMP_USERAPI
 
#define XMP_FAILURE   -2000
 
#define XMP_UNDEFINED   -2001
 
#define XMP_ENTIRE_NODES   2000
 
#define XMP_EXECUTING_NODES   2001
 
#define XMP_PRIMARY_NODES   2002
 
#define XMP_EQUIVALENCE_NODES   2003
 
#define XMP_NOT_DISTRIBUTED   2100
 
#define XMP_BLOCK   2101
 
#define XMP_CYCLIC   2102
 
#define XMP_GBLOCK   2103
 
#define XMP_DESC_NODES   2200
 
#define XMP_DESC_TEMPLATE   2201
 
#define XMP_DESC_ARRAY   2202
 

Typedefs

typedef void * xmp_desc_t
 

Functions

MPI_Comm xmp_get_mpi_comm (void)
 
void xmp_init_mpi (int *argc, char ***argv)
 
void xmp_finalize_mpi (void)
 
void xmp_init (MPI_Comm comm)
 
void xmp_finalize ()
 
int xmp_num_nodes (void)
 
int xmp_num_images (void)
 
int xmp_desc_kind (xmp_desc_t d, int *kind)
 
int xmp_node_num (void)
 
int xmpc_node_num (void)
 
int xmpc_this_image (void)
 
void xmp_barrier (void)
 
int xmp_all_num_nodes (void)
 
int xmp_all_node_num (void)
 
int xmpc_all_node_num (void)
 
double xmp_wtime (void)
 
double xmp_wtick (void)
 
int xmp_array_ndims (xmp_desc_t d, int *ndims)
 
int xmp_array_lbound (xmp_desc_t d, int dim, int *lbound)
 
int xmp_array_ubound (xmp_desc_t d, int dim, int *ubound)
 
size_t xmp_array_type_size (xmp_desc_t d)
 
int xmp_array_gsize (xmp_desc_t d, int dim)
 
int xmp_array_lsize (xmp_desc_t d, int dim, int *lsize)
 
int xmp_array_gcllbound (xmp_desc_t d, int dim)
 
int xmp_array_gclubound (xmp_desc_t d, int dim)
 
int xmp_array_lcllbound (xmp_desc_t d, int dim)
 
int xmp_array_lclubound (xmp_desc_t d, int dim)
 
int xmp_array_gcglbound (xmp_desc_t d, int dim)
 
int xmp_array_gcgubound (xmp_desc_t d, int dim)
 
int xmp_array_laddr (xmp_desc_t d, void **laddr)
 
int xmp_array_lshadow (xmp_desc_t d, int dim, int *lshadow)
 
int xmp_array_ushadow (xmp_desc_t d, int dim, int *ushadow)
 
int xmp_array_owner (xmp_desc_t d, int ndims, int index[], int dim)
 
int xmp_array_lead_dim (xmp_desc_t d, int size[])
 
int xmp_array_gtol (xmp_desc_t d, int dim, int g_idx, int *lidx)
 
int xmp_align_axis (xmp_desc_t d, int dim, int *axis)
 
int xmp_align_offset (xmp_desc_t d, int dim, int *offset)
 
int xmp_align_format (xmp_desc_t d, int dim)
 
int xmp_align_size (xmp_desc_t d, int dim)
 
int xmp_align_replicated (xmp_desc_t d, int dim, int *replicated)
 
int xmp_align_template (xmp_desc_t d, xmp_desc_t *dt)
 
int xmp_template_fixed (xmp_desc_t d, int *fixed)
 
int xmp_template_ndims (xmp_desc_t d, int *ndims)
 
int xmp_template_lbound (xmp_desc_t d, int dim, int *lbound)
 
int xmp_template_ubound (xmp_desc_t d, int dim, int *ubound)
 
int xmp_template_gsize (xmp_desc_t d, int dim)
 
int xmp_template_lsize (xmp_desc_t d, int dim)
 
int xmp_dist_format (xmp_desc_t d, int dim, int *format)
 
int xmp_dist_blocksize (xmp_desc_t d, int dim, int *blocksize)
 
int xmp_dist_stride (xmp_desc_t d, int dim)
 
int xmp_dist_nodes (xmp_desc_t d, xmp_desc_t *dn)
 
int xmp_dist_axis (xmp_desc_t d, int dim, int *axis)
 
int xmp_dist_gblockmap (xmp_desc_t d, int dim, int *map)
 
int xmp_nodes_ndims (xmp_desc_t d, int *ndims)
 
int xmp_nodes_index (xmp_desc_t d, int dim, int *index)
 
int xmp_nodes_size (xmp_desc_t d, int dim, int *size)
 
int xmp_nodes_rank (xmp_desc_t d, int *rank)
 
int xmp_nodes_comm (xmp_desc_t d, void **comm)
 
int xmp_nodes_equiv (xmp_desc_t d, xmp_desc_t *dn, int lb[], int ub[], int st[])
 
void xmp_sched_template_index (int *local_start_index, int *local_end_index, const int global_start_index, const int global_end_index, const int step, const xmp_desc_t template, const int template_dim)
 
void xmp_sync_memory (const int *status)
 Execute sync_memory() More...
 
void xmp_sync_all (const int *status)
 Execute sync_all() More...
 
void xmp_sync_image (const int image, int *status)
 Execute sync_image() More...
 
void xmp_sync_images (const int num, int *image_set, int *status)
 Execute sync_images() More...
 
void xmp_sync_images_all (int *status)
 Execute sync_images_all() More...
 
void xmp_sort_up (xmp_desc_t a_desc, xmp_desc_t b_desc)
 
void xmp_sort_down (xmp_desc_t a_desc, xmp_desc_t b_desc)
 
void * xmp_malloc (xmp_desc_t d,...)
 
void xmp_free (xmp_desc_t d)
 
void xmp_exit (int status)
 
void xmp_array_lbound_global (xmp_desc_t d, int dim, int *global_i)
 
void xmp_array_ubound_global (xmp_desc_t d, int dim, int *global_i)
 
void xmp_atomic_define (int, int)
 
void xmp_atomic_ref (int *, int)
 

Macro Definition Documentation

◆ _XMP_USERAPI

#define _XMP_USERAPI

◆ XMP_BLOCK

#define XMP_BLOCK   2101

◆ XMP_CYCLIC

#define XMP_CYCLIC   2102

◆ XMP_DESC_ARRAY

#define XMP_DESC_ARRAY   2202

◆ XMP_DESC_NODES

#define XMP_DESC_NODES   2200

◆ XMP_DESC_TEMPLATE

#define XMP_DESC_TEMPLATE   2201

◆ XMP_ENTIRE_NODES

#define XMP_ENTIRE_NODES   2000

◆ XMP_EQUIVALENCE_NODES

#define XMP_EQUIVALENCE_NODES   2003

◆ XMP_EXECUTING_NODES

#define XMP_EXECUTING_NODES   2001

◆ XMP_FAILURE

#define XMP_FAILURE   -2000

◆ XMP_GBLOCK

#define XMP_GBLOCK   2103

◆ XMP_NOT_DISTRIBUTED

#define XMP_NOT_DISTRIBUTED   2100

◆ XMP_PRIMARY_NODES

#define XMP_PRIMARY_NODES   2002

◆ XMP_UNDEFINED

#define XMP_UNDEFINED   -2001

Typedef Documentation

◆ xmp_desc_t

typedef void* xmp_desc_t

Function Documentation

◆ xmp_align_axis()

int xmp_align_axis ( xmp_desc_t  d,
int  dim,
int *  axis 
)
243 {
244  _XMP_array_t *a = (_XMP_array_t *)d;
245  *axis = a->info[dim-1].align_template_index + 1;
246  return 0;
247 }
Here is the caller graph for this function:

◆ xmp_align_format()

int xmp_align_format ( xmp_desc_t  d,
int  dim 
)
257 {
258  _XMP_array_t *a = (_XMP_array_t *)d;
259  return a->info[dim-1].align_manner;
260 }
Here is the caller graph for this function:

◆ xmp_align_offset()

int xmp_align_offset ( xmp_desc_t  d,
int  dim,
int *  offset 
)
250 {
251  _XMP_array_t *a = (_XMP_array_t *)d;
252  *offset = a->info[dim-1].align_subscript;
253  return 0;
254 }

◆ xmp_align_replicated()

int xmp_align_replicated ( xmp_desc_t  d,
int  dim,
int *  replicated 
)
291 {
292  int andims, nndims, axis, counter=0;
293  xmp_desc_t dt, dn;
294 
295  xmp_align_template(d, &dt);
296  xmp_dist_nodes(dt, &dn);
297  xmp_array_ndims(d, &andims);
298  xmp_nodes_ndims(dn, &nndims);
299 
300  for(int i=0; i<andims; i++){
301  xmp_align_axis(d, i+1, &axis);
302  if (axis <= 0){
303  counter = counter +1;
304  }
305  }
306 
307  if (counter != nndims){
308  *replicated=1;
309  for(int i=0; i<andims; i++){
310  xmp_align_axis(d, i+1, &axis);
311  if (dim == axis){
312  *replicated=0;
313  break;
314  }
315  }
316  }else{
317  *replicated=0;
318  }
319 
320  return 0;
321 }
Here is the call graph for this function:

◆ xmp_align_size()

int xmp_align_size ( xmp_desc_t  d,
int  dim 
)
263 {
264  int format, ival=0, idim;
265  xmp_desc_t dt;
266  _XMP_array_t *a = (_XMP_array_t *)d;
267 
268  format = xmp_align_format(d,dim);
269  xmp_align_axis(d,dim,&idim);
270  xmp_align_template(d,&dt);
271 
272  _XMP_template_t *t = (_XMP_template_t *)dt;
273 
274  if (format == _XMP_N_ALIGN_BLOCK){
275  ival = t->chunk[idim-1].par_chunk_width;
276  }else if (format == _XMP_N_ALIGN_CYCLIC){
277  ival = t->chunk[idim-1].par_width;
278  }else if (format == _XMP_N_ALIGN_BLOCK_CYCLIC){
279  ival = t->chunk[idim-1].par_width;
280  }else if (format == _XMP_N_ALIGN_DUPLICATION){
281  ival = t->chunk[idim-1].par_chunk_width;
282  }else if (format == _XMP_N_ALIGN_NOT_ALIGNED){
283  ival = a->info[dim-1].par_size;
284  }else
285  ival = -1;
286 
287  return ival;
288 }
Here is the call graph for this function:

◆ xmp_align_template()

int xmp_align_template ( xmp_desc_t  d,
xmp_desc_t dt 
)
324 {
325  _XMP_array_t *a = (_XMP_array_t *)d;
326  *dt = (xmp_desc_t)(a->align_template);
327  return 0;
328 }
Here is the caller graph for this function:

◆ xmp_all_node_num()

int xmp_all_node_num ( void  )
77 {
78  return _XMP_world_rank + 1;
79 }

◆ xmp_all_num_nodes()

int xmp_all_num_nodes ( void  )
72 {
73  return _XMP_world_size;
74 }

◆ xmp_array_gcglbound()

int xmp_array_gcglbound ( xmp_desc_t  d,
int  dim 
)
162 {
163  _XMP_array_t *a = (_XMP_array_t *)d;
164  return a->info[dim-1].ser_lower;
165 }

◆ xmp_array_gcgubound()

int xmp_array_gcgubound ( xmp_desc_t  d,
int  dim 
)
168 {
169  _XMP_array_t *a = (_XMP_array_t *)d;
170  return a->info[dim-1].ser_upper;
171 }

◆ xmp_array_gcllbound()

int xmp_array_gcllbound ( xmp_desc_t  d,
int  dim 
)
138 {
139  _XMP_array_t *a = (_XMP_array_t *)d;
140  return a->info[dim-1].par_lower;
141 }

◆ xmp_array_gclubound()

int xmp_array_gclubound ( xmp_desc_t  d,
int  dim 
)
144 {
145  _XMP_array_t *a = (_XMP_array_t *)d;
146  return a->info[dim-1].par_upper;
147 }

◆ xmp_array_gsize()

int xmp_array_gsize ( xmp_desc_t  d,
int  dim 
)
124 {
125  _XMP_array_t *a = (_XMP_array_t *)d;
126  return a->info[dim-1].ser_size;
127 }

◆ xmp_array_gtol()

int xmp_array_gtol ( xmp_desc_t  d,
int  dim,
int  g_idx,
int *  lidx 
)
235 {
236  int rank;
237  _XMP_align_local_idx((long long int)g_idx, l_idx, d, dim-1, &rank);
238 
239  return 0;
240 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmp_array_laddr()

int xmp_array_laddr ( xmp_desc_t  d,
void **  laddr 
)
174 {
175  _XMP_array_t *a = (_XMP_array_t *)d;
176  *(void **)laddr = (void *)a->array_addr_p;
177  return 0;
178 }

◆ xmp_array_lbound()

int xmp_array_lbound ( xmp_desc_t  d,
int  dim,
int *  lbound 
)
104 {
105  _XMP_array_t *a = (_XMP_array_t *)d;
106  *lbound = a->info[dim-1].ser_lower;
107  return 0;
108 }

◆ xmp_array_lbound_global()

void xmp_array_lbound_global ( xmp_desc_t  d,
int  dim,
int *  global_i 
)
617 {
618  _XMP_array_t *a = (_XMP_array_t *)d;
619  *global_i = a->info[dim-1].par_lower;
620 }

◆ xmp_array_lcllbound()

int xmp_array_lcllbound ( xmp_desc_t  d,
int  dim 
)
150 {
151  _XMP_array_t *a = (_XMP_array_t *)d;
152  return a->info[dim-1].local_lower;
153 }

◆ xmp_array_lclubound()

int xmp_array_lclubound ( xmp_desc_t  d,
int  dim 
)
156 {
157  _XMP_array_t *a = (_XMP_array_t *)d;
158  return a->info[dim-1].local_upper;
159 }

◆ xmp_array_lead_dim()

int xmp_array_lead_dim ( xmp_desc_t  d,
int  size[] 
)
223 {
224  _XMP_array_t *a = (_XMP_array_t *)d;
225 
226  int ndims;
227  xmp_array_ndims(d, &ndims);
228  for(int i=0;i<ndims;i++)
229  size[i] = (int)a->info[i].dim_acc;
230 
231  return 0;
232 }
Here is the call graph for this function:

◆ xmp_array_lshadow()

int xmp_array_lshadow ( xmp_desc_t  d,
int  dim,
int *  lshadow 
)
188 {
189  _XMP_array_t *a = (_XMP_array_t *)d;
190  *lshadow = a->info[dim-1].shadow_size_lo;
191  return 0;
192 }

◆ xmp_array_lsize()

int xmp_array_lsize ( xmp_desc_t  d,
int  dim,
int *  lsize 
)
130 {
131  _XMP_array_t *a = (_XMP_array_t *)d;
132  // *lsize = a->info[dim-1].par_size;
133  *lsize = a->info[dim-1].alloc_size;
134  return 0;
135 }

◆ xmp_array_ndims()

int xmp_array_ndims ( xmp_desc_t  d,
int *  ndims 
)
97 {
98  _XMP_array_t *a = (_XMP_array_t *)d;
99  *ndims = a->dim;
100  return 0;
101 }
Here is the caller graph for this function:

◆ xmp_array_owner()

int xmp_array_owner ( xmp_desc_t  d,
int  ndims,
int  index[],
int  dim 
)

◆ xmp_array_type_size()

size_t xmp_array_type_size ( xmp_desc_t  d)
118 {
119  _XMP_array_t *a = (_XMP_array_t *)d;
120  return a->type_size;
121 }
Here is the caller graph for this function:

◆ xmp_array_ubound()

int xmp_array_ubound ( xmp_desc_t  d,
int  dim,
int *  ubound 
)
111 {
112  _XMP_array_t *a = (_XMP_array_t *)d;
113  *ubound = a->info[dim-1].ser_upper;
114  return 0;
115 }

◆ xmp_array_ubound_global()

void xmp_array_ubound_global ( xmp_desc_t  d,
int  dim,
int *  global_i 
)
623 {
624  _XMP_array_t *a = (_XMP_array_t *)d;
625  *global_i = a->info[dim-1].par_upper;
626 }

◆ xmp_array_ushadow()

int xmp_array_ushadow ( xmp_desc_t  d,
int  dim,
int *  ushadow 
)
181 {
182  _XMP_array_t *a = (_XMP_array_t *)d;
183  *ushadow = a->info[dim-1].shadow_size_hi;
184  return 0;
185 }

◆ xmp_atomic_define()

void xmp_atomic_define ( int  ,
int   
)
1  {
2 }

◆ xmp_atomic_ref()

void xmp_atomic_ref ( int *  ,
int   
)

◆ xmp_barrier()

void xmp_barrier ( void  )
67 {
69 }
Here is the call graph for this function:

◆ xmp_desc_kind()

int xmp_desc_kind ( xmp_desc_t  d,
int *  kind 
)
36 {
37  *kind = *(int*)d;
38  return 0;
39 }

◆ xmp_dist_axis()

int xmp_dist_axis ( xmp_desc_t  d,
int  dim,
int *  axis 
)
423 {
425  *axis = t->chunk[dim-1].onto_nodes_index + 1;
426  return 0;
427 }
Here is the caller graph for this function:

◆ xmp_dist_blocksize()

int xmp_dist_blocksize ( xmp_desc_t  d,
int  dim,
int *  blocksize 
)
390 {
391  int format;
393 
394  xmp_dist_format(d,dim,&format);
395 
396  if (format == XMP_BLOCK){
397  *blocksize = t->chunk[dim-1].par_chunk_width;
398  }else if (format == XMP_CYCLIC){
399  *blocksize = t->chunk[dim-1].par_width;
400  }else if (format == XMP_NOT_DISTRIBUTED){
401  *blocksize = t->chunk[dim-1].par_chunk_width;
402  }else{
403  *blocksize = -1;
404  }
405 
406  return 0;
407 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmp_dist_format()

int xmp_dist_format ( xmp_desc_t  d,
int  dim,
int *  format 
)
372 {
374 
375  *format = t->chunk[dim-1].dist_manner;
376  if (*format == _XMP_N_DIST_BLOCK){
377  *format = XMP_BLOCK;
378  }else if (*format == _XMP_N_DIST_CYCLIC){
379  *format = XMP_CYCLIC;
380  }else if (*format == _XMP_N_DIST_BLOCK_CYCLIC){
381  *format = XMP_CYCLIC;
382  }else{
383  *format = XMP_NOT_DISTRIBUTED;
384  }
385 
386  return 0;
387 }
Here is the caller graph for this function:

◆ xmp_dist_gblockmap()

int xmp_dist_gblockmap ( xmp_desc_t  d,
int  dim,
int *  map 
)
430 {
432  _XMP_template_chunk_t *chunk = &(t->chunk[dim-1]);
433 
434  int axis, size;
435  xmp_desc_t dn;
436  xmp_dist_nodes(d, &dn);
437  xmp_dist_axis(d, dim, &axis);
438  xmp_nodes_size(dn, axis, &size);
439 
440  for (int i=0; i<size-1; i++){
441  map[i] = chunk->mapping_array[i+1]-chunk->mapping_array[i];
442  }
443  if (size > 1){
444  map[size-1] = t->info[dim-1].ser_size - map[size-2];
445  }else if (size == 1){
446  map[0] = t->info[dim-1].ser_size;
447  }else{
448  return -1;
449  }
450 
451  return 0;
452 }
Here is the call graph for this function:

◆ xmp_dist_nodes()

int xmp_dist_nodes ( xmp_desc_t  d,
xmp_desc_t dn 
)
416 {
418  *dn = (xmp_desc_t)(t->onto_nodes);
419  return 0;
420 }
Here is the caller graph for this function:

◆ xmp_dist_stride()

int xmp_dist_stride ( xmp_desc_t  d,
int  dim 
)
410 {
412  return t->chunk[dim-1].par_stride;
413 }

◆ xmp_exit()

void xmp_exit ( int  status)
611  {
612  _XMP_finalize(true);
613  exit(status);
614 }
Here is the call graph for this function:

◆ xmp_finalize()

void xmp_finalize ( )
31 {
32  _XMP_finalize(false);
33 }
Here is the call graph for this function:

◆ xmp_finalize_mpi()

void xmp_finalize_mpi ( void  )
19 {}

◆ xmp_free()

void xmp_free ( xmp_desc_t  d)
605  {
606  if (((_XMP_array_t *)d)->is_allocated)
608 }
Here is the call graph for this function:

◆ xmp_get_mpi_comm()

MPI_Comm xmp_get_mpi_comm ( void  )
12 {
13  MPI_Comm *comm;
14  comm = _XMP_get_execution_nodes()->comm;
15  return *comm;
16 }

◆ xmp_init()

void xmp_init ( MPI_Comm  comm)
26 {
27  _XMP_init(1, NULL, comm);
28 }

◆ xmp_init_mpi()

void xmp_init_mpi ( int *  argc,
char ***  argv 
)
18 {}

◆ xmp_malloc()

void* xmp_malloc ( xmp_desc_t  d,
  ... 
)
539 {
540  _XMP_array_t *a = (_XMP_array_t *)d;
541  _XMP_ASSERT(a->dim == 1);
543  if (!t->is_fixed) _XMP_fatal("target template is not fixed");
544  a->is_allocated = t->is_owner;
545  int is_star[_XMP_N_MAX_DIM] = { 0 };
546  unsigned long long *acc[_XMP_N_MAX_DIM] = { NULL };
547 
548  va_list args;
549  va_start(args, d);
550  for (int i = 0; i < a->dim; i++){
551  int size = va_arg(args, int);
552  _XMP_array_info_t *ai = &(a->info[i]);
553  int tdim = ai->align_template_index;
554  ai->ser_upper = size - 1;
555  ai->ser_size = size;
556  acc[i] = ai->acc;
557 
558  if (tdim == _XMP_N_NO_ALIGN_TEMPLATE){
560  }
561  else {
562  _XMP_template_info_t *info = &(t->info[tdim]);
563  is_star[tdim] = 1;
564 
565  /* Now, normalize align_subscript and size */
566  size += (ai->align_subscript - info->ser_lower);
567  ai->align_subscript = info->ser_lower;
568 
569  switch (t->chunk[tdim].dist_manner){
572  break;
573  case _XMP_N_DIST_BLOCK:
574  _XMP_align_array_BLOCK(a, i, tdim, ai->align_subscript, ai->temp0);
575  break;
576  case _XMP_N_DIST_CYCLIC:
577  _XMP_align_array_CYCLIC(a, i, tdim, ai->align_subscript, ai->temp0);
578  break;
581  break;
582  case _XMP_N_DIST_GBLOCK:
583  _XMP_align_array_GBLOCK(a, i, tdim, ai->align_subscript, ai->temp0);
584  break;
585  default:
586  _XMP_fatal("unknown distribution manner");
587  return NULL;
588  }
590  }
591  }
592 
593  va_end(args);
594 
595  _XMP_init_array_comm2(a, is_star);
597 
598  void *array_addr;
599  _XMP_alloc_array2(&array_addr, a, 1, acc);
600 
601  return array_addr;
602 }
Here is the call graph for this function:

◆ xmp_node_num()

int xmp_node_num ( void  )
52 {
53  return _XMP_get_execution_nodes()->comm_rank + 1;
54 }
Here is the call graph for this function:

◆ xmp_nodes_comm()

int xmp_nodes_comm ( xmp_desc_t  d,
void **  comm 
)
483 {
484  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
485  *(void **)comm = (void *)n->comm;
486  return 0;
487 }

◆ xmp_nodes_equiv()

int xmp_nodes_equiv ( xmp_desc_t  d,
xmp_desc_t dn,
int  lb[],
int  ub[],
int  st[] 
)
489  {
490 
491  int i, ndims;
492  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
493 
494  *dn = (xmp_desc_t)(n->inherit_nodes);
495  if (*dn != NULL){
496  xmp_nodes_ndims(*dn, &ndims);
497 
498  for (i=0; i<ndims; i++){
499  lb[i]= n ->inherit_info[i].lower+1;
500  ub[i]= n ->inherit_info[i].upper+1;
501  st[i]= n ->inherit_info[i].stride;
502  }
503  return 0;
504 
505  }else{
506  return -1;
507  }
508 }
Here is the call graph for this function:

◆ xmp_nodes_index()

int xmp_nodes_index ( xmp_desc_t  d,
int  dim,
int *  index 
)
462 {
463  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
464  *index = n->info[dim-1].rank + 1;
465  return 0;
466 }

◆ xmp_nodes_ndims()

int xmp_nodes_ndims ( xmp_desc_t  d,
int *  ndims 
)
455 {
456  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
457  *ndims = n->dim;
458  return 0;
459 }
Here is the caller graph for this function:

◆ xmp_nodes_rank()

int xmp_nodes_rank ( xmp_desc_t  d,
int *  rank 
)
476 {
477  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
478  *rank = n->comm_rank + 1;
479  return 0;
480 }

◆ xmp_nodes_size()

int xmp_nodes_size ( xmp_desc_t  d,
int  dim,
int *  size 
)
469 {
470  _XMP_nodes_t *n = (_XMP_nodes_t *)d;
471  *size = n->info[dim-1].size;
472  return 0;
473 }
Here is the caller graph for this function:

◆ xmp_num_images()

int xmp_num_images ( void  )
47 {
48  return _XMP_get_execution_nodes()->comm_size;
49 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmp_num_nodes()

int xmp_num_nodes ( void  )
42 {
43  return _XMP_get_execution_nodes()->comm_size;
44 }
Here is the call graph for this function:

◆ xmp_sched_template_index()

void xmp_sched_template_index ( int *  local_start_index,
int *  local_end_index,
const int  global_start_index,
const int  global_end_index,
const int  step,
const xmp_desc_t  template,
const int  template_dim 
)
514 {
515  int tmp;
516  _XMP_template_chunk_t *chunk = &(((_XMP_template_t*)template)->chunk[template_dim]);
517 
518  switch(chunk->dist_manner){
519  case _XMP_N_DIST_BLOCK:
520  _XMP_sched_loop_template_BLOCK(global_start_index, global_end_index, step,
521  local_start_index, local_end_index, &tmp, template, template_dim);
522  break;
523  case _XMP_N_DIST_CYCLIC:
524  _XMP_sched_loop_template_CYCLIC(global_start_index, global_end_index, step,
525  local_start_index, local_end_index, &tmp, template, template_dim);
526  break;
528  _XMP_sched_loop_template_BLOCK_CYCLIC(global_start_index, global_end_index, step,
529  local_start_index, local_end_index, &tmp, template, template_dim);
530  break;
531  default:
532  _XMP_fatal("does not support distribution in xmp_sched_template_index()");
533  break;
534  }
535 }
Here is the call graph for this function:

◆ xmp_sort_down()

void xmp_sort_down ( xmp_desc_t  a_desc,
xmp_desc_t  b_desc 
)

◆ xmp_sort_up()

void xmp_sort_up ( xmp_desc_t  a_desc,
xmp_desc_t  b_desc 
)

◆ xmp_sync_all()

void xmp_sync_all ( const int *  status)

Execute sync_all()

1424 {
1425 #ifdef _XMP_GASNET
1427 #elif _XMP_FJRDMA
1429 #elif _XMP_UTOFU
1431 #elif _XMP_MPI3_ONESIDED
1433 #endif
1434 }

◆ xmp_sync_image()

void xmp_sync_image ( const int  image,
int *  status 
)

Execute sync_image()

1456 {
1457  xmp_sync_images(1, &image, status);
1458 }

◆ xmp_sync_images()

void xmp_sync_images ( const int  num,
int *  image_set,
int *  status 
)

Execute sync_images()

1440 {
1441 #ifdef _XMP_GASNET
1442  _XMP_gasnet_sync_images(num, image_set, status);
1443 #elif _XMP_FJRDMA
1444  _XMP_fjrdma_sync_images(num, image_set, status);
1445 #elif _XMP_UTOFU
1446  _XMP_utofu_sync_images(num, image_set, status);
1447 #elif _XMP_MPI3_ONESIDED
1448  _XMP_mpi_sync_images(num, image_set, status);
1449 #endif
1450 }

◆ xmp_sync_images_all()

void xmp_sync_images_all ( int *  status)

Execute sync_images_all()

1464 {
1465  _XMP_fatal("Not implement xmp_sync_images_all()");
1466 }

◆ xmp_sync_memory()

void xmp_sync_memory ( const int *  status)

Execute sync_memory()

1406 {
1407 #ifdef _XMP_GASNET
1409 #elif _XMP_FJRDMA
1411 #elif _XMP_UTOFU
1413 #elif _XMP_TCA
1415 #elif _XMP_MPI3_ONESIDED
1417 #endif
1418 }

◆ xmp_template_fixed()

int xmp_template_fixed ( xmp_desc_t  d,
int *  fixed 
)
331 {
333  *fixed = t->is_fixed;
334  return 0;
335 }

◆ xmp_template_gsize()

int xmp_template_gsize ( xmp_desc_t  d,
int  dim 
)
360 {
362  return t->info[dim-1].ser_size;
363 }

◆ xmp_template_lbound()

int xmp_template_lbound ( xmp_desc_t  d,
int  dim,
int *  lbound 
)
345 {
347  *lbound = t->info[dim-1].ser_lower;
348  return 0;
349 }

◆ xmp_template_lsize()

int xmp_template_lsize ( xmp_desc_t  d,
int  dim 
)
366 {
368  return t->chunk[dim-1].par_chunk_width;
369 }

◆ xmp_template_ndims()

int xmp_template_ndims ( xmp_desc_t  d,
int *  ndims 
)
338 {
340  *ndims = t->dim;
341  return 0;
342 }

◆ xmp_template_ubound()

int xmp_template_ubound ( xmp_desc_t  d,
int  dim,
int *  ubound 
)
352 {
354  *ubound = t->info[dim-1].ser_upper;
355  return 0;
356 
357 }

◆ xmp_wtick()

double xmp_wtick ( void  )
92 {
93  return MPI_Wtick();
94 }

◆ xmp_wtime()

double xmp_wtime ( void  )
87 {
88  return MPI_Wtime();
89 }

◆ xmpc_all_node_num()

int xmpc_all_node_num ( void  )
82 {
83  return _XMP_world_rank;
84 }

◆ xmpc_node_num()

int xmpc_node_num ( void  )
57 {
58  return _XMP_get_execution_nodes()->comm_rank;
59 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmpc_this_image()

int xmpc_this_image ( void  )
62 {
63  return _XMP_get_execution_nodes()->comm_rank;
64 }
Here is the call graph for this function:
_XMP_utofu_sync_all
void _XMP_utofu_sync_all(void)
Definition: xmp_coarray_utofu.c:975
_XMP_gasnet_sync_memory
void _XMP_gasnet_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_gasnet.c:830
_XMP_array_info_type::align_subscript
long long align_subscript
Definition: xmp_data_struct.h:246
_XMP_align_array_NOT_ALIGNED
void _XMP_align_array_NOT_ALIGNED(void *array, int array_index)
_XMP_barrier_EXEC
void _XMP_barrier_EXEC(void)
Definition: xmp_barrier.c:16
_XMP_nodes_info_type::size
int size
Definition: xmp_data_struct.h:32
_XMP_fjrdma_sync_all
void _XMP_fjrdma_sync_all()
Execute sync_all.
Definition: xmp_coarray_fjrdma.c:1350
_XMP_nodes_type::info
_XMP_nodes_info_t info[1]
Definition: xmp_data_struct.h:60
_XMP_template_type::info
_XMP_template_info_t info[1]
Definition: xmp_data_struct.h:115
_XMP_finalize
void _XMP_finalize(bool isFinalize)
Definition: xmp_runtime.c:73
_XMP_template_info_type::ser_size
unsigned long long ser_size
Definition: xmp_data_struct.h:74
_XMP_array_info_type::align_template_index
int align_template_index
Definition: xmp_data_struct.h:260
_XMP_utofu_sync_memory
void _XMP_utofu_sync_memory(void)
Definition: xmp_coarray_utofu.c:960
_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_fjrdma_sync_memory
void _XMP_fjrdma_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_fjrdma.c:1338
_XMP_array_info_type
Definition: xmp_data_struct.h:194
_XMP_nodes_type::inherit_nodes
struct _XMP_nodes_type * inherit_nodes
Definition: xmp_data_struct.h:57
_XMP_template_type::chunk
_XMP_template_chunk_t * chunk
Definition: xmp_data_struct.h:112
xmp_align_format
int xmp_align_format(xmp_desc_t d, int dim)
Definition: xmp_lib.c:256
_XMP_array_info_type::ser_upper
int ser_upper
Definition: xmp_data_struct.h:200
_XMP_world_size
int _XMP_world_size
Definition: xmp_world.c:8
xmp_align_template
int xmp_align_template(xmp_desc_t d, xmp_desc_t *dt)
Definition: xmp_lib.c:323
_XMP_array_info_type::shadow_type
int shadow_type
Definition: xmp_data_struct.h:248
_XMP_array_info_type::ser_size
int ser_size
Definition: xmp_data_struct.h:201
_XMP_mpi_sync_memory
void _XMP_mpi_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_mpi.c:542
_XMP_dealloc_array
void _XMP_dealloc_array(void *array_desc)
xmp_align_axis
int xmp_align_axis(xmp_desc_t d, int dim, int *axis)
Definition: xmp_lib.c:242
xmp_dist_nodes
int xmp_dist_nodes(xmp_desc_t d, xmp_desc_t *dn)
Definition: xmp_lib.c:415
_XMP_template_type::is_fixed
_Bool is_fixed
Definition: xmp_data_struct.h:104
_XMP_template_info_type
Definition: xmp_data_struct.h:70
_XMP_template_type::dim
int dim
Definition: xmp_data_struct.h:108
_XMP_align_local_idx
void _XMP_align_local_idx(long long int global_idx, int *local_idx, _XMP_array_t *array, int array_axis, int *rank)
Definition: xmp_gmove.c:1358
xmp_desc_t
void * xmp_desc_t
Definition: xmp.h:29
_XMP_nodes_type::comm_rank
int comm_rank
Definition: xmp_data_struct.h:52
_XMP_align_array_BLOCK
void _XMP_align_array_BLOCK(void *array, int array_index, int template_index, long long align_subscript, int *temp0)
_XMP_init
void _XMP_init(int argc, char **argv, MPI_Comm comm)
Definition: xmp_runtime.c:30
_XMP_template_chunk_type::par_chunk_width
unsigned long long par_chunk_width
Definition: xmp_data_struct.h:86
_XMP_world_rank
int _XMP_world_rank
Definition: xmp_world.c:9
_XMP_array_info_type::par_upper
int par_upper
Definition: xmp_data_struct.h:205
xmp_dist_format
int xmp_dist_format(xmp_desc_t d, int dim, int *format)
Definition: xmp_lib.c:371
_XMP_mpi_sync_all
void _XMP_mpi_sync_all()
Execute sync_all.
Definition: xmp_coarray_mpi.c:603
_XMP_template_type::onto_nodes
_XMP_nodes_t * onto_nodes
Definition: xmp_data_struct.h:111
_XMP_init_array_comm2
void _XMP_init_array_comm2(_XMP_array_t *array, int args[])
Definition: xmp_align.c:882
xmp_array_ndims
int xmp_array_ndims(xmp_desc_t d, int *ndims)
Definition: xmp_lib.c:96
_XMP_array_info_type::shadow_size_lo
int shadow_size_lo
Definition: xmp_data_struct.h:249
_XMP_array_type::align_template
_XMP_template_t * align_template
Definition: xmp_data_struct.h:312
_XMP_init_shadow_dim
void _XMP_init_shadow_dim(_XMP_array_t *array, int i, int type, int lo, int hi)
Definition: xmp_shadow.c:347
_XMP_array_info_type::align_manner
int align_manner
Definition: xmp_data_struct.h:197
_XMP_align_array_DUPLICATION
void _XMP_align_array_DUPLICATION(void *array, int array_index, int template_index, long long align_subscript)
_XMP_N_DIST_CYCLIC
#define _XMP_N_DIST_CYCLIC
Definition: xmp_constant.h:30
_XMP_nodes_inherit_info_type::stride
int stride
Definition: xmp_data_struct.h:25
_XMP_template_type
Definition: xmp_data_struct.h:98
_XMP_gasnet_sync_all
void _XMP_gasnet_sync_all()
Execute sync_all.
Definition: xmp_coarray_gasnet.c:846
_XMP_align_array_GBLOCK
void _XMP_align_array_GBLOCK(void *array, int array_index, int template_index, long long align_subscript, int *temp0)
_XMP_array_info_type::ser_lower
int ser_lower
Definition: xmp_data_struct.h:199
_XMP_nodes_type::inherit_info
_XMP_nodes_inherit_info_t * inherit_info
Definition: xmp_data_struct.h:59
_XMP_tca_sync_memory
void _XMP_tca_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_tca.c:177
_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_gasnet_sync_images
void _XMP_gasnet_sync_images(const int num, int image_set[num], int *status)
Execute sync images.
Definition: xmp_coarray_gasnet.c:1677
_XMP_template_chunk_type::onto_nodes_index
int onto_nodes_index
Definition: xmp_data_struct.h:92
_XMP_N_DIST_BLOCK_CYCLIC
#define _XMP_N_DIST_BLOCK_CYCLIC
Definition: xmp_constant.h:31
_XMP_array_info_type::local_lower
int local_lower
Definition: xmp_data_struct.h:209
_XMP_N_DIST_GBLOCK
#define _XMP_N_DIST_GBLOCK
Definition: xmp_constant.h:32
_XMP_init_array_nodes
void _XMP_init_array_nodes(void *array)
_XMP_N_DIST_DUPLICATION
#define _XMP_N_DIST_DUPLICATION
Definition: xmp_constant.h:28
_XMP_array_info_type::shadow_size_hi
int shadow_size_hi
Definition: xmp_data_struct.h:250
_XMP_array_type
Definition: xmp_data_struct.h:266
_XMP_N_NO_ALIGN_TEMPLATE
#define _XMP_N_NO_ALIGN_TEMPLATE
Definition: xmp_constant.h:23
_XMP_alloc_array2
void _XMP_alloc_array2(void **array_addr, _XMP_array_t *array_desc, int is_coarray, unsigned long long *acc[])
Definition: xmp_align.c:690
_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_array_type::type_size
size_t type_size
Definition: xmp_data_struct.h:274
_XMP_array_info_type::alloc_size
int alloc_size
Definition: xmp_data_struct.h:212
_XMP_N_ALIGN_CYCLIC
#define _XMP_N_ALIGN_CYCLIC
Definition: xmp_constant.h:38
_XMP_N_ALIGN_BLOCK
#define _XMP_N_ALIGN_BLOCK
Definition: xmp_constant.h:37
_XMP_N_ALIGN_DUPLICATION
#define _XMP_N_ALIGN_DUPLICATION
Definition: xmp_constant.h:36
_XMP_array_type::info
_XMP_array_info_t info[1]
Definition: xmp_data_struct.h:313
_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_ASSERT
#define _XMP_ASSERT(_flag)
Definition: xmp_internal.h:34
_XMP_mpi_sync_images
void _XMP_mpi_sync_images(const int num, const int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_mpi.c:1080
xmp_sync_images
void xmp_sync_images(const int num, int *image_set, int *status)
Execute sync_images()
Definition: xmp_coarray.c:1439
XMP_BLOCK
#define XMP_BLOCK
Definition: xmp.h:17
_XMP_nodes_inherit_info_type::lower
int lower
Definition: xmp_data_struct.h:23
_XMP_N_ALIGN_NOT_ALIGNED
#define _XMP_N_ALIGN_NOT_ALIGNED
Definition: xmp_constant.h:35
_XMP_align_array_CYCLIC
void _XMP_align_array_CYCLIC(void *array, int array_index, int template_index, long long align_subscript, int *temp0)
xmp_nodes_ndims
int xmp_nodes_ndims(xmp_desc_t d, int *ndims)
Definition: xmp_lib.c:454
_XMP_array_type::array_addr_p
void * array_addr_p
Definition: xmp_data_struct.h:279
_XMP_N_ALIGN_BLOCK_CYCLIC
#define _XMP_N_ALIGN_BLOCK_CYCLIC
Definition: xmp_constant.h:39
_XMP_nodes_type::comm
_XMP_comm_t * comm
Definition: xmp_data_struct.h:53
_XMP_array_type::dim
int dim
Definition: xmp_data_struct.h:272
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
_XMP_array_info_type::acc
unsigned long long * acc
Definition: xmp_data_struct.h:262
_XMP_align_array_BLOCK_CYCLIC
void _XMP_align_array_BLOCK_CYCLIC(void *array, int array_index, int template_index, long long align_subscript, int *temp0)
_XMP_array_info_type::dim_acc
unsigned long long dim_acc
Definition: xmp_data_struct.h:242
_XMP_array_info_type::par_size
int par_size
Definition: xmp_data_struct.h:207
_XMP_template_chunk_type::par_width
unsigned long long par_width
Definition: xmp_data_struct.h:82
_XMP_nodes_type::dim
int dim
Definition: xmp_data_struct.h:47
_XMP_nodes_type
Definition: xmp_data_struct.h:40
_XMP_array_info_type::temp0
int * temp0
Definition: xmp_data_struct.h:239
xmp_dist_axis
int xmp_dist_axis(xmp_desc_t d, int dim, int *axis)
Definition: xmp_lib.c:422
_XMP_N_MAX_DIM
#define _XMP_N_MAX_DIM
Definition: xmp_constant.h:6
_XMP_utofu_sync_images
void _XMP_utofu_sync_images(const int num, int *image_set, int *status)
Definition: xmp_coarray_utofu.c:1065
XMP_NOT_DISTRIBUTED
#define XMP_NOT_DISTRIBUTED
Definition: xmp.h:16
_XMP_fjrdma_sync_images
void _XMP_fjrdma_sync_images(const int num, int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_fjrdma.c:2251
_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_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_CYCLIC
#define XMP_CYCLIC
Definition: xmp.h:18
_XMP_template_chunk_type::mapping_array
long long * mapping_array
Definition: xmp_data_struct.h:88
_XMP_array_type::is_allocated
_Bool is_allocated
Definition: xmp_data_struct.h:270
_XMP_get_execution_nodes
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
_XMP_template_type::is_owner
_Bool is_owner
Definition: xmp_data_struct.h:106
_XMP_array_info_type::par_lower
int par_lower
Definition: xmp_data_struct.h:204
_XMP_nodes_inherit_info_type::upper
int upper
Definition: xmp_data_struct.h:24
xmp_nodes_size
int xmp_nodes_size(xmp_desc_t d, int dim, int *size)
Definition: xmp_lib.c:468
_XMP_array_info_type::local_upper
int local_upper
Definition: xmp_data_struct.h:210