Skip to content

Commit

Permalink
Add more clarifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Sep 11, 2024
1 parent df06a5d commit 49c1bd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/include/kvikio/posix_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class StreamsByThread {
// (e.g. CUstream) with static storage duration, but instead let them leak
// on program termination. This is to prevent undefined behavior in CUDA. See
// <https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#initialization>
// This also prevents crash (segmentation fault) if clients call
// cuDevicePrimaryCtxReset() or cudaDeviceReset() before program termination.
~StreamsByThread() = default;

static CUstream get(CUcontext ctx, std::thread::id thd_id)
Expand Down

0 comments on commit 49c1bd0

Please sign in to comment.