A Thread Block Programming Example – Solution – Intro to Parallel Programming

A Thread Block Programming Example – Solution – Intro to Parallel Programming


Well as we’ll see, the correct answer is actually 21 trillion, which is 16 factorial. Let’s see how that works. So here I’m just going to run this program in my terminal, and as you can see, the blocks complete in some basically random order: block 7 completes, then block 6, then 1, then 0, and so forth. If I run it again, I get a different order and a different order and so forth. You’ll find that the blocks executed in a different order every time, which is where that number 16 factorial comes from.

Leave a Reply

Your email address will not be published. Required fields are marked *