Skip to content

Commit 5d6861b

Browse files
committed
Benchmarks: Minor bugfix in manual benchmarks
1 parent fe66ce3 commit 5d6861b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

benchmarks/manual/benchmarks.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ namespace
549549
auto vTask = vector<MeasurementTask<BoundingBoxND<N>>>();
550550
for (size_t iSize = 0; iSize < nSizeNonLog; ++iSize)
551551
vTask.push_back(MeasurementTask<BoundingBoxND<N>>
552-
{ szName, aSizeNonLog[iSize], aRepeatNonLog[iSize] / 50, nDepth, false, aBox_.subspan(0, aSizeNonLog[iSize])
552+
{ szName, aSizeNonLog[iSize], std::max(1, aRepeatNonLog[iSize] / 50), nDepth, false, aBox_.subspan(0, aSizeNonLog[iSize])
553553
, [](depth_t nDepth, span<BoundingBoxND<N> const> const& aBox, bool fPar)
554554
{
555555
auto const vvElem = RangeSearchNaive<PointND<N>, BoundingBoxND<N>, RayND<N>, PlaneND<N>>(aBox, aBox);
@@ -572,7 +572,7 @@ namespace
572572
auto vTask = vector<MeasurementTask<BoundingBoxND<N>>>();
573573
for (size_t iSize = 0; iSize < nSizeNonLog; ++iSize)
574574
vTask.push_back(MeasurementTask<BoundingBoxND<N>>
575-
{ szName, aSizeNonLog[iSize], aRepeatNonLog[iSize] / 50, 0, false, aBox_.subspan(0, aSizeNonLog[iSize])
575+
{ szName, aSizeNonLog[iSize], std::max(1, aRepeatNonLog[iSize] / 50), 0, false, aBox_.subspan(0, aSizeNonLog[iSize])
576576
, [](depth_t nDepth, span<BoundingBoxND<N> const> const& aBox, bool fPar)
577577
{
578578
if (!fPar)
@@ -697,8 +697,8 @@ int main()
697697
// Morton vs Dynamic
698698
{
699699
auto const szName = string("Cylindrical semi-random placed points Morton vs Dynamic");
700-
auto const aPoint = GenerateGeometry<N, vector<PointND<N>>>([&] { return GeneratePointsRandom<N>(N1M); }, szName, 100, report);
701-
auto const aBox = GenerateGeometry<N, vector<BoundingBoxND<N>>>([&] { return GenerateBoxesRandom<N>(N1M); }, szName, 100, report);
700+
auto const aPoint = GenerateGeometry<N, vector<PointND<N>>>([&] { return GeneratePointsRandom<N>(100 * N1M); }, szName, 100, report);
701+
auto const aBox = GenerateGeometry<N, vector<BoundingBoxND<N>>>([&] { return GenerateBoxesRandom<N>(100 * N1M); }, szName, 100, report);
702702

703703
auto const vTaskMortonP = GeneratePointTasks<N>(nDepth, "Morton point", aPoint);
704704
auto const vTaskDynP = GeneratePointDynTasks_NonLog<N>(nDepth, "Dynamic point", aPoint);

0 commit comments

Comments
 (0)