Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 2.72 KB

CONTRIBUTING.md

File metadata and controls

72 lines (57 loc) · 2.72 KB

Contributing to SIMDe

First off, if you're even reading this, thank you! There is a lot of work to do, and any help is appreciated.

If you haven't already, please read the README. The wiki also has some good information, especially the FAQ and a guide on how to implement a new function.

For information on developing for architectures you don't have access to, please see the Development Environment page on the wiki.

If you still have questions, or if anything below doesn't make sense to you, please feel free to use the issue tracker or the mailing list to ask. I know the SIMDe documentation needs a lot of improvement, and asking questions will help us understand what is missing, so please don't be shy!

Building the Tests

SIMDe contains an extensive test suite used for development. Most users will never need to build the suite, but if you're contributing code to SIMDe you'll need to build them.

Here is the basic procedure for compiling and running the tests:

mkdir build
cd build
CFLAGS="-march=native" CXXFLAGS="-march=native" meson ..
ninja test

Note that -march=native may not be the right flag for your compiler. That should work for most compilers on x86/x86_64, though MSVC is an exception (try /arch:AVX2 instead of -march=native). On other architectures please consult your compiler documentation to find out what flags you should use to enable the SIMD extension for your target platform. Here are a few to try:

  • ARM:
    • -march=armv8-a+simd (for AArch64)
    • -march=armv8-a+simd -mfpu=auto (for ARMv8)
    • -march=armv7-a -mfpu=neon (for ARMv7)
  • POWER
    • -mcpu=native

If you need a flag not listed above, please let us know so we can add it to the list.

You may also want to take a look at the Docker container which has many builds pre-configured, including cross-compilers and emulators.

Coding Style

SIMDe has an EditorConfig file to configure your editor for things like tabs vs. spaces, how many spaces, etc. If you use an editor which doesn't support it out of the box then odds are good there is a plugin you can download; please do so.

For other coding style information, please see the Coding Style document in the Wiki.