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

Functions

void _XMP_utofu_atomic_define (int target_rank, _XMP_coarray_t *dst_desc, size_t dst_offset, int value, size_t elmt_size)
 
void _XMP_utofu_atomic_ref (int target_rank, _XMP_coarray_t *dst_desc, size_t dst_offset, int *value, size_t elmt_size)
 

Function Documentation

◆ _XMP_utofu_atomic_define()

void _XMP_utofu_atomic_define ( int  target_rank,
_XMP_coarray_t dst_desc,
size_t  dst_offset,
int  value,
size_t  elmt_size 
)
35 {
36  if( elmt_size != 4 ) {
37  _XMP_fatal("_XMP_utofu_atomic_define : invalid elmt_size");
38  }
39 
40  int ident_val = _xmp_utofu_num_of_puts;
41  unsigned long int post_flags;
42  post_flags = _XMP_UTOFU_COARRAY_PUT_POST_FLAGS;
43  uint64_t edata = _xmp_utofu_edata_flag_armw_puts;
44  uintptr_t cbvalue = ident_val;
45 
46  utofu_vcq_id_t rmt_vcq_id = _xmp_utofu_vcq_ids[target_rank];
47  enum utofu_armw_op armw_op = UTOFU_ARMW_OP_SWAP;
48  utofu_stadd_t rmt_stadd = dst_desc->stadds[target_rank] + elmt_size * dst_offset;
49 
50  uint32_t op_value = value;
51 
52  _xmp_utofu_num_of_puts++;
53  utofu_armw4(_xmp_utofu_vcq_hdl, rmt_vcq_id, armw_op, op_value, rmt_stadd,
54  edata, post_flags, (void *)cbvalue);
55  while( _xmp_utofu_num_of_puts != 0 )
56  _XMP_utofu_sync_memory_armw(edata, post_flags, cbvalue);
57 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_utofu_atomic_ref()

void _XMP_utofu_atomic_ref ( int  target_rank,
_XMP_coarray_t dst_desc,
size_t  dst_offset,
int *  value,
size_t  elmt_size 
)
62 {
63  if( elmt_size != 4 ) {
64  _XMP_fatal("_XMP_utofu_atomic_ref : invalid elmt_size");
65  }
66 
67  int ident_val = _xmp_utofu_num_of_gets;
68  unsigned long int post_flags;
69  post_flags = _XMP_UTOFU_COARRAY_GET_POST_FLAGS;
70  uint64_t edata = _xmp_utofu_edata_flag_armw_gets;
71  uintptr_t cbvalue = ident_val;
72 
73  utofu_vcq_id_t rmt_vcq_id = _xmp_utofu_vcq_ids[target_rank];
74  enum utofu_armw_op armw_op = UTOFU_ARMW_OP_OR;
75  utofu_stadd_t rmt_stadd = dst_desc->stadds[target_rank] + elmt_size * dst_offset;
76 
77  uint32_t op_value = 0;
78 
79  _xmp_utofu_num_of_gets++;
80  utofu_armw4(_xmp_utofu_vcq_hdl, rmt_vcq_id, armw_op, op_value, rmt_stadd,
81  edata, post_flags, (void *)cbvalue);
82  while( _xmp_utofu_num_of_gets != 0 )
83  *value = _XMP_utofu_sync_memory_armw(edata, post_flags, cbvalue);
84 }
Here is the call graph for this function:
Here is the caller graph for this function:
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42