CUDA之——入门程序
2016-05-10 16:55
253 查看
[b]摘要[/b]
本文主要讲述CUDA的第一个入门程序"Hello World"。This simple "Hello World" example is meant to illustrate that, at most of time, there is no different between CUDA C language and standard C language! That is really important.
1. VS下,新建CUDA项目
在Visual Studio中新建CUDA项目,如下
2. "Hello World"入门(HelloWorld.cu)
#include "cuda_runtime.h"
[b]3. 测试结果
[/b]
[b]
[/b]
本文主要讲述CUDA的第一个入门程序"Hello World"。This simple "Hello World" example is meant to illustrate that, at most of time, there is no different between CUDA C language and standard C language! That is really important.
1. VS下,新建CUDA项目
在Visual Studio中新建CUDA项目,如下
2. "Hello World"入门(HelloWorld.cu)
#include "cuda_runtime.h"
#include "device_launch_parameters.h" #include <stdio.h> int main(void) { printf("Hello CUDA \n"); return 0; }
[b]3. 测试结果
[/b]
[b]
[/b]
相关文章推荐
- teechart怎么删除(到达一定数目)动态曲线出现过的点
- Java自带的MD5加密
- 在.NET使用JSON作为数据交换格式【转】
- 通过 :hover 伪元素控制其他元素
- 用户体验-博客园
- iOS开发经验总结(下)
- C 结构体嵌套一级指针 二级指针 动态分配内存
- 2016年学习Linux决心书(老男孩教育在线课程班第二期)
- ecshop二次开发--热词搜索且显示
- 你是否还在质疑EF的性能
- 不惑JAVA之JAVA基础 - HashMap
- Gradle 多环境配置
- dispaly:inline-block
- Android Studio 配置ADV发生异常“VT -x is desabled in BIOS”
- 【BZOJ 1051】【HAOI 2006】受欢迎的牛
- Sqlserver2008相关配置问题
- IQueryable & IEnumberable 区别
- Oracle权限管理详解(转载)
- iwebshop 改版页面
- [LeetCode]题解(python):153-Find Minimum in Rotated Sorted Array