Commit c66a7469 authored by Scott Cyphers's avatar Scott Cyphers

Review comments

parent 3c6ab287
......@@ -29,6 +29,16 @@ ngraph::Node::Node(const std::vector<Node::ptr>& arguments, ValueType::ptr type)
}
}
bool ngraph::Node::is_op() const
{
return dynamic_cast<const ngraph::Op*>(this) != nullptr;
}
bool ngraph::Node::is_parameter() const
{
return dynamic_cast<const ngraph::Parameter*>(this) != nullptr;
}
std::ostream& ngraph::operator<<(std::ostream& out, const ngraph::Node& node)
{
auto op_tmp = dynamic_cast<const ngraph::Op*>(&node);
......
......@@ -67,8 +67,8 @@ namespace ngraph
return typeid(*this) == typeid(*node.get());
}
virtual bool is_op() const { return false; }
virtual bool is_parameter() const { return false; }
bool is_op() const;
bool is_parameter() const;
size_t instance_id() const { return m_instance_id; }
friend std::ostream& operator<<(std::ostream&, const Node&);
......
......@@ -76,7 +76,6 @@ namespace ngraph
virtual std::string op_class_name() const = 0;
virtual std::string node_id() const override;
virtual bool is_op() const override { return true; }
};
/**
......
......@@ -42,7 +42,6 @@ namespace ngraph
std::string description() const override { return "Parameter"; }
virtual void propagate_types() override;
virtual std::string node_id() const override;
virtual bool is_parameter() const override { return true; }
protected:
Function* m_function;
......
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