1
1

- Only minor white-space changes, to clean up

This commit was SVN r7843.
Этот коммит содержится в:
Rainer Keller 2005-10-24 10:36:16 +00:00
родитель f92185c43b
Коммит d6120d32d6
3 изменённых файлов: 119 добавлений и 119 удалений

Просмотреть файл

@ -30,6 +30,7 @@
#include "mca/gpr/gpr_types.h"
#include "mca/oob/oob_types.h"
#include "request/request.h"
#include "ompi/proc/proc.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
@ -75,11 +76,11 @@ OMPI_DECLSPEC extern opal_class_t ompi_communicator_t_class;
#define OMPI_COMM_ALLREDUCE_TAG -31080
/**
* Modes reqquired for accquiring the new comm-id.
* Modes required for acquiring the new comm-id.
* The first (INTER/INTRA) indicates whether the
* input comm was an inter/intra-comm, the second
* whether the new communicator will be an inter/intra
*comm
* comm
*/
#define OMPI_COMM_CID_INTRA 0x00000020
#define OMPI_COMM_CID_INTER 0x00000040
@ -163,12 +164,12 @@ struct ompi_communicator_t {
*/
static inline int ompi_comm_invalid(ompi_communicator_t* comm)
{
if ((NULL == comm) || (MPI_COMM_NULL == comm) ||
(comm->c_flags & OMPI_COMM_ISFREED ) ||
(OMPI_COMM_IS_INVALID(comm)) )
return true;
else
return false;
if ((NULL == comm) || (MPI_COMM_NULL == comm) ||
(comm->c_flags & OMPI_COMM_ISFREED ) ||
(OMPI_COMM_IS_INVALID(comm)) )
return true;
else
return false;
}
/**
@ -176,7 +177,7 @@ struct ompi_communicator_t {
*/
static inline int ompi_comm_rank(ompi_communicator_t* comm)
{
return comm->c_my_rank;
return comm->c_my_rank;
}
/**
@ -184,7 +185,7 @@ struct ompi_communicator_t {
*/
static inline int ompi_comm_size(ompi_communicator_t* comm)
{
return comm->c_local_group->grp_proc_count;
return comm->c_local_group->grp_proc_count;
}
/**
@ -193,38 +194,38 @@ struct ompi_communicator_t {
*/
static inline int ompi_comm_remote_size(ompi_communicator_t* comm)
{
if ( comm->c_flags & OMPI_COMM_INTER )
return comm->c_remote_group->grp_proc_count;
else
return 0;
if ( comm->c_flags & OMPI_COMM_INTER )
return comm->c_remote_group->grp_proc_count;
else
return 0;
}
/* return pointer to communicator associated with context id cid,
* No error checking is done*/
static inline ompi_communicator_t *ompi_comm_lookup(uint32_t cid)
{
/* array of pointers to communicators, indexed by context ID */
OMPI_DECLSPEC extern ompi_pointer_array_t ompi_mpi_communicators;
return (ompi_communicator_t*)ompi_pointer_array_get_item(&ompi_mpi_communicators, cid);
/* array of pointers to communicators, indexed by context ID */
OMPI_DECLSPEC extern ompi_pointer_array_t ompi_mpi_communicators;
return (ompi_communicator_t*)ompi_pointer_array_get_item(&ompi_mpi_communicators, cid);
}
static inline struct ompi_proc_t* ompi_comm_peer_lookup(ompi_communicator_t* comm, int peer_id)
{
#if OMPI_ENABLE_DEBUG
if(peer_id >= comm->c_remote_group->grp_proc_count) {
opal_output(0, "ompi_comm_lookup_peer: invalid peer index (%d)", peer_id);
return (struct ompi_proc_t *) NULL;
}
if(peer_id >= comm->c_remote_group->grp_proc_count) {
opal_output(0, "ompi_comm_lookup_peer: invalid peer index (%d)", peer_id);
return (struct ompi_proc_t *) NULL;
}
#endif
return comm->c_remote_group->grp_proc_pointers[peer_id];
return comm->c_remote_group->grp_proc_pointers[peer_id];
}
static inline bool ompi_comm_peer_invalid(ompi_communicator_t* comm, int peer_id)
{
if(peer_id < 0 || peer_id >= comm->c_remote_group->grp_proc_count) {
return true;
}
return false;
if(peer_id < 0 || peer_id >= comm->c_remote_group->grp_proc_count) {
return true;
}
return false;
}
@ -237,13 +238,13 @@ struct ompi_communicator_t {
/**
* extract the local group from a communicator
*/
int ompi_comm_group ( ompi_communicator_t *comm, ompi_group_t **group );
int ompi_comm_group (ompi_communicator_t *comm, ompi_group_t **group);
/**
* create a communicator based on a group
*/
int ompi_comm_create ( ompi_communicator_t* comm, ompi_group_t *group,
ompi_communicator_t** newcomm );
int ompi_comm_create (ompi_communicator_t* comm, ompi_group_t *group,
ompi_communicator_t** newcomm);
/**
@ -267,7 +268,7 @@ struct ompi_communicator_t {
*
* @
*/
int ompi_comm_split ( ompi_communicator_t *comm, int color, int key,
int ompi_comm_split (ompi_communicator_t *comm, int color, int key,
ompi_communicator_t** newcomm, bool pass_on_topo);
/**
@ -278,26 +279,26 @@ struct ompi_communicator_t {
* @param comm: input communicator
*
*/
int ompi_comm_dup ( ompi_communicator_t *comm, ompi_communicator_t **newcomm);
int ompi_comm_dup (ompi_communicator_t *comm, ompi_communicator_t **newcomm);
/**
* free a communicator
*/
int ompi_comm_free ( ompi_communicator_t **comm );
int ompi_comm_free (ompi_communicator_t **comm);
/**
* allocate a new communicator structure
* @param local_group_size
* @param remote_group_size
*
* this routine allocates the structure, the according local and
* This routine allocates the structure, the according local and
* remote groups, the proc-arrays in the local and remote group.
* It furthermore sets the fortran index correctly,
* and sets all other elements to zero.
*/
ompi_communicator_t* ompi_comm_allocate ( int local_group_size,
int remote_group_size );
ompi_communicator_t* ompi_comm_allocate (int local_group_size,
int remote_group_size);
/**
* allocate new communicator ID
@ -357,14 +358,12 @@ struct ompi_communicator_t {
orte_rml_tag_t tag,
int rsize);
/**
* This routine verifies, whether local_group and remote group are overlapping
* in intercomm_create
*/
int ompi_comm_overlapping_groups (int size, struct ompi_proc_t **lprocs,
int rsize, struct ompi_proc_t ** rprocs);
int ompi_comm_overlapping_groups (int size, struct ompi_proc_t ** lprocs,
int rsize, struct ompi_proc_t ** rprocs);
/**
* This is a routine determining whether the local or the
@ -431,7 +430,7 @@ struct ompi_communicator_t {
*/
orte_process_name_t *ompi_comm_get_rport (orte_process_name_t *port,
int send_first, struct ompi_proc_t *proc,
orte_rml_tag_t tag);
orte_rml_tag_t tag);
@ -487,10 +486,10 @@ struct ompi_communicator_t {
*/
struct ompi_comm_disconnect_obj {
ompi_communicator_t *comm;
int size;
ompi_request_t **reqs;
int buf;
ompi_communicator_t *comm;
int size;
ompi_request_t **reqs;
int buf;
};
typedef struct ompi_comm_disconnect_obj ompi_comm_disconnect_obj;

Просмотреть файл

@ -53,7 +53,7 @@ struct ompi_datatype_t;
typedef int32_t (*conversion_fct_t)( uint32_t count,
const void* from, uint32_t from_len, long from_extent,
void* to, uint32_t in_length, long to_extent );
void* to, uint32_t to_length, long to_extent );
typedef struct ompi_convertor_t ompi_convertor_t;
typedef int32_t (*convertor_advance_fct_t)( ompi_convertor_t* pConvertor,

Просмотреть файл

@ -70,6 +70,7 @@ OMPI_DECLSPEC extern ompi_pointer_array_t *ompi_datatype_f_to_c_table;
#define DT_FLAG_DATA_CPP 0x8000
#define DT_FLAG_DATA_FORTRAN 0xC000
#define DT_FLAG_DATA_LANGUAGE 0xC000
/*
* We should make the difference here between the predefined contiguous and non contiguous
* datatypes. The DT_FLAG_BASIC is held by all predefined contiguous datatypes.