11 #ifndef hifi_workload_Region_h
12 #define hifi_workload_Region_h
29 static constexpr uint32_t NUM_KNOWN_REGIONS = uint32_t(Region::R4 - Region::R1 + 1);
30 static constexpr uint32_t NUM_TRACKED_REGIONS = uint32_t(Region::R3 - Region::R1 + 1);
31 static const uint8_t NUM_REGION_TRANSITIONS = NUM_KNOWN_REGIONS * (NUM_KNOWN_REGIONS - 1);
33 static uint8_t computeTransitionIndex(uint8_t prevIndex, uint8_t newIndex);
37 inline uint8_t Region::computeTransitionIndex(uint8_t prevIndex, uint8_t newIndex) {
65 uint8_t p = prevIndex + Region::NUM_KNOWN_REGIONS * newIndex;
66 if (0 == (p % (Region::NUM_KNOWN_REGIONS + 1))) {
69 return p - (1 + p / (Region::NUM_KNOWN_REGIONS + 1));