diff --git a/Cargo.toml b/Cargo.toml index fcff1b06..184bac73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ openblas-system = ["lapack/openblas", "openblas-src/system"] netlib-shared = ["lapack/netlib"] netlib-static = ["lapack/netlib", "netlib-src/static"] netlib-system = ["lapack/netlib", "netlib-src/system"] +intel-mkl = ["intel-mkl-src"] [dependencies] rand = "0.3" @@ -26,15 +27,12 @@ derive-new = "0.4" procedurals = "0.2" num-traits = "0.1" num-complex = "0.1" +lapack = { version = "0.13", default-features = false } +lapack-sys = { version = "0.11", default-features = false } [dependencies.ndarray] version = "0.10" default-features = false -features = ["blas"] - -[dependencies.lapack] -version = "0.13" -default-features = false [dependencies.openblas-src] version = "0.5.3" @@ -45,3 +43,8 @@ optional = true version = "0.7.0" default-features = false optional = true + +[dependencies.intel-mkl-src] +version = "0.2.5" +default-features = false +optional = true diff --git a/README.md b/README.md index affedf1e..2bb9f015 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,16 @@ and more (See Cargo.toml). Feature flags -------------- -- OpenBLAS +- [OpenBLAS](https://github.com/cmr/openblas-src) - `openblas-static`: use OpenBLAS with static link (default) - `openblas-shared`: use OpenBLAS with shared link - `openblas-system`: use system OpenBLAS (experimental) -- Netlib +- [Netlib](https://github.com/cmr/netlib-src) - `netlib-static`: use Netlib with static link (default) - `netlib-shared`: use Netlib with shared link - `netlib-system`: use system Netlib (experimental) +- [Intel MKL](https://github.com/termoshtt/rust-intel-mkl) (non-free license, see the linked page) + - `intel-mkl`: use Intel MKL shared link (experimental) Examples --------- diff --git a/src/layout.rs b/src/layout.rs index f7036747..4c8e2b2e 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -116,7 +116,9 @@ where if self.is_square() { Ok(()) } else { - Err(NotSquareError::new(self.rows() as i32, self.cols() as i32).into()) + Err( + NotSquareError::new(self.rows() as i32, self.cols() as i32).into(), + ) } } diff --git a/src/lib.rs b/src/lib.rs index df48b157..e46aac62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,6 +18,7 @@ //! - [Scalar trait](types/trait.Scalar.html) extern crate lapack; +extern crate lapack_sys; extern crate num_traits; extern crate num_complex; extern crate rand; @@ -28,6 +29,9 @@ extern crate procedurals; #[macro_use] extern crate derive_new; +#[cfg(feature = "intel-mkl")] +extern crate intel_mkl_src; + pub mod assert; pub mod cholesky; pub mod convert; diff --git a/wercker.yml b/wercker.yml index d4fa9315..e43c0a49 100644 --- a/wercker.yml +++ b/wercker.yml @@ -11,3 +11,9 @@ test-netlib: - script: name: test NetLib backend code: cargo test --no-default-features --features=netlib-static + +test-intel-mkl: + steps: + - script: + name: test Intel MKL backend + code: cargo test --no-default-features --features=intel-mkl