diff --git a/include/mscclpp/proxy_channel.hpp b/include/mscclpp/proxy_channel.hpp index c8719aca..d7566db0 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 56470a0b..a06eea26 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 {