Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
e567c891
Unverified
Commit
e567c891
authored
7 years ago
by
Scott Cyphers
Committed by
GitHub
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove coding style violations, greatly simplify (#505)
parent
ab1cb2e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
39 deletions
+4
-39
node.cpp
src/ngraph/node.cpp
+4
-37
node.hpp
src/ngraph/node.hpp
+0
-2
No files found.
src/ngraph/node.cpp
View file @
e567c891
...
...
@@ -144,42 +144,6 @@ void Node::set_name(const string& name)
}
}
void
Node
::
assert_argument_list_equivalency
(
const
Nodes
&
b
)
{
bool
arguments_equal
=
true
;
if
(
this
->
m_arguments
.
size
()
==
b
.
size
())
{
for
(
size_t
i
=
0
;
i
<
this
->
m_arguments
.
size
();
i
++
)
{
arguments_equal
=
arguments_equal
&&
this
->
m_arguments
.
at
(
i
)
==
b
.
at
(
i
);
}
}
else
{
arguments_equal
=
false
;
}
if
(
!
arguments_equal
)
{
std
::
cout
<<
"node = "
<<
this
->
get_name
()
<<
std
::
endl
;
std
::
cout
<<
"m_arguments"
<<
std
::
endl
;
for
(
auto
arg
:
this
->
m_arguments
)
{
std
::
cout
<<
"arg = "
<<
arg
->
get_name
()
<<
std
::
endl
;
}
std
::
cout
<<
"results"
<<
std
::
endl
;
for
(
auto
arg
:
b
)
{
std
::
cout
<<
"arg = "
<<
arg
->
get_name
()
<<
std
::
endl
;
}
}
if
(
!
arguments_equal
)
{
throw
"Arguments aren't equal"
;
}
}
std
::
shared_ptr
<
Node
>
Node
::
get_input_op
(
size_t
index
)
{
for
(
auto
arg
:
m_arguments
)
...
...
@@ -201,7 +165,10 @@ Nodes Node::get_input_ops() //const
result
.
push_back
(
i
.
get_output
().
get_node
());
}
}
assert_argument_list_equivalency
(
result
);
if
(
m_arguments
!=
result
)
{
throw
ngraph_error
(
"Arguments aren't equal: different values"
);
}
return
result
;
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/node.hpp
View file @
e567c891
...
...
@@ -170,8 +170,6 @@ namespace ngraph
protected
:
void
add_output
(
const
element
::
Type
&
element_type
,
const
Shape
&
shape
);
void
assert_argument_list_equivalency
(
const
Nodes
&
b
);
bool
test_identical
(
const
Node
&
)
const
;
std
::
string
m_node_type
;
std
::
multiset
<
Node
*>
m_users
;
...
...
This diff is collapsed.
Click to expand it.
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