Bureaucrats, cc_docs_admin, cc_staff
337
edits
Line 100: | Line 100: | ||
= First CUDA C Program= | = First CUDA C Program= | ||
The following example | The following example shows how to add two numbers on the GPU using CUDA. Note that this is just an exercise, it's very simple, so it will not scale up. | ||
<syntaxhighlight lang="cpp" line highlight="1,5"> | <syntaxhighlight lang="cpp" line highlight="1,5"> | ||
__global__ void add (int *a, int *b, int *c){ | __global__ void add (int *a, int *b, int *c){ |