Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
caffe2::MPICommonWorldWrapper Class Reference

A simple wrapper over an MPI common world. More...

#include <mpi_common.h>

Public Member Functions

 MPICommonWorldWrapper (MPI_Comm src_comm=MPI_COMM_NULL, int color=0, int rank=-1)
 Creates a common world wrapper. More...
 
MPI_Comm comm () const
 Returns the common world held by the wrapper.
 
int size () const
 Returns the size of the world.
 
int rank () const
 Returns the rank of this process in the world.
 

Detailed Description

A simple wrapper over an MPI common world.

Definition at line 73 of file mpi_common.h.

Constructor & Destructor Documentation

◆ MPICommonWorldWrapper()

caffe2::MPICommonWorldWrapper::MPICommonWorldWrapper ( MPI_Comm  src_comm = MPI_COMM_NULL,
int  color = 0,
int  rank = -1 
)
inlineexplicit

Creates a common world wrapper.

The new common world is created by taking the existing communicator passed in as src_comm, and splitting it using the color and the rank specified. In default, we will split from Caffe2's global communicator, and use color 0 as well as rank implicitly given by src_comm. As a result, the default constructor basically creates a comm identical to the source comm world.

Definition at line 85 of file mpi_common.h.


The documentation for this class was generated from the following file: