Commit f4bb3e46 authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

Remove unused args from Input (#353)

* cleanup

* remove arg_index

* remove argno from Input

* uncleanup
parent feab44b5
......@@ -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);
......
......@@ -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:
......
......@@ -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++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment