| 55 | } |
| 56 | |
| 57 | class BM_ReprojErrorConstantPoseCostFunction : public benchmark::Fixture { |
| 58 | public: |
| 59 | void SetUp(::benchmark::State& state) { |
| 60 | cost_function.reset( |
| 61 | ReprojErrorConstantPoseCostFunctor<camera_model>::Create( |
| 62 | data.point2D, data.cam_from_world)); |
| 63 | } |
| 64 | |
| 65 | ReprojErrorData data = CreateReprojErrorData(); |
| 66 | const double* parameters[2] = {data.point3D.data(), |
| 67 | data.camera_params.data()}; |
| 68 | double residuals[2]; |
| 69 | double jacobian_p[2 * 3]; |
| 70 | double jacobian_params[2 * camera_model::num_params]; |
| 71 | double* jacobians[2] = {jacobian_p, jacobian_params}; |
| 72 | std::unique_ptr<ceres::CostFunction> cost_function; |
| 73 | }; |
| 74 | |
| 75 | BENCHMARK_F(BM_ReprojErrorConstantPoseCostFunction, Run) |
| 76 | (benchmark::State& state) { |
nothing calls this directly
no test coverage detected