Previous | Next --- Slide 18 of 63
Back to Lecture Thumbnails
siyuliu3

What is the time complexity of reduce_add()?

WLTDO

I would think it is O(programCount), since reduce_add() just adds up the partial sum in each program instance (i.e., adding up 8 floats if we have 8 program instances).

Considering that the number of program instances in a gang is relatively small, reduce_add() is just a constant time operation.