Skip to content

Commit

Permalink
Merge pull request #68 from termoshtt/static_lapack
Browse files Browse the repository at this point in the history
Use static link for OpenBLAS/Netlib
  • Loading branch information
termoshtt committed Aug 21, 2017
2 parents 7240b1d + 6e9616c commit 190313c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
31 changes: 26 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,36 @@ keywords = ["ndarray", "lapack", "matrix"]
license = "MIT"

[features]
default = ["openblas"]
openblas = ["lapack/openblas"]
netlib = ["lapack/netlib"]
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"]

[dependencies]
rand = "0.3"
derive-new = "0.4"
enum-error-derive = "0.1"
num-traits = "0.1"
num-complex = "0.1"
ndarray = { version = "0.9", default-features = false, features = ["blas"] }
lapack = { version = "0.13", default-features = false }

[dependencies.ndarray]
version = "0.9"
default-features = false
features = ["blas"]

[dependencies.lapack]
version = "0.13"
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Dependencies

and more (See Cargo.toml).

Feature flags
--------------

- OpenBLAS
- `openblas-static`: use OpenBLAS with static link (default)
- `openblas-shared`: use OpenBLAS with shared link
- `openblas-system`: use system OpenBLAS (experimental)
- Netlib
- `netlib-static`: use Netlib with static link (default)
- `netlib-shared`: use Netlib with shared link
- `netlib-system`: use system Netlib (experimental)

Examples
---------
See [examples](https://github.com/termoshtt/ndarray-linalg/tree/master/examples) directory.
Expand Down
4 changes: 2 additions & 2 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ test-openblas:
steps:
- script:
name: test OpenBLAS backend
code: cargo test --no-default-features --features=openblas
code: cargo test --no-default-features --features=openblas-static

test-netlib:
steps:
- script:
name: test NetLib backend
code: cargo test --no-default-features --features=netlib
code: cargo test --no-default-features --features=netlib-static

0 comments on commit 190313c

Please sign in to comment.