#ifndef __cplusplus
-typedef int bool;
+typedef int gmx_bool;
#define TRUE 1
#define FALSE 0
#else
size_t bufsize; /* the size of the data to be transmitted */
tMPI_Datatype datatype; /* the data type */
- bool nonblock; /* whether the receiver is non-blocking */
+ gmx_bool nonblock; /* whether the receiver is non-blocking */
/* state, values from enum_envelope_state .
(there's a few busy-waits relying on this flag).
/* prev and next envelopes in the send/recv_envelope_list linked list */
struct envelope *prev,*next;
- bool send; /* whether this is a send envelope (if TRUE), or a receive
+ gmx_bool send; /* whether this is a send envelope (if TRUE), or a receive
envelope (if FALSE) */
#ifdef USE_SEND_RECV_COPY_BUFFER
- bool using_cb; /* whether a copy buffer is (going to be) used */
+ gmx_bool using_cb; /* whether a copy buffer is (going to be) used */
void* cb;/* the allocated copy buffer pointer */
#endif
/* the next and previous envelopes in the request list */
/* the request object for asynchronious operations. */
struct tmpi_req_
{
- bool finished; /* whether it's finished */
+ gmx_bool finished; /* whether it's finished */
struct envelope *ev; /* the envelope */
struct tmpi_thread *source; /* the message source (for receives) */
int tag; /* the tag */
int error; /* error code */
size_t transferred; /* the number of transferred bytes */
- bool cancelled; /* whether the transmission was canceled */
+ gmx_bool cancelled; /* whether the transmission was canceled */
struct tmpi_req_ *next,*prev; /* next,prev request in linked list,
used in the req_list, but also in
size_t *bufsize; /* array of number of bytes to send/recv */
#ifdef USE_COLLECTIVE_COPY_BUFFER
- bool using_cb; /* whether a copy buffer is (going to be) used */
+ gmx_bool using_cb; /* whether a copy buffer is (going to be) used */
tMPI_Atomic_t buf_readcount; /* Number of threads reading from buf
while using_cpbuf is true, but cpbuf
is still NULL. */
and the coll_env_thread is ready for re-use. */
tMPI_Event recv_ev; /* event associated with being a receiving thread. */
- bool *read_data; /* whether we read data from a specific thread. */
+ gmx_bool *read_data; /* whether we read data from a specific thread. */
};
/* Collective communications once sync. These run in parallel with
{
volatile int Ncol_init;
volatile int Ncol_destroy;
- volatile bool can_finish;
+ volatile gmx_bool can_finish;
volatile int *colors;
volatile int *keys;
};
tMPI_Op_fn *op_functions; /* array of op functions for this datatype */
int N_comp; /* number of components */
struct tmpi_datatype_component *comps; /* the components */
- bool committed; /* whether the data type is committed */
+ gmx_bool committed; /* whether the data type is committed */
};
/* just as a shorthand: */
typedef struct tmpi_datatype_ tmpi_dt;
/* check whether we're the main thread */
-bool tMPI_Is_master(void);
+gmx_bool tMPI_Is_master(void);
/* check whether the current process is in a group */
-bool tMPI_In_group(tMPI_Group group);
+gmx_bool tMPI_In_group(tMPI_Group group);
/* find the rank of a thread in a comm */
int tMPI_Comm_seek_rank(tMPI_Comm comm, struct tmpi_thread *th);