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

Functions

void _XMP_lock_0 (_XMP_coarray_t *c, const unsigned int offset, void *lock_obj)
 Wrapper function of executing Lock using local coarray (#pragma xmp lock(lockobj[offset])) More...
 
void _XMP_lock_1 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int rank)
 Wrapper function of executing Lock using 1-dim coarray (#pragma xmp lock(lockobj[offset]:[rank])) More...
 
void _XMP_lock_2 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1)
 Wrapper function of executing Lock using 2-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1])) More...
 
void _XMP_lock_3 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2)
 Wrapper function of executing Lock using 3-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2])) More...
 
void _XMP_lock_4 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3)
 Wrapper function of executing Lock using 4-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3])) More...
 
void _XMP_lock_5 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4)
 Wrapper function of executing Lock using 5-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4])) More...
 
void _XMP_lock_6 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5)
 Wrapper function of executing Lock using 6-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5])) More...
 
void _XMP_lock_7 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5, const unsigned int e6)
 Wrapper function of executing Lock using 7-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5][e6])) More...
 
void _XMP_unlock (_XMP_coarray_t *c, const unsigned int offset, const unsigned int rank)
 Wrapper function of executing Unlock. More...
 
void _XMP_unlock_0 (_XMP_coarray_t *c, const unsigned int offset, void *lock_obj)
 Wrapper function of executing Lock using local coarray (#pragma xmp lock(lockobj[offset])) More...
 
void _XMP_unlock_1 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int rank)
 Wrapper function of executing Lock using 1-dim coarray (#pragma xmp lock(lockobj[offset]:[rank])) More...
 
void _XMP_unlock_2 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1)
 Wrapper function of executing Lock using 2-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1])) More...
 
void _XMP_unlock_3 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2)
 Wrapper function of executing Lock using 3-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2])) More...
 
void _XMP_unlock_4 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3)
 Wrapper function of executing Lock using 4-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3])) More...
 
void _XMP_unlock_5 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4)
 Wrapper function of executing Lock using 5-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4])) More...
 
void _XMP_unlock_6 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5)
 Wrapper function of executing Lock using 6-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5])) More...
 
void _XMP_unlock_7 (_XMP_coarray_t *c, const unsigned int offset, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5, const unsigned int e6)
 Wrapper function of executing Lock using 7-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5][e6])) More...
 
void _XMP_lock_initialize_1 (void *addr, const unsigned int e0)
 Wrapper function of initializing 1-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_2 (void *addr, const unsigned int e0, const unsigned int e1)
 Wrapper function of initializing 2-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_3 (void *addr, const unsigned int e0, const unsigned int e1, const unsigned int e2)
 Wrapper function of initializing 3-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_4 (void *addr, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3)
 Wrapper function of initializing 4-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_5 (void *addr, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4)
 Wrapper function of initializing 5-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_6 (void *addr, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5)
 Wrapper function of initializing 6-dim array Lock object (e.g. More...
 
void _XMP_lock_initialize_7 (void *addr, const unsigned int e0, const unsigned int e1, const unsigned int e2, const unsigned int e3, const unsigned int e4, const unsigned int e5, const unsigned int e6)
 Wrapper function of initializing 7-dim array Lock object (e.g. More...
 

Function Documentation

◆ _XMP_lock_0()

void _XMP_lock_0 ( _XMP_coarray_t c,
const unsigned int  offset,
void *  lock_obj 
)

Wrapper function of executing Lock using local coarray (#pragma xmp lock(lockobj[offset]))

21 {
22  _XMP_lock(c, offset, _XMP_world_rank);
23 }

◆ _XMP_lock_1()

void _XMP_lock_1 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  rank 
)

Wrapper function of executing Lock using 1-dim coarray (#pragma xmp lock(lockobj[offset]:[rank]))

29 {
30  _XMP_lock(c, offset, rank);
31 }

◆ _XMP_lock_2()

void _XMP_lock_2 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1 
)

Wrapper function of executing Lock using 2-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1]))

37 {
38  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1;
39  _XMP_lock(c, offset, rank);
40 }

◆ _XMP_lock_3()

void _XMP_lock_3 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2 
)

Wrapper function of executing Lock using 3-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2]))

47 {
48  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2;
49  _XMP_lock(c, offset, rank);
50 }

◆ _XMP_lock_4()

void _XMP_lock_4 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3 
)

Wrapper function of executing Lock using 4-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3]))

57 {
58  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
59  c->distance_of_image_elmts[3] * e3;
60  _XMP_lock(c, offset, rank);
61 }

◆ _XMP_lock_5()

void _XMP_lock_5 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4 
)

Wrapper function of executing Lock using 5-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4]))

68 {
69  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
70  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4;
71  _XMP_lock(c, offset, rank);
72 }

◆ _XMP_lock_6()

void _XMP_lock_6 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5 
)

Wrapper function of executing Lock using 6-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5]))

79 {
80  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
81  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4 + c->distance_of_image_elmts[5] * e5;
82  _XMP_lock(c, offset, rank);
83 }

◆ _XMP_lock_7()

void _XMP_lock_7 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5,
const unsigned int  e6 
)

Wrapper function of executing Lock using 7-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5][e6]))

91 {
92  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
93  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4 + c->distance_of_image_elmts[5] * e5 +
94  c->distance_of_image_elmts[6] * e6;
95  _XMP_lock(c, offset, rank);
96 }

◆ _XMP_lock_initialize_1()

void _XMP_lock_initialize_1 ( void *  addr,
const unsigned int  e0 
)

Wrapper function of initializing 1-dim array Lock object (e.g.

xmp_lock_t A[e0];)

208 {
209  _xmp_lock_initialize(addr, e0);
210 }

◆ _XMP_lock_initialize_2()

void _XMP_lock_initialize_2 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1 
)

Wrapper function of initializing 2-dim array Lock object (e.g.

xmp_lock_t A[e0][e1];)

216 {
217  _xmp_lock_initialize(addr, e0*e1);
218 }

◆ _XMP_lock_initialize_3()

void _XMP_lock_initialize_3 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2 
)

Wrapper function of initializing 3-dim array Lock object (e.g.

xmp_lock_t A[e0][e1][e2];)

224 {
225  _xmp_lock_initialize(addr, e0*e1*e2);
226 }

◆ _XMP_lock_initialize_4()

void _XMP_lock_initialize_4 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3 
)

Wrapper function of initializing 4-dim array Lock object (e.g.

xmp_lock_t A[e0][e1][e2][e3];)

233 {
234  _xmp_lock_initialize(addr, e0*e1*e2*e3);
235 }

◆ _XMP_lock_initialize_5()

void _XMP_lock_initialize_5 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4 
)

Wrapper function of initializing 5-dim array Lock object (e.g.

xmp_lock_t A[e0][e1][e2][e3][e4];)

242 {
243  _xmp_lock_initialize(addr, e0*e1*e2*e3*e4);
244 }

◆ _XMP_lock_initialize_6()

void _XMP_lock_initialize_6 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5 
)

Wrapper function of initializing 6-dim array Lock object (e.g.

xmp_lock_t A[e0][e1][e2][e3][e4][e5];)

251 {
252  _xmp_lock_initialize(addr, e0*e1*e2*e3*e4*e5);
253 }

◆ _XMP_lock_initialize_7()

void _XMP_lock_initialize_7 ( void *  addr,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5,
const unsigned int  e6 
)

Wrapper function of initializing 7-dim array Lock object (e.g.

xmp_lock_t A[e0][e1][e2][e3][e4][e5][e6];)

260 {
261  _xmp_lock_initialize(addr, e0*e1*e2*e3*e4*e5*e6);
262 }

◆ _XMP_unlock()

void _XMP_unlock ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  rank 
)

Wrapper function of executing Unlock.

The second argument "offset" is a distance from beginning address of lock object. e.g. xmp_lock_t lockobj[10][10]; #pragma xmp unlock(lockobj[3][2]:[x]) -> offset = 32

104 {
105 #ifdef _XMP_GASNET
106  _xmp_gasnet_unlock(c, offset*sizeof(xmp_lock_t), rank);
107 #else
108  _XMP_fatal("Cannt use unlock Function");
109 #endif
110 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_unlock_0()

void _XMP_unlock_0 ( _XMP_coarray_t c,
const unsigned int  offset,
void *  lock_obj 
)

Wrapper function of executing Lock using local coarray (#pragma xmp lock(lockobj[offset]))

116 {
117  _XMP_unlock(c, offset, _XMP_world_rank);
118 }
Here is the call graph for this function:

◆ _XMP_unlock_1()

void _XMP_unlock_1 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  rank 
)

Wrapper function of executing Lock using 1-dim coarray (#pragma xmp lock(lockobj[offset]:[rank]))

124 {
125  _XMP_unlock(c, offset, rank);
126 }
Here is the call graph for this function:

◆ _XMP_unlock_2()

void _XMP_unlock_2 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1 
)

Wrapper function of executing Lock using 2-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1]))

132 {
133  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1;
134  _XMP_unlock(c, offset, rank);
135 }
Here is the call graph for this function:

◆ _XMP_unlock_3()

void _XMP_unlock_3 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2 
)

Wrapper function of executing Lock using 3-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2]))

142 {
143  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2;
144  _XMP_unlock(c, offset, rank);
145 }
Here is the call graph for this function:

◆ _XMP_unlock_4()

void _XMP_unlock_4 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3 
)

Wrapper function of executing Lock using 4-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3]))

152 {
153  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
154  c->distance_of_image_elmts[3] * e3;
155  _XMP_unlock(c, offset, rank);
156 }
Here is the call graph for this function:

◆ _XMP_unlock_5()

void _XMP_unlock_5 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4 
)

Wrapper function of executing Lock using 5-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4]))

162 {
163  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
164  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4;
165  _XMP_unlock(c, offset, rank);
166 }
Here is the call graph for this function:

◆ _XMP_unlock_6()

void _XMP_unlock_6 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5 
)

Wrapper function of executing Lock using 6-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5]))

173 {
174  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
175  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4 + c->distance_of_image_elmts[5] * e5;
176  _XMP_unlock(c, offset, rank);
177 }
Here is the call graph for this function:

◆ _XMP_unlock_7()

void _XMP_unlock_7 ( _XMP_coarray_t c,
const unsigned int  offset,
const unsigned int  e0,
const unsigned int  e1,
const unsigned int  e2,
const unsigned int  e3,
const unsigned int  e4,
const unsigned int  e5,
const unsigned int  e6 
)

Wrapper function of executing Lock using 7-dim coarray (#pragma xmp lock(lockobj[offset]:[e0][e1][e2][e3][e4][e5][e6]))

185 {
186  unsigned int rank = e0 + c->distance_of_image_elmts[1] * e1 + c->distance_of_image_elmts[2] * e2 +
187  c->distance_of_image_elmts[3] * e3 + c->distance_of_image_elmts[4] * e4 + c->distance_of_image_elmts[5] * e5 +
188  c->distance_of_image_elmts[6] * e6;
189  _XMP_unlock(c, offset, rank);
190 }
Here is the call graph for this function:
_xmp_gasnet_unlock
void _xmp_gasnet_unlock(_XMP_coarray_t *c, const unsigned int offset, const unsigned int target_rank)
Definition: xmp_lock_unlock_gasnet.c:98
_XMP_unlock
void _XMP_unlock(_XMP_coarray_t *c, const unsigned int offset, const unsigned int rank)
Wrapper function of executing Unlock.
Definition: xmp_lock_unlock.c:103
xmp_coarray::distance_of_image_elmts
int * distance_of_image_elmts
Definition: xmp_data_struct.h:357
_XMP_world_rank
int _XMP_world_rank
Definition: xmp_world.c:9
xmp_lock
Definition: xmp_lock.h:3
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42