Commit b527258d authored by Scott Cyphers's avatar Scott Cyphers

Change to std::string

parent 257cb67c
...@@ -33,11 +33,7 @@ namespace ngraph ...@@ -33,11 +33,7 @@ namespace ngraph
Parameter(Function& function, size_t index); Parameter(Function& function, size_t index);
const std::string& description() const override std::string description() const override { return "Parameter"; }
{
static std::string name{"Parameter"};
return name;
}
protected: protected:
Function& m_function; Function& m_function;
...@@ -72,7 +68,7 @@ namespace ngraph ...@@ -72,7 +68,7 @@ namespace ngraph
Parameter::ptr parameter(size_t i) { return m_parameters[i]; } Parameter::ptr parameter(size_t i) { return m_parameters[i]; }
const std::string& name() const override { return m_name; } std::string name() const override { return m_name; }
protected: protected:
std::vector<Parameter::ptr> m_parameters; std::vector<Parameter::ptr> m_parameters;
......
...@@ -50,7 +50,7 @@ namespace ngraph ...@@ -50,7 +50,7 @@ namespace ngraph
public: public:
/// A "one-liner" describing this node. /// A "one-liner" describing this node.
virtual const std::string& description() const = 0; virtual std::string description() const = 0;
/// Propagate types and check arguments for consistency /// Propagate types and check arguments for consistency
// virtual void propagate_types() = 0; // virtual void propagate_types() = 0;
...@@ -61,7 +61,7 @@ namespace ngraph ...@@ -61,7 +61,7 @@ namespace ngraph
const std::multiset<Node*> users() const { return m_users; } const std::multiset<Node*> users() const { return m_users; }
std::multiset<Node*> users() { return m_users; } std::multiset<Node*> users() { return m_users; }
const std::string& name() const { return m_name; } std::string name() const { return m_name; }
void name(const std::string& name) { m_name = name; } void name(const std::string& name) { m_name = name; }
protected: protected:
......
...@@ -30,7 +30,7 @@ namespace ngraph ...@@ -30,7 +30,7 @@ namespace ngraph
virtual ~Op() {} virtual ~Op() {}
public: public:
virtual const std::string& name() const = 0; virtual std::string name() const = 0;
}; };
/** /**
...@@ -49,7 +49,7 @@ namespace ngraph ...@@ -49,7 +49,7 @@ namespace ngraph
{ {
} }
const std::string& description() const override { return m_op->name(); } virtual std::string description() const override { return m_op->name(); }
protected: protected:
std::shared_ptr<Op> m_op; std::shared_ptr<Op> m_op;
...@@ -69,7 +69,7 @@ namespace ngraph ...@@ -69,7 +69,7 @@ namespace ngraph
} }
public: public:
const std::string& name() const override { return m_name; } std::string name() const override { return m_name; }
protected: protected:
std::string m_name; std::string m_name;
...@@ -78,11 +78,7 @@ namespace ngraph ...@@ -78,11 +78,7 @@ namespace ngraph
class BuiltinCall : public Call class BuiltinCall : public Call
{ {
public: public:
const std::string& description() const override virtual std::string description() const override { return "BuiltinCall"; }
{
static std::string name{"BuiltinCall "};
return name;
}
protected: protected:
BuiltinCall(const std::shared_ptr<Op>& op, const std::vector<Node::ptr>& args) BuiltinCall(const std::shared_ptr<Op>& op, const std::vector<Node::ptr>& args)
......
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