rapidsai / cudf

cuDF - GPU DataFrame Library
https://docs.rapids.ai/api/cudf/stable/
Apache License 2.0
8.35k stars 889 forks source link

[FEA] Add a sentinel `constexpr` value to denote `INVALID_INDEX` #9426

Open ttnghia opened 3 years ago

ttnghia commented 3 years ago

Currently, various cudf APIs need to use a special constant to denote an invalid row index for certain operations. However, there is not any guideline on what constant should be used to mark an invalid index row. Therefore, different APIs implement their own INVALID_INDEX constant.

For example:

And maybe more. As such, the constants used for INVALID_INDEX is not agreed across cudf development. We should explicitly add a sentinel constant in some of cudf main header and replace the existing ones with it. By doing so, we can enforce consistency and reduce confusion (why this file uses -1 while other file uses numeric_limit::lowest() or numeric_limit::max()).

harrism commented 3 years ago

If this is added, be sure to add a section to the libcudf DEVELOPER_GUIDE.md as well.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.