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
dgl
Commits
4682b76e
Unverified
Commit
4682b76e
authored
Dec 02, 2018
by
Gan Quan
Committed by
GitHub
Dec 02, 2018
Browse files
fixing stupid segfault in edge_ids (#216)
parent
168794cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/graph/graph.cc
src/graph/graph.cc
+2
-0
No files found.
src/graph/graph.cc
View file @
4682b76e
...
@@ -189,6 +189,8 @@ Graph::EdgeArray Graph::EdgeIds(IdArray src_ids, IdArray dst_ids) const {
...
@@ -189,6 +189,8 @@ Graph::EdgeArray Graph::EdgeIds(IdArray src_ids, IdArray dst_ids) const {
for
(
i
=
0
,
j
=
0
;
i
<
srclen
&&
j
<
dstlen
;
i
+=
src_stride
,
j
+=
dst_stride
)
{
for
(
i
=
0
,
j
=
0
;
i
<
srclen
&&
j
<
dstlen
;
i
+=
src_stride
,
j
+=
dst_stride
)
{
const
dgl_id_t
src_id
=
src_data
[
i
],
dst_id
=
dst_data
[
j
];
const
dgl_id_t
src_id
=
src_data
[
i
],
dst_id
=
dst_data
[
j
];
CHECK
(
HasVertex
(
src_id
)
&&
HasVertex
(
dst_id
))
<<
"invalid edge: "
<<
src_id
<<
" -> "
<<
dst_id
;
const
auto
&
succ
=
adjlist_
[
src_id
].
succ
;
const
auto
&
succ
=
adjlist_
[
src_id
].
succ
;
for
(
size_t
k
=
0
;
k
<
succ
.
size
();
++
k
)
{
for
(
size_t
k
=
0
;
k
<
succ
.
size
();
++
k
)
{
if
(
succ
[
k
]
==
dst_id
)
{
if
(
succ
[
k
]
==
dst_id
)
{
...
...
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