Compilation Methods
- To use basic HMPP functions, add the following compile options:
- To use the HMPP signal library, install the Kunpeng Math Library (KML) first. For details, see Kunpeng Math Library Developer Guide. Then, add the following compile options:
-L /usr/local/kml/lib/neon -lkfft -lkfftf -L /usr/local/kml/lib/noarch/kvml/single -lkvml -L /usr/local/kml/lib/noarch/ -lkm -lm -L /usr/local/kml/lib/neon/kblas/locking -lkblas -L /usr/local/lib/HMPP -lHMPP_signal -lHMPP_core -lpthread
Perform the following steps to ensure that the KML environment variables are correctly set:
- Open the /etc/profile file.
vim /etc/profile
- Press i to enter the insert mode and add the following content to the end of the file:
export LD_LIBRARY_PATH=/usr/local/lib/HMPP:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kblas/nolocking:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kblas/locking:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kblas/omp:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kblas/pthread:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kspblas/single:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/neon/kspblas/multi:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/noarch:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/noarch/kvml/single:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/kml/lib/noarch/kvml/multi:$LD_LIBRARY_PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the configuration take effect.
source /etc/profile
- Open the /etc/profile file.
- To use the HMPP image library, add the following compile options:
- To use the HMPP audio library, add the following compile options:
Parent topic: HMPP Usage