@@ -4,29 +4,58 @@ ndarray-linalg
4
4
[ ![ docs.rs] ( https://docs.rs/ndarray-linalg/badge.svg )] ( https://docs.rs/ndarray-linalg )
5
5
[ ![ wercker status] ( https://app.wercker.com/status/f04aeba682ea6e79577e15bd946344a5/s/master " wercker status ")] ( https://app.wercker.com/project/byKey/f04aeba682ea6e79577e15bd946344a5 )
6
6
7
- Linear algebra package for Rust.
7
+ Linear algebra package for Rust with [ rust-ndarray ] ( https://github.com/bluss/rust-ndarray ) .
8
8
9
- Dependencies
10
- -------------
9
+ LAPACKE Backend
10
+ ----------------
11
11
12
- - [ bluss/rust-ndarray] ( https://github.com/bluss/rust-ndarray )
13
- - [ stainless-steel/lapack] ( https://github.com/stainless-steel/lapack )
14
-
15
- and more (See Cargo.toml).
16
-
17
- Feature flags
18
- --------------
12
+ Currently three LAPACKE implementations are supported and tested:
19
13
20
14
- [ OpenBLAS] ( https://github.com/cmr/openblas-src )
21
- - ` openblas-static ` : use OpenBLAS with static link (default)
22
- - ` openblas-shared ` : use OpenBLAS with shared link
23
- - ` openblas-system ` : use system OpenBLAS (experimental)
24
15
- [ Netlib] ( https://github.com/cmr/netlib-src )
25
- - ` netlib-static ` : use Netlib with static link (default)
26
- - ` netlib-shared ` : use Netlib with shared link
27
- - ` netlib-system ` : use system Netlib (experimental)
28
16
- [ 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)
17
+
18
+ There are two ways to link LAPACKE backend:
19
+
20
+ ### backend features (recommended)
21
+ There are three features corresponding to the backend implementations (` openblas ` / ` netlib ` / ` intel-mkl ` ):
22
+
23
+ ``` toml
24
+ [depencdencies ]
25
+ ndarray = " 0.10"
26
+ ndarray-linalg = { version = " 0.8" , features = [" openblas" ] }
27
+ ```
28
+
29
+ ### link backend crate manually
30
+ For the sake of linking flexibility, you can provide LAPACKE implementation (as an ` extern crate ` ) yourself.
31
+ You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library.
32
+
33
+ ``` toml
34
+ [depencdencies ]
35
+ ndarray = " 0.10"
36
+ ndarray-linalg = " 0.8"
37
+ openblas-src = " 0.5" # or another backend of your choice
38
+
39
+ ```
40
+
41
+ You must add ` extern crate ` to your code in this case:
42
+
43
+ ``` rust
44
+ extern crate ndarray;
45
+ extern crate ndarray_linalg;
46
+ extern crate openblas_src; // or another backend of your choice
47
+ ```
48
+
49
+ ### For librarian
50
+ If you creating a library depending on this crate, we encourage you not to link any backend for flexibility:
51
+
52
+ ``` toml
53
+ [depencdencies ]
54
+ ndarray = " 0.10"
55
+ ndarray-linalg = { version = " 0.8" , default-features = false }
56
+ ```
57
+
58
+ However, if you hope simplicity instead of the flexibility, you can link your favorite backend in the way described above.
30
59
31
60
Examples
32
61
---------
0 commit comments