3.3 Methods of writing code for NEON

You can use a number of different methods to write code for NEON.

These methods are as follows:

  • Write in assembly language, or use embedded assembly language in C, and use the NEON instructions directly.

  • Write in C or C++ using the NEON C language extensions.

  • Call a library routine that has been optimized to use NEON instructions.

  • Use automatic vectorization to get loops vectorized for NEON.

Optimizing for performance requires an understanding of where in the program most of the time is spent. To gain maximum performance benefits you might also have to use profiling and benchmarking of the code under realistic conditions.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.