Library selection
To instruct your compiler to load the optimum version of Arm Performance Libraries for your target architecture and implementation, you can use the -armpl
(Arm Compiler) or -larmpl
(GCC) option . These options also enable the optimized versions of the C mathematical functions declared in the math.h
library, tuned scalar and vector implementations of Fortran math intrinsics, and auto-vectorization of mathematical functions (disable this using -fno-simdmath
).
Supported options and arguments are:
Arm Compiler
|
GCC
|
Description |
-armpl=sve |
-larmpl |
Use the Scalable Vector Extension (SVE) library. Notes
|
(Default) |
-DINTEGER32 (Compile)-larmpl_lp64 (Link) |
Use 32-bit integers. |
(Default if using |
-DINTEGER64 (Compile)-larmpl_ilp64 (Link) |
Use 64-bit integers. |
(Default) |
-larmpl_lp64 |
Use the single-threaded library. |
(Default if using |
-larmpl_lp64_mp |
Use the OpenMP multi-threaded library. |
Separate multiple arguments using a comma, for example: -armpl=<arg1>,<arg2>
.
Default option and argument behavior
For information about the default behavior of the -armpl
option and its arguments in Arm Compiler for Linux,
see the Arm C/C++ Compiler or Arm Fortran Compiler reference guide.
Selecting target architecture
Arm Performance Libraries provides libraries suitable for a range of supported CPUs. If you intend to use -armpl
, you must also specify the required architecture using the -mcpu
option.
By default the compiler will auto-detect the CPU architecture from the build compiler. To change this behavior, and specify a particular architecture, use the -mcpu
option.
-mcpu={native | generic | thunderx2c99 | neoverse-n1 | a64fx}
Linking against static libraries
The Arm Performance Libraries are supplied in both static and shareable versions, libarmpl_lp64.a
and libarmpl_lp64.so
. By default, the commands given above link to the shareable version of the library, libarmpl_lp64.so
, if that version exists in the specified directory.
To force linking with the static library, either:
- Use the compiler flag
-static
, for example:
{armclang|armclang++|armflang} driver.{c|cpp|f90} -L${ARMPL_LIBRARIES} -static -larmpl_lp64
- Insert the name of the static library in the command line, for example:
{armclang|armclang++|armflang} driver.{c|cpp|f90} ${ARMPL_LIBRARIES}/libarmpl_lp64.a