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
aa568358
Unverified
Commit
aa568358
authored
Nov 09, 2018
by
Minjie Wang
Committed by
GitHub
Nov 09, 2018
Browse files
[Hotfix] hotfix for clang (#130)
parent
7fe6d0c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/c_api_common.cc
src/c_api_common.cc
+1
-1
src/graph/graph_apis.cc
src/graph/graph_apis.cc
+2
-2
No files found.
src/c_api_common.cc
View file @
aa568358
...
@@ -24,7 +24,7 @@ DLManagedTensor* CreateTmpDLManagedTensor(const TVMArgValue& arg) {
...
@@ -24,7 +24,7 @@ DLManagedTensor* CreateTmpDLManagedTensor(const TVMArgValue& arg) {
PackedFunc
ConvertNDArrayVectorToPackedFunc
(
const
std
::
vector
<
NDArray
>&
vec
)
{
PackedFunc
ConvertNDArrayVectorToPackedFunc
(
const
std
::
vector
<
NDArray
>&
vec
)
{
auto
body
=
[
vec
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
auto
body
=
[
vec
](
TVMArgs
args
,
TVMRetValue
*
rv
)
{
const
size_
t
which
=
args
[
0
];
const
in
t
which
=
args
[
0
];
if
(
which
>=
vec
.
size
())
{
if
(
which
>=
vec
.
size
())
{
LOG
(
FATAL
)
<<
"invalid choice"
;
LOG
(
FATAL
)
<<
"invalid choice"
;
}
else
{
}
else
{
...
...
src/graph/graph_apis.cc
View file @
aa568358
...
@@ -19,7 +19,7 @@ namespace {
...
@@ -19,7 +19,7 @@ namespace {
// Convert EdgeArray structure to PackedFunc.
// Convert EdgeArray structure to PackedFunc.
PackedFunc
ConvertEdgeArrayToPackedFunc
(
const
Graph
::
EdgeArray
&
ea
)
{
PackedFunc
ConvertEdgeArrayToPackedFunc
(
const
Graph
::
EdgeArray
&
ea
)
{
auto
body
=
[
ea
]
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
auto
body
=
[
ea
]
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
int
which
=
args
[
0
];
const
int
which
=
args
[
0
];
if
(
which
==
0
)
{
if
(
which
==
0
)
{
*
rv
=
std
::
move
(
ea
.
src
);
*
rv
=
std
::
move
(
ea
.
src
);
}
else
if
(
which
==
1
)
{
}
else
if
(
which
==
1
)
{
...
@@ -36,7 +36,7 @@ PackedFunc ConvertEdgeArrayToPackedFunc(const Graph::EdgeArray& ea) {
...
@@ -36,7 +36,7 @@ PackedFunc ConvertEdgeArrayToPackedFunc(const Graph::EdgeArray& ea) {
// Convert Subgraph structure to PackedFunc.
// Convert Subgraph structure to PackedFunc.
PackedFunc
ConvertSubgraphToPackedFunc
(
const
Subgraph
&
sg
)
{
PackedFunc
ConvertSubgraphToPackedFunc
(
const
Subgraph
&
sg
)
{
auto
body
=
[
sg
]
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
auto
body
=
[
sg
]
(
TVMArgs
args
,
TVMRetValue
*
rv
)
{
int
which
=
args
[
0
];
const
int
which
=
args
[
0
];
if
(
which
==
0
)
{
if
(
which
==
0
)
{
Graph
*
gptr
=
new
Graph
();
Graph
*
gptr
=
new
Graph
();
*
gptr
=
std
::
move
(
sg
.
graph
);
*
gptr
=
std
::
move
(
sg
.
graph
);
...
...
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