Skip to content

Commit d4c4eb6

Browse files
committed
- fix
1 parent 5aa4efe commit d4c4eb6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cuNSearchDeviceData.cu

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ namespace cuNSearch
2626
{
2727
void cuNSearchDeviceData::computeMinMax(PointSet &pointSet)
2828
{
29+
if (pointSet.n_points() == 0)
30+
return;
31+
2932
auto pointSetImpl = pointSet.impl.get();
3033

3134
Int3 data[2];
@@ -76,6 +79,9 @@ namespace cuNSearch
7679

7780
void cuNSearchDeviceData::computeCellInformation(PointSet &pointSet)
7881
{
82+
if (pointSet.n_points() == 0)
83+
return;
84+
7985
auto pointSetImpl = pointSet.impl.get();
8086
Real3 sceneMin = pointSetImpl->Min;
8187
Real3 sceneMax = pointSetImpl->Max;
@@ -169,6 +175,9 @@ namespace cuNSearch
169175

170176
void cuNSearchDeviceData::computeNeighborhood(PointSet &queryPointSet, PointSet &pointSet, uint neighborListEntry)
171177
{
178+
if (queryPointSet.n_points() == 0)
179+
return;
180+
172181
auto queryPointSetImpl = queryPointSet.impl.get();
173182
auto pointSetImpl = pointSet.impl.get();
174183

0 commit comments

Comments
 (0)