@@ -4,30 +4,32 @@ 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
- - [ blas-lapack-rs/lapacke] ( https://github.com/blas-lapack-rs/lapacke )
14
-
15
- and more (See Cargo.toml).
16
-
17
- Choosing LAPACKE implementation
18
- --------------------------------
19
-
20
- For the sake of linking flexibility, you must provide LAPACKE implementation (as an ` extern crate ` ) yourself.
21
12
Currently three LAPACKE implementations are supported and tested:
22
13
23
14
- [ OpenBLAS] ( https://github.com/cmr/openblas-src )
24
15
- [ Netlib] ( https://github.com/cmr/netlib-src )
25
16
- [ Intel MKL] ( https://github.com/termoshtt/rust-intel-mkl ) (non-free license, see the linked page)
26
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.
27
31
You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library.
28
- Example:
29
32
30
- ` Cargo.toml ` :
31
33
``` toml
32
34
[depencdencies ]
33
35
ndarray = " 0.10"
@@ -36,13 +38,25 @@ openblas-src = "0.5" # or another backend of your choice
36
38
37
39
```
38
40
39
- ` main.rs ` :
41
+ You must add ` extern crate ` to your code in this case:
42
+
40
43
``` rust
41
44
extern crate ndarray;
42
45
extern crate ndarray_linalg;
43
46
extern crate openblas_src; // or another backend of your choice
44
47
```
45
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.
59
+
46
60
Examples
47
61
---------
48
62
See [ examples] ( https://github.com/termoshtt/ndarray-linalg/tree/master/examples ) directory.
0 commit comments