为什么关于并发编程的书籍总是忽略数据并行?

发布于 2024-08-13 05:02:17 字数 1431 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

霓裳挽歌倾城醉 2024-08-20 05:02:18

“总是”有点强;有一些资源(示例)包含数据并行性主题。

"always" is a bit strong; there are resources out there (example) that include data parallelism topics.

七七 2024-08-20 05:02:18

Hillis 的经典著作《连接机器》讲的都是数据并行。这是我的最爱之一

The classic book "The Connection Machine" by Hillis was all data parallelism. It's one of my favorites

泛泛之交 2024-08-20 05:02:17

首先,我要指出并发编程不一定是并行编程的同义词。并发编程是关于从松散耦合的任务构建应用程序。例如,对话窗口可以与作为单独任务实现的每个控件进行交互。另一方面,并​​行编程明确是将某些计算任务的解决方案分散到多个执行硬件上,本质上总是出于某种性能原因(注意:当替代方案时,即使 RAM 太少也是一个性能原因) ?

所以,我必须反问:你指的是哪些书?它们是关于并发编程的(我有一些,里面有很多有趣的理论),或者是关于并行编程

的 关于并行编程,我将提出一些意见:

  • 时就已经过时了。
  • CUDA 是一个快速变化的目标,并且自发布以来一直如此。今天写的一本关于它的书在 OpenCL 标准发布 就在不到一年前,在过去 8 个月左右的时间里,我们还没有足够的时间来编写一本书,更不用说
  • 至少在一些并行编程教科书中 进行修订和出版了。我用过的。直到版本 2(v3 刚刚发布)为止,它本质上都是关于数据并行编程的。

First off, I'll point out that concurrent programming is not necessarily synonymous with parallel programming. Concurrent programming is about constructing applications from loosely-coupled tasks. For instance, a dialog window could have interactions with each control implemented as a separate task. Parallel programming, on the other hand, is explicitly about spreading the solution of some computational task across more than a single piece of execution hardware, essentially always for performance reasons of some sort (note: even too little RAM is a performance reason when the alternative is swapping.

So, I have to ask in return: What books are you referring to? Are they about concurrent programming (I have a few of these, there's a lot of interesting theory there), or about parallel programming?

If they really are about parallel programming, I'll make a few observations:

  • CUDA is a rapidly moving target, and has been since its release. A book written about it today would be half-obsolete by the time it made it into print.
  • OpenCL's standard was released just under a year ago. Stable implementations came out over the last 8 months or so. There's simply not been enough time to get a book written yet, let alone revised and published.
  • OpenMP is covered in at least a few of the parallel programming textbooks that I've used. Up to version 2 (v3 was just released), it was essentially all about data parallel programming.
夏雨凉 2024-08-20 05:02:17

我认为当今学术界从事并行计算工作的人通常来自集群计算领域。 OpenCL 和 CUDA 使用图形处理器,随着更先进的图形渲染算法的发展,图形处理器或多或少地已经演变为通用处理器。

然而,图形人员和高性能计算人员已经“发现”彼此有一段时间了,并且正在开展大量研究以使用 GPU 进行通用计算。

I think those working with parallel computing academically today are usually coming from the cluster computing field. OpenCL and CUDA use graphics processors, which more or less inadvertently have evolved into general purpose processors along with the development of more advanced graphics rendering algorithms.

However, the graphics people and the high performance computing people have been "discovering" each other for some time now, and a lot or research is being does into using GPUs for general purpose computing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文