eyalroz / cuda-kat

CUDA kernel author's tools
BSD 3-Clause "New" or "Revised" License
105 stars 8 forks source link

Inappropriate return type and incorrect calculation in grid_info.cuh #39

Closed eyalroz closed 4 years ago

eyalroz commented 4 years ago

In grid_info.cuh:

  1. The variants of the index() function current return dimensions_t rather than unsigned. This might fit a "position" function (perhaps the subject of another issue I'll open, but certainly not an index, singluar.
  2. The templated index_in_grid() function for thread doesn't current compute the index correctly; plus, it shouls use other, already-defined functions which themselves call detail::row_major_linearization() rather than calling that directly.
  3. Recursive call of warp::index() to itself.