15 MPI_Bcast(&cmd, 1, MPI_INT, 0,comm->comm);
33 MPI_Bcast(&length, 1, MPI_INT, 0,comm->comm);
34 char* remote =
new char[length];
35 MPI_Bcast(remote, length, MPI_CHAR, 0,comm->comm);
36 terminate = !strcmp(remote, name.c_str());
37 yCDebug(
MPI_CARRIER,
"[MpiBcastStream @ %s] Got disconnect : %s => %d", name.c_str(), remote, terminate);
39 comm->disconnect(terminate);
59 MPI_Bcast(&size, 1, MPI_INT, 0,comm->comm);
65 if ((
size_t)size == b.
length()) {
68 MPI_Bcast(b.
get(), size, MPI_BYTE, 0, comm->comm);
73 readBuffer =
new char[size];
74 MPI_Bcast(readBuffer, size, MPI_BYTE, 0, comm->comm);
83 if (take>(
int)b.
length()) {
86 memcpy(b.
get(),readBuffer+readAt,take);
104 MPI_Bcast(&size, 1, MPI_INT, 0, comm->comm );
105 MPI_Bcast((
void*)b.
get(), size, MPI_BYTE, 0, comm->comm );
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,...)
An interface to the operating system, including Port based communication.