9 #include <benchmark/benchmark.h>
15 namespace benchmarks {
18 constexpr
static double step = .139;
27 if (this->size_ ==
size)
return;
32 for (
int i = 0; i <
size; ++i) {
41 pos_ += 2 * radiusInSteps;
42 if (pos_ >=
size_ - radiusInSteps) {
46 Eigen::Vector3d query = {(pos_ + 0.1) * step, 0., 0.};
47 double radius = radiusInSteps * step;
48 std::vector<int> indices;
49 std::vector<double> distance2;
53 if (
result != radiusInSteps * 2) {
55 "error! size={:d} radiusInSteps={:d} pos={:d} num={:d}",
65 int radius = state.range(0);
66 int size = state.range(1);
68 for (
auto _ : state) {
78 ->Ranges({{1 << 0, 1 << 14}, {1 << 16, 1 << 22}});
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
void clear() override
Clears the entity from all its points and features.
void addEigenPoint(const Eigen::Vector3d &point)
void search(int radiusInSteps)
KDTree with FLANN for nearest neighbor search.
int SearchRadius(const T &query, double radius, std::vector< int > &indices, std::vector< double > &distance2) const
bool SetGeometry(const ccHObject &geometry)
BENCHMARK(BM_TestKDTreeLine0) -> Args({1<< 5, 1<< 10}) ->Args({1<< 9, 1<< 11})
static void BM_TestKDTreeLine0(benchmark::State &state)
TestKDTreeLine0 testKDTreeLine0
Generic file read and write utility for python interface.