This crate provides wrappers of the Intel Integrated Performance Primitives (Intel IPP) library made with rust-bindgen.
Use the 2017
, 2018
, or 2019
cargo feature to use IPP 2017, 2018, or
2019 respectively.
Get IPP from https://software.intel.com/en-us/intel-ipp
Compile IPP statically into your app by setting environment variable
IPP_STATIC=1
.
You must set the IPPROOT
environment variable at compilation time. This is
used by the build.rs
files to find your IPP installation. Typically, this is
set using a tool provided by Intel with IPP and run as follows.
On Linux:
source /opt/intel/compilers_and_libraries_2019/linux/ipp/bin/ippvars.sh -arch intel64 -platform linux
On Mac:
source /opt/intel/compilers_and_libraries_2019/mac/bin/compilervars.sh -arch intel64 -platform mac
On Windows:
"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019\windows\ipp\bin\ippvars.bat" intel64
In Cargo.toml
, include ipp-sys
as a dependency with a feature to select
the IPP version used:
[dependencies]
ipp-sys = { version = "0.4", features=["2019"] }
Now, you can use ipp_sys
in your crate. You might like to check that you
compiled the correct version by doing something like:
```rust // Get the version from IPP at runtime. let linkedversionmajor = unsafe{ (ipp_sys::ippGetLibVersion()).major }; let linked_version_minor = unsafe{ (ipp_sys::ippGetLibVersion()).minor };
// Compare the runtime major version with the compile-time major version. asserteq!( linkedversionmajor as i32, ippsys::IPPVERSIONMAJOR as i32); // And compare the minor version, too. asserteq!( linkedversionminor as i32, ippsys::IPPVERSIONMINOR as i32); ```
README.md
in the ipp-sys
crate)This file is automatically generated from the ipp-sys
docstring by running the
following command:
cargo readme > README.md