fix: Use namespaced typenames/headers

This commit is contained in:
Dennis Klein
2022-03-22 13:59:37 +01:00
parent 18f50871ef
commit 8d575a23a5
32 changed files with 114 additions and 116 deletions

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -24,8 +24,8 @@ namespace fair::mq::ofi
using namespace std;
Context::Context(FairMQTransportFactory& sendFactory,
FairMQTransportFactory& receiveFactory,
Context::Context(mq::TransportFactory& sendFactory,
mq::TransportFactory& receiveFactory,
int numberIoThreads)
: fIoWork(fIoContext)
, fReceiveFactory(receiveFactory)

View File

@@ -51,8 +51,8 @@ struct Address {
class Context
{
public:
Context(FairMQTransportFactory& sendFactory,
FairMQTransportFactory& receiveFactory,
Context(mq::TransportFactory& sendFactory,
mq::TransportFactory& receiveFactory,
int numberIoThreads = 1);
Context(const Context&) = delete;
Context(Context&&) = delete;
@@ -78,8 +78,8 @@ class Context
asio::io_context fIoContext;
asio::io_context::work fIoWork;
std::vector<std::thread> fThreadPool;
FairMQTransportFactory& fReceiveFactory;
FairMQTransportFactory& fSendFactory;
mq::TransportFactory& fReceiveFactory;
mq::TransportFactory& fSendFactory;
size_t fSizeHint;
auto InitThreadPool(int numberIoThreads) -> void;

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -69,7 +69,7 @@ Message::Message(pmr::memory_resource* pmr, const size_t size, Alignment /* alig
Message::Message(pmr::memory_resource* pmr,
void* data,
const size_t size,
fairmq_free_fn* ffn,
FreeFn* ffn,
void* hint)
: fInitialSize(size)
, fSize(size)
@@ -137,7 +137,7 @@ auto Message::Rebuild(size_t size, Alignment /* alignment */) -> void
Rebuild(size);
}
auto Message::Rebuild(void* /*data*/, size_t size, fairmq_free_fn* ffn, void* hint) -> void
auto Message::Rebuild(void* /*data*/, size_t size, FreeFn* ffn, void* hint) -> void
{
if (fFreeFunction) {
fFreeFunction(fData, fHint);

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -37,7 +37,7 @@ class Message final : public fair::mq::Message
Message(std::pmr::memory_resource* pmr,
void* data,
size_t size,
fairmq_free_fn* ffn,
FreeFn* ffn,
void* hint = nullptr);
Message(std::pmr::memory_resource* pmr,
fair::mq::UnmanagedRegionPtr& region,
@@ -54,7 +54,7 @@ class Message final : public fair::mq::Message
auto Rebuild(Alignment alignment) -> void override;
auto Rebuild(size_t size) -> void override;
auto Rebuild(size_t size, Alignment alignment) -> void override;
auto Rebuild(void* data, size_t size, fairmq_free_fn* ffn, void* hint = nullptr) -> void override;
auto Rebuild(void* data, size_t size, FreeFn* ffn, void* hint = nullptr) -> void override;
auto GetData() const -> void* override;
auto GetSize() const -> size_t override;
@@ -71,7 +71,7 @@ class Message final : public fair::mq::Message
size_t fInitialSize;
size_t fSize;
void* fData;
fairmq_free_fn* fFreeFunction;
FreeFn* fFreeFunction;
void* fHint;
std::pmr::memory_resource* fPmr;
}; /* class Message */

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -100,7 +100,7 @@ try {
// TODO catch the correct ofi error
catch (const SilentSocketError& e)
{
// do not print error in this case, this is handled by FairMQDevice
// do not print error in this case, this is handled by fair::mq::Device
// in case no connection could be established after trying a number of random ports from a range.
return false;
}
@@ -189,7 +189,7 @@ try {
}
catch (const SilentSocketError& e)
{
// do not print error in this case, this is handled by FairMQDevice
// do not print error in this case, this is handled by fair::mq::Device
return false;
}
catch (const std::exception& e)

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -9,8 +9,8 @@
#ifndef FAIR_MQ_OFI_SOCKET_H
#define FAIR_MQ_OFI_SOCKET_H
#include <FairMQSocket.h>
#include <FairMQMessage.h>
#include <fairmq/Message.h>
#include <fairmq/Socket.h>
#include <fairmq/ofi/Context.h>
#include <fairmq/ofi/ControlMessages.h>

View File

@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2018-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -23,7 +23,6 @@
#include <fairmq/ofi/Context.h>
#include <fairmq/ofi/Message.h>
#include <fairmq/ofi/Socket.h>
#include <fairmq/ofi/TransportFactory.h>
#include <memory>
#include <stdexcept>
#include <string>
@@ -84,7 +83,7 @@ struct TransportFactory final : mq::TransportFactory
return std::make_unique<Message>(&fMemoryResource, size);
}
auto CreateMessage(void* data, std::size_t size, fairmq_free_fn* ffn, void* hint = nullptr)
auto CreateMessage(void* data, std::size_t size, FreeFn* ffn, void* hint = nullptr)
-> std::unique_ptr<mq::Message> override
{
return std::make_unique<Message>(&fMemoryResource, data, size, ffn, hint);
@@ -117,7 +116,7 @@ struct TransportFactory final : mq::TransportFactory
}
auto CreatePoller(
std::unordered_map<std::string, std::vector<FairMQChannel>> const& /*channelsMap*/,
std::unordered_map<std::string, std::vector<Channel>> const& /*channelsMap*/,
std::vector<std::string> const& /*channelList*/) const
-> std::unique_ptr<mq::Poller> override
{