File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ serde = { version = "1.0", optional = true }
45
45
defmac = " 0.2"
46
46
quickcheck = { version = " 0.7.2" , default-features = false }
47
47
rawpointer = " 0.1"
48
- num_cpus = " 1.2"
49
48
50
49
[features ]
51
50
# Enable blas usage
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ extern crate itertools;
9
9
use ndarray:: prelude:: * ;
10
10
use ndarray:: parallel:: prelude:: * ;
11
11
12
- extern crate num_cpus;
13
12
extern crate test;
14
13
use test:: Bencher ;
15
14
@@ -21,9 +20,10 @@ const ADDN: usize = 512;
21
20
use std:: cmp:: max;
22
21
23
22
fn set_threads ( ) {
24
- let n = max ( 1 , num_cpus:: get ( ) / 2 ) ;
25
- //println!("Using {} threads", n);
26
- let _ = rayon:: ThreadPoolBuilder :: new ( ) . num_threads ( n) . build_global ( ) ;
23
+ // Consider setting a fixed number of threads here, for example to avoid
24
+ // oversubscribing on hyperthreaded cores.
25
+ // let n = 4;
26
+ // let _ = rayon::ThreadPoolBuilder::new().num_threads(n).build_global();
27
27
}
28
28
29
29
#[ bench]
You can’t perform that action at this time.
0 commit comments