Fix potential UNITY build failures (ENABLE_FASTER_BUILD) (#7647)

When ENABLE_FASTER_BUILD is ON, source files are combined to batch for faster compilation.
However, when one source file uses "using namespace ngraph", and another has "using namespace ov" - then conflicts may occur depending on how sources were combined

This fix removes usage of "using namespace ov" from ngraph code to avoid such potential issues
This commit is contained in:
Mikhail Nosov 2021-09-25 00:47:28 +03:00 committed by GitHub
parent 7320e9710a
commit 4a49fb6e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -10,7 +10,7 @@
#include "ngraph/except.hpp"
#include "ngraph/util.hpp"
using namespace ov;
namespace ov {
/////////////////////////////////////////////////////////////////////////////////
@ -264,3 +264,5 @@ void AttributeAdapter<ov::Layout>::set(const std::string& value) {
}
constexpr VariantTypeInfo VariantWrapper<ov::Layout>::type_info;
} // namespace ov

View File

@ -8,8 +8,9 @@
#include "ngraph/op/constant.hpp"
#include "ngraph/validation_util.hpp"
namespace ov {
using namespace std;
using namespace ov;
BWDCMP_RTTI_DEFINITION(op::util::LogicalReduction);
@ -62,3 +63,5 @@ void op::util::LogicalReduction::validate_and_infer_types() {
set_input_is_relevant_to_shape(1);
set_output_type(0, data_et, result_shape);
}
} // namespace ov

View File

@ -8,8 +8,8 @@
#include "openvino/core/node.hpp"
#include "openvino/core/shape.hpp"
using namespace ov;
using namespace ov::preprocess;
namespace ov {
namespace preprocess {
static Shape construct_mean_scale_shape(const std::shared_ptr<Node>& node,
size_t values_size,
@ -97,3 +97,6 @@ void PreProcessSteps::PreProcessStepsImpl::add_convert_impl(const ov::element::T
},
true));
}
} // namespace preprocess
} // namespace ov