MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DoNotOptimize

Function DoNotOptimize

tensorflow/core/platform/test_benchmark.h:78–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76// compiler from optimizing away 'c' as dead code.
77template <class T>
78void DoNotOptimize(const T& var) {
79 asm volatile("" : "+m"(const_cast<T&>(var)));
80}
81
82class Benchmark {
83 public:

Callers 15

BM_DotprodSparseMultiplyFunction · 0.85
BM_CopyFunction · 0.85
BM_ForEachFunction · 0.85
BM_IterateFunction · 0.85
BM_RoundFloatToBFloat16Function · 0.85
BM_TensorShape_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected