14 #ifndef SST_CORE_RANKINFO_H
15 #define SST_CORE_RANKINFO_H
17 #include <sst/core/serialization/serializable.h>
23 static const uint32_t UNASSIGNED = (uint32_t)-1;
27 RankInfo(uint32_t rank, uint32_t thread) :
28 rank(rank), thread(thread)
31 RankInfo() : rank(UNASSIGNED), thread(UNASSIGNED)
34 bool isAssigned()
const {
35 return (rank != UNASSIGNED && thread != UNASSIGNED);
42 return ((rank > other.rank) && (thread > other.thread));
45 bool operator==(
const RankInfo& other)
const {
46 return (rank == other.rank) && (thread == other.thread);
49 bool operator!=(
const RankInfo& other)
const {
50 return !(operator==(other));
53 bool operator<(
const RankInfo& other)
const {
54 if ( rank == other.rank )
return thread < other.thread;
55 return rank < other.rank;
58 bool operator<=(
const RankInfo& other)
const {
59 if ( rank == other.rank )
return thread <= other.thread;
60 return rank <= other.rank;
63 bool operator>(
const RankInfo& other)
const {
64 if ( rank == other.rank )
return thread > other.thread;
65 return rank > other.rank;
68 bool operator>=(
const RankInfo& other)
const {
69 if ( rank == other.rank )
return thread >= other.thread;
70 return rank >= other.rank;
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Definition: serializable.h:110
Definition: rankInfo.h:21
bool inRange(const RankInfo &other) const
Definition: rankInfo.h:41