Commit 81a2d933 authored by fenglei's avatar fenglei

resolve Scott's comment about construction

parent d3032021
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
const string op::Recv::type_name{"Recv"};
op::Recv::Recv(const shared_ptr<Node>& arg, int src_id) op::Recv::Recv(const shared_ptr<Node>& arg, int src_id)
: Op("Recv", check_single_output_args({arg})) : Op(check_single_output_args({arg}))
, m_src_id(src_id) , m_src_id(src_id)
{ {
constructor_validate_and_infer_types(); constructor_validate_and_infer_types();
......
...@@ -27,7 +27,11 @@ namespace ngraph ...@@ -27,7 +27,11 @@ namespace ngraph
class Recv : public Op class Recv : public Op
{ {
public: public:
Recv(const std::shared_ptr<Node>& arg, int src_id = 0); NGRAPH_API
static const std::string type_name;
const std::string& description() const override { return type_name; }
Recv(const std::shared_ptr<Node>& arg, int src_id);
void validate_and_infer_types() override; void validate_and_infer_types() override;
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
const string op::Send::type_name{"Send"};
op::Send::Send(const shared_ptr<Node>& arg, int dest_id) op::Send::Send(const shared_ptr<Node>& arg, int dest_id)
: Op("Send", check_single_output_args({arg})) : Op(check_single_output_args({arg}))
, m_dest_id(dest_id) , m_dest_id(dest_id)
{ {
constructor_validate_and_infer_types(); constructor_validate_and_infer_types();
......
...@@ -27,7 +27,11 @@ namespace ngraph ...@@ -27,7 +27,11 @@ namespace ngraph
class Send : public Op class Send : public Op
{ {
public: public:
Send(const std::shared_ptr<Node>& arg, int dest_id = 0); NGRAPH_API
static const std::string type_name;
const std::string& description() const override { return type_name; }
Send(const std::shared_ptr<Node>& arg, int dest_id);
void validate_and_infer_types() override; void validate_and_infer_types() override;
......
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