mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-26 08:01:00 +00:00
epoch creation
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
if (res != mscclppSuccess && res != mscclppInProgress) { \
|
||||
throw std::runtime_error(std::string("Call to " #call " failed with error code ") + mscclppGetErrorString(res)); \
|
||||
} \
|
||||
} while (0);
|
||||
} while (false)
|
||||
|
||||
#define CUDATHROW(cmd) \
|
||||
do { \
|
||||
|
||||
@@ -35,15 +35,16 @@ public:
|
||||
// TODO: move implementations of these helpers out of this header
|
||||
void send(const std::vector<char>& data, int peer, int tag)
|
||||
{
|
||||
send((void*)data.size(), sizeof(size_t), peer, tag);
|
||||
send((void*)data.data(), data.size(), peer, tag);
|
||||
size_t size = data.size();
|
||||
send((void*)&size, sizeof(size_t), peer, tag);
|
||||
send((void*)data.data(), data.size(), peer, tag+1);
|
||||
}
|
||||
void recv(std::vector<char>& data, int peer, int tag)
|
||||
{
|
||||
size_t size;
|
||||
recv((void*)&size, sizeof(size_t), peer, tag);
|
||||
data.resize(size);
|
||||
recv((void*)data.data(), data.size(), peer, tag);
|
||||
recv((void*)data.data(), data.size(), peer, tag+1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user