FairMQ  1.3.9
C++ Message Passing Framework
Transports.h
1 /********************************************************************************
2  * Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef FAIR_MQ_TRANSPORTS_H
10 #define FAIR_MQ_TRANSPORTS_H
11 
12 #include <fairmq/Tools.h>
13 
14 #include <memory>
15 #include <string>
16 #include <unordered_map>
17 
18 namespace fair
19 {
20 namespace mq
21 {
22 
23 enum class Transport
24 {
25  DEFAULT,
26  ZMQ,
27  NN,
28  SHM,
29  OFI
30 };
31 
32 } /* namespace mq */
33 } /* namespace fair */
34 
35 namespace std
36 {
37 
38 template<>
39 struct hash<fair::mq::Transport> : fair::mq::tools::HashEnum<fair::mq::Transport> {};
40 
41 } /* namespace std */
42 
43 namespace fair
44 {
45 namespace mq
46 {
47 
48 static std::unordered_map<std::string, Transport> TransportTypes {
49  { "default", Transport::DEFAULT },
50  { "zeromq", Transport::ZMQ },
51  { "nanomsg", Transport::NN },
52  { "shmem", Transport::SHM },
53  { "ofi", Transport::OFI }
54 };
55 
56 static std::unordered_map<Transport, std::string> TransportNames {
57  { Transport::DEFAULT, "default" },
58  { Transport::ZMQ, "zeromq" },
59  { Transport::NN, "nanomsg" },
60  { Transport::SHM, "shmem" },
61  { Transport::OFI, "ofi" }
62 };
63 
64 } /* namespace mq */
65 } /* namespace fair */
66 
67 #endif /* FAIR_MQ_TRANSPORTS_H */
Definition: CppSTL.h:32
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy