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-sparse
Commits
c493caaf
Commit
c493caaf
authored
Nov 13, 2020
by
rusty1s
Browse files
typo
parent
8d837c78
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
csrc/cpu/relabel_cpu.cpp
csrc/cpu/relabel_cpu.cpp
+3
-3
No files found.
csrc/cpu/relabel_cpu.cpp
View file @
c493caaf
...
@@ -71,7 +71,7 @@ relabel_one_hop_cpu(torch::Tensor rowptr, torch::Tensor col,
...
@@ -71,7 +71,7 @@ relabel_one_hop_cpu(torch::Tensor rowptr, torch::Tensor col,
int64_t
v
,
w
,
c
,
row_start
,
row_end
,
offset
=
0
;
int64_t
v
,
w
,
c
,
row_start
,
row_end
,
offset
=
0
;
for
(
int64_t
i
=
0
;
i
<
idx
.
numel
();
i
++
)
{
for
(
int64_t
i
=
0
;
i
<
idx
.
numel
();
i
++
)
{
v
=
idx_data
[
i
];
v
=
idx_data
[
i
];
n_id_map
[
i
]
=
v
;
n_id_map
[
v
]
=
i
;
offset
+=
rowptr_data
[
v
+
1
]
-
rowptr_data
[
v
];
offset
+=
rowptr_data
[
v
+
1
]
-
rowptr_data
[
v
];
out_rowptr_data
[
i
+
1
]
=
offset
;
out_rowptr_data
[
i
+
1
]
=
offset
;
}
}
...
@@ -135,8 +135,8 @@ relabel_one_hop_cpu(torch::Tensor rowptr, torch::Tensor col,
...
@@ -135,8 +135,8 @@ relabel_one_hop_cpu(torch::Tensor rowptr, torch::Tensor col,
torch
::
cat
({
out_rowptr
,
torch
::
full
({(
int64_t
)
n_ids
.
size
()},
torch
::
cat
({
out_rowptr
,
torch
::
full
({(
int64_t
)
n_ids
.
size
()},
out_col
.
numel
(),
rowptr
.
options
())});
out_col
.
numel
(),
rowptr
.
options
())});
idx
=
torch
::
cat
(
idx
=
torch
::
cat
(
{
idx
,
torch
::
from_blob
(
n_ids
.
data
(),
{(
int64_t
)
n_ids
.
size
()},
{
idx
,
torch
::
from_blob
(
n_ids
.
data
(),
{(
int64_t
)
n_ids
.
size
()
}
)});
idx
.
options
())});
return
std
::
make_tuple
(
out_rowptr
,
out_col
,
out_value
,
idx
);
return
std
::
make_tuple
(
out_rowptr
,
out_col
,
out_value
,
idx
);
}
}
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