[MIPS GlobalISel] Select MSA vector generic and builtin add
[llvm-complete.git] / utils / benchmark / test / templated_fixture_test.cc
blobec5b4c0cc07821937a514745adf9d99514b204c6
2 #include "benchmark/benchmark.h"
4 #include <cassert>
5 #include <memory>
7 template<typename T>
8 class MyFixture : public ::benchmark::Fixture {
9 public:
10 MyFixture() : data(0) {}
12 T data;
15 BENCHMARK_TEMPLATE_F(MyFixture, Foo, int)(benchmark::State &st) {
16 for (auto _ : st) {
17 data += 1;
21 BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark::State& st) {
22 for (auto _ : st) {
23 data += 1.0;
26 BENCHMARK_REGISTER_F(MyFixture, Bar);
28 BENCHMARK_MAIN();