Skip to content

Commit

Permalink
Fix Codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Kazantaev committed Jul 27, 2021
1 parent 151b5bb commit 0878007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions ngraph/core/include/ngraph/op/constant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ namespace ngraph
}

Constant(const Constant& other);
Constant(const Constant& other, const Shape & new_shape);
Constant(const Constant& other, const Shape& new_shape);
Constant& operator=(const Constant&) = delete;

virtual ~Constant() override;
Expand Down Expand Up @@ -308,7 +308,10 @@ namespace ngraph
return rc;
}

std::shared_ptr<runtime::AlignedBuffer> get_aligned_buffer() const { return m_data; }
std::shared_ptr<runtime::AlignedBuffer> get_aligned_buffer() const
{
return m_data;
}

const void* get_data_ptr() const { return (m_data ? m_data->get_ptr() : nullptr); }
template <typename T>
Expand Down
5 changes: 3 additions & 2 deletions ngraph/core/src/op/constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ op::Constant::Constant(const Constant& other)
constructor_validate_and_infer_types();
}

op::Constant::Constant(const Constant& other, const Shape & new_shape)
op::Constant::Constant(const Constant& other, const Shape& new_shape)
{
NGRAPH_CHECK(shape_size(other.m_shape) == shape_size(new_shape),
"Shape size " + std::to_string(shape_size(new_shape)) + " is not equal to " + std::to_string(shape_size(other.m_shape)));
"Shape size " + std::to_string(shape_size(new_shape)) + " is not equal to " +
std::to_string(shape_size(other.m_shape)));
m_element_type = other.m_element_type;
m_shape = new_shape;
m_data = other.m_data;
Expand Down

0 comments on commit 0878007

Please sign in to comment.