Tuning the Mathematical Libraries
Principle
libamath is a subset of libm and contains a set of optimized mathematical functions. It optimizes exp, pow and log routines.
Procedure
- Run the following commands to install the libamath mathematical Library.
yum install glibc* glibm* -y
unzip optimized-routines-master.zip
cd optimized-routines-master
mkdir -p /path/to/MATH
cp config.mk.dist config.mk
make -j 16
make install
cp -r ./build/* /path/to/MATH
- Run the following commands to set the libamath mathematical Library environment variables.
export PATH=/path/to/MATH/bin:$PATH
export LD_LIBRARY_PATH=/path/to/MATH/lib:$LD_LIBRARY_PATH
- Run the following command to add the following compilation parameter and link libamath to the application when compiling the application software.
-L/path/to/MATH/lib -lmathlib
Parent topic: Basic Software Tuning