Lines Matching refs:T
30 template <typename T> class BenchmarkWantsArg;
31 template <typename T> class BenchmarkWithArg;
58 template <typename T>
61 BenchmarkWantsArgBase(const char* name, void (*fn)(int, T)) : Benchmark(name) { in BenchmarkWantsArgBase() argument
65 BenchmarkWantsArgBase<T>* Arg(const char* arg_name, T arg) { in Arg()
66 BenchmarkRegister(new BenchmarkWithArg<T>(name_, fn_arg_, arg_name, arg)); in Arg()
72 void (*fn_arg_)(int, T);
75 template <typename T>
76 class BenchmarkWithArg : public BenchmarkWantsArg<T> {
78 BenchmarkWithArg(const char* name, void (*fn)(int, T), const char* arg_name, T arg) : in BenchmarkWithArg() argument
79 BenchmarkWantsArg<T>(name, fn), arg_(arg) { in BenchmarkWithArg()
90 virtual void RunFn(int iterations) { BenchmarkWantsArg<T>::fn_arg_(iterations, arg_); } in RunFn()
93 T arg_;
97 template <typename T>
98 class BenchmarkWantsArg : public BenchmarkWantsArgBase<T> {
100 BenchmarkWantsArg<T>(const char* name, void (*fn)(int, T)) :
101 BenchmarkWantsArgBase<T>(name, fn) { }
122 template <typename T>
123 static inline BenchmarkWantsArg<T>* BenchmarkFactory(const char* name, void (*fn)(int, T)) { in BenchmarkFactory() argument
124 return new BenchmarkWantsArg<T>(name, fn); in BenchmarkFactory()
129 template <typename T>
130 static inline void BenchmarkAddArg(::testing::Benchmark* b, const char* name, T arg) { in BenchmarkAddArg()
131 ::testing::BenchmarkWantsArg<T>* ba; in BenchmarkAddArg()
132 ba = static_cast< ::testing::BenchmarkWantsArg<T>* >(b); in BenchmarkAddArg()