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
f4bb3e46
Commit
f4bb3e46
authored
Jan 05, 2018
by
Robert Kimball
Committed by
Scott Cyphers
Jan 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused args from Input (#353)
* cleanup * remove arg_index * remove argno from Input * uncleanup
parent
feab44b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
19 deletions
+5
-19
input.cpp
src/ngraph/descriptor/input.cpp
+1
-3
input.hpp
src/ngraph/descriptor/input.hpp
+3
-11
node.cpp
src/ngraph/node.cpp
+1
-5
No files found.
src/ngraph/descriptor/input.cpp
View file @
f4bb3e46
...
...
@@ -20,11 +20,9 @@
using
namespace
ngraph
;
using
namespace
descriptor
;
Input
::
Input
(
Node
*
node
,
size_t
index
,
size_t
argno
,
size_t
arg_index
,
Output
&
output
)
Input
::
Input
(
Node
*
node
,
size_t
index
,
Output
&
output
)
:
m_node
(
node
)
,
m_index
(
index
)
,
m_argno
(
argno
)
,
m_arg_index
(
arg_index
)
,
m_output
(
&
output
)
{
output
.
add_input
(
this
);
...
...
src/ngraph/descriptor/input.hpp
View file @
f4bb3e46
...
...
@@ -35,18 +35,12 @@ namespace ngraph
public
:
/// @param node The node that owns this input
/// @param index The position of this this tensor in all input tensors
/// @param argno The position of the argument with this tensor
/// @param arg_index The position of the tensor within the argument's tensors
/// @param output The output that supplies a value for this input
Input
(
Node
*
node
,
size_t
index
,
size_t
argno
,
size_t
arg_index
,
Output
&
output
);
Input
(
Node
*
node
,
size_t
index
,
Output
&
output
);
/// @return the node that this is an input of
std
::
shared_ptr
<
Node
>
get_node
();
/// @return the position of the node argument that uses this input
size_t
get_argno
()
const
{
return
m_argno
;
}
/// @return the position within the node argument of this tensor
size_t
get_arg_index
()
const
{
return
m_arg_index
;
}
/// @return the position within all supplied tensors of this input
size_t
get_index
()
const
{
return
m_index
;
}
// @return the connected output
...
...
@@ -80,10 +74,8 @@ namespace ngraph
const
element
::
Type
&
get_element_type
()
const
;
protected
:
Node
*
m_node
;
// The node we are an input for
size_t
m_index
;
// Index into all input tensors
size_t
m_argno
;
// Arg number for this input
size_t
m_arg_index
;
// Index into arg's tensors
Node
*
m_node
;
// The node we are an input for
size_t
m_index
;
// Index into all input tensors
Output
*
m_output
;
private
:
...
...
src/ngraph/node.cpp
View file @
f4bb3e46
...
...
@@ -34,17 +34,13 @@ Node::Node(const std::string& node_type, const std::vector<shared_ptr<Node>>& ar
{
// Add this node as a user of each argument.
size_t
i
=
0
;
size_t
argno
=
0
;
for
(
auto
arg
:
m_arguments
)
{
arg
->
m_users
.
insert
(
this
);
size_t
arg_index
=
0
;
for
(
descriptor
::
Output
&
output
:
arg
->
get_outputs
())
{
m_inputs
.
emplace_back
(
this
,
i
,
argno
,
arg_index
++
,
output
);
i
++
;
m_inputs
.
emplace_back
(
this
,
i
++
,
output
);
}
argno
++
;
}
}
...
...
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