MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / black_box

Function black_box

crates/memtrack/testdata/alloc_cpp/src/main.cpp:21–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19// Similar to Rust's core::hint::black_box
20template<typename T>
21inline void black_box(T* ptr) {
22 asm volatile("" : : "r,m"(ptr) : "memory");
23}
24
25int main() {
26 std::this_thread::sleep_for(std::chrono::seconds(1));

Callers 3

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected