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

Function atomic_fetch_max

layers/sync/sync_stats.cpp:32–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0493r5.pdf
31template <typename T>
32inline T atomic_fetch_max(std::atomic<T>& current_max, const T& value) noexcept {
33 T t = current_max.load();
34 while (!current_max.compare_exchange_weak(t, std::max(t, value)));
35 return t;
36}
37} // namespace vvl
38
39namespace syncval {

Callers 2

UpdateMethod · 0.85
AddMethod · 0.85

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected