18 #include <gtest/gtest.h>
46 for (
int i = 0; i < batch_size; ++i) {
53 data.
src =
reinterpret_cast<char*
>(malloc(128));
54 data.
dst =
reinterpret_cast<char*
>(malloc(128));
62 cout <<
"Rate 16 Byte: " << rate_copy_16 << endl;
63 cout <<
"Rate 128 Byte: " << rate_copy_128 << endl;
65 ASSERT_LT(rate_copy_128, rate_copy_16);
73 int main(
int argc,
char **argv) {
75 ::testing::InitGoogleTest(&argc, argv);
76 return RUN_ALL_TESTS();
std::string Measure()
Runs all the benchmarks and returns the result in a formatted string.
int main(int argc, char **argv)
void(* BenchmarkFunction)(int iters, void *)
static double Measure(Benchmark::BenchmarkFunction fn, void *data)
void TestFunction(int batch_size, void *d)
static void Init()
Initialize CpuInfo.