cuNSearch icon indicating copy to clipboard operation
cuNSearch copied to clipboard

Redundant gather in computeCellInformation

Open yuhao opened this issue 4 years ago • 1 comments

https://github.com/InteractiveComputerGraphics/cuNSearch/blob/master/src/cuNSearchDeviceData.cu#L160-#L167

These lines seem to be redundant. Since tempSequence.begin is a unique sequence that starts from 0 and d_SortIndices is also a unique sequence that starts from 0, d_ReversedSortIndices is guaranteed to be exactly the same as d_SortIndices after gather. They why not directly copy d_SortIndices to d_ReversedSortIndices? I validated this on a few examples, but maybe there are cases where this is not the case?

yuhao avatar Jul 02 '21 12:07 yuhao

This call really seems to be redundant. I will check if it can be removed.

WeilerMarcel avatar Jul 06 '21 19:07 WeilerMarcel