tensorflow/cc/experimental/libtf/tests/perf_test.cc
// Add numbers in a loop by calling a raw C++ function with a function
// pointer.
Add numbers in a loop by calling a raw C++ function with a function
pointer.
Add numbers in a loop by calling a raw C ++ function with a function pointer .
void CallFunctionsBase(::testing::benchmark::State& state) {
  int64_t sum = 0;
  typedef int64_t (*Func)(int64_t a, int64_t b);
  volatile Func f_raw = AddRaw;
  Func f = f_raw;
  size_t i = 0;
  for (auto dummy : state) {
    sum = f(sum, i);
    i++;
  }
}
void CallFunctionsBase ( :: testing :: benchmark :: State & state ) { int64_t sum = 0 ; typedef int64_t ( * Func ) ( int64_t a , int64_t b ) ; volatile Func f_raw = AddRaw ; Func f = f_raw ; size_t i = 0 ; for ( auto dummy : state ) { sum = f ( sum , i ) ; i ++ ; } }
Add numbers in a loop by calling a raw C++ function with a function
pointer.
Add numbers in a loop by calling a raw C ++ function with a function pointer .
// volatile int64_t result = sum;