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
torch-cluster
Commits
e0e5a84c
Commit
e0e5a84c
authored
Feb 22, 2021
by
rusty1s
Browse files
fix equal outcome in radius for CPU/GPU
parent
2582d47b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
csrc/cpu/radius_cpu.cpp
csrc/cpu/radius_cpu.cpp
+2
-2
No files found.
csrc/cpu/radius_cpu.cpp
View file @
e0e5a84c
...
...
@@ -52,7 +52,7 @@ torch::Tensor radius_cpu(torch::Tensor x, torch::Tensor y,
for
(
int64_t
i
=
0
;
i
<
y
.
size
(
0
);
i
++
)
{
std
::
vector
<
std
::
pair
<
size_t
,
scalar_t
>>
ret_matches
;
size_t
num_matches
=
mat_index
.
index
->
radiusSearch
(
y_data
+
i
*
y
.
size
(
1
),
r
*
r
+
0.00001
,
ret_matches
,
params
);
y_data
+
i
*
y
.
size
(
1
),
r
*
r
,
ret_matches
,
params
);
for
(
size_t
j
=
0
;
j
<
std
::
min
(
num_matches
,
(
size_t
)
max_num_neighbors
);
j
++
)
{
...
...
@@ -86,7 +86,7 @@ torch::Tensor radius_cpu(torch::Tensor x, torch::Tensor y,
for
(
int64_t
i
=
y_start
;
i
<
y_end
;
i
++
)
{
std
::
vector
<
std
::
pair
<
size_t
,
scalar_t
>>
ret_matches
;
size_t
num_matches
=
mat_index
.
index
->
radiusSearch
(
y_data
+
i
*
y
.
size
(
1
),
r
*
r
+
0.00001
,
ret_matches
,
params
);
y_data
+
i
*
y
.
size
(
1
),
r
*
r
,
ret_matches
,
params
);
for
(
size_t
j
=
0
;
j
<
std
::
min
(
num_matches
,
(
size_t
)
max_num_neighbors
);
j
++
)
{
...
...
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