cuspatial icon indicating copy to clipboard operation
cuspatial copied to clipboard

[FEA]: Adopt an abstraction for grid-stride ranges.

Open harrism opened this issue 1 year ago • 0 comments

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem you would like to solve.

The number of custom CUDA kernels in cuSpatial is gradually increasing. We try to use Thrust algorithms as much as possible, but custom kernels are often necessary. Within these, we often use grid-stride for-loops. I think we should adopt an abstraction for this common type of iteration to make it less verbose and less error-prone. A search shows 13 grid-stride loops currently:

https://github.com/search?q=repo%3Arapidsai%2Fcuspatial%20idx%20%3D%20threadIdx.x%20%2B%20blockIdx.x%20*%20blockDim.x&type=code

We could use the ranger single-header library that I wrote. Perhaps we should just vendor it: https://github.com/harrism/ranger

Describe any alternatives you have considered

No response

Additional context

No response

harrism avatar Apr 18 '23 02:04 harrism