Implement parallel ofi::Socket::Send

This commit is contained in:
Dennis Klein
2018-11-13 22:26:38 +01:00
committed by Dennis Klein
parent 9ae48c21f5
commit 46e2420547
7 changed files with 229 additions and 348 deletions

View File

@@ -21,7 +21,6 @@
#include <string>
#include <string.h>
#include <sys/socket.h>
#include <zmq.h>
namespace fair
{
@@ -33,15 +32,11 @@ namespace ofi
using namespace std;
Context::Context(int numberIoThreads)
: fZmqContext(zmq_ctx_new())
, fOfiInfo(nullptr)
: fOfiInfo(nullptr)
, fOfiFabric(nullptr)
, fOfiDomain(nullptr)
, fIoWork(fIoContext)
{
if (!fZmqContext)
throw ContextError{tools::ToString("Failed creating zmq context, reason: ", zmq_strerror(errno))};
InitThreadPool(numberIoThreads);
}
@@ -63,16 +58,6 @@ Context::~Context()
fIoContext.stop();
for (auto& thread : fThreadPool)
thread.join();
if (zmq_ctx_term(fZmqContext) != 0)
LOG(error) << "Failed closing zmq context, reason: " << zmq_strerror(errno);
}
auto Context::GetZmqVersion() const -> string
{
int major, minor, patch;
zmq_version(&major, &minor, &patch);
return tools::ToString(major, ".", minor, ".", patch);
}
auto Context::GetAsiofiVersion() const -> string