CUDA 笔记

1. __device__ 函数的声明和定义   

函数头文件device.h

extern __device__ void helloworld();

其实就是声明一下函数

#include <stdio.h>

__device__  void helloworld()
{
	printf("Hello world!\n");
}
posted @ 2017-12-26 11:34  洛笔达  阅读(185)  评论(0编辑  收藏  举报