You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be wrong about this, but I was under the impression that the point of sorting points is to minimize scattered global memory access and thus facilitating memory coalescing. If so, then we need to actually sort and reorder points in the actual global memory, but the referenced code above shows that we don't actually reorder the point layout in the memory; rather, we simply use the indices in reversedSortIndices to index into the original memory layout.
I would think to actually reorder points in the memory, you would have to do something like:
Actually my fix was wrong. what should have been done is in the kCountingSortIndices kernel function we should populate a new array, say posInSortedPoints by posInSortedPoints[particleIndex] = sortIndex;, and then do a sort_by_key using posInSortedPoints. This would then actually reorder the point layout in the memory.
Yes, currently only reversedSortIndices is sorted by cells. It might be beneficial to also sort the particles themselves. Do you have a working fix? Otherwise I will implement it.
cuNSearch/src/cuNSearchKernels.cu
Line 162 in b3b708d
I might be wrong about this, but I was under the impression that the point of sorting points is to minimize scattered global memory access and thus facilitating memory coalescing. If so, then we need to actually sort and reorder points in the actual global memory, but the referenced code above shows that we don't actually reorder the point layout in the memory; rather, we simply use the indices in
reversedSortIndices
to index into the original memory layout.I would think to actually reorder points in the memory, you would have to do something like:
thrust::sort_by_key(pointSetImpl->d_ReversedSortIndices.begin(), pointSetImpl->d_ReversedSortIndices.end(), pointSetImpl->d_Particles.begin())
Am I correct in this understanding?
The text was updated successfully, but these errors were encountered: