Skip to content

Commit

Permalink
Add DYN_ARCH/USE_THREADS/USE_OPENMP features
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiersg committed Apr 26, 2021
1 parent 3d06dc3 commit 4825ff8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openblas-build/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,12 @@ impl Configure {
args.push("NO_LAPACKE=1".into())
}
if self.use_thread {
args.push("USE_THREAD=1".into())
args.push("USE_THREAD=1".into());
args.push("NUM_THREADS=128".into());
}
if self.use_openmp {
args.push("USE_OPENMP=1".into())
args.push("USE_OPENMP=1".into());
args.push("NUM_THREADS=128".into());
}
if matches!(self.interface, Interface::ILP64) {
args.push("INTERFACE64=1".into())
Expand Down
3 changes: 3 additions & 0 deletions openblas-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ cblas = []
lapacke = []
static = []
system = []
use_thread = []
use_openmp = []
dynamic_arch = []

[dev-dependencies]
libc = "0.2"
Expand Down
9 changes: 9 additions & 0 deletions openblas-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ fn build() {
} else {
cfg.no_static = true;
}
if feature_enabled("use_thread") {
cfg.use_thread = true;
}
if feature_enabled("use_openmp") {
cfg.use_openmp = true;
}
if feature_enabled("dynamic_arch") {
cfg.no_shared = true;
}

let output = if feature_enabled("cache") {
use std::{collections::hash_map::DefaultHasher, hash::*};
Expand Down

0 comments on commit 4825ff8

Please sign in to comment.