You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| openblas-static | static | gcc, gfortran, make | Build OpenBLAS in your project, and link it statically |
47
+
| openblas-system | dynamic/static | libopenblas-dev | Seek OpenBLAS in system, and link it |
48
+
| netlib-static | static | gfortran, make | Same as openblas-static except for using reference LAPACK |
49
+
| netlib-system | dynamic/static | liblapack-dev | Same as openblas-system except for using reference LAPACK |
50
+
| intel-mkl-static | static | (pkg-config) | Seek static library of Intel MKL from system, or download if not found, and link it statically |
51
+
| intel-mkl-system | dynamic | (pkg-config) | Seek shared library of Intel MKL from system, and link it dynamically |
52
+
53
+
- You must use **just one** feature of them.
54
+
-`dynamic/static` means it depends on what is found in the system. When the system has `/usr/lib/libopenblas.so`, it will be linked dynamically, and `/usr/lib/libopenblas.a` will be linked statically. Dynamic linking is prior to static linking.
55
+
- Requirements notices:
56
+
-`gcc` and `gfortran` can be another compiler, e.g. `icc` and `ifort`.
57
+
-`libopenblas-dev` is package name in Debian, Ubuntu, and other derived distributions.
58
+
There are several binary packages of OpenBLAS, i.e. `libopenblas-{openmp,pthread,serial}-dev`.
59
+
It can be other names in other distributions, e.g. Fedora, ArchLinux, and so on.
60
+
-`pkg-config` is used for searching Intel MKL packages in system, and it is optional. See [intel-mkl-src/README.md](https://github.com/rust-math/intel-mkl-src/blob/master/README.md#how-to-find-system-mkl-libraries) for detail.
61
+
62
+
### For library developer
51
63
52
-
### For librarian
53
64
If you creating a library depending on this crate, we encourage you not to link any backend:
54
65
55
66
```toml
@@ -58,25 +69,21 @@ ndarray = "0.13"
58
69
ndarray-linalg = "0.12"
59
70
```
60
71
61
-
### Link backend crate manually
62
-
For the sake of linking flexibility, you can provide LAPACKE implementation (as an `extern crate`) yourself.
63
-
You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library.
72
+
The cargo's feature is additive. If your library (saying `lib1`) set a feature `openblas-static`,
73
+
the application using `lib1` builds ndarray_linalg with `openblas-static` feature though they want to use `intel-mkl-static` backend.
64
74
65
-
```toml
66
-
[dependencies]
67
-
ndarray = "0.13"
68
-
ndarray-linalg = "0.12"
69
-
openblas-src = "0.7"# or another backend of your choice
75
+
See [the cargo reference](https://doc.rust-lang.org/cargo/reference/features.html) for detail
70
76
71
-
```
77
+
Tested Environments
78
+
--------------------
72
79
73
-
You must add `extern crate` to your code in this case:
80
+
Only x86_64 system is supported currently.
74
81
75
-
```rust
76
-
externcrate ndarray;
77
-
externcrate ndarray_linalg;
78
-
externcrate openblas_src; // or another backend of your choice
But, be sure that this works only for `--no-deps`. `cargo doc` will fail with this `.cargo/config`.
106
+
107
+
License
108
+
--------
109
+
110
+
**CAUTION** Be sure that if you use `intel-mkl-src` backend, you have to accept [Intel Simplified Software License](https://software.intel.com/content/www/us/en/develop/articles/end-user-license-agreement.html)
111
+
in addition to the MIT-License or Apache-2.0 License.
112
+
113
+
Dual-licensed to be compatible with the Rust project.
114
+
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option.
0 commit comments