29.01.2013 Views

Tutorial CUDA

Tutorial CUDA

Tutorial 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.

Reduce 3: Bank Conflicts<br />

Showed for step 1 below<br />

First simultaneous memory access<br />

sresult[2 * stride * threadID]<br />

Stride 1<br />

Banks<br />

Indices<br />

Values<br />

Thread<br />

IDs<br />

© NVIDIA Corporation 2008<br />

Threads 0 and 8 access the same bank<br />

Threads 1 and 9 access the same bank<br />

Threads 2 and 10 access the same bank, etc.<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 ...<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...<br />

10 1 8 -1 0 -2 3 5 -2 -3 2 7 0 11 0 2 -1 4 11 -5 0 12 ...<br />

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

8 9 10

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

Saved successfully!

Ooh no, something went wrong!