关于并行化应用程序的建议?
我必须为我的大学项目并行化一些 C++ 应用程序。但是,我想不出任何不是很大并且可以并行化的应用程序。我想听听你们的建议。
请建议我一些可以并行化的串行应用程序。请指出一些链接,我可以在其中获取一些(不是很大)应用程序的代码,然后可以并行化。
谢谢
I have to parallelize some c++ application for my college project. But, I could not think of any application that is not very huge and can be parallelizes. I would like suggestions from you guys.
Please suggest me some serial application that I can parallelize. Please point me to some link where I can get code for some (not very huge) application that I can then parallelize.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
做一些傅里叶变换。有无数充分的理由去做这件事,而且它可以并行化。伊迪丝提醒我,如果傅里叶太复杂,请进行离散余弦变换。更容易编码。只需谷歌“DCT”,您就会找到示例和解释。
Do some Fourier-Transformation. There are gazillion good reasons to do one and it can be parallelized. Edith reminded me that if a Fourier is too complicated, do a Discrete Cosine Transform. Much easier to code. Just google "DCT" and you will find examples and explanations.
简单的生命游戏或 DES 数据加密应用程序对于那些规模不大但可用于演示并行编程的事物来说是很好的候选者
A simple game of life or DES data encryption application would be good candidates for things that arent that huge but can be used to demonstrate parallel programming
矩阵乘法?
http://www.mcs.anl.gov/~itf/dbpp /text/node45.html
Matrix multiplication?
http://www.mcs.anl.gov/~itf/dbpp/text/node45.html
您可以搜索其问题属于令人尴尬的并行的现有程序。 以下是来自维基百科的一些示例。
You could search for existing programs whose problem qualify as embarrassingly parallel. Here are some examples from wikipedia.
我总是喜欢将注销分成单独的线程,并将其变成生产者消费者线程。您可以有多个使用者线程(转到不同的文件或同一文件)。如果对输入数据的处理很高,您也可以对其他资源(如套接字读取等)执行此操作。
I always like to split the logging out into separate threads and turn it into a producer consumer thread. You can have multiple consumer threads (going to different files or the same file). You can also do this for other resources like socket reading etc... if the processing on the input data is hight.