@@ -137,20 +137,15 @@ void tns::TreeNSearch::set_cell_size(const double cell_size)
137137}
138138void tns::TreeNSearch::run ()
139139{
140- if (this ->get_total_n_points () < this ->number_of_too_few_particles ) {
141- this ->run_scalar ();
142- }
143- else {
144- // Run in SIMD mode
145- this ->_set_up ();
146- this ->_check ();
147- this ->_clear_neighborlists ();
148- this ->_update_world_AABB_simd ();
149- this ->_points_to_cells_simd ();
150- this ->_build_octree_and_gather_leaves_simd ();
151- this ->_solve_leaves (/* use_simd = */ true );
152- this ->are_cells_valid = true ;
153- }
140+ // Run in SIMD mode
141+ this ->_set_up ();
142+ this ->_check ();
143+ this ->_clear_neighborlists ();
144+ this ->_update_world_AABB_simd ();
145+ this ->_points_to_cells_simd ();
146+ this ->_build_octree_and_gather_leaves_simd ();
147+ this ->_solve_leaves (/* use_simd = */ true );
148+ this ->are_cells_valid = true ;
154149}
155150void tns::TreeNSearch::run_scalar ()
156151{
@@ -432,24 +427,6 @@ void tns::TreeNSearch::_update_world_AABB()
432427 std::array<float , 3 > new_bottom = { MAXf, MAXf, MAXf };
433428 std::array<float , 3 > new_top = { MINf, MINf, MINf };
434429
435- // Sequentual computation if points are too few
436- if (this ->get_total_n_points () < this ->number_of_too_few_particles ) {
437- for (int set_i = 0 ; set_i < this ->n_sets ; set_i++) {
438- const float * points = this ->set_points [set_i];
439- const int n_points = this ->get_n_points_in_set (set_i);
440-
441- for (int point_i = 0 ; point_i < n_points; point_i++) {
442- new_bottom[0 ] = std::min (new_bottom[0 ], points[3 * point_i]);
443- new_bottom[1 ] = std::min (new_bottom[1 ], points[3 * point_i + 1 ]);
444- new_bottom[2 ] = std::min (new_bottom[2 ], points[3 * point_i + 2 ]);
445-
446- new_top[0 ] = std::max (new_top[0 ], points[3 * point_i]);
447- new_top[1 ] = std::max (new_top[1 ], points[3 * point_i + 1 ]);
448- new_top[2 ] = std::max (new_top[2 ], points[3 * point_i + 2 ]);
449- }
450- }
451- }
452-
453430 // Parallel version
454431 // Note: Paralelized across points and sets
455432 for (int set_i = 0 ; set_i < this ->n_sets ; set_i++) {
@@ -2603,11 +2580,6 @@ void tns::TreeNSearch::prepare_zsort()
26032580 and then find the new point indices concatenating the cell's points in order.
26042581 */
26052582
2606- // Minimum number of points for zsort
2607- if (this ->get_total_n_points () < this ->number_of_too_few_particles ) {
2608- this ->are_cells_valid = false ; // Ensures we do a global zsort
2609- }
2610-
26112583 // Set up
26122584 this ->_set_up ();
26132585
0 commit comments