您的位置:首页 > 其它

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"

#include "device_launch_parameters.h"
#include <stdio.h>
int main(void) {
printf("Hello CUDA \n");
return 0;
}


[b]3. 测试结果

[/b]

[b]


[/b]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: