📅  最后修改于: 2022-03-11 14:56:59.685000             🧑  作者: Mango
/*
*hello_world.cu
*/
#include
__global__ void hello_world(void)
{
printf("GPU: Hello world!\n");
}
int main(int argc,char **argv)
{
printf("CPU: Hello world!\n");
hello_world<<<1,10>>>();
cudaDeviceReset();//if no this line ,it can not output hello world from gpu
return 0;
}