22 int rank = comm->rank();
29 MPI_Iprobe(!rank, tag, comm->comm, &available, &status);
37 MPI_Get_count(&status, MPI_BYTE, &size);
38 if (size == (
int)b.
length()) {
41 MPI_Recv(b.
get(), size, MPI_BYTE, !rank, tag, comm->comm, &status);
46 readBuffer =
new char[size];
47 MPI_Recv(readBuffer, size, MPI_BYTE, !rank, tag, comm->comm, &status);
56 if (take>(
int)b.
length()) {
59 memcpy(b.
get(),readBuffer+readAt,take);
77 int rank = comm->rank();
80 MPI_Isend(b.
get(), size, MPI_BYTE, !rank , 0, comm->comm, &request );
88 MPI_Test(&request, &flag, &status);
const yarp::os::LogComponent & MPI_CARRIER()
ssize_t read(yarp::os::Bytes &b) override=0
Read and return a single byte.
void write(const yarp::os::Bytes &b) override=0
A simple abstraction for a block of bytes.
#define yCDebug(component,...)
void yield()
The calling thread releases its remaining quantum upon calling this function.
An interface to the operating system, including Port based communication.