Skip to content

Intel MKL support #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,20 @@ 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"
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"
Expand All @@ -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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------
Expand Down
4 changes: 3 additions & 1 deletion src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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