Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert all indexing variables to size_t/ptrdiff_t #271

Open
bcaddy opened this issue Mar 21, 2023 · 0 comments
Open

Convert all indexing variables to size_t/ptrdiff_t #271

bcaddy opened this issue Mar 21, 2023 · 0 comments
Labels
code cleanup For issues with making code align with standards or removing deprecated components enhancement good first issue refactor for code that is functional but needs to be refactored

Comments

@bcaddy
Copy link
Collaborator

bcaddy commented Mar 21, 2023

Currently many of the indexing variables we use are of type 'int' when they should be size_t (or ptrdiff_t if they're a difference). This could potentially lead to issues with the range of int as the size of VRAM on GPUs grows and this change would allow us to enable the following clang-tidy checks:

  • bugprone-implicit-widening-of-multiplication-result
  • bugprone-narrowing-conversions (alias of cppcoreguidelines-narrowing-conversions)

This conversion wouldn't be too difficult but would be time consuming and would be a good project for a new student/collaborator to become familiar with the code.

See this discussion for the original discussion on the topic.

@bcaddy bcaddy added enhancement good first issue refactor for code that is functional but needs to be refactored code cleanup For issues with making code align with standards or removing deprecated components labels Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup For issues with making code align with standards or removing deprecated components enhancement good first issue refactor for code that is functional but needs to be refactored
Projects
Status: No Status
Development

No branches or pull requests

1 participant