Skip to content

Commit

Permalink
Add references in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Sep 11, 2024
1 parent f919ce4 commit df06a5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cpp/include/kvikio/posix_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ class StreamsByThread {
std::map<std::pair<CUcontext, std::thread::id>, CUstream> _streams;

public:
StreamsByThread() = default;
StreamsByThread() = default;

// Here we intentionally do not destroy in the destructor the CUDA resources
// (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>
~StreamsByThread() = default;

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

0 comments on commit df06a5d

Please sign in to comment.