aboutsummaryrefslogtreecommitdiff
path: root/src/graph/DataLayerVisitor.cpp
diff options
context:
space:
mode:
authorFelix Thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-27 17:46:17 +0100
committerfelixjohnny.thomasmathibalan <felixjohnny.thomasmathibalan@arm.com>2023-09-28 12:08:05 +0000
commitafd38f0c617d6f89b2b4532c6c44f116617e2b6f (patch)
tree03bc7d5a762099989b16a656fa8d397b490ed70e /src/graph/DataLayerVisitor.cpp
parentbdcb4c148ee2fdeaaddf4cf1e57bbb0de02bb894 (diff)
downloadComputeLibrary-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/DataLayerVisitor.cpp')
-rw-r--r--src/graph/DataLayerVisitor.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/graph/DataLayerVisitor.cpp b/src/graph/DataLayerVisitor.cpp
index 073ffd413d..f0fac25577 100644
--- a/src/graph/DataLayerVisitor.cpp
+++ b/src/graph/DataLayerVisitor.cpp
@@ -25,8 +25,8 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/graph/Graph.h"
-#include "arm_compute/graph/TypePrinter.h"
#include "arm_compute/graph/nodes/Nodes.h"
+#include "arm_compute/graph/TypePrinter.h"
namespace arm_compute
{
@@ -43,17 +43,14 @@ void add_convolution_layer_data(DataLayerVisitor::LayerData &layer_data, T &node
layer_data["data_layout"] = to_string(layout);
// Add padding info
std::ostringstream padding;
- padding << "[" << to_string(ps_info.pad_left()) << ","
- << to_string(ps_info.pad_top()) << ","
- << to_string(ps_info.pad_bottom()) << ","
- << to_string(ps_info.pad_right()) << "]";
+ padding << "[" << to_string(ps_info.pad_left()) << "," << to_string(ps_info.pad_top()) << ","
+ << to_string(ps_info.pad_bottom()) << "," << to_string(ps_info.pad_right()) << "]";
layer_data["pad"] = padding.str();
// Add stride info
std::ostringstream stride;
- stride << "[" << to_string(ps_info.stride().first) << ","
- << to_string(ps_info.stride().second) << "]";
+ stride << "[" << to_string(ps_info.stride().first) << "," << to_string(ps_info.stride().second) << "]";
layer_data["stride"] = stride.str();
@@ -68,12 +65,12 @@ void add_convolution_layer_data(DataLayerVisitor::LayerData &layer_data, T &node
// Change input names for weights / bias (if applicable)
// Assumes input(1) is weights and input(2) is bias
- if(layer_data.count("input_shape1"))
+ if (layer_data.count("input_shape1"))
{
layer_data["weights_shape"] = layer_data["input_shape1"];
layer_data.erase("input_shape1");
}
- if(layer_data.count("input_shape2"))
+ if (layer_data.count("input_shape2"))
{
layer_data["bias_shape"] = layer_data["input_shape2"];
layer_data.erase("input_shape2");
@@ -92,16 +89,17 @@ template <typename T>
void add_generic_layer_data(DataLayerVisitor::LayerData &layer_data, T &node)
{
// Loop over each input tensor
- for(size_t tensor_no = 0; tensor_no < node.num_inputs(); ++tensor_no)
+ for (size_t tensor_no = 0; tensor_no < node.num_inputs(); ++tensor_no)
{
// Add input tensor shapes
- if(node.input(tensor_no) != nullptr)
+ if (node.input(tensor_no) != nullptr)
{
- layer_data["input_shape" + to_string(tensor_no)] = "[" + to_string(node.input(tensor_no)->desc().shape) + "]";
+ layer_data["input_shape" + to_string(tensor_no)] =
+ "[" + to_string(node.input(tensor_no)->desc().shape) + "]";
}
}
// Add output tensor shape
- if(node.output(0) != nullptr)
+ if (node.output(0) != nullptr)
{
layer_data["output_shape0"] = "[" + to_string(node.output(0)->desc().shape) + "]";
}