From bc48885d36e013c2cc854bf1107fcfca47704b43 Mon Sep 17 00:00:00 2001 From: Mark Horvath Date: Fri, 30 May 2025 14:18:08 +0000 Subject: [PATCH] Add contribution guide --- README.md | 3 +- doc/contributing.md | 72 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 doc/contributing.md diff --git a/README.md b/README.md index 7c620317b..15914df25 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -18,3 +18,4 @@ It is designed to be simple to integrate into a wide variety of projects. * [C API documentation](https://kleidi.sites.arm.com/kleidicv/) * [Benchmarking](doc/benchmark.md) * [Testing](doc/test.md) +* [Contributing](doc/contributing.md) diff --git a/doc/contributing.md b/doc/contributing.md new file mode 100644 index 000000000..45c03153b --- /dev/null +++ b/doc/contributing.md @@ -0,0 +1,72 @@ + + +# Contributing to Kleidicv + +## Licensing + +Use of KleidiCV is subject to an Apache-2.0 license. The license can be found at +`LICENSES/Apache-2.0.txt`. We will receive inbound contributions under the same +license. + +## How to submit a patch + +Contributions are managed on [Arm's Gitlab](https://gitlab.arm.com) via merge +requests. To create a merge request first the project needs to be forked which +requires permission. Details on how to request this permission are given +[here](https://gitlab.arm.com/documentation/contributions). + +## Code style + +KleidiCV follows the +[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) +with the following exceptions: +* Function names are `snake_case`. +* Where the + [Arm C Language Extensions](https://arm-software.github.io/acle/main/acle.html) + mandates nonstandard C++ extensions, this takes precedence over the style + guide. + +The formatting is checked with `clang-format` before accepting a change. Source +can be formatted locally with `scripts/format.sh`. (It is the developerss +responsibility to provide the `clang-format` binary. Please use +`clang-format-20`.) + +## No dependency on C++ standard library at runtime + +KleidiCV must not have any dependencies on the C++ runtime library to enable its +usage on systems without a C++ runtime. This means that only compile-time C++ +constructs can be used in KleidiCV. However, there is not such a restriction for +the test and benchmark sources. + +## Documentation + +KlieidiCV's public API is documented in `kleidicv/include/kleidicv/kleidicv.h` +with Doxygen comments in Javadoc style. + +## Testing + +Each function with a prototype in `kleidicv.h` must be accompanied by a set of +tests that run the function on a set of representative inputs and compare the +result to known-good output. These tests are placed in the `test/api` folder +(see [Testing](doc/test.md)) and must exercise every path in the function under +test. + +## Benchmarks + +Each function with a prototype in `kleidicv.h` must be accompanied by benchmarks +implemented in `benchmark/benchmark.cpp` based on +[Google Benchmark](https://github.com/google/benchmark). The image size to +execute the given operaion on can be set via the benchmark executable command +line (see [Benchmarking](doc/benchmark.md)). If there are other parameters of +the operation affecting performance then these parameters should be excercised +as well with representative inputs. + +## Commit message + +The subject line of the commit message should be 50 characters maximum and the +body should be wrapped at 72 characters. Please use imperative mood in the +subject line. -- GitLab