In the context of Parallel programming and GPU, we have an array that is called Prefix-Sum
array. In Dynamic Mapping, each thread performs a binary search on the Prefix-Sum to find the corresponding Work-Item.
It is a question for me, How a thread know for which work-item or work-unit will be searched?
Thread 5 does a binary search for its own identity 5
5 <25
5 < 9
5 > 3
4 (work item 2)