-
Notifications
You must be signed in to change notification settings - Fork 85
Use lapacke library, drop linking to LAPACKE implementation #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,7 @@ Cargo.lock | |
|
||
# cargo fmt | ||
*.bk | ||
|
||
# IntelliJ Rust | ||
.idea | ||
*.iml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ndarray-linalg" | ||
version = "0.7.1" | ||
version = "0.8.0" | ||
authors = ["Toshiki Teramura <[email protected]>"] | ||
|
||
description = "Linear algebra package for rust-ndarray using LAPACK" | ||
|
@@ -11,40 +11,20 @@ license = "MIT" | |
readme = "README.md" | ||
categories = ["algorithms", "science"] | ||
|
||
[features] | ||
default = ["openblas-static"] | ||
openblas-shared = ["lapack/openblas"] | ||
openblas-static = ["lapack/openblas", "openblas-src/static"] | ||
openblas-system = ["lapack/openblas", "openblas-src/system"] | ||
netlib-shared = ["lapack/netlib"] | ||
netlib-static = ["lapack/netlib", "netlib-src/static"] | ||
netlib-system = ["lapack/netlib", "netlib-src/system"] | ||
intel-mkl = ["intel-mkl-src"] | ||
|
||
[dependencies] | ||
rand = "0.3" | ||
derive-new = "0.4" | ||
derive-new = "0.5" | ||
procedurals = "0.2" | ||
num-traits = "0.1" | ||
num-complex = "0.1" | ||
lapack = { version = "0.13", default-features = false } | ||
lapack-sys = { version = "0.11", default-features = false } | ||
num-complex = { version = "0.1", default-features = false } | ||
lapacke = "0.1.4" | ||
lapack-src = { git = "https://github.com/alexbool/lapack-src", rev = "da33354", optional = true } | ||
|
||
[dependencies.ndarray] | ||
version = "0.10" | ||
default-features = false | ||
|
||
[dependencies.openblas-src] | ||
version = "0.5.3" | ||
default-features = false | ||
optional = true | ||
|
||
[dependencies.netlib-src] | ||
version = "0.7.0" | ||
default-features = false | ||
optional = true | ||
|
||
[dependencies.intel-mkl-src] | ||
version = "0.2.5" | ||
default-features = false | ||
optional = true | ||
[features] | ||
openblas = ["lapack-src", "lapack-src/openblas"] | ||
netlib = ["lapack-src", "lapack-src/netlib"] | ||
intel-mkl = ["lapack-src", "lapack-src/intel-mkl"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,38 @@ Dependencies | |
------------- | ||
|
||
- [bluss/rust-ndarray](https://github.com/bluss/rust-ndarray) | ||
- [stainless-steel/lapack](https://github.com/stainless-steel/lapack) | ||
- [blas-lapack-rs/lapacke](https://github.com/blas-lapack-rs/lapacke) | ||
|
||
and more (See Cargo.toml). | ||
|
||
Feature flags | ||
-------------- | ||
Choosing LAPACKE implementation | ||
-------------------------------- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "--------------------------------" at 18 is typo? |
||
|
||
For the sake of linking flexibility, you must provide LAPACKE implementation (as an `extern crate`) yourself. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "LAPACKE" at 20 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "flexibility," at 20 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "`extern" at 20 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "(as" at 20 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "crate`)" at 20 is typo?
|
||
Currently three LAPACKE implementations are supported and tested: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "LAPACKE" at 21 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "tested:" at 21 is typo?
|
||
|
||
- [OpenBLAS](https://github.com/cmr/openblas-src) | ||
- `openblas-static`: use OpenBLAS with static link (default) | ||
- `openblas-shared`: use OpenBLAS with shared link | ||
- `openblas-system`: use system OpenBLAS (experimental) | ||
- [Netlib](https://github.com/cmr/netlib-src) | ||
- `netlib-static`: use Netlib with static link (default) | ||
- `netlib-shared`: use Netlib with shared link | ||
- `netlib-system`: use system Netlib (experimental) | ||
- [Intel MKL](https://github.com/termoshtt/rust-intel-mkl) (non-free license, see the linked page) | ||
- `intel-mkl`: use Intel MKL shared link (experimental) | ||
|
||
You should link a LAPACKE implementation to a final crate (like binary executable or dylib) only, not to a Rust library. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "(like" at 27 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "LAPACKE" at 27 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "only," at 27 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "dylib)" at 27 is typo?
|
||
Example: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Example:" at 28 is typo?
|
||
|
||
`Cargo.toml`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "
|
||
```toml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "```toml" at 31 is typo?
|
||
[depencdencies] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "[depencdencies]" at 32 is typo?
|
||
ndarray = "0.10" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "ndarray" at 33 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "=" at 33 is typo?
|
||
ndarray-linalg = "0.8" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "=" at 34 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "ndarray-linalg" at 34 is typo?
|
||
openblas-src = "0.5" # or another backend of your choice | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "openblas-src" at 35 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "#" at 35 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "=" at 35 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "backend" at 35 is typo?
|
||
|
||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "```" at 37 is typo? |
||
|
||
`main.rs`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "
|
||
```rust | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "```rust" at 40 is typo?
|
||
extern crate ndarray; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "ndarray;" at 41 is typo?
|
||
extern crate ndarray_linalg; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "ndarray_linalg;" at 42 is typo?
|
||
extern crate openblas_src; // or another backend of your choice | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "openblas_src;" at 43 is typo?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "//" at 43 is typo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "backend" at 43 is typo?
|
||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "```" at 44 is typo? |
||
|
||
Examples | ||
--------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"LAPACKE" at 17 is typo?