From 70fae5c5bc666dcb40d39bb5779a0dd0f855c675 Mon Sep 17 00:00:00 2001 From: Patryk Elszkowski Date: Thu, 11 Feb 2021 08:09:10 +0100 Subject: [PATCH] Update ngraph/core/reference/src/runtime/reference/concat.cpp Co-authored-by: Gleb Kazantaev --- .../reference/src/runtime/reference/concat.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ngraph/core/reference/src/runtime/reference/concat.cpp b/ngraph/core/reference/src/runtime/reference/concat.cpp index 54c2675b0b0945..c47004905071e1 100644 --- a/ngraph/core/reference/src/runtime/reference/concat.cpp +++ b/ngraph/core/reference/src/runtime/reference/concat.cpp @@ -30,10 +30,10 @@ namespace ngraph { std::vector sizes; sizes.reserve(in_shapes.size()); - for (size_t in_index = 0; in_index != in_shapes.size(); ++in_index) - { - sizes.push_back(shape_size(in_shapes[in_index])); - } + std::transform(begin(in_shapes), + end(in_shapes), + std::back_inserter(sizes), + [](const Shape& shape) { return shape_size(shape); }); return sizes; } } // namespace @@ -69,6 +69,6 @@ namespace ngraph } } } - } - } -} + } // namespace reference + } // namespace runtime +} // namespace ngraph