File: link_main_test.cc

package info (click to toggle)
benchmark 1.9.5-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,820 kB
  • sloc: cpp: 14,339; python: 2,399; ansic: 38; sh: 28; makefile: 14
file content (12 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#include "benchmark/benchmark.h"

namespace {
void BM_empty(benchmark::State& state) {
  for (auto _ : state) {
    auto iterations = static_cast<double>(state.iterations()) *
                      static_cast<double>(state.iterations());
    benchmark::DoNotOptimize(iterations);
  }
}
BENCHMARK(BM_empty);
}  // end namespace