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 | - | 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 | - | 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
+
-`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.
56
+
57
+
### For library developer
51
58
52
-
### For librarian
53
59
If you creating a library depending on this crate, we encourage you not to link any backend:
54
60
55
61
```toml
@@ -58,25 +64,21 @@ ndarray = "0.13"
58
64
ndarray-linalg = "0.12"
59
65
```
60
66
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.
67
+
The cargo's feature is additive. If your library (saying `lib1`) set a feature `openblas-static`,
68
+
the application using `lib1` builds ndarray_linalg with `openblas-static` feature though they want to use `intel-mkl-static` backend.
64
69
65
-
```toml
66
-
[dependencies]
67
-
ndarray = "0.13"
68
-
ndarray-linalg = "0.12"
69
-
openblas-src = "0.7"# or another backend of your choice
70
+
See [the cargo reference](https://doc.rust-lang.org/cargo/reference/features.html) for detail
70
71
71
-
```
72
+
Tested Environments
73
+
--------------------
72
74
73
-
You must add `extern crate` to your code in this case:
75
+
Only x86_64 system is supported currently.
74
76
75
-
```rust
76
-
externcrate ndarray;
77
-
externcrate ndarray_linalg;
78
-
externcrate openblas_src; // or another backend of your choice
| openblas-static | static | gcc, gfortran, make | Build OpenBLAS in your project, and link it statically |
16
-
| openblas-system | dynamic/static | - | Seek OpenBLAS in system, and link it |
17
-
| netlib-static | static | gfortran, make | Same as openblas-static except for using reference LAPACK |
18
-
| netlib-system | dynamic/static | - | Same as openblas-system except for using reference LAPACK |
19
-
| intel-mkl-static | static | (pkg-config) | Seek static library of Intel MKL from system, or download if not found, and link it statically |
20
-
| intel-mkl-system | dynamic | (pkg-config) | Seek shared library of Intel MKL from system, and link it dynamically |
21
-
22
-
- You must use **just one** feature of them.
23
-
-`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.
24
-
-`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.
0 commit comments