eyalroz / cuda-api-wrappers

Thin, unified, C++-flavored wrappers for the CUDA APIs
BSD 3-Clause "New" or "Revised" License
799 stars 80 forks source link

Add square-brackets element acces into `grid::dimensions_t` and `grid::overall_dimensions_t` #668

Open eyalroz opened 2 months ago

eyalroz commented 2 months ago

It might be convenient for some users to treat grid::dimensions_t and grid::overall_dimensions_t as arrays of dimensions for the different axes. So, let's allow this via a (const and non-const) operator[].