@@ -43,31 +43,31 @@ BENCHMARK_DEFINE_F(BmPicoKdTree, BuildCtSldMid)(benchmark::State& state) {
4343 int max_leaf_size = state.range (0 );
4444
4545 for (auto _ : state) {
46- PicoKdTreeCtSldMid<PointX> tree (points_ , max_leaf_size);
46+ PicoKdTreeCtSldMid<PointX> tree (points_tree_ , max_leaf_size);
4747 }
4848}
4949
5050BENCHMARK_DEFINE_F (BmPicoKdTree, BuildCtLngMed)(benchmark::State& state) {
5151 int max_leaf_size = state.range (0 );
5252
5353 for (auto _ : state) {
54- PicoKdTreeCtLngMed<PointX> tree (points_ , max_leaf_size);
54+ PicoKdTreeCtLngMed<PointX> tree (points_tree_ , max_leaf_size);
5555 }
5656}
5757
5858BENCHMARK_DEFINE_F (BmPicoKdTree, BuildRtSldMid)(benchmark::State& state) {
5959 int max_leaf_size = state.range (0 );
6060
6161 for (auto _ : state) {
62- PicoKdTreeRtSldMid<PointX> tree (points_ , max_leaf_size);
62+ PicoKdTreeRtSldMid<PointX> tree (points_tree_ , max_leaf_size);
6363 }
6464}
6565
6666BENCHMARK_DEFINE_F (BmPicoKdTree, BuildRtLngMed)(benchmark::State& state) {
6767 int max_leaf_size = state.range (0 );
6868
6969 for (auto _ : state) {
70- PicoKdTreeRtLngMed<PointX> tree (points_ , max_leaf_size);
70+ PicoKdTreeRtLngMed<PointX> tree (points_tree_ , max_leaf_size);
7171 }
7272}
7373
@@ -98,12 +98,12 @@ BENCHMARK_DEFINE_F(BmPicoKdTree, KnnCtSldMid)(benchmark::State& state) {
9898 int max_leaf_size = state.range (0 );
9999 int knn_count = state.range (1 );
100100
101- PicoKdTreeCtSldMid<PointX> tree (points_ , max_leaf_size);
101+ PicoKdTreeCtSldMid<PointX> tree (points_tree_ , max_leaf_size);
102102
103103 for (auto _ : state) {
104104 std::vector<pico_tree::Neighbor<Index, Scalar>> results;
105105 std::size_t sum = 0 ;
106- for (auto const & p : points_ ) {
106+ for (auto const & p : points_test_ ) {
107107 tree.SearchKnn (p, knn_count, &results);
108108 benchmark::DoNotOptimize (sum += results.size ());
109109 }
@@ -114,12 +114,12 @@ BENCHMARK_DEFINE_F(BmPicoKdTree, KnnCtLngMed)(benchmark::State& state) {
114114 int max_leaf_size = state.range (0 );
115115 int knn_count = state.range (1 );
116116
117- PicoKdTreeCtLngMed<PointX> tree (points_ , max_leaf_size);
117+ PicoKdTreeCtLngMed<PointX> tree (points_tree_ , max_leaf_size);
118118
119119 for (auto _ : state) {
120120 std::vector<pico_tree::Neighbor<Index, Scalar>> results;
121121 std::size_t sum = 0 ;
122- for (auto const & p : points_ ) {
122+ for (auto const & p : points_test_ ) {
123123 tree.SearchKnn (p, knn_count, &results);
124124 benchmark::DoNotOptimize (sum += results.size ());
125125 }
@@ -129,11 +129,11 @@ BENCHMARK_DEFINE_F(BmPicoKdTree, KnnCtLngMed)(benchmark::State& state) {
129129BENCHMARK_DEFINE_F (BmPicoKdTree, NnCtSldMid)(benchmark::State& state) {
130130 int max_leaf_size = state.range (0 );
131131
132- PicoKdTreeCtSldMid<PointX> tree (points_ , max_leaf_size);
132+ PicoKdTreeCtSldMid<PointX> tree (points_tree_ , max_leaf_size);
133133
134134 for (auto _ : state) {
135135 pico_tree::Neighbor<Index, Scalar> result;
136- for (auto const & p : points_ ) {
136+ for (auto const & p : points_test_ ) {
137137 tree.SearchNn (p, &result);
138138 }
139139 }
@@ -142,11 +142,11 @@ BENCHMARK_DEFINE_F(BmPicoKdTree, NnCtSldMid)(benchmark::State& state) {
142142BENCHMARK_DEFINE_F (BmPicoKdTree, NnCtLngMed)(benchmark::State& state) {
143143 int max_leaf_size = state.range (0 );
144144
145- PicoKdTreeCtLngMed<PointX> tree (points_ , max_leaf_size);
145+ PicoKdTreeCtLngMed<PointX> tree (points_tree_ , max_leaf_size);
146146
147147 for (auto _ : state) {
148148 pico_tree::Neighbor<Index, Scalar> result;
149- for (auto const & p : points_ ) {
149+ for (auto const & p : points_test_ ) {
150150 tree.SearchNn (p, &result);
151151 }
152152 }
@@ -217,15 +217,15 @@ BENCHMARK_REGISTER_F(BmPicoKdTree, NnCtLngMed)
217217
218218BENCHMARK_DEFINE_F (BmPicoKdTree, RadiusCtSldMid)(benchmark::State& state) {
219219 int max_leaf_size = state.range (0 );
220- double radius = static_cast <double >(state.range (1 )) / 10.0 ;
221- double squared = radius * radius;
220+ Scalar radius = static_cast <Scalar >(state.range (1 )) / 10.0 ;
221+ Scalar squared = radius * radius;
222222
223- PicoKdTreeCtSldMid<PointX> tree (points_ , max_leaf_size);
223+ PicoKdTreeCtSldMid<PointX> tree (points_tree_ , max_leaf_size);
224224
225225 for (auto _ : state) {
226226 std::vector<pico_tree::Neighbor<Index, Scalar>> results;
227227 std::size_t sum = 0 ;
228- for (auto const & p : points_ ) {
228+ for (auto const & p : points_test_ ) {
229229 tree.SearchRadius (p, squared, &results);
230230 benchmark::DoNotOptimize (sum += results.size ());
231231 }
0 commit comments