From eecd4276c0140eb16d777d823fcc5a40fafa44e5 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Sun, 31 Mar 2024 22:30:20 +0300 Subject: [PATCH] Fixes #628, regards #3: Corrected signatures of `context::current::peer_to_peer` functions + added documentation --- src/cuda/api/peer_to_peer.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cuda/api/peer_to_peer.hpp b/src/cuda/api/peer_to_peer.hpp index 37fca510..68c718b1 100644 --- a/src/cuda/api/peer_to_peer.hpp +++ b/src/cuda/api/peer_to_peer.hpp @@ -76,9 +76,19 @@ namespace current { namespace peer_to_peer { -void enable_access_to(const context_t &context, const context_t &peer_context); +/** + * Allows subsequently-executed memory operations and kernels to access the memory + * associated with the specified peer context - if peer-to-peer access is supported + * between the two devices. + */ +void enable_access_to(const context_t &peer_context); -void disable_access_to(const context_t &context, const context_t &peer_context); +/** + * Prevents subsequently-executed memory operations and kernels from accessing the + * memory associated with the specified peer context - if peer-to-peer access is + * supported between the two devices. + */ +void disable_access_to(const context_t &peer_context); } // namespace peer_to_peer