TransportFactory.h
/********************************************************************************
* Copyright (C) 2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIR_MQ_OFI_TRANSPORTFACTORY_H
#define FAIR_MQ_OFI_TRANSPORTFACTORY_H
#include <FairMQTransportFactory.h>
#include <options/FairMQProgOptions.h>
#include <fairmq/ofi/Context.h>
namespace fair
{
namespace mq
{
namespace ofi
{
class TransportFactory final : public FairMQTransportFactory
{
public:
TransportFactory(const std::string& id = "", const FairMQProgOptions* config = nullptr);
TransportFactory(const TransportFactory&) = delete;
TransportFactory operator=(const TransportFactory&) = delete;
auto CreateMessage() const -> MessagePtr override;
auto CreateMessage(const std::size_t size) const -> MessagePtr override;
auto CreateMessage(void* data, const std::size_t size, fairmq_free_fn* ffn, void* hint = nullptr) const -> MessagePtr override;
auto CreateMessage(UnmanagedRegionPtr& region, void* data, const std::size_t size, void* hint = nullptr) const -> MessagePtr override;
auto CreateSocket(const std::string& type, const std::string& name) -> SocketPtr override;
auto CreatePoller(const std::vector<FairMQChannel>& channels) const -> PollerPtr override;
auto CreatePoller(const std::vector<const FairMQChannel*>& channels) const -> PollerPtr override;
auto CreatePoller(const std::unordered_map<std::string, std::vector<FairMQChannel>>& channelsMap, const std::vector<std::string>& channelList) const -> PollerPtr override;
auto CreateUnmanagedRegion(const size_t size, FairMQRegionCallback callback = nullptr) const -> UnmanagedRegionPtr override;
auto GetType() const -> Transport override;
void Interrupt() override {}
void Resume() override {}
void Reset() override {}
private:
mutable Context fContext;
}; /* class TransportFactory */
} /* namespace ofi */
} /* namespace mq */
} /* namespace fair */
#endif /* FAIR_MQ_OFI_TRANSPORTFACTORY_H */
fair::mq::ofi::Context
Transport-wide context.
Definition: Context.h:38
fair::mq::ofi::TransportFactory::CreateSocket
auto CreateSocket(const std::string &type, const std::string &name) -> SocketPtr override
Create a socket.
Definition: TransportFactory.cxx:59
FairMQTransportFactory
Definition: FairMQTransportFactory.h:28
fair::mq::ofi::TransportFactory::GetType
auto GetType() const -> Transport override
Get transport type.
Definition: TransportFactory.cxx:84
FairMQProgOptions
Definition: FairMQProgOptions.h:37
fair::mq::ofi::TransportFactory
FairMQ transport factory for the ofi transport (implemented with ZeroMQ + libfabric)
Definition: TransportFactory.h:29
fair::mq::ofi::TransportFactory::CreatePoller
auto CreatePoller(const std::vector< FairMQChannel > &channels) const -> PollerPtr override
Create a poller for a single channel (all subchannels)
fair
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy