cuda4cpu:使 CUDA 代码在 CPU 上无缝运行的库和头文件

上传者: 42131342 | 上传时间: 2022-11-24 21:21:46 | 文件大小: 34KB | 文件类型: ZIP
C++
使 CUDA 代码在 CPU 上无缝运行的库和头文件。 使用 cuda4cpu 在包含 CUDA 代码的源文件中包含cuda4hpc.hpp文件: # include < cuda4hpc> 使用cuda4hpc命名空间覆盖 CUDA 关键字和类型: using namespace cuda4hpc ; 使用launch函数而不是 CUDA <<<...>>>符号来启动 cuda 内核。 它返回一个临时对象,您必须使用它来传递内核参数: launch (my_cuda_kernel, grid, block)(arguments...); 使用 C++11 编译您的代码: g++ -o object_file -c source_file -std=c++11 将您的程序与libcuda4cpu链接: g++ -o my_app object_files

文件下载

资源详情

[{"title":"( 21 个子文件 34KB ) cuda4cpu:使 CUDA 代码在 CPU 上无缝运行的库和头文件","children":[{"title":"cuda4cpu-master","children":[{"title":".gitignore <span style='color:#111;'> 177B </span>","children":null,"spread":false},{"title":"configure <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false},{"title":"LICENSE.LESSER <span style='color:#111;'> 7.47KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 34.30KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false},{"title":"tests","children":[{"title":"stencil3d.cpp <span style='color:#111;'> 6.49KB </span>","children":null,"spread":false},{"title":"stencil2d.cpp <span style='color:#111;'> 4.80KB </span>","children":null,"spread":false},{"title":"CMakeLists.txt <span style='color:#111;'> 544B </span>","children":null,"spread":false}],"spread":true},{"title":"include","children":[{"title":"defines.hpp <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"cuda","children":[{"title":"types.hpp <span style='color:#111;'> 2.34KB </span>","children":null,"spread":false},{"title":"events.hpp <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"streams.hpp <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"device.hpp <span style='color:#111;'> 1017B </span>","children":null,"spread":false},{"title":"memory.hpp <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false},{"title":"mycuda.hpp <span style='color:#111;'> 990B </span>","children":null,"spread":false}],"spread":true},{"title":"cuda4cpu.hpp <span style='color:#111;'> 975B </span>","children":null,"spread":false},{"title":"launch.hpp <span style='color:#111;'> 10.42KB </span>","children":null,"spread":false},{"title":"CMakeLists.txt <span style='color:#111;'> 130B </span>","children":null,"spread":false}],"spread":true},{"title":"lib","children":[{"title":"cuda4cpu.cpp <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"CMakeLists.txt <span style='color:#111;'> 732B </span>","children":null,"spread":false}],"spread":true},{"title":"CMakeLists.txt <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明