- 授权协议: Apache
- 开发语言: C/C++
- 操作系统: 跨平台
- 软件首页: http://thrust.github.com/
- 软件文档: https://github.com/thrust/thrust/wiki/Documentation
软件介绍
Thrust 是一个开源的 C++ 库用于开发高性能并行应用程序,以 C++ 标准模板库为蓝本实现,Thrust 带来一系列并行计算领域的抽象层。
下面示例代码用来并行结算 100 个随机数的和:
#include <thrust/host_vector.h> #include <thrust/device_vector.h> #include <thrust/generate.h> #include <thrust/reduce.h> #include <thrust/functional.h> #include <algorithm> #include <cstdlib> int main(void) { // generate random data serially thrust::host_vector<int> h_vec(100); std:generate(h_vec.begin(), h_vec.end(), rand); // transfer to device and compute sum thrust::device_vector<int> d_vec = h_vec; int x = thrust::reduce(d_vec.begin(), d_vec.end(), 0, thrust::plus<int>()); return 0; }
代码整洁之道:程序员的职业素养
罗伯特·C.马丁 (Robert C.Martin) / 余晟、章显洲 / 人民邮电出版社 / 2016-9-1 / 49.00元
1. 汇聚编程大师40余年编程生涯的心得体会 2. 阐释软件工艺中的原理、技术、工具和实践 3. 助力专业软件开发人员具备令人敬佩的职业素养 成功的程序员在以往的工作和生活中都曾经历过大大小小的不确定性,承受过永无休止的压力。他们之所以能够成功,是因为拥有一个共同点,都深切关注创建软件所需的各项实践。他们将软件开发视为一种需要精雕细琢加以修炼的技艺,他们以专业人士的标准要求自己,......一起来看看 《代码整洁之道:程序员的职业素养》 这本书的介绍吧!
