From 99145f787e9e99b45522f16d861c8527583f2b4e Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Thu, 13 Apr 2023 16:44:36 +0100 Subject: Update contibutor guidelines with rules for header guards - Includes an example Resolves: [COMPMID-5867] Signed-off-by: Mohammed Suhail Munshi Change-Id: I02c0cafecf56e9cbaf9e8284d43f8ef87af8f4d8 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/510081 Comments-Addressed: bsgcomp Tested-by: bsgcomp Reviewed-by: Viet-Hoa Do Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9441 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- docs/contributor_guide/contribution_guidelines.dox | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/contributor_guide/contribution_guidelines.dox b/docs/contributor_guide/contribution_guidelines.dox index d0287341b4..30ee41af0f 100644 --- a/docs/contributor_guide/contribution_guidelines.dox +++ b/docs/contributor_guide/contribution_guidelines.dox @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2019-2022 Arm Limited. +/// Copyright (c) 2019-2023 Arm Limited. /// /// SPDX-License-Identifier: MIT /// @@ -240,6 +240,18 @@ class ClassName }; @endcode +- In header files, use header guards that use the full file path from the project root and prepend it with "ACL_" + +@code{cpp} +// For File arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h +#ifndef ACL_ARM_COMPUTE_RUNTIME_NEON_FUNCTIONS_NEBATCHNORMALIZATIONLAYER +#define ACL_ARM_COMPUTE_RUNTIME_NEON_FUNCTIONS_NEBATCHNORMALIZATIONLAYER +. +. +. +#endif /* ACL_ARM_COMPUTE_RUNTIME_NEON_FUNCTIONS_NEBATCHNORMALIZATIONLAYER */ +@endcode + - Use quotes instead of angular brackets to include local headers. Use angular brackets for system headers. - Also include the module header first, then local headers, and lastly system headers. All groups should be separated by a blank line and sorted lexicographically within each group. - Where applicable the C++ version of system headers has to be included, e.g. cstddef instead of stddef.h. -- cgit v1.2.1