From afd38f0c617d6f89b2b4532c6c44f116617e2b6f Mon Sep 17 00:00:00 2001 From: Felix Thomasmathibalan Date: Wed, 27 Sep 2023 17:46:17 +0100 Subject: 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 Change-Id: Ib7eb1fcf4e7537b9feaefcfc15098a804a3fde0a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10391 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir --- src/graph/backends/NEON/NENodeValidator.cpp | 64 ++++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'src/graph/backends/NEON/NENodeValidator.cpp') diff --git a/src/graph/backends/NEON/NENodeValidator.cpp b/src/graph/backends/NEON/NENodeValidator.cpp index a485e5d235..a97806f92c 100644 --- a/src/graph/backends/NEON/NENodeValidator.cpp +++ b/src/graph/backends/NEON/NENodeValidator.cpp @@ -25,9 +25,9 @@ #include "arm_compute/graph/backends/ValidateHelpers.h" #include "arm_compute/graph/nodes/Nodes.h" - #include "arm_compute/runtime/CPP/CPPFunctions.h" #include "arm_compute/runtime/NEON/NEFunctions.h" + #include "support/Cast.h" using namespace arm_compute::utils::cast; @@ -56,41 +56,51 @@ struct NEUnaryEltwiseLayerFunctions Status NENodeValidator::validate(INode *node) { - if(node == nullptr) + if (node == nullptr) { return Status{}; } NodeType type = node->type(); - switch(type) + switch (type) { case NodeType::ArgMinMaxLayer: - return detail::validate_arg_min_max_layer(*polymorphic_downcast(node)); + return detail::validate_arg_min_max_layer( + *polymorphic_downcast(node)); case NodeType::BoundingBoxTransformLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : BoundingBoxTransformLayer"); + return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, + "Unsupported operation : BoundingBoxTransformLayer"); case NodeType::ChannelShuffleLayer: - return detail::validate_channel_shuffle_layer(*polymorphic_downcast(node)); + return detail::validate_channel_shuffle_layer( + *polymorphic_downcast(node)); case NodeType::ConvolutionLayer: - return detail::validate_convolution_layer(*polymorphic_downcast(node)); + return detail::validate_convolution_layer( + *polymorphic_downcast(node)); case NodeType::DepthToSpaceLayer: - return detail::validate_depth_to_space_layer(*polymorphic_downcast(node)); + return detail::validate_depth_to_space_layer( + *polymorphic_downcast(node)); case NodeType::DepthwiseConvolutionLayer: - return detail::validate_depthwise_convolution_layer(*polymorphic_downcast(node)); + return detail::validate_depthwise_convolution_layer( + *polymorphic_downcast(node)); case NodeType::DequantizationLayer: - return detail::validate_dequantization_layer(*polymorphic_downcast(node)); + return detail::validate_dequantization_layer( + *polymorphic_downcast(node)); case NodeType::DetectionOutputLayer: - return detail::validate_detection_output_layer(*polymorphic_downcast(node)); + return detail::validate_detection_output_layer( + *polymorphic_downcast(node)); case NodeType::DetectionPostProcessLayer: - return detail::validate_detection_post_process_layer(*polymorphic_downcast(node)); + return detail::validate_detection_post_process_layer( + *polymorphic_downcast(node)); case NodeType::GenerateProposalsLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : GenerateProposalsLayer"); + return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, + "Unsupported operation : GenerateProposalsLayer"); case NodeType::L2NormalizeLayer: - return detail::validate_l2_normalize_layer(*polymorphic_downcast(node)); + return detail::validate_l2_normalize_layer( + *polymorphic_downcast(node)); case NodeType::NormalizePlanarYUVLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : NormalizePlanarYUVLayer"); + return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, + "Unsupported operation : NormalizePlanarYUVLayer"); case NodeType::PadLayer: return detail::validate_pad_layer(*polymorphic_downcast(node)); case NodeType::PermuteLayer: @@ -100,23 +110,29 @@ Status NENodeValidator::validate(INode *node) case NodeType::PriorBoxLayer: return detail::validate_priorbox_layer(*polymorphic_downcast(node)); case NodeType::QuantizationLayer: - return detail::validate_quantization_layer(*polymorphic_downcast(node)); + return detail::validate_quantization_layer( + *polymorphic_downcast(node)); case NodeType::ReductionOperationLayer: - return detail::validate_reduction_operation_layer(*polymorphic_downcast(node)); + return detail::validate_reduction_operation_layer( + *polymorphic_downcast(node)); case NodeType::ReorgLayer: return detail::validate_reorg_layer(*polymorphic_downcast(node)); case NodeType::ReshapeLayer: return detail::validate_reshape_layer(*polymorphic_downcast(node)); case NodeType::ROIAlignLayer: - return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, "Unsupported operation : ROIAlignLayer"); + return ARM_COMPUTE_CREATE_ERROR(arm_compute::ErrorCode::RUNTIME_ERROR, + "Unsupported operation : ROIAlignLayer"); case NodeType::SliceLayer: return detail::validate_slice_layer(*polymorphic_downcast(node)); case NodeType::StridedSliceLayer: - return detail::validate_strided_slice_layer(*polymorphic_downcast(node)); + return detail::validate_strided_slice_layer( + *polymorphic_downcast(node)); case NodeType::EltwiseLayer: - return detail::validate_eltwise_Layer(*polymorphic_downcast(node)); + return detail::validate_eltwise_Layer( + *polymorphic_downcast(node)); case NodeType::UnaryEltwiseLayer: - return detail::validate_unary_eltwise_layer(*polymorphic_downcast(node)); + return detail::validate_unary_eltwise_layer( + *polymorphic_downcast(node)); default: return Status{}; } -- cgit v1.2.1