chundoong-lab-ta/APWS23/ans/hello_world_ans.cu

12 lines
189 B
Plaintext

#include <cstdio>
__global__ void hello_world() {
printf("Thread %d: Hello, World!\n", threadIdx.x);
}
int main() {
hello_world<<<1, 32>>>();
cudaDeviceSynchronize();
return 0;
}