c++ - 可以分发或并行处理顺序程序吗?

标签 c++ distributed parallel-processing

在 C++ 中,我编写了一个数学程序(用于扩散限制聚合),其中计算的每个新点都取决于前面的所有点。 是否可以让这样的程序以并行或分布式的方式工作以提高计算速度? 如果是这样,我需要研究对代码进行哪些类型的修改?

编辑:我的源代码可在... http://www.bitbucket.org/damigu78/brownian-motion/downloads/ 文件名为 DLA_full3D.cpp 如果需要的话,我不介意大量重写。毕竟,我想学习如何去做。

最佳答案

如果您的算法基本上是顺序的,您就不能从根本上做到这一点。

您使用的算法是什么?

编辑:谷歌搜索“扩散限制聚合算法并行”引导我 here ,引述如下:

DLA, on the other hand, has been shown [9,10] to belong to the class of inherently sequential or, more formally, P-complete problems. Therefore, it is unlikely that DLA clusters can be sampled in parallel in polylog time when restricted to a number of processors polynomial in the system size.

所以你的问题的答案是“所有迹象都表明没有”。

关于c++ - 可以分发或并行处理顺序程序吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2464629/

相关文章:

c++ - 使用 Xlib 在 Linux 上绘制图像问题

c++ - 使用 C++ 编写的应用程序的 64 个连接限制 **帮助**

c++ - boost 序列化多态性问题

github - GitHub 如何托管源代码?

architecture - Google的分布式监管模型的体系结构

c# - 如果我等待一个已经在运行或运行的任务,会发生什么?

C++:如何实现(类似于)JSON

ruby-on-rails - Sidekiq - 防止工作人员在特定机器上执行

r - 在 R 中的 foreach 循环中打印输出

node.js - CasperJS,与测试框架并行浏览