35 #ifndef MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED
36 #define MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED
52 inline bool operator==(
const DistributedID& left,
const DistributedID& right) {
53 return (left.first == right.first) && (left.second == right.second);
62 inline bool operator!=(
const DistributedID& left,
const DistributedID& right) {
63 return (left.first != right.first) || (left.second != right.second);
70 template <
typename Key,
typename Tag =
void>
86 key_(key), proc_(proc)
93 key_(other.key_), proc_(other.proc_)
122 return ((key_ == other.key_) && (proc_ == other.proc_));
131 return ((key_ != other.key_) || (proc_ != other.proc_));
138 template <
typename Archive>
149 hashT seed = hasher(key.key_);
160 template <
typename Key,
typename Tag>
201 return (key_ == other.key_);
210 return (key_ != other.key_);
217 template <
typename Archive>
226 return hasher(key.key_);
248 #endif // MADNESS_WORLD_DISTRIBUTED_ID_H__INCLUDED
void serialize(const Archive &ar)
Serialize this key.
Definition: dist_keys.h:218
ProcessKey()
Default constructor.
Definition: dist_keys.h:79
TaggedKey< Key, Tag > & operator=(const TaggedKey< Key, Tag > &other)
Copy assignment operator.
Definition: dist_keys.h:185
Definition: mpreal.h:3066
ProcessKey< Key, Tag > & operator=(const ProcessKey< Key, Tag > &other)
Copy assignment operator.
Definition: dist_keys.h:100
Key object that included the process information.
Definition: dist_keys.h:71
ProcessID proc() const
Process id accessor.
Definition: dist_keys.h:114
TaggedKey(const Key &key)
Constructor.
Definition: dist_keys.h:174
friend hashT hash_value(const ProcessKey< Key, Tag > &key)
Hashing function.
Definition: dist_keys.h:147
const Key & key() const
Base key accessor.
Definition: dist_keys.h:109
void combine_hash(hashT &seed, hashT hash)
Internal use only.
Definition: worldhash.h:247
bool operator!=(const ProcessKey< Key, Tag > &other) const
Inequality comparison.
Definition: dist_keys.h:130
bool operator==(const ProcessKey< Key, Tag > &other) const
Equality comparison.
Definition: dist_keys.h:121
const Key & key() const
Base key accessor.
Definition: dist_keys.h:193
madness::hashT hash_value(const std::array< T, N > &a)
Hash std::array with madness::Hash.
Definition: array.h:62
TaggedKey()
Default constructor.
Definition: dist_keys.h:168
ProcessKey(const ProcessKey< Key, Tag > &other)
Copy constructor.
Definition: dist_keys.h:92
std::size_t hashT
The hash value type.
Definition: worldhash.h:148
int ProcessID
Used to clearly identify process number/rank.
Definition: worldtypes.h:37
std::pair< uniqueidT, std::size_t > DistributedID
Distributed ID which is used to identify objects.
Definition: dist_keys.h:44
madness::hashT hash_value(const madness::DistributedID &id)
Hash a DistributedID.
Definition: dist_keys.h:239
bool operator==(const TaggedKey< Key, Tag > &other) const
Equality comparison.
Definition: dist_keys.h:200
friend hashT hash_value(const TaggedKey< Key, Tag > &key)
Hashing function.
Definition: dist_keys.h:224
ProcessKey(const Key &key, const ProcessID proc)
Constructor.
Definition: dist_keys.h:85
TaggedKey(const TaggedKey< Key, Tag > &other)
Copy constructor.
Definition: dist_keys.h:179
bool operator==(const DistributedID &left, const DistributedID &right)
Distributed ID equality comparison operator.
Definition: dist_keys.h:52
bool operator!=(const DistributedID &left, const DistributedID &right)
Distributed ID inequality comparison operator.
Definition: dist_keys.h:62
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
Key object that uses a tag to differentiate keys.
Definition: dist_keys.h:161
Hash functor.
Definition: shared_ptr_bits.h:32
Key is the index for a node of the 2^NDIM-tree.
Definition: key.h:69
void serialize(const Archive &ar)
Serialize this key.
Definition: dist_keys.h:139
bool operator!=(const TaggedKey< Key, Tag > &other) const
Inequality comparison.
Definition: dist_keys.h:209