Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tutorial01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Following table compares a hello world program in C and CUDA side-by-side.
**C**

``` C
#include <stdio.h>

void c_hello(){
printf("Hello World!\n");
}
Expand All @@ -34,12 +36,15 @@ int main() {
**CUDA**

``` C
#include <stdio.h>

__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}

int main() {
cuda_hello<<<1,1>>>();
cudaDeviceSynchronize(); // force flush stdout from gpu before we exit
return 0;
}
```
Expand Down