Skip to content

Instantly share code, notes, and snippets.

@malfet
Last active November 24, 2021 21:05
Show Gist options
  • Save malfet/cae27d3eb5caf3627539471b8a766eec to your computer and use it in GitHub Desktop.
Save malfet/cae27d3eb5caf3627539471b8a766eec to your computer and use it in GitHub Desktop.
CUDA Hello world
#include <stdio.h>
__global__ void kernel() {
printf("Hello World of CUDA %d\n", threadIdx.x);
}
int main() {
kernel<<<1,1>>>();
return cudaDeviceSynchronize();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment