问题
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.
来源:https://stackoverflow.com/questions/43263598/sending-bitset-with-mpi