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

operator overloading as a free function (#142)

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