geometry.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:gmes 作者: aitatanit 项目源码 文件源码
def bcast(self, obj=None, root=None):
        """Same with the Broadcast but, it handles for unknown root among 
        the nodes.

        """
        size = self.cart_comm.Get_size()
        if size == 1:
            return obj

        if root is None:
            obj = self.cart_comm.recv(source = MPI.ANY_SOURCE)
        else:
            for dest in xrange(size):
                if dest != root:
                    self.cart_comm.send(obj, dest)

        return obj
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号