A shared folder with AI prompts and code snippets
From workspace: Nvidia
Team: NVIDIA Developer
Total snippets: 3
3 snippets
A minimal CUDA kernel that prints "Hello, World!" from the device.
#include <stdio.h> __device__ const char *STR = "HELLO WORLD!"; const char STR_LENGTH = 12; __global__ void hello() { printf("%c\n", STR[threadIdx.x % STR_LENGTH]); } int main(void) { int num_threads = STR_LENGTH; int num_blocks =...
Explanation of how a basic "Hello, World" program works using CUDA and how each thread behaves.
Credit: Mark Ebersole - NVIDIA Corporation Description: A very simple Hello World designed to help demonstrate the high parallelism available in a modern GPU. Files: Exercise: hello.cu - the Hello World...
A simple version of a parallel CUDA “Hello World!”