14 #ifndef SST_CORE_RANKINFO_H
15 #define SST_CORE_RANKINFO_H
17 #include "sst/core/serialization/serializable.h"
24 static const uint32_t UNASSIGNED = (uint32_t)-1;
28 RankInfo(uint32_t rank, uint32_t thread) : rank(rank), thread(thread) {}
30 RankInfo() : rank(UNASSIGNED), thread(UNASSIGNED) {};
32 bool isAssigned()
const {
return (rank != UNASSIGNED && thread != UNASSIGNED); }
37 bool inRange(
const RankInfo& other)
const {
return ((rank > other.rank) && (thread > other.thread)); }
39 bool operator==(
const RankInfo& other)
const {
return (rank == other.rank) && (thread == other.thread); }
41 bool operator!=(
const RankInfo& other)
const {
return !(operator==(other)); }
43 bool operator<(
const RankInfo& other)
const
45 if ( rank == other.rank )
return thread < other.thread;
46 return rank < other.rank;
49 bool operator<=(
const RankInfo& other)
const
51 if ( rank == other.rank )
return thread <= other.thread;
52 return rank <= other.rank;
55 bool operator>(
const RankInfo& other)
const
57 if ( rank == other.rank )
return thread > other.thread;
58 return rank > other.rank;
61 bool operator>=(
const RankInfo& other)
const
63 if ( rank == other.rank )
return thread >= other.thread;
64 return rank >= other.rank;
Definition: serializable.h:119
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Definition: rankInfo.h:22
bool inRange(const RankInfo &other) const
Definition: rankInfo.h:37