c++ - 将 OpenMP 与 C++ 结合使用的算法库

标签 c++ multithreading parallel-processing openmp thrust

我在 GNU/Linux 桌面上使用 C++ 编程语言和 GCC。我正在努力实现 C++ 中的一些 PRAM 并行算法。据我了解,在多核 CPU 上使用 OpenMP 或多或少有助于模拟 CREW PRAM 算法。

许多复杂的 PRAM 算法,涉及并行前缀和、排序等操作, 对全局地址空间等中的 vector 执行元素明智的操作。

不知何故,在谷歌搜索大约 15 分钟后,似乎没有提供此功能的库,即一些开箱即用的基本并行算法或数据结构,如标准模板库。

谁能列出任何这样的库?

编辑:本质上,我需要的是一个类似于 Thrust Library 的 OpenMP,它用于 CUDA 世界。 http://thrust.github.com/

最佳答案

Thrust 支持通过 OpenMP 或 TBB 在多核上并行执行,并通过 CUDA 在 GPU 上并行执行。来自website :

Thrust is a parallel algorithms library which resembles the C++ Standard Template Library (STL). Thrust's high-level interface greatly enhances programmer productivity while enabling performance portability between GPUs and multicore CPUs. Interoperability with established technologies (such as CUDA, TBB, and OpenMP) facilitates integration with existing software. Develop high-performance applications rapidly with Thrust!

这是一些额外的 information关于如何访问 Thrust 的多核功能。

关于c++ - 将 OpenMP 与 C++ 结合使用的算法库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11475931/

相关文章:

c# - Monotouch 中的 System.ComponentModel.BackgroundWorker - 正确用法?

java - 如何用Java实现多线程PID Controller ?

performance - 并行版本比golang中的串行版本慢得多

c++ - 在 CLION 中使用 MSYS2 安装的库

c++ - 表达式必须具有指向类类型的指针

multithreading - 从 servlet 内的线程访问请求对象

c - 串行代码比在 C 中只使用一个线程慢得多?

c++ - 我可以更改损坏的 C++ DLL 导出符号吗? (二进制兼容但源代码不兼容)

c++ - 特定时间的 wxwidgets 事件

java - 实现未知大小的非并行 Spliterator?