25 #include "ompi_config.h"
31 #include "ompi/info/info.h"
32 #include "ompi/communicator/communicator.h"
39 #define OMPI_WIN_FREED 0x00000001
40 #define OMPI_WIN_INVALID 0x00000002
41 #define OMPI_WIN_NO_LOCKS 0x00000004
44 #define OMPI_WIN_ACCESS_EPOCH 0x00000001
45 #define OMPI_WIN_EXPOSE_EPOCH 0x00000002
46 #define OMPI_WIN_FENCE 0x00000010
47 #define OMPI_WIN_POSTED 0x00000020
48 #define OMPI_WIN_STARTED 0x00000040
49 #define OMPI_WIN_LOCK_ACCESS 0x00000080
58 char w_name[MPI_MAX_OBJECT_NAME];
100 #define PREDEFINED_WIN_PAD (sizeof(void*) * 64)
104 char padding[PREDEFINED_WIN_PAD -
sizeof(
ompi_win_t)];
110 int ompi_win_init(
void);
111 int ompi_win_finalize(
void);
113 int ompi_win_create(
void *base,
size_t size,
int disp_unit,
119 OMPI_DECLSPEC
int ompi_win_set_name(
ompi_win_t *win,
char *win_name);
120 OMPI_DECLSPEC
int ompi_win_get_name(
ompi_win_t *win,
char *win_name,
int *length);
127 static inline int ompi_win_invalid(
ompi_win_t *win) {
129 MPI_WIN_NULL == win ||
130 (OMPI_WIN_INVALID & win->w_flags) ||
131 (OMPI_WIN_FREED & win->w_flags)) {
138 static inline int ompi_win_peer_invalid(
ompi_win_t *win,
int peer) {
143 static inline int ompi_win_rank(
ompi_win_t *win) {
147 static inline bool ompi_win_allow_locks(
ompi_win_t *win) {
148 return (0 == (win->w_flags & OMPI_WIN_NO_LOCKS));
151 static inline int16_t ompi_win_get_mode(
ompi_win_t *win) {
152 int16_t mode = win->
w_mode;
157 static inline void ompi_win_set_mode(
ompi_win_t *win, int16_t mode) {
162 static inline void ompi_win_append_mode(
ompi_win_t *win, int16_t mode) {
167 static inline void ompi_win_remove_mode(
ompi_win_t *win,
175 static inline bool ompi_win_access_epoch(
ompi_win_t *win) {
176 int16_t mode = ompi_win_get_mode(win);
177 return (0 != (OMPI_WIN_ACCESS_EPOCH & mode) ?
true :
false);
181 static inline bool ompi_win_exposure_epoch(
ompi_win_t *win) {
182 int16_t mode = ompi_win_get_mode(win);
183 return (0 != (OMPI_WIN_EXPOSE_EPOCH & mode) ?
true :
false);
189 static inline bool ompi_win_comm_allowed(
ompi_win_t *win) {
190 int16_t mode = ompi_win_get_mode(win);
191 return (0 != (OMPI_WIN_ACCESS_EPOCH & mode || OMPI_WIN_FENCE & mode) ?
true :
false);
OSC module instance.
Definition: osc.h:269
Definition: opal_hash_table.h:42
dynamic pointer array
Definition: opal_pointer_array.h:45
void opal_atomic_rmb(void)
Read memory barrier.
Back-end type for MPI_Errorhandler.
Definition: errhandler.h:108
Definition: mutex_unix.h:53
volatile uint16_t w_mode
Current epoch / mode (access, expose, lock, etc.).
Definition: win.h:87
int grp_proc_count
number of processes in group
Definition: group.h:81
One-sided Communication interface.
int grp_my_rank
rank in group
Definition: group.h:82
A hash table that may be indexed with either fixed length (e.g.
Group structure Currently we have four formats for storing the process pointers that are members of t...
Definition: group.h:79
Base object.
Definition: opal_object.h:182
void opal_atomic_wmb(void)
Write memory barrier.
Infrastructure for MPI group support.
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
Definition: communicator.h:118
ompi_errhandler_type_t
Enum used to describe what kind MPI object an error handler is used for.
Definition: errhandler.h:84
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236