19.11.2014 Views

Introduction to CUDA C/C++

Introduction to CUDA C/C++

Introduction to CUDA C/C++

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Addition on the Device: add()<br />

• Returning <strong>to</strong> our add() kernel<br />

__global__ void add(int *a, int *b, int *c) {<br />

}<br />

*c = *a + *b;<br />

• Let’s take a look at main()…<br />

© NVIDIA Corporation 2011

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!