Unverified Commit e567c891 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Remove coding style violations, greatly simplify (#505)

parent ab1cb2e6
......@@ -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;
}
......
......@@ -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;
......
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