From 0bc991d895d3b03ecfbb3795d966bda83cc15c81 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Thu, 26 Aug 2021 06:45:07 +0300 Subject: [PATCH] Moved AxisSet, AxisVector, Coordinate, CoordinateDiff to ov (#7237) --- ngraph/core/include/ngraph/axis_set.hpp | 49 +-------------- ngraph/core/include/ngraph/axis_vector.hpp | 43 +------------ ngraph/core/include/ngraph/coordinate.hpp | 42 +------------ .../core/include/ngraph/coordinate_diff.hpp | 45 +------------- .../core/include/openvino/core/axis_set.hpp | 60 +++++++++++++++++++ .../include/openvino/core/axis_vector.hpp | 52 ++++++++++++++++ .../core/include/openvino/core/coordinate.hpp | 51 ++++++++++++++++ .../include/openvino/core/coordinate_diff.hpp | 56 +++++++++++++++++ .../include/ngraph/coordinate_index.hpp | 9 ++- ngraph/core/src/axis_set.cpp | 26 ++++---- ngraph/core/src/axis_vector.cpp | 20 +++---- ngraph/core/src/coordinate.cpp | 22 +++---- ngraph/core/src/coordinate_diff.cpp | 20 +++---- 13 files changed, 275 insertions(+), 220 deletions(-) create mode 100644 ngraph/core/include/openvino/core/axis_set.hpp create mode 100644 ngraph/core/include/openvino/core/axis_vector.hpp create mode 100644 ngraph/core/include/openvino/core/coordinate.hpp create mode 100644 ngraph/core/include/openvino/core/coordinate_diff.hpp diff --git a/ngraph/core/include/ngraph/axis_set.hpp b/ngraph/core/include/ngraph/axis_set.hpp index 9a1c72b8abee33..ae513c8081830e 100644 --- a/ngraph/core/include/ngraph/axis_set.hpp +++ b/ngraph/core/include/ngraph/axis_set.hpp @@ -11,53 +11,8 @@ #include "ngraph/attribute_adapter.hpp" #include "ngraph/ngraph_visibility.hpp" +#include "openvino/core/axis_set.hpp" namespace ngraph { -/// \brief A set of axes. -class AxisSet : public std::set { -public: - NGRAPH_API AxisSet(); - - NGRAPH_API AxisSet(const std::initializer_list& axes); - - NGRAPH_API AxisSet(const std::set& axes); - - NGRAPH_API AxisSet(const std::vector& axes); - - NGRAPH_API AxisSet(const AxisSet& axes); - - NGRAPH_API AxisSet& operator=(const AxisSet& v); - - NGRAPH_API AxisSet& operator=(AxisSet&& v) noexcept; - - NGRAPH_API std::vector to_vector() const; -}; - -NGRAPH_API -std::ostream& operator<<(std::ostream& s, const AxisSet& axis_set); +using ov::AxisSet; } // namespace ngraph - -namespace ov { - -template <> -class NGRAPH_API AttributeAdapter : public ValueAccessor> { -public: - AttributeAdapter(ngraph::AxisSet& value) : m_ref(value) {} - - const std::vector& get() override; - void set(const std::vector& value) override; - static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; - const DiscreteTypeInfo& get_type_info() const override { - return type_info; - } - operator ngraph::AxisSet&() { - return m_ref; - } - -protected: - ngraph::AxisSet& m_ref; - std::vector m_buffer; - bool m_buffer_valid{false}; -}; - -} // namespace ov diff --git a/ngraph/core/include/ngraph/axis_vector.hpp b/ngraph/core/include/ngraph/axis_vector.hpp index f7215d0c88f8ba..f8c2cf0555467d 100644 --- a/ngraph/core/include/ngraph/axis_vector.hpp +++ b/ngraph/core/include/ngraph/axis_vector.hpp @@ -10,48 +10,9 @@ #include "ngraph/attribute_adapter.hpp" #include "ngraph/ngraph_visibility.hpp" +#include "openvino/core/axis_vector.hpp" namespace ngraph { /// \brief A vector of axes. -class AxisVector : public std::vector { -public: - NGRAPH_API AxisVector(const std::initializer_list& axes); - - NGRAPH_API AxisVector(const std::vector& axes); - - NGRAPH_API AxisVector(const AxisVector& axes); - - NGRAPH_API explicit AxisVector(size_t n); - - template - AxisVector(InputIterator first, InputIterator last) : std::vector(first, last) {} - - NGRAPH_API AxisVector(); - - NGRAPH_API ~AxisVector(); - - NGRAPH_API AxisVector& operator=(const AxisVector& v); - - NGRAPH_API AxisVector& operator=(AxisVector&& v) noexcept; -}; - -NGRAPH_API -std::ostream& operator<<(std::ostream& s, const AxisVector& axis_vector); +using ov::AxisVector; } // namespace ngraph - -namespace ov { - -template <> -class NGRAPH_API AttributeAdapter - : public IndirectVectorValueAccessor> { -public: - AttributeAdapter(ngraph::AxisVector& value) - : IndirectVectorValueAccessor>(value) {} - - static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; - const DiscreteTypeInfo& get_type_info() const override { - return type_info; - } -}; - -} // namespace ov diff --git a/ngraph/core/include/ngraph/coordinate.hpp b/ngraph/core/include/ngraph/coordinate.hpp index 56535fdeb18c28..59c664dc692996 100644 --- a/ngraph/core/include/ngraph/coordinate.hpp +++ b/ngraph/core/include/ngraph/coordinate.hpp @@ -10,47 +10,9 @@ #include "ngraph/attribute_adapter.hpp" #include "ngraph/axis_set.hpp" #include "ngraph/shape.hpp" +#include "openvino/core/coordinate.hpp" namespace ngraph { /// \brief Coordinates for a tensor element -class Coordinate : public std::vector { -public: - NGRAPH_API Coordinate(); - NGRAPH_API Coordinate(const std::initializer_list& axes); - - NGRAPH_API Coordinate(const Shape& shape); - - NGRAPH_API Coordinate(const std::vector& axes); - - NGRAPH_API Coordinate(const Coordinate& axes); - - NGRAPH_API Coordinate(size_t n, size_t initial_value = 0); - - NGRAPH_API ~Coordinate(); - - template - Coordinate(InputIterator first, InputIterator last) : std::vector(first, last) {} - - NGRAPH_API Coordinate& operator=(const Coordinate& v); - - NGRAPH_API Coordinate& operator=(Coordinate&& v) noexcept; -}; - -NGRAPH_API -std::ostream& operator<<(std::ostream& s, const Coordinate& coordinate); +using ov::Coordinate; } // namespace ngraph - -namespace ov { -template <> -class NGRAPH_API AttributeAdapter - : public IndirectVectorValueAccessor> { -public: - AttributeAdapter(ngraph::Coordinate& value) - : IndirectVectorValueAccessor>(value) {} - - static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; - const DiscreteTypeInfo& get_type_info() const override { - return type_info; - } -}; -} // namespace ov diff --git a/ngraph/core/include/ngraph/coordinate_diff.hpp b/ngraph/core/include/ngraph/coordinate_diff.hpp index 77fb5c365ffe07..21077fe2aa9ed0 100644 --- a/ngraph/core/include/ngraph/coordinate_diff.hpp +++ b/ngraph/core/include/ngraph/coordinate_diff.hpp @@ -10,50 +10,9 @@ #include "ngraph/attribute_adapter.hpp" #include "ngraph/ngraph_visibility.hpp" +#include "openvino/core/coordinate_diff.hpp" namespace ngraph { /// \brief A difference (signed) of tensor element coordinates. -class CoordinateDiff : public std::vector { -public: - NGRAPH_API CoordinateDiff(const std::initializer_list& diffs); - - NGRAPH_API CoordinateDiff(const std::vector& diffs); - - NGRAPH_API CoordinateDiff(const CoordinateDiff& diffs); - - NGRAPH_API explicit CoordinateDiff(size_t n, std::ptrdiff_t initial_value = 0); - - template - CoordinateDiff(InputIterator first, InputIterator last) : std::vector(first, last) {} - - NGRAPH_API ~CoordinateDiff(); - - NGRAPH_API CoordinateDiff(); - - NGRAPH_API CoordinateDiff& operator=(const CoordinateDiff& v); - - NGRAPH_API CoordinateDiff& operator=(CoordinateDiff&& v) noexcept; -}; - -NGRAPH_API -std::ostream& operator<<(std::ostream& s, const CoordinateDiff& coordinate_diff); +using ov::CoordinateDiff; } // namespace ngraph - -namespace ov { - -template <> -class NGRAPH_API AttributeAdapter - : public IndirectVectorValueAccessor> - -{ -public: - AttributeAdapter(ngraph::CoordinateDiff& value) - : IndirectVectorValueAccessor>(value) {} - - static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; - const DiscreteTypeInfo& get_type_info() const override { - return type_info; - } -}; - -} // namespace ov diff --git a/ngraph/core/include/openvino/core/axis_set.hpp b/ngraph/core/include/openvino/core/axis_set.hpp new file mode 100644 index 00000000000000..ea4b93be186bbc --- /dev/null +++ b/ngraph/core/include/openvino/core/axis_set.hpp @@ -0,0 +1,60 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "openvino/core/attribute_adapter.hpp" +#include "openvino/core/core_visibility.hpp" + +namespace ov { +/// \brief A set of axes. +class AxisSet : public std::set { +public: + OPENVINO_API AxisSet(); + + OPENVINO_API AxisSet(const std::initializer_list& axes); + + OPENVINO_API AxisSet(const std::set& axes); + + OPENVINO_API AxisSet(const std::vector& axes); + + OPENVINO_API AxisSet(const AxisSet& axes); + + OPENVINO_API AxisSet& operator=(const AxisSet& v); + + OPENVINO_API AxisSet& operator=(AxisSet&& v) noexcept; + + OPENVINO_API std::vector to_vector() const; +}; + +OPENVINO_API +std::ostream& operator<<(std::ostream& s, const AxisSet& axis_set); + +template <> +class OPENVINO_API AttributeAdapter : public ValueAccessor> { +public: + AttributeAdapter(ov::AxisSet& value) : m_ref(value) {} + + const std::vector& get() override; + void set(const std::vector& value) override; + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; + const DiscreteTypeInfo& get_type_info() const override { + return type_info; + } + operator ov::AxisSet&() { + return m_ref; + } + +protected: + ov::AxisSet& m_ref; + std::vector m_buffer; + bool m_buffer_valid{false}; +}; + +} // namespace ov diff --git a/ngraph/core/include/openvino/core/axis_vector.hpp b/ngraph/core/include/openvino/core/axis_vector.hpp new file mode 100644 index 00000000000000..c545f727fd5932 --- /dev/null +++ b/ngraph/core/include/openvino/core/axis_vector.hpp @@ -0,0 +1,52 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "openvino/core/attribute_adapter.hpp" +#include "openvino/core/core_visibility.hpp" + +namespace ov { +/// \brief A vector of axes. +class AxisVector : public std::vector { +public: + OPENVINO_API AxisVector(const std::initializer_list& axes); + + OPENVINO_API AxisVector(const std::vector& axes); + + OPENVINO_API AxisVector(const AxisVector& axes); + + OPENVINO_API explicit AxisVector(size_t n); + + template + AxisVector(InputIterator first, InputIterator last) : std::vector(first, last) {} + + OPENVINO_API AxisVector(); + + OPENVINO_API ~AxisVector(); + + OPENVINO_API AxisVector& operator=(const AxisVector& v); + + OPENVINO_API AxisVector& operator=(AxisVector&& v) noexcept; +}; + +OPENVINO_API +std::ostream& operator<<(std::ostream& s, const AxisVector& axis_vector); + +template <> +class OPENVINO_API AttributeAdapter : public IndirectVectorValueAccessor> { +public: + AttributeAdapter(AxisVector& value) : IndirectVectorValueAccessor>(value) {} + + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; + const DiscreteTypeInfo& get_type_info() const override { + return type_info; + } +}; + +} // namespace ov diff --git a/ngraph/core/include/openvino/core/coordinate.hpp b/ngraph/core/include/openvino/core/coordinate.hpp new file mode 100644 index 00000000000000..28dd5196030b2d --- /dev/null +++ b/ngraph/core/include/openvino/core/coordinate.hpp @@ -0,0 +1,51 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include "ngraph/shape.hpp" +#include "openvino/core/core_visibility.hpp" + +namespace ov { +/// \brief Coordinates for a tensor element +class Coordinate : public std::vector { +public: + OPENVINO_API Coordinate(); + OPENVINO_API Coordinate(const std::initializer_list& axes); + + OPENVINO_API Coordinate(const ngraph::Shape& shape); + + OPENVINO_API Coordinate(const std::vector& axes); + + OPENVINO_API Coordinate(const Coordinate& axes); + + OPENVINO_API Coordinate(size_t n, size_t initial_value = 0); + + OPENVINO_API ~Coordinate(); + + template + Coordinate(InputIterator first, InputIterator last) : std::vector(first, last) {} + + OPENVINO_API Coordinate& operator=(const Coordinate& v); + + OPENVINO_API Coordinate& operator=(Coordinate&& v) noexcept; +}; + +OPENVINO_API +std::ostream& operator<<(std::ostream& s, const Coordinate& coordinate); + +template <> +class OPENVINO_API AttributeAdapter : public IndirectVectorValueAccessor> { +public: + AttributeAdapter(Coordinate& value) : IndirectVectorValueAccessor>(value) {} + + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; + const DiscreteTypeInfo& get_type_info() const override { + return type_info; + } +}; +} // namespace ov diff --git a/ngraph/core/include/openvino/core/coordinate_diff.hpp b/ngraph/core/include/openvino/core/coordinate_diff.hpp new file mode 100644 index 00000000000000..3f633e67da5805 --- /dev/null +++ b/ngraph/core/include/openvino/core/coordinate_diff.hpp @@ -0,0 +1,56 @@ +// Copyright (C) 2018-2021 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "openvino/core/attribute_adapter.hpp" +#include "openvino/core/core_visibility.hpp" + +namespace ov { +/// \brief A difference (signed) of tensor element coordinates. +class CoordinateDiff : public std::vector { +public: + OPENVINO_API CoordinateDiff(const std::initializer_list& diffs); + + OPENVINO_API CoordinateDiff(const std::vector& diffs); + + OPENVINO_API CoordinateDiff(const CoordinateDiff& diffs); + + OPENVINO_API explicit CoordinateDiff(size_t n, std::ptrdiff_t initial_value = 0); + + template + CoordinateDiff(InputIterator first, InputIterator last) : std::vector(first, last) {} + + OPENVINO_API ~CoordinateDiff(); + + OPENVINO_API CoordinateDiff(); + + OPENVINO_API CoordinateDiff& operator=(const CoordinateDiff& v); + + OPENVINO_API CoordinateDiff& operator=(CoordinateDiff&& v) noexcept; +}; + +OPENVINO_API +std::ostream& operator<<(std::ostream& s, const CoordinateDiff& coordinate_diff); + +template <> +class OPENVINO_API AttributeAdapter + : public IndirectVectorValueAccessor> + +{ +public: + AttributeAdapter(CoordinateDiff& value) + : IndirectVectorValueAccessor>(value) {} + + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; + const DiscreteTypeInfo& get_type_info() const override { + return type_info; + } +}; + +} // namespace ov diff --git a/ngraph/core/reference/include/ngraph/coordinate_index.hpp b/ngraph/core/reference/include/ngraph/coordinate_index.hpp index 9884c7c70ebb0f..1c0a7ff893c6d5 100644 --- a/ngraph/core/reference/include/ngraph/coordinate_index.hpp +++ b/ngraph/core/reference/include/ngraph/coordinate_index.hpp @@ -5,12 +5,11 @@ #pragma once #include +#include +#include namespace ngraph { -class Coordinate; -class Shape; -} // namespace ngraph -namespace ngraph { std::size_t coordinate_index(const Coordinate& c, const Shape& s); -} + +} // namespace ngraph diff --git a/ngraph/core/src/axis_set.cpp b/ngraph/core/src/axis_set.cpp index fcc623dc646ead..49988d7b0a99e5 100644 --- a/ngraph/core/src/axis_set.cpp +++ b/ngraph/core/src/axis_set.cpp @@ -6,38 +6,38 @@ #include "ngraph/util.hpp" -ngraph::AxisSet::AxisSet() : std::set() {} +ov::AxisSet::AxisSet() : std::set() {} -ngraph::AxisSet::AxisSet(const std::initializer_list& axes) : std::set(axes) {} +ov::AxisSet::AxisSet(const std::initializer_list& axes) : std::set(axes) {} -ngraph::AxisSet::AxisSet(const std::set& axes) : std::set(axes) {} +ov::AxisSet::AxisSet(const std::set& axes) : std::set(axes) {} -ngraph::AxisSet::AxisSet(const std::vector& axes) : std::set(axes.begin(), axes.end()) {} +ov::AxisSet::AxisSet(const std::vector& axes) : std::set(axes.begin(), axes.end()) {} -ngraph::AxisSet::AxisSet(const AxisSet& axes) : std::set(axes) {} +ov::AxisSet::AxisSet(const AxisSet& axes) : std::set(axes) {} -ngraph::AxisSet& ngraph::AxisSet::operator=(const AxisSet& v) { +ov::AxisSet& ov::AxisSet::operator=(const AxisSet& v) { static_cast*>(this)->operator=(v); return *this; } -ngraph::AxisSet& ngraph::AxisSet::operator=(AxisSet&& v) noexcept { +ov::AxisSet& ov::AxisSet::operator=(AxisSet&& v) noexcept { static_cast*>(this)->operator=(v); return *this; } -std::vector ngraph::AxisSet::to_vector() const { +std::vector ov::AxisSet::to_vector() const { return std::vector(this->begin(), this->end()); } -std::ostream& ngraph::operator<<(std::ostream& s, const AxisSet& axis_set) { +std::ostream& ov::operator<<(std::ostream& s, const AxisSet& axis_set) { s << "AxisSet{"; s << ngraph::join(axis_set); s << "}"; return s; } -const std::vector& ov::AttributeAdapter::get() { +const std::vector& ov::AttributeAdapter::get() { if (!m_buffer_valid) { m_buffer.clear(); for (auto elt : m_ref) { @@ -48,12 +48,12 @@ const std::vector& ov::AttributeAdapter::get() { return m_buffer; } -void ov::AttributeAdapter::set(const std::vector& value) { - m_ref = ngraph::AxisSet(); +void ov::AttributeAdapter::set(const std::vector& value) { + m_ref = ov::AxisSet(); for (auto elt : value) { m_ref.insert(elt); } m_buffer_valid = false; } -constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; +constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; diff --git a/ngraph/core/src/axis_vector.cpp b/ngraph/core/src/axis_vector.cpp index 33052a964968fc..442ac5899d974f 100644 --- a/ngraph/core/src/axis_vector.cpp +++ b/ngraph/core/src/axis_vector.cpp @@ -6,33 +6,33 @@ #include "ngraph/util.hpp" -std::ostream& ngraph::operator<<(std::ostream& s, const AxisVector& axis_vector) { +std::ostream& ov::operator<<(std::ostream& s, const AxisVector& axis_vector) { s << "AxisVector{"; s << ngraph::join(axis_vector); s << "}"; return s; } -ngraph::AxisVector::AxisVector(const std::initializer_list& axes) : std::vector(axes) {} +ov::AxisVector::AxisVector(const std::initializer_list& axes) : std::vector(axes) {} -ngraph::AxisVector::AxisVector(const std::vector& axes) : std::vector(axes) {} +ov::AxisVector::AxisVector(const std::vector& axes) : std::vector(axes) {} -ngraph::AxisVector::AxisVector(const AxisVector& axes) : std::vector(axes) {} +ov::AxisVector::AxisVector(const AxisVector& axes) : std::vector(axes) {} -ngraph::AxisVector::AxisVector(size_t n) : std::vector(n) {} +ov::AxisVector::AxisVector(size_t n) : std::vector(n) {} -ngraph::AxisVector::AxisVector() {} +ov::AxisVector::AxisVector() {} -ngraph::AxisVector::~AxisVector() {} +ov::AxisVector::~AxisVector() {} -ngraph::AxisVector& ngraph::AxisVector::operator=(const AxisVector& v) { +ov::AxisVector& ov::AxisVector::operator=(const AxisVector& v) { static_cast*>(this)->operator=(v); return *this; } -ngraph::AxisVector& ngraph::AxisVector::operator=(AxisVector&& v) noexcept { +ov::AxisVector& ov::AxisVector::operator=(AxisVector&& v) noexcept { static_cast*>(this)->operator=(v); return *this; } -constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; +constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; diff --git a/ngraph/core/src/coordinate.cpp b/ngraph/core/src/coordinate.cpp index f1b9c17feca70a..2a09314dbe591a 100644 --- a/ngraph/core/src/coordinate.cpp +++ b/ngraph/core/src/coordinate.cpp @@ -8,36 +8,36 @@ using namespace std; -std::ostream& ngraph::operator<<(std::ostream& s, const Coordinate& coordinate) { +std::ostream& ov::operator<<(std::ostream& s, const Coordinate& coordinate) { s << "Coordinate{"; s << ngraph::join(coordinate); s << "}"; return s; } -ngraph::Coordinate::Coordinate() {} +ov::Coordinate::Coordinate() = default; -ngraph::Coordinate::Coordinate(const std::initializer_list& axes) : std::vector(axes) {} +ov::Coordinate::Coordinate(const std::initializer_list& axes) : std::vector(axes) {} -ngraph::Coordinate::Coordinate(const Shape& shape) +ov::Coordinate::Coordinate(const ngraph::Shape& shape) : std::vector(static_cast&>(shape)) {} -ngraph::Coordinate::Coordinate(const std::vector& axes) : std::vector(axes) {} +ov::Coordinate::Coordinate(const std::vector& axes) : std::vector(axes) {} -ngraph::Coordinate::Coordinate(const Coordinate& axes) : std::vector(axes) {} +ov::Coordinate::Coordinate(const Coordinate& axes) = default; -ngraph::Coordinate::Coordinate(size_t n, size_t initial_value) : std::vector(n, initial_value) {} +ov::Coordinate::Coordinate(size_t n, size_t initial_value) : std::vector(n, initial_value) {} -ngraph::Coordinate::~Coordinate() {} +ov::Coordinate::~Coordinate() = default; -ngraph::Coordinate& ngraph::Coordinate::operator=(const Coordinate& v) { +ov::Coordinate& ov::Coordinate::operator=(const Coordinate& v) { static_cast*>(this)->operator=(v); return *this; } -ngraph::Coordinate& ngraph::Coordinate::operator=(Coordinate&& v) noexcept { +ov::Coordinate& ov::Coordinate::operator=(Coordinate&& v) noexcept { static_cast*>(this)->operator=(v); return *this; } -constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; +constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; diff --git a/ngraph/core/src/coordinate_diff.cpp b/ngraph/core/src/coordinate_diff.cpp index 856a4e2ead9bda..dcbb3abc7e753a 100644 --- a/ngraph/core/src/coordinate_diff.cpp +++ b/ngraph/core/src/coordinate_diff.cpp @@ -9,35 +9,35 @@ using namespace std; using namespace ngraph; -std::ostream& ngraph::operator<<(std::ostream& s, const CoordinateDiff& coordinate_diff) { +std::ostream& ov::operator<<(std::ostream& s, const CoordinateDiff& coordinate_diff) { s << "CoordinateDiff{"; s << ngraph::join(coordinate_diff); s << "}"; return s; } -ngraph::CoordinateDiff::CoordinateDiff(const std::initializer_list& diffs) +ov::CoordinateDiff::CoordinateDiff(const std::initializer_list& diffs) : std::vector(diffs) {} -ngraph::CoordinateDiff::CoordinateDiff(const std::vector& diffs) : std::vector(diffs) {} +ov::CoordinateDiff::CoordinateDiff(const std::vector& diffs) : std::vector(diffs) {} -ngraph::CoordinateDiff::CoordinateDiff(const CoordinateDiff& diffs) : std::vector(diffs) {} +ov::CoordinateDiff::CoordinateDiff(const CoordinateDiff& diffs) = default; -ngraph::CoordinateDiff::CoordinateDiff(size_t n, std::ptrdiff_t initial_value) +ov::CoordinateDiff::CoordinateDiff(size_t n, std::ptrdiff_t initial_value) : std::vector(n, initial_value) {} -ngraph::CoordinateDiff::CoordinateDiff() {} +ov::CoordinateDiff::CoordinateDiff() = default; -ngraph::CoordinateDiff::~CoordinateDiff() {} +ov::CoordinateDiff::~CoordinateDiff() = default; -ngraph::CoordinateDiff& ngraph::CoordinateDiff::operator=(const CoordinateDiff& v) { +ov::CoordinateDiff& ov::CoordinateDiff::operator=(const CoordinateDiff& v) { static_cast*>(this)->operator=(v); return *this; } -ngraph::CoordinateDiff& ngraph::CoordinateDiff::operator=(CoordinateDiff&& v) noexcept { +ov::CoordinateDiff& ov::CoordinateDiff::operator=(CoordinateDiff&& v) noexcept { static_cast*>(this)->operator=(v); return *this; } -constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info; +constexpr ov::DiscreteTypeInfo ov::AttributeAdapter::type_info;