使用MPI发送位集 [英] sending bitset with MPI

查看:89
本文介绍了使用MPI发送位集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是无需转换即可从位集类发送/接收位的有效方法.可以使用MPI_BYTE吗?

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

如果是这样,对于要容纳这些位的数组,定义为什么容器呢? 如果不可能,那么转换为ulong或字符串更有效?

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?

推荐答案

将其转换为布尔"数组并由MPI_BYTE发送,此方法适用于群集.

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

这篇关于使用MPI发送位集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆