14 #ifndef SST_CORE_RANKINFO_H 15 #define SST_CORE_RANKINFO_H 17 #include "sst/core/serialization/serializable.h" 26 static const uint32_t UNASSIGNED = (uint32_t)-1;
30 RankInfo(uint32_t rank, uint32_t thread) :
37 thread(UNASSIGNED) {};
39 bool isAssigned()
const {
return (rank != UNASSIGNED && thread != UNASSIGNED); }
44 bool inRange(
const RankInfo& other)
const {
return ((rank > other.rank) && (thread > other.thread)); }
46 bool operator==(
const RankInfo& other)
const {
return (rank == other.rank) && (thread == other.thread); }
48 bool operator!=(
const RankInfo& other)
const {
return !(operator==(other)); }
50 bool operator<(
const RankInfo& other)
const 52 if ( rank == other.rank )
return thread < other.thread;
53 return rank < other.rank;
56 bool operator<=(
const RankInfo& other)
const 58 if ( rank == other.rank )
return thread <= other.thread;
59 return rank <= other.rank;
62 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 70 if ( rank == other.rank )
return thread >= other.thread;
71 return rank >= other.rank;
86 #endif // SST_CORE_RANKINFO_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
bool inRange(const RankInfo &other) const
Definition: rankInfo.h:44
Definition: serializable.h:23
Definition: rankInfo.h:23