Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
1a2f174f
Unverified
Commit
1a2f174f
authored
Mar 24, 2022
by
VVsssssk
Committed by
GitHub
Mar 24, 2022
Browse files
[Bug] Fix voxelization bug (#1822)
* fix voxelization bug * fix code
parent
d929fa41
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
+2
-2
No files found.
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
View file @
1a2f174f
...
@@ -101,7 +101,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
...
@@ -101,7 +101,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
CUDA_1D_KERNEL_LOOP
(
index
,
num_points
)
{
CUDA_1D_KERNEL_LOOP
(
index
,
num_points
)
{
auto
coor_offset
=
coor
+
index
*
NDim
;
auto
coor_offset
=
coor
+
index
*
NDim
;
// skip invalid points
// skip invalid points
if
(
coor_offset
[
0
]
==
-
1
)
return
;
if
(
coor_offset
[
0
]
==
-
1
)
continue
;
int
num
=
0
;
int
num
=
0
;
int
coor_x
=
coor_offset
[
0
];
int
coor_x
=
coor_offset
[
0
];
...
@@ -122,7 +122,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
...
@@ -122,7 +122,7 @@ __global__ void point_to_voxelidx_kernel(const T_int* coor,
point_to_pointidx
[
index
]
=
i
;
point_to_pointidx
[
index
]
=
i
;
}
else
if
(
num
>=
max_points
)
{
}
else
if
(
num
>=
max_points
)
{
// out of boundary
// out of boundary
re
turn
;
b
re
ak
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment