I am writing a program for Pre-fix Sum i.e scan. I have 128 elements in the array. I am not able to identify the proper value of offset that I should use for avoiding Bank Conflicts. I have seen one example scan code on SDK (please refer to scan in the SDK), and one paper by Mark Harris here on page number 11, that uses the following macro for offset:
((index) >> LOG_NUM_BANKS)
in else part of above macro. It is simply because we are adding to the index, Index/NUM_BANKS, which when used with >> converts to (index) >> LOG_NUM_BANKS. This is quite clear why we are adding this value.
However, I am not able to understand the purpose/meaning of