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

Function GetPadding

IntelPresentMon/CommonUtilities/Memory.h:6–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace pmon::util
5{
6 inline constexpr size_t GetPadding(size_t byteIndex, size_t alignment)
7 {
8 const auto partialBytes = byteIndex % alignment;
9 const auto padding = (alignment - partialBytes) % alignment;
10 return padding;
11 }
12
13 template<typename T>
14 constexpr size_t GetPadding(size_t byteIndex)

Callers 2

PadToAlignmentFunction · 0.85
EstimateSampleBytes_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected