Skip to content

Commit 53fffa9

Browse files
committed
set the minimum chunk size to 1
1 parent 7322903 commit 53fffa9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pairing = {package = "pairing_ce", version = "0.18.0" }
2323
byteorder = "1"
2424

2525
futures-cpupool = {version = "0.1", optional = true}
26-
num_cpus = {version = "1", optional = true}
26+
num_cpus = "1"
2727
crossbeam = {version = "0.7.1", optional = true}
2828

2929
prefetch = {version = "0.2", optional = true}
@@ -37,7 +37,7 @@ blake2-rfc = {version = "0.2.18", optional = true}
3737
default = ["multicore"]
3838
#default = ["multicore", "nightly"]
3939
#default = ["wasm"]
40-
multicore = ["futures-cpupool", "num_cpus", "crossbeam"]
40+
multicore = ["futures-cpupool", "crossbeam"]
4141
sonic = ["tiny-keccak", "blake2-rfc"]
4242
gm17 = []
4343
wasm = ["web-sys"]

src/singlecore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Worker {
5353
) -> R
5454
where F: FnOnce(&Scope<'a>, usize) -> R
5555
{
56-
let chunk_size = elements;
56+
let chunk_size = if elements == 0 { 1 } else { elements };
5757

5858
let scope = Scope{
5959
_marker: PhantomData

0 commit comments

Comments
 (0)