29.01.2013 Views

Tutorial CUDA

Tutorial CUDA

Tutorial CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Reduce 2: Go Ahead!<br />

Thread IDs<br />

Block IDs<br />

Open up reduce\src\reduce2.sln<br />

Goal: Replace the TODOs in reduce2.cu to get<br />

“test PASSED”<br />

© NVIDIA Corporation 2008<br />

… … … … … … …<br />

0 … t-1<br />

0<br />

t = numThreadsPerBlock<br />

b = numBlocks<br />

0 … t-1<br />

… b-1<br />

0 … t-1<br />

0<br />

0 … t-1<br />

… b-1<br />

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

Saved successfully!

Ooh no, something went wrong!