Skip to content
Snippets Groups Projects
Commit 81c52301 authored by Andreas Herten's avatar Andreas Herten
Browse files

Some minor changes, most of them to description

parent e3aa6293
No related branches found
No related tags found
No related merge requests found
// This is the REAL "hello world" for CUDA! /*
// It takes the string "Hello ", prints it, then passes it to CUDA ##########################
// with an array of offsets. Then the offsets are added in parallel CUDA Hello World!
// to produce the string "World!" Based on code by Ingemar Ragnemalm (http://computer-graphics.se/hello-world-for-cuda.html), modified by Andreas Herten
// By Ingemar Ragnemalm 2010
// nvcc hello-world.cu -L /usr/local/cuda/lib -lcudart -o hello-world The string Hello is printed, then transferred to the GPU and every character shifted to form string World in parallel. The string is then transferred back and printed.
Compile with nvcc, e.g. with the accompanying Makefile.
##########################
*/
#include <iostream> #include <iostream>
...@@ -51,6 +54,6 @@ int main() ...@@ -51,6 +54,6 @@ int main()
CUDA_CALL(cudaFree( bd );) CUDA_CALL(cudaFree( bd );)
printf("%s\n", a); printf("%s\n", a);
// sleep(1);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment