Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation Methods

  • To use basic HMPP functions, add the following compile options:

    -L /usr/local/lib/HMPP -lHMPP_core

  • 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:

    1. Open the /etc/profile file.
      vim /etc/profile
    2. 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
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the configuration take effect.
      source /etc/profile
  • To use the HMPP image library, add the following compile options:

    -L /usr/local/lib/HMPP -lHMPP_image -lHMPP_core -lm

  • To use the HMPP audio library, add the following compile options:

    -L /usr/local/lib/HMPP -lHMPP_audio -lHMPP_core -lm