25 int rank = comm->rank();
31 MPI_Iprobe(!rank, tag, comm->comm, &available, &status);
38 MPI_Get_count(&status, MPI_BYTE, &size);
39 if (size == (
int)b.
length()) {
42 MPI_Recv(b.
get(), size, MPI_BYTE, !rank, tag, comm->comm, &status);
47 readBuffer =
new char[size];
48 MPI_Recv(readBuffer, size, MPI_BYTE, !rank, tag, comm->comm, &status);
57 if (take>(
int)b.
length()) {
60 memcpy(b.
get(),readBuffer+readAt,take);
78 int rank = comm->rank();
81 MPI_Isend(b.
get(), size, MPI_BYTE, !rank , 0, comm->comm, &request );
89 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.