Commit 8156e3e0 authored by Yixing Lao's avatar Yixing Lao Committed by Avijit

operator overloading as a free function (#142)

parent 332c4833
...@@ -59,7 +59,7 @@ size_t Tensor::get_pool_offset() const ...@@ -59,7 +59,7 @@ size_t Tensor::get_pool_offset() const
return m_pool_offset; return m_pool_offset;
} }
std::ostream& descriptor::operator<<(std::ostream& out, const Tensor& tensor) std::ostream& operator<<(std::ostream& out, const Tensor& tensor)
{ {
out << "Tensor(" << tensor.get_name() << ")"; out << "Tensor(" << tensor.get_name() << ")";
return out; return out;
......
...@@ -59,8 +59,6 @@ public: ...@@ -59,8 +59,6 @@ public:
void set_pool_offset(size_t); void set_pool_offset(size_t);
size_t get_pool_offset() const; size_t get_pool_offset() const;
friend std::ostream& operator<<(std::ostream&, const Tensor&);
protected: protected:
const element::Type& m_element_type; const element::Type& m_element_type;
PrimaryTensorView* m_primary_tensor_view; PrimaryTensorView* m_primary_tensor_view;
...@@ -72,3 +70,5 @@ protected: ...@@ -72,3 +70,5 @@ protected:
size_t m_size; size_t m_size;
size_t m_pool_offset; size_t m_pool_offset;
}; };
std::ostream& operator<<(std::ostream&, const ngraph::descriptor::Tensor&);
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