From 5f9ee27aa8f8aa6a6c880f6bbbd54030065f7b0e Mon Sep 17 00:00:00 2001 From: Binyang Li Date: Mon, 15 Jul 2024 12:05:13 -0700 Subject: [PATCH] Support to write packets via uint2 (#327) --- include/mscclpp/packet_device.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mscclpp/packet_device.hpp b/include/mscclpp/packet_device.hpp index 8cff4c790..dc3886528 100644 --- a/include/mscclpp/packet_device.hpp +++ b/include/mscclpp/packet_device.hpp @@ -59,6 +59,11 @@ union alignas(16) LL16Packet { /// @param flag The flag to write. MSCCLPP_DEVICE_INLINE void write(uint64_t val, uint32_t flag) { write((uint32_t)val, (uint32_t)(val >> 32), flag); } + /// Write 8 bytes of data to the packet. + /// @param val The 8-byte data to write. + /// @param flag The flag to write. + MSCCLPP_DEVICE_INLINE void write(uint2 val, uint32_t flag) { write(val.x, val.y, flag); } + /// Helper of @ref read(). /// @param flag The flag to read. /// @param data The 8-byte data read.