cholla-hydro/cholla

Convert all indexing variables to `size_t`/`ptrdiff_t`

Open

#271 建立於 2023年3月21日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C++ (41 fork)auto 404
code cleanupenhancementgood first issuerefactor

倉庫指標

Star
 (74 star)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南