sending bitset with MPI

2019-09-14 16:26发布

问题:

What is an efficient way to send/receive bits from bitset class without conversion. Is it possible to use MPI_BYTE?

If so, what to define as container for the array that is going to hold the bits? If this is not possible, which conversion is more efficient, conversion to ulong or to strings?

回答1:

Convert it to array of "bool" and send by MPI_BYTE, this method works on cluster.