add interface for getting an ompi_proc_t from a group, similar to the
ompi_comm_peer_lookup function for communicators This commit was SVN r15365.
Этот коммит содержится в:
родитель
cb2bc19f07
Коммит
82c8d224d6
@ -135,6 +135,19 @@ static inline int ompi_group_rank(ompi_group_t *group)
|
||||
}
|
||||
|
||||
|
||||
static inline struct ompi_proc_t* ompi_group_peer_lookup(ompi_group_t *group, int peer_id)
|
||||
{
|
||||
#if OMPI_ENABLE_DEBUG
|
||||
if (peer_id >= group->grp_proc_count) {
|
||||
opal_output(0, "ompi_group_lookup_peer: invalid peer index (%d)", peer_id);
|
||||
return (struct ompi_proc_t *) NULL;
|
||||
}
|
||||
#endif
|
||||
return group->grp_proc_pointers[peer_id];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set group rank in the input group structure
|
||||
*
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user