MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / At

Method At

IntelPresentMon/SampleClient/PacedPlayback.cpp:67–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66 template<typename T>
67 T At(size_t iElement)
68 {
69 const auto off = qInfo_[iElement].offset;
70 switch (qInfo_[iElement].type) {
71 case PM_DATA_TYPE_BOOL: return (T)reinterpret_cast<const bool&>(pFirstByteTarget_[off]);
72 case PM_DATA_TYPE_DOUBLE: return reinterpret_cast<const double&>(pFirstByteTarget_[off]);
73 case PM_DATA_TYPE_ENUM: return (T)reinterpret_cast<const int&>(pFirstByteTarget_[off]);
74 case PM_DATA_TYPE_INT32: return (T)reinterpret_cast<const int32_t&>(pFirstByteTarget_[off]);
75 case PM_DATA_TYPE_STRING: return (T)-1;
76 case PM_DATA_TYPE_UINT32: return (T)reinterpret_cast<const uint32_t&>(pFirstByteTarget_[off]);
77 case PM_DATA_TYPE_UINT64: return (T)reinterpret_cast<const uint64_t&>(pFirstByteTarget_[off]);
78 case PM_DATA_TYPE_VOID: return (T)-1;
79 }
80 return (T)-1;
81 }
82private:
83 const uint8_t* pFirstByteTarget_ = nullptr;
84 std::vector<LookupInfo_> qInfo_;

Callers 12

PollMethod · 0.45
PollMethod · 0.45
ProcessNewFrames_Method · 0.45
TEST_METHODFunction · 0.45
DumpRing_Function · 0.45
TEST_METHODFunction · 0.45
DumpRing_Function · 0.45
TEST_METHODFunction · 0.45
HistoryRingClass · 0.45

Calls

no outgoing calls

Tested by 6

TEST_METHODFunction · 0.36
DumpRing_Function · 0.36
TEST_METHODFunction · 0.36
DumpRing_Function · 0.36
TEST_METHODFunction · 0.36