diff options
author | Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-27 17:46:17 +0100 |
---|---|---|
committer | felixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com> | 2023-09-28 12:08:05 +0000 |
commit | afd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch) | |
tree | 03bc7d5a762099989b16a656fa8d397b490ed70e /src/graph/nodes/ConcatenateLayerNode.cpp | |
parent | bdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff) | |
download | ComputeLibrary-afd38f0c617d6f89b2b4532c6c44f116617e2b6f.tar.gz |
Apply clang-format on repository
Code is formatted as per a revised clang format configuration
file(not part of this delivery). Version 14.0.6 is used.
Exclusion List:
- files with .cl extension
- files that are not strictly C/C++ (e.g. Android.bp, Sconscript ...)
And the following directories
- compute_kernel_writer/validation/
- tests/
- include/
- src/core/NEON/kernels/convolution/
- src/core/NEON/kernels/arm_gemm/
- src/core/NEON/kernels/arm_conv/
- data/
There will be a follow up for formatting of .cl files and the
files under tests/ and compute_kernel_writer/validation/.
Signed-off-by: Felix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>
Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Diffstat (limited to 'src/graph/nodes/ConcatenateLayerNode.cpp')
-rw-r--r-- | src/graph/nodes/ConcatenateLayerNode.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/graph/nodes/ConcatenateLayerNode.cpp b/src/graph/nodes/ConcatenateLayerNode.cpp index 3f3c70f3bb..8e5393a5e4 100644 --- a/src/graph/nodes/ConcatenateLayerNode.cpp +++ b/src/graph/nodes/ConcatenateLayerNode.cpp @@ -24,17 +24,17 @@ #include "arm_compute/graph/nodes/ConcatenateLayerNode.h" #include "arm_compute/core/Utils.h" +#include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "arm_compute/graph/Graph.h" #include "arm_compute/graph/INodeVisitor.h" #include "arm_compute/graph/Utils.h" -#include "arm_compute/core/utils/misc/ShapeCalculator.h" - namespace arm_compute { namespace graph { -ConcatenateLayerNode::ConcatenateLayerNode(unsigned int total_nodes, descriptors::ConcatLayerDescriptor concat_descriptor) +ConcatenateLayerNode::ConcatenateLayerNode(unsigned int total_nodes, + descriptors::ConcatLayerDescriptor concat_descriptor) : _total_nodes(total_nodes), _concat_descriptor(std::move(concat_descriptor)), _is_enabled(true) { _input_edges.resize(_total_nodes, EmptyEdgeID); @@ -73,7 +73,7 @@ TensorDescriptor ConcatenateLayerNode::compute_output_descriptor(const std::vect // Extract shapes std::vector<const TensorShape *> shapes; shapes.reserve(input_descriptors.size()); - for(auto &input_descriptor : input_descriptors) + for (auto &input_descriptor : input_descriptors) { shapes.emplace_back(&input_descriptor.shape); } @@ -85,7 +85,7 @@ TensorDescriptor ConcatenateLayerNode::compute_output_descriptor(const std::vect bool ConcatenateLayerNode::forward_descriptors() { - if(_outputs[0] != NullTensorID) + if (_outputs[0] != NullTensorID) { Tensor *dst = output(0); ARM_COMPUTE_ERROR_ON(dst == nullptr); @@ -101,24 +101,22 @@ TensorDescriptor ConcatenateLayerNode::configure_output(size_t idx) const ARM_COMPUTE_ERROR_ON(idx >= _outputs.size()); // Check if all input tensors are set - bool are_all_inputs_set = std::all_of(std::begin(_input_edges), std::end(_input_edges), [](const EdgeID & eid) - { - return eid != EmptyEdgeID; - }); + bool are_all_inputs_set = std::all_of(std::begin(_input_edges), std::end(_input_edges), + [](const EdgeID &eid) { return eid != EmptyEdgeID; }); TensorDescriptor output_info = {}; - if(are_all_inputs_set) + if (are_all_inputs_set) { std::vector<TensorDescriptor> inputs_descriptors; - for(unsigned int i = 0; i < _input_edges.size(); ++i) + for (unsigned int i = 0; i < _input_edges.size(); ++i) { const Tensor *t = _graph->tensor(input_id(i)); ARM_COMPUTE_ERROR_ON(t == nullptr); inputs_descriptors.push_back(t->desc()); } output_info = compute_output_descriptor(inputs_descriptors, _concat_descriptor.axis); - if(!_concat_descriptor.output_qinfo.empty()) + if (!_concat_descriptor.output_qinfo.empty()) { output_info.quant_info = _concat_descriptor.output_qinfo; } |