06.08.2012 Views

Getting Started with CUDA

Getting Started with CUDA

Getting Started with CUDA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Arrays of Parallel Threads<br />

A <strong>CUDA</strong> kernel is executed by an array of threads<br />

All threads run the same code<br />

Each thread has an ID that it uses to compute memory<br />

addresses and make control decisions<br />

threadID<br />

0 1 2 3 4 5 6 7<br />

…<br />

float x = input[threadID];<br />

float y = func(x);<br />

output[threadID] = y;<br />

…<br />

© 2008 NVIDIA Corporation.

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

Saved successfully!

Ooh no, something went wrong!