Changes

Jump to: navigation, search

GPU610/Cosmosis

1,249 bytes added, 13:42, 13 April 2013
Assignment 3
<span style='color:#406080; '>}</span>
<span style='color:#406080; '>}</span>
</div>
 
==== Launch Control ====
 
We used the following calculations to determine the the number of threads and blocks to launch with:
 
<div style='color:#000020;background:#f6f8ff;'>
numThreads_ <span style='color:#308080; '>=</span> prop<span style='color:#308080; '>.</span>maxThreadsPerMultiProcessor <span style='color:#308080; '>/</span> maxBlocks<span style='color:#406080; '>;</span>
numBlocks_ <span style='color:#308080; '>=</span> <span style='color:#308080; '>(</span>bodies_<span style='color:#308080; '>.</span>size<span style='color:#308080; '>(</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>+</span> numThreads_ <span style='color:#308080; '>-</span> <span style='color:#008c00; '>1</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>/</span> numThreads_<span style='color:#406080; '>;</span>
numThreads_ <span style='color:#308080; '>=</span> <span style='color:#308080; '>(</span>numThreads_ <span style='color:#308080; '>+</span> <span style='color:#008c00; '>1</span><span style='color:#308080; '>)</span> <span style='color:#308080; '>&amp;</span> <span style='color:#308080; '>~</span><span style='color:#008c00; '>1</span><span style='color:#406080; '>;</span>
</div>
1
edit

Navigation menu