PUP namespace
Extensions to Charm++'s Pack/Unpack routines.
Contents
- Reference
Functions
-
template<typename E, typename std::enable_if<std::is_enum<E>::value, int>::type = 0>void pup(PUP::er& p, E& e)
- Pack/Unpack enum class.
-
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>void pup(PUP::er& p, std::unordered_map<Key, T, Hash, KeyEqual>& m)
-
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>void operator|(PUP::er& p, std::unordered_map<Key, T, Hash, KeyEqual>& m)
-
template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>void pup(PUP::er& p, std::unordered_set<Key, Hash, KeyEqual>& s)
-
template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>void operator|(PUP::er& p, std::unordered_set<Key, Hash, KeyEqual>& s)
-
template<class T>void pup(PUP::er& p, std::optional<T>& o)
-
template<class T>void operator|(PUP::er& p, std::optional<T>& o)
-
template<class T, class... Ts>auto pup_helper(std::size_t& index, const std::size_t send_index, PUP::er& p, std::variant<Ts...>& var) -> char
-
template<class... Ts>void pup(PUP::er& p, std::variant<Ts...>& var)
-
template<typename... Ts>void operator|(PUP::er& p, std::variant<Ts...>& d)
Function documentation
template<typename E, typename std::enable_if<std::is_enum<E>::value, int>::type = 0>
void PUP:: pup(PUP::er& p,
E& e)
Pack/Unpack enum class.
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
e in | Enum class to pack/unpack |
In Charm++ usually both the pup() overload and an overload for operator| are defined for all serializable types. However, we cannot define operator| for enum class as it would conflict with Charm++'s catch-all, template< class T > inline void operator|(PUP::er &p,T &t) {...}.
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>
void PUP:: pup(PUP::er& p,
std::unordered_map<Key, T, Hash, KeyEqual>& m)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
m in | std::unordered_map< Key, T, Hash, KeyEqual > to pack/unpack |
Pack/Unpack std::unordered_map.
template<class Key, class T, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>
void PUP:: operator|(PUP::er& p,
std::unordered_map<Key, T, Hash, KeyEqual>& m)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
m in | std::unordered_map< Key, T, Hash, KeyEqual > to pack/unpack |
Pack/Unpack std::unordered_map.
template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>
void PUP:: pup(PUP::er& p,
std::unordered_set<Key, Hash, KeyEqual>& s)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
s in | std::unordered_set< Key, Hash, KeyEqual > to pack/unpack |
Pack/Unpack std::unordered_set.
template<class Key, class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>>
void PUP:: operator|(PUP::er& p,
std::unordered_set<Key, Hash, KeyEqual>& s)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
s in | std::unordered_set< Key, Hash, KeyEqual > to pack/unpack |
Pack/Unpack std::unordered_set.
template<class T>
void PUP:: pup(PUP::er& p,
std::optional<T>& o)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
o in | std::optional< T > of arbitrary type T to pack/unpack |
Pack/Unpack std::optional
template<class T>
void PUP:: operator|(PUP::er& p,
std::optional<T>& o)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
o in | std::optional< T > of arbitrary type T to pack/unpack |
Pack/Unpack std::optional
template<class T, class... Ts>
char PUP:: pup_helper(std::size_t& index,
const std::size_t send_index,
PUP::er& p,
std::variant<Ts...>& var)
Parameters | |
---|---|
index in/out | Counter (location) for type in variant |
send_index in | Target counter (location) for type in variant |
p in | Charm++'s pack/unpack object |
var in | std::variant< Ts... > of arbitrary types to pack/unpack |
Pack/Unpack helper for std::variant
template<class... Ts>
void PUP:: pup(PUP::er& p,
std::variant<Ts...>& var)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
var in | std::variant< Ts... > of arbitrary types to pack/unpack |
Pack/Unpack std::variant
template<typename... Ts>
void PUP:: operator|(PUP::er& p,
std::variant<Ts...>& d)
Parameters | |
---|---|
p in | Charm++'s pack/unpack object |
d in | std::variant< Ts... > of arbitrary types to pack/unpack |
Pack/Unpack std::variant