cuda-kat icon indicating copy to clipboard operation
cuda-kat copied to clipboard

Use "xxx_index" in dimensioned contexts and "xxx_id" in linearized ones

Open eyalroz opened this issue 4 years ago • 0 comments

In a 2D or 3D block, the CUDA "thread index" - according to official documentation - is a 3D or 3D entity, while the "thread ID" is its linearization (where x changes fastest, then y, then z).

cuda-kat currently doesn't observe this distinction, due to a bias in favor of work with linear grids. We should make sure it is respected in:

  • Function and member names (especially but not limited to grid_info:: namespaces)
  • Parameter names
  • Implementations

We should also check if there are separate special registers for the dimensioned index and the id; that could be useful.

eyalroz avatar Mar 03 '20 21:03 eyalroz