Skip to content

Commit d8a8585

Browse files
authored
Merge pull request #92 from termoshtt/intel-mkl
Intel MKL support
2 parents 4fca959 + d255a89 commit d8a8585

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

Cargo.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,20 @@ openblas-system = ["lapack/openblas", "openblas-src/system"]
1919
netlib-shared = ["lapack/netlib"]
2020
netlib-static = ["lapack/netlib", "netlib-src/static"]
2121
netlib-system = ["lapack/netlib", "netlib-src/system"]
22+
intel-mkl = ["intel-mkl-src"]
2223

2324
[dependencies]
2425
rand = "0.3"
2526
derive-new = "0.4"
2627
procedurals = "0.2"
2728
num-traits = "0.1"
2829
num-complex = "0.1"
30+
lapack = { version = "0.13", default-features = false }
31+
lapack-sys = { version = "0.11", default-features = false }
2932

3033
[dependencies.ndarray]
3134
version = "0.10"
3235
default-features = false
33-
features = ["blas"]
34-
35-
[dependencies.lapack]
36-
version = "0.13"
37-
default-features = false
3836

3937
[dependencies.openblas-src]
4038
version = "0.5.3"
@@ -45,3 +43,8 @@ optional = true
4543
version = "0.7.0"
4644
default-features = false
4745
optional = true
46+
47+
[dependencies.intel-mkl-src]
48+
version = "0.2.5"
49+
default-features = false
50+
optional = true

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ and more (See Cargo.toml).
1717
Feature flags
1818
--------------
1919

20-
- OpenBLAS
20+
- [OpenBLAS](https://github.com/cmr/openblas-src)
2121
- `openblas-static`: use OpenBLAS with static link (default)
2222
- `openblas-shared`: use OpenBLAS with shared link
2323
- `openblas-system`: use system OpenBLAS (experimental)
24-
- Netlib
24+
- [Netlib](https://github.com/cmr/netlib-src)
2525
- `netlib-static`: use Netlib with static link (default)
2626
- `netlib-shared`: use Netlib with shared link
2727
- `netlib-system`: use system Netlib (experimental)
28+
- [Intel MKL](https://github.com/termoshtt/rust-intel-mkl) (non-free license, see the linked page)
29+
- `intel-mkl`: use Intel MKL shared link (experimental)
2830

2931
Examples
3032
---------

src/layout.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ where
116116
if self.is_square() {
117117
Ok(())
118118
} else {
119-
Err(NotSquareError::new(self.rows() as i32, self.cols() as i32).into())
119+
Err(
120+
NotSquareError::new(self.rows() as i32, self.cols() as i32).into(),
121+
)
120122
}
121123
}
122124

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! - [Scalar trait](types/trait.Scalar.html)
1919
2020
extern crate lapack;
21+
extern crate lapack_sys;
2122
extern crate num_traits;
2223
extern crate num_complex;
2324
extern crate rand;
@@ -28,6 +29,9 @@ extern crate procedurals;
2829
#[macro_use]
2930
extern crate derive_new;
3031

32+
#[cfg(feature = "intel-mkl")]
33+
extern crate intel_mkl_src;
34+
3135
pub mod assert;
3236
pub mod cholesky;
3337
pub mod convert;

wercker.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ test-netlib:
1111
- script:
1212
name: test NetLib backend
1313
code: cargo test --no-default-features --features=netlib-static
14+
15+
test-intel-mkl:
16+
steps:
17+
- script:
18+
name: test Intel MKL backend
19+
code: cargo test --no-default-features --features=intel-mkl

0 commit comments

Comments
 (0)