Closed xshen053 closed 1 year ago
Solved, reason is I didn't install google benchmark
This benchmark cannot be compiled
1355 | FunctionBenchmark(const std::string& name, Function* func)
| ~~~~~~~~~~^~~~
/home/ubuntu/xiaxi/g2o/benchmarks/jacobian_timing_tests.cpp:239:3: error: no matching function for call to ‘benchmark::internal::FunctionBenchmark::FunctionBenchmark(const char [31], <unresolved overloaded function type>)’
239 | BENCHMARK_TEMPLATE2(M, F, 3); \
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/xiaxi/g2o/benchmarks/jacobian_timing_tests.cpp:257:1: note: in expansion of macro ‘BENCHMARK_FIXED_DIMENSION’
257 | BENCHMARK_FIXED_DIMENSION(BM_StaticEigenMatrix, double)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/benchmark/benchmark.h:1355:3: note: candidate: ‘benchmark::internal::FunctionBenchmark::FunctionBenchmark(const string&, void (*)(benchmark::State&))’
1355 | FunctionBenchmark(const std::string& name, Function* func)
| ^~~~~~~~~~~~~~~~~
/usr/local/include/benchmark/benchmark.h:1355:56: note: no known conversion for argument 2 from ‘<unresolved overloaded function type>’ to ‘void (*)(benchmark::State&)’
1355 | FunctionBenchmark(const std::string& name, Function* func)
| ~~~~~~~~~~^~~~
/home/ubuntu/xiaxi/g2o/benchmarks/jacobian_timing_tests.cpp:240:3: error: no matching function for call to ‘benchmark::internal::FunctionBenchmark::FunctionBenchmark(const char [31], <unresolved overloaded function type>)’
240 | BENCHMARK_TEMPLATE2(M, F, 6); \
| ^~~~~~~~~~~~~~~~~~~
/home/ubuntu/xiaxi/g2o/benchmarks/jacobian_timing_tests.cpp:257:1: not
The benchmark focus on a very particular aspect on how to allocate an array. Might not provide much insights into things like which linear solver is faster depending on the size of problem or other aspects. I will fix the benchmark that it can be compiled.
I set flag in CMakeLists of benchmark to ON, but looks like it cannot find it.