From b9ec5a6afbe90b97f7aef674aa84ec3c17853ecf Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Thu, 27 Jul 2023 09:36:11 +0000 Subject: [PATCH] doc string --- include/mscclpp/proxy_channel.hpp | 3 +++ src/proxy_channel.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mscclpp/proxy_channel.hpp b/include/mscclpp/proxy_channel.hpp index c8719acab..d7566db03 100644 --- a/include/mscclpp/proxy_channel.hpp +++ b/include/mscclpp/proxy_channel.hpp @@ -41,6 +41,9 @@ class ProxyService : public BaseProxyService { /// @return The ID of the semaphore. SemaphoreId addSemaphore(std::shared_ptr connection); + /// Add a pitch pair to the proxy service. + /// @param id The ID of the semaphore. + /// @param pitch The pitch pair. void addPitch(SemaphoreId id, std::pair pitch); /// Register a memory region with the proxy service. diff --git a/src/proxy_channel.cc b/src/proxy_channel.cc index 56470a0b2..a06eea264 100644 --- a/src/proxy_channel.cc +++ b/src/proxy_channel.cc @@ -67,7 +67,7 @@ ProxyHandlerResult ProxyService::handleTrigger(ProxyTrigger triggerRaw) { RegisteredMemory& dst = memories_[trigger->fields.dstMemoryId]; RegisteredMemory& src = memories_[trigger->fields.srcMemoryId]; if (trigger->fields2D.multiDimensionFlag) { - std::pair& pitch = pitches_[trigger->fields.chanId]; + std::pair& pitch = pitches_.at(trigger->fields.chanId); semaphore->connection()->write2D(dst, trigger->fields.dstOffset, pitch.first, src, trigger->fields.srcOffset, pitch.second, trigger->fields2D.width, trigger->fields2D.height); } else {