MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / AbsDiff

Function AbsDiff

layers/utils/math_utils.h:188–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187template <typename T>
188constexpr T AbsDiff(T a, T b) {
189 static_assert(std::is_unsigned_v<T>);
190 return a > b ? a - b : b - a;
191}
192
193static inline uint32_t GetSmallestGreaterOrEquallPowerOfTwo(uint32_t v) {
194 v--;

Callers 5

CheckMaxDiffThresholdMethod · 0.85
CheckTimelineMaxDiffMethod · 0.85
ValidateTimelineWaitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected