Commit 7d11d579 authored by Matthew Brookhart's avatar Matthew Brookhart Committed by GitHub

Add operator overloads for operation division, subtraction, and negation (#172)

parent ea9a120d
......@@ -29,4 +29,9 @@ namespace ngraph
virtual std::string description() const override { return "Divide"; }
};
}
inline std::shared_ptr<ngraph::Node> operator/(const std::shared_ptr<ngraph::Node> arg0,
const std::shared_ptr<ngraph::Node> arg1)
{
return std::make_shared<ngraph::op::Divide>(arg0, arg1);
}
}
......@@ -29,4 +29,8 @@ namespace ngraph
virtual std::string description() const override { return "Negative"; }
};
}
inline std::shared_ptr<ngraph::Node> operator-(const std::shared_ptr<ngraph::Node> arg0)
{
return std::make_shared<ngraph::op::Negative>(arg0);
}
}
......@@ -29,4 +29,9 @@ namespace ngraph
virtual std::string description() const override { return "Subtract"; }
};
}
inline std::shared_ptr<ngraph::Node> operator-(const std::shared_ptr<ngraph::Node> arg0,
const std::shared_ptr<ngraph::Node> arg1)
{
return std::make_shared<ngraph::op::Subtract>(arg0, arg1);
}
}
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