p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional Professional CUDA C Programming (http://p2p.wrox.com/forumdisplay.php?f=792)
-   -   I need a help (http://p2p.wrox.com/showthread.php?t=99140)

Yasien August 16th, 2016 05:40 PM

I need a help
I'm a new user of linux. I installed the CUDA C driver. I run the executable file of the sample bandwidth test and it worked well. But when I tried to run the executable file of this code :
#include <stdio.h>
__global__ void helloFromGPU (void)
printf("Hello World from GPU!\n");
int main(void)
// hello from cpu
printf("Hello World from CPU!\n");
helloFromGPU <<<1, 10>>>();
return 0;
I got :
$ ./code_1
Hello World from CPU!

and the device code doesn't show the expected result of repeating the string 10 times.

All times are GMT -4. The time now is 02:25 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.