Commit 7e179a85 authored by James Dinan's avatar James Dinan
Browse files

[svn-r10531] Refactored struct and enum naming to MPICH style

Updated RMA code to remove trailing "_e" and "_s" on enum and struct type
names to match the MPICH style.

Reviewer: goodell
parent 7ee045ee
......@@ -317,7 +317,7 @@ static const MPI_Datatype mpich_mpi_datatype_null MPICH_ATTR_TYPE_TAG_MUST_BE_NU
#define MPI_KEYVAL_INVALID 0x24000000
/* MPI-3 window flavors */
typedef enum MPIR_Win_flavor_e {
typedef enum MPIR_Win_flavor {
MPI_WIN_FLAVOR_CREATE = 1,
MPI_WIN_FLAVOR_ALLOCATE = 2,
MPI_WIN_FLAVOR_DYNAMIC = 3,
......@@ -325,7 +325,7 @@ typedef enum MPIR_Win_flavor_e {
} MPIR_Win_flavor_t;
/* MPI-3 window consistency models */
typedef enum MPIR_Win_model_e {
typedef enum MPIR_Win_model {
MPI_WIN_SEPARATE = 1,
MPI_WIN_UNIFIED = 2
} MPIR_Win_model_t;
......
......@@ -1117,7 +1117,7 @@ int MPIDI_CH3U_Comm_FinishPending( MPID_Comm * );
* which can optionally override any defaults already set by CH3.
*/
typedef struct MPIDI_CH3U_Win_fns_s {
typedef struct {
int (*create)(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *, MPID_Win **);
int (*allocate)(MPI_Aint, int, MPID_Info *, MPID_Comm *, void *, MPID_Win **);
int (*allocate_shared)(MPI_Aint, int, MPID_Info *, MPID_Comm *, void **, MPID_Win **);
......
......@@ -182,26 +182,26 @@ typedef struct MPIDI_VC * MPID_VCR;
# define MPIDI_REQUEST_SEQNUM
#endif
enum MPIDI_CH3_Lock_states_e {
enum MPIDI_CH3_Lock_states {
MPIDI_CH3_WIN_LOCK_NONE = 0,
MPIDI_CH3_WIN_LOCK_REQUESTED,
MPIDI_CH3_WIN_LOCK_GRANTED,
MPIDI_CH3_WIN_LOCK_FLUSH
};
enum MPIDI_Win_info_arv_vals_accumulate_ordering_e {
enum MPIDI_Win_info_arv_vals_accumulate_ordering {
MPIDI_ACC_ORDER_RAR = 1,
MPIDI_ACC_ORDER_RAW = 2,
MPIDI_ACC_ORDER_WAR = 4,
MPIDI_ACC_ORDER_WAW = 8
};
enum MPIDI_Win_info_arg_vals_accumulate_ops_e {
enum MPIDI_Win_info_arg_vals_accumulate_ops {
MPIDI_ACC_OPS_SAME_OP,
MPIDI_ACC_OPS_SAME_OP_NO_OP
};
struct MPIDI_Win_info_args_s {
struct MPIDI_Win_info_args {
int no_locks; /* valid flavor = all */
int accumulate_ordering;
int accumulate_ops;
......@@ -209,10 +209,10 @@ struct MPIDI_Win_info_args_s {
int alloc_shared_noncontig; /* valid flavor = allocate shared */
};
struct MPIDI_Win_target_state_s {
struct MPIDI_RMA_Op_s *rma_ops_list; \
struct MPIDI_Win_target_state {
struct MPIDI_RMA_Op *rma_ops_list; \
/* list of outstanding RMA operations */ \
volatile enum MPIDI_CH3_Lock_states_e remote_lock_state; \
volatile enum MPIDI_CH3_Lock_states remote_lock_state; \
/* Indicates the state of the target \
process' "lock" for passive target \
RMA. */ \
......@@ -242,8 +242,8 @@ struct MPIDI_Win_target_state_s {
that this process has \
completed as target */ \
MPI_Aint *sizes; /* array of sizes of all windows */ \
struct MPIDI_Win_info_args_s info_args; \
struct MPIDI_Win_target_state_s *targets; \
struct MPIDI_Win_info_args info_args; \
struct MPIDI_Win_target_state *targets; \
#ifdef MPIDI_CH3_WIN_DECL
#define MPID_DEV_WIN_DECL \
......
......@@ -8,7 +8,7 @@
#include "mpl_utlist.h"
typedef enum MPIDI_RMA_Op_type_e {
typedef enum MPIDI_RMA_Op_type {
MPIDI_RMA_PUT = 23,
MPIDI_RMA_GET = 24,
MPIDI_RMA_ACCUMULATE = 25,
......@@ -21,12 +21,12 @@ typedef enum MPIDI_RMA_Op_type_e {
/* Special case RMA operations */
enum MPIDI_RMA_Datatype_e {
enum MPIDI_RMA_Datatype {
MPIDI_RMA_DATATYPE_BASIC = 50,
MPIDI_RMA_DATATYPE_DERIVED = 51
};
enum MPID_Lock_state_e {
enum MPID_Lock_state {
MPID_LOCK_NONE = 0,
MPID_LOCK_SHARED_ALL = 1
};
......@@ -54,9 +54,9 @@ typedef struct MPIDI_RMA_dtype_info { /* for derived datatypes */
} MPIDI_RMA_dtype_info;
/* for keeping track of RMA ops, which will be executed at the next sync call */
typedef struct MPIDI_RMA_Op_s {
struct MPIDI_RMA_Op_s *prev; /* pointer to next element in list */
struct MPIDI_RMA_Op_s *next; /* pointer to next element in list */
typedef struct MPIDI_RMA_Op {
struct MPIDI_RMA_Op *prev; /* pointer to next element in list */
struct MPIDI_RMA_Op *next; /* pointer to next element in list */
/* FIXME: It would be better to setup the packet that will be sent, at
least in most cases (if, as a result of the sync/ops/sync sequence,
a different packet type is needed, it can be extracted from the
......
......@@ -280,8 +280,8 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
(*win_ptr)->my_pt_rma_puts_accs = 0;
/* Initialize the passive target lock state */
MPIU_CHKPMEM_MALLOC((*win_ptr)->targets, struct MPIDI_Win_target_state_s *,
sizeof(struct MPIDI_Win_target_state_s)*MPIR_Comm_size(win_comm_ptr),
MPIU_CHKPMEM_MALLOC((*win_ptr)->targets, struct MPIDI_Win_target_state *,
sizeof(struct MPIDI_Win_target_state)*MPIR_Comm_size(win_comm_ptr),
mpi_errno, "RMA target states array");
for (i = 0; i < MPIR_Comm_size(win_comm_ptr); i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment