@@ -265,7 +265,7 @@ namespace
265265 static void Contains (benchmark::State& state)
266266 {
267267 constexpr dim_t DIMENSION_NO = 3 ;
268- constexpr depth_t depth = 5 ;
268+ constexpr depth_t depth = 8 ;
269269
270270 size_t entityNo = state.range ();
271271
@@ -284,14 +284,14 @@ namespace
284284 static void RangeSearch (benchmark::State& state)
285285 {
286286 constexpr dim_t DIMENSION_NO = 3 ;
287- constexpr depth_t depth = 5 ;
287+ constexpr depth_t depth = 8 ;
288288
289289 size_t entityNo = state.range ();
290290
291291 auto const points = GeneratePointsRandom<DIMENSION_NO>(entityNo);
292292 auto const tree = TreePointND<DIMENSION_NO>(points, depth);
293293 constexpr size_t boxNo = 100 ;
294- auto const searchBoxes = GenerateBoxesRandom<DIMENSION_NO>(boxNo);
294+ auto const searchBoxes = GenerateBoxesRandom<DIMENSION_NO>(boxNo, 1 , 0.05 );
295295
296296 size_t entityID = 0 ;
297297 for (auto _ : state)
@@ -326,7 +326,7 @@ namespace
326326 static void FrustumCulling (benchmark::State& state)
327327 {
328328 constexpr dim_t DIMENSION_NO = 3 ;
329- constexpr depth_t depth = 5 ;
329+ constexpr depth_t depth = 8 ;
330330
331331 size_t entityNo = state.range ();
332332
@@ -458,12 +458,12 @@ namespace
458458 {
459459 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
460460 constexpr dim_t DIMENSION_NO = 3 ;
461- constexpr depth_t depth = 5 ;
461+ constexpr depth_t depth = 8 ;
462462 using EntityID = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>::TEntityID;
463463
464464 size_t entityNo = state.range ();
465465
466- auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo);
466+ auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 , 0.02 );
467467 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
468468 auto const tree = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities, depth, boxSpace);
469469
@@ -484,16 +484,16 @@ namespace
484484 {
485485 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
486486 constexpr dim_t DIMENSION_NO = 3 ;
487- constexpr depth_t depth = 5 ;
487+ constexpr depth_t depth = 8 ;
488488
489489 size_t entityNo = state.range ();
490490
491- auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo);
491+ auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 , 0.02 );
492492 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
493493 auto const tree = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities, depth, boxSpace);
494494
495495 constexpr size_t boxNo = 100 ;
496- auto const searchBoxes = GenerateBoxesRandom<DIMENSION_NO>(boxNo, 1 );
496+ auto const searchBoxes = GenerateBoxesRandom<DIMENSION_NO>(boxNo, 1 , 0.02 );
497497
498498 size_t entityID = 0 ;
499499 for (auto _ : state)
@@ -509,11 +509,11 @@ namespace
509509 {
510510 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
511511 constexpr dim_t DIMENSION_NO = 3 ;
512- constexpr depth_t depth = 5 ;
512+ constexpr depth_t depth = 8 ;
513513
514514 size_t entityNo = state.range ();
515515
516- auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo);
516+ auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 , 0.05 );
517517 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
518518 auto const tree = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities, depth, boxSpace);
519519
@@ -534,10 +534,10 @@ namespace
534534 {
535535 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
536536 constexpr dim_t DIMENSION_NO = 3 ;
537- constexpr depth_t depth = 5 ;
537+ constexpr depth_t depth = 8 ;
538538
539539 size_t entityNo = state.range ();
540- auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo);
540+ auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 , 0.05 );
541541 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
542542 auto const tree = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities, depth, boxSpace);
543543
@@ -553,11 +553,11 @@ namespace
553553 {
554554 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
555555 constexpr dim_t DIMENSION_NO = 3 ;
556- constexpr depth_t depth = 5 ;
556+ constexpr depth_t depth = 8 ;
557557
558558 size_t entityNo = state.range ();
559- auto const entities0 = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 );
560- auto const entities1 = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 1 );
559+ auto const entities0 = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 0 , 0.05 );
560+ auto const entities1 = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 1 , 0.05 );
561561 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
562562 auto const tree0 = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities0, depth, boxSpace);
563563 auto const tree1 = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities1, depth, boxSpace);
@@ -599,11 +599,11 @@ namespace
599599 {
600600 constexpr bool DO_SPLIT_PARENT_ENTITIES = SPLIT_DEPTH_INCREASEMENT > 0 ;
601601 constexpr dim_t DIMENSION_NO = 3 ;
602- constexpr depth_t depth = 5 ;
602+ constexpr depth_t depth = 8 ;
603603
604604 size_t entityNo = state.range ();
605605
606- auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 2 );
606+ auto const entities = GenerateBoxesRandom<DIMENSION_NO>(entityNo, 2 , 0.02 );
607607 auto const boxSpace = CreateSearcBox<DIMENSION_NO>(0 , rMax);
608608 auto const tree = TreeBoxND<DIMENSION_NO, DO_SPLIT_PARENT_ENTITIES>(entities, depth, boxSpace);
609609
@@ -628,11 +628,11 @@ namespace
628628 auto const & ray = rays[entityID % rays.size ()];
629629 if constexpr (IS_FIRST)
630630 {
631- tree.RayIntersectedFirst (ray.Origin , ray.Direction , entities, 0 );
631+ benchmark::DoNotOptimize ( tree.RayIntersectedFirst (ray.Origin , ray.Direction , entities, 0 ) );
632632 }
633633 else
634634 {
635- tree.RayIntersectedAll (ray.Origin , ray.Direction , entities, 0 );
635+ benchmark::DoNotOptimize ( tree.RayIntersectedAll (ray.Origin , ray.Direction , entities, 0 ) );
636636 }
637637 ++entityID;
638638 }
0 commit comments