Previous | Next --- Slide 52 of 54
Back to Lecture Thumbnails
Elias

Is there a way to access the hardware information at runtime (to eliminate the predefined constants THREADS_PER_BLK, and BLOCKS_PER_CHIP)?

ananyak

I don't really understand the point of the while loop and thread synchronization. Isn't each block responsible for exactly 1 / (15 * 12) of the array, so wouldn't each block exit after the first iteration of the while loop?

kk

The synchronization is intended to synchronize the threads in the same block, since they may run at different speed.

For example, the first call to _syncthreads() is to ensure no threads proceed to performing the task until startingIndex has been computed.