From c64b2abce3ff39a73ca299e496d75881cab1bc74 Mon Sep 17 00:00:00 2001 From: "Zinoviev, Vladimir" Date: Wed, 15 Jul 2020 20:06:11 +0300 Subject: [PATCH] [LPT] code style fix #4 --- .../low_precision/network_helper.hpp | 1 + .../multiply_function.cpp | 36 +++++++++++-------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/inference-engine/src/transformations/include/transformations/low_precision/network_helper.hpp b/inference-engine/src/transformations/include/transformations/low_precision/network_helper.hpp index 1e763bb7ef720a..f23e5241ab0d78 100644 --- a/inference-engine/src/transformations/include/transformations/low_precision/network_helper.hpp +++ b/inference-engine/src/transformations/include/transformations/low_precision/network_helper.hpp @@ -134,6 +134,7 @@ class TRANSFORMATIONS_API NetworkHelper { static FakeQuantizeDequantizationValues createEmptyValues(const FakeQuantizeDequantization& dequantization); static bool isZeroConst(const std::shared_ptr& node); + private: // 1 - on weights // 0 - weightable layer was not found diff --git a/inference-engine/tests/ngraph_functions/src/low_precision_transformations/multiply_function.cpp b/inference-engine/tests/ngraph_functions/src/low_precision_transformations/multiply_function.cpp index f3b311d3e49b43..8b18088499d66b 100644 --- a/inference-engine/tests/ngraph_functions/src/low_precision_transformations/multiply_function.cpp +++ b/inference-engine/tests/ngraph_functions/src/low_precision_transformations/multiply_function.cpp @@ -30,24 +30,26 @@ std::shared_ptr MultiplyFunction::getOriginal( if (!actualValues.subtractValues1.empty()) { const std::shared_ptr subtract1 = std::make_shared< ngraph::opset1::Subtract >( parent1, - std::make_shared(precision, Shape({ actualValues.subtractValues1.size() }), actualValues.subtractValues1)); + std::make_shared( + precision, Shape({ actualValues.subtractValues1.size() }), actualValues.subtractValues1)); parent1 = subtract1; } if (!actualValues.mutliplyValues1.empty()) { const std::shared_ptr multiply1 = std::make_shared< ngraph::opset1::Multiply >( parent1, - std::make_shared(precision, Shape({ actualValues.mutliplyValues1.size() }), actualValues.mutliplyValues1)); + std::make_shared( + precision, Shape({ actualValues.mutliplyValues1.size() }), actualValues.mutliplyValues1)); parent1 = multiply1; } std::shared_ptr parent2; std::shared_ptr input2; if (constInput) { - const auto const2 = std::make_shared(actualValues.precision2, Shape({ actualValues.mutliplyValues2.size() }), actualValues.mutliplyValues2); + const auto const2 = std::make_shared( + actualValues.precision2, Shape({ actualValues.mutliplyValues2.size() }), actualValues.mutliplyValues2); parent2 = const2; - } - else { + } else { input2 = std::make_shared( actualValues.precision2, ngraph::Shape(inputShape)); @@ -59,14 +61,16 @@ std::shared_ptr MultiplyFunction::getOriginal( if (!actualValues.subtractValues2.empty()) { const std::shared_ptr subtract2 = std::make_shared< ngraph::opset1::Subtract >( parent2, - std::make_shared(precision, Shape({ actualValues.subtractValues2.size() }), actualValues.subtractValues2)); + std::make_shared( + precision, Shape({ actualValues.subtractValues2.size() }), actualValues.subtractValues2)); parent2 = subtract2; } if (!actualValues.mutliplyValues2.empty()) { const std::shared_ptr multiply2 = std::make_shared< ngraph::opset1::Multiply >( parent2, - std::make_shared(precision, Shape({ actualValues.mutliplyValues2.size() }), actualValues.mutliplyValues2)); + std::make_shared( + precision, Shape({ actualValues.mutliplyValues2.size() }), actualValues.mutliplyValues2)); parent2 = multiply2; } } @@ -99,24 +103,26 @@ std::shared_ptr MultiplyFunction::getReference( if (!expectedValues.subtractValues1.empty()) { const std::shared_ptr subtract1 = std::make_shared( parent1, - std::make_shared(precision, Shape({ expectedValues.subtractValues1.size() }), expectedValues.subtractValues1)); + std::make_shared( + precision, Shape({ expectedValues.subtractValues1.size() }), expectedValues.subtractValues1)); parent1 = subtract1; } if (!expectedValues.mutliplyValues1.empty()) { const std::shared_ptr multiply1 = std::make_shared( parent1, - std::make_shared(precision, Shape({ expectedValues.mutliplyValues1.size() }), expectedValues.mutliplyValues1)); + std::make_shared( + precision, Shape({ expectedValues.mutliplyValues1.size() }), expectedValues.mutliplyValues1)); parent1 = multiply1; } std::shared_ptr parent2; std::shared_ptr input2; if (constInput) { - const auto const2 = std::make_shared(expectedValues.precision2, Shape({ expectedValues.mutliplyValues2.size() }), expectedValues.mutliplyValues2); + const auto const2 = std::make_shared( + expectedValues.precision2, Shape({ expectedValues.mutliplyValues2.size() }), expectedValues.mutliplyValues2); parent2 = const2; - } - else { + } else { input2 = std::make_shared( expectedValues.precision2, ngraph::Shape(inputShape)); @@ -130,14 +136,16 @@ std::shared_ptr MultiplyFunction::getReference( if (!expectedValues.subtractValues2.empty()) { const std::shared_ptr subtract2 = std::make_shared( parent2, - std::make_shared(precision, Shape({ expectedValues.subtractValues2.size() }), expectedValues.subtractValues2)); + std::make_shared( + precision, Shape({ expectedValues.subtractValues2.size() }), expectedValues.subtractValues2)); parent2 = subtract2; } if (!expectedValues.mutliplyValues2.empty()) { const std::shared_ptr multiply2 = std::make_shared( parent2, - std::make_shared(precision, Shape({ expectedValues.mutliplyValues2.size() }), expectedValues.mutliplyValues2)); + std::make_shared( + precision, Shape({ expectedValues.mutliplyValues2.size() }), expectedValues.mutliplyValues2)); parent2 = multiply2; } }