Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify mkl linkage options
  • Loading branch information
geo-ant committed Sep 24, 2025
commit 6b621c32c7dd0553fafbdbbfd3f241d39a59ccfb
15 changes: 5 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ changelog = "CHANGELOG.md"
[features]
# apple accelerate
accelerate = ["accelerate-src"]
# intel mkl with different configurations
intel-mkl = ["intel-mkl-static-lp64-seq"]
intel-mkl-static-lp64-iomp = ["intel-mkl-src/mkl-static-lp64-iomp"]
intel-mkl-static-lp64-seq = ["intel-mkl-src/mkl-static-lp64-seq"]
intel-mkl-static-ilp64-iomp = ["intel-mkl-src/mkl-static-ilp64-iomp"]
intel-mkl-static-ilp64-seq = ["intel-mkl-src/mkl-static-ilp64-seq"]
intel-mkl-dynamic-lp64-iomp = ["intel-mkl-src/mkl-dynamic-lp64-iomp"]
intel-mkl-dynamic-lp64-seq = ["intel-mkl-src/mkl-dynamic-lp64-seq"]
intel-mkl-dynamic-ilp64-iomp = ["intel-mkl-src/mkl-dynamic-ilp64-iomp"]
intel-mkl-dynamic-ilp64-seq = ["intel-mkl-src/mkl-dynamic-ilp64-seq"]
# parallel LP64 version of MKL
intel-mkl = ["intel-mkl-src/mkl-static-lp64-iomp"]
# sequential LP64 version of MKL
intel-mkl-seq = ["intel-mkl-src/mkl-static-lp64-seq"]

# netlib
netlib = ["netlib-src"]
# openblas
Expand Down
31 changes: 15 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@
//!
//! ```toml
//! [dependencies]
//! lapack-src = { version = "0.11", features = ["accelerate"] }
//! lapack-src = { version = "0.11", features = ["intel-mkl"] }
//! lapack-src = { version = "0.11", features = ["netlib"] }
//! lapack-src = { version = "0.11", features = ["openblas"] }
//! lapack-src = { version = "0.11", features = ["r"] }
//! lapack-src = { version = "0.12", features = ["accelerate"] }
//! lapack-src = { version = "0.12", features = ["intel-mkl"] }
//! lapack-src = { version = "0.12", features = ["netlib"] }
//! lapack-src = { version = "0.12", features = ["openblas"] }
//! lapack-src = { version = "0.12", features = ["r"] }
//! ```
//! ### Configuring MKL
//!
//! When the `intel-mkl` feature is selected, then the parallel version of
//! MKL using OpenMP is _statically_ linked. To link the sequential version
//! use the `intel-mkl-seq` feature. In both cases, the
//! [LP64 interface](https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-0/using-the-ilp64-interface-vs-lp64-interface.html)
//! is linked. If other linkage options for MKL are desired, omit `lapack-src`
//! as a dependency and use the [`intel-mkl-src`](https://crates.io/crates/intel-mkl-src)
//! crate directly with the appropriate feature flags.
//!
//! [architecture]: https://blas-lapack-rs.github.io/architecture
//! [lapack]: https://en.wikipedia.org/wiki/LAPACK
Expand All @@ -37,17 +46,7 @@
#[cfg(feature = "accelerate")]
extern crate accelerate_src as raw;

#[cfg(any(
feature = "intel-mkl",
feature = "intel-mkl-static-lp64-iomp",
feature = "intel-mkl-static-lp64-seq",
feature = "intel-mkl-static-ilp64-iomp",
feature = "intel-mkl-static-ilp64-seq",
feature = "intel-mkl-dynamic-lp64-iomp",
feature = "intel-mkl-dynamic-lp64-seq",
feature = "intel-mkl-dynamic-ilp64-iomp",
feature = "intel-mkl-dynamic-ilp64-seq"
))]
#[cfg(any(feature = "intel-mkl", feature = "intel-mkl-seq",))]
extern crate intel_mkl_src as raw;

#[cfg(feature = "netlib")]
Expand Down