From 00bb86af0b377a7625e6ee4a047cd3707eef0015 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Jun 13 2019 04:07:06 +0000 Subject: Update to 1.5.0 --- diff --git a/.gitignore b/.gitignore index df9707f..eb568bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /rayon-core-1.3.0.crate /rayon-core-1.4.0.crate /rayon-core-1.4.1.crate +/rayon-core-1.5.0.crate diff --git a/0001-Update-to-crossbeam-deque-0.7.patch b/0001-Update-to-crossbeam-deque-0.7.patch new file mode 100644 index 0000000..b753cd8 --- /dev/null +++ b/0001-Update-to-crossbeam-deque-0.7.patch @@ -0,0 +1,69 @@ +From aaf3296c9470a094f740d004444b45065d00a730 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Wed, 12 Jun 2019 20:45:51 -0700 +Subject: [PATCH] Update to crossbeam-deque 0.7 + +--- + src/registry.rs | 28 ++++++++++------------------ + 1 file changed, 10 insertions(+), 18 deletions(-) + +diff --git a/src/registry.rs b/src/registry.rs +index 76567c3703e6..3171d0041d34 100644 +--- a/src/registry.rs ++++ b/src/registry.rs +@@ -1,4 +1,4 @@ +-use crossbeam_deque::{self as deque, Pop, Steal, Stealer, Worker}; ++use crossbeam_deque::{Steal, Stealer, Worker}; + use crossbeam_queue::SegQueue; + #[cfg(rayon_unstable)] + use internal::task::Task; +@@ -222,15 +222,13 @@ impl Registry { + let n_threads = builder.get_num_threads(); + let breadth_first = builder.get_breadth_first(); + +- let (workers, stealers): (Vec<_>, Vec<_>) = (0..n_threads) +- .map(|_| { +- if breadth_first { +- deque::fifo() +- } else { +- deque::lifo() +- } +- }) +- .unzip(); ++ let new = if breadth_first { ++ Worker::new_fifo ++ } else { ++ Worker::new_lifo ++ }; ++ let workers: Vec<_> = (0..n_threads).map(|_| new()).collect(); ++ let stealers: Vec<_> = workers.iter().map(Worker::stealer).collect(); + + let registry = Arc::new(Registry { + thread_infos: stealers.into_iter().map(ThreadInfo::new).collect(), +@@ -674,13 +672,7 @@ impl WorkerThread { + /// bottom. + #[inline] + pub(super) unsafe fn take_local_job(&self) -> Option { +- loop { +- match self.worker.pop() { +- Pop::Empty => return None, +- Pop::Data(d) => return Some(d), +- Pop::Retry => {} +- } +- } ++ self.worker.pop() + } + + /// Wait until the latch is set. Try to keep busy by popping and +@@ -763,7 +755,7 @@ impl WorkerThread { + loop { + match victim.stealer.steal() { + Steal::Empty => return None, +- Steal::Data(d) => { ++ Steal::Success(d) => { + log!(StoleWork { + worker: self.index, + victim: victim_index +-- +2.21.0 + diff --git a/rayon-core-fix-metadata.diff b/rayon-core-fix-metadata.diff index f141be8..37ba9b6 100644 --- a/rayon-core-fix-metadata.diff +++ b/rayon-core-fix-metadata.diff @@ -1,11 +1,11 @@ ---- rayon-core-1.4.1/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ rayon-core-1.4.1/Cargo.toml 2018-10-28T02:33:49.374552+02:00 -@@ -45,7 +45,7 @@ - name = "simple_panic" - path = "tests/simple_panic.rs" +--- rayon-core-1.5.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ rayon-core-1.5.0/Cargo.toml 2019-06-13T04:01:24.258939+00:00 +@@ -49,7 +49,7 @@ + name = "scoped_threadpool" + path = "tests/scoped_threadpool.rs" [dependencies.crossbeam-deque] --version = "0.2.0" -+version = "0.4.0" +-version = "0.6.3" ++version = "0.7.1" - [dependencies.lazy_static] - version = "1" + [dependencies.crossbeam-queue] + version = "0.1.2" diff --git a/rust-rayon-core.spec b/rust-rayon-core.spec index 8d28b8e..5f3291a 100644 --- a/rust-rayon-core.spec +++ b/rust-rayon-core.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm +# Generated by rust2rpm 9 # * Some tests don't work with optimized builds # https://github.com/rayon-rs/rayon/issues/585 %bcond_with check @@ -7,27 +7,38 @@ %global crate rayon-core Name: rust-%{crate} -Version: 1.4.1 -Release: 3%{?dist} +Version: 1.5.0 +Release: 1%{?dist} Summary: Core APIs for Rayon # Upstream license specification: Apache-2.0/MIT License: ASL 2.0 or MIT URL: https://crates.io/crates/rayon-core -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +Source: %{crates_source} # Initial patched metadata -# * Bump crossbeam-deque to 0.4, upstream doesn't want this +# * Bump crossbeam-deque to 0.7, upstream doesn't want this Patch0: rayon-core-fix-metadata.diff +# https://github.com/rayon-rs/rayon/compare/master...cuviper:crossbeam-deque-0.7 +Patch1: 0001-Update-to-crossbeam-deque-0.7.patch ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif BuildRequires: rust-packaging -BuildRequires: (crate(crossbeam-deque/default) >= 0.4.0 with crate(crossbeam-deque/default) < 0.5.0) +%if ! %{__cargo_skip_build} +BuildRequires: (crate(crossbeam-deque/default) >= 0.7.1 with crate(crossbeam-deque/default) < 0.8.0) +BuildRequires: (crate(crossbeam-queue/default) >= 0.1.2 with crate(crossbeam-queue/default) < 0.2.0) +BuildRequires: (crate(crossbeam-utils/default) >= 0.6.5 with crate(crossbeam-utils/default) < 0.7.0) BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0) -BuildRequires: (crate(libc/default) >= 0.2.16 with crate(libc/default) < 0.3.0) BuildRequires: (crate(num_cpus/default) >= 1.2.0 with crate(num_cpus/default) < 2.0.0) %if %{with check} -BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) +BuildRequires: (crate(rand/default) >= 0.6.0 with crate(rand/default) < 0.7.0) +BuildRequires: (crate(rand_xorshift/default) >= 0.1.0 with crate(rand_xorshift/default) < 0.2.0) +BuildRequires: (crate(scoped-tls/default) >= 1.0.0 with crate(scoped-tls/default) < 2.0.0) +%endif %endif %global _description \ @@ -62,7 +73,7 @@ which use "default" feature of "%{crate}" crate. %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %build @@ -77,6 +88,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Thu Jun 13 2019 Josh Stone - 1.5.0-1 +- Update to 1.5.0 + * Sat Feb 02 2019 Fedora Release Engineering - 1.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 8b6efe5..6f0e839 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rayon-core-1.4.1.crate) = 4d12b8097356d0a9eac8b3ca64085de8d19360dae81b3ccb199275c3487f705e2aded498e819958bb81d4de56c05d4d29c21c07da02236ba6fa0b2888ecfbea8 +SHA512 (rayon-core-1.5.0.crate) = 7221e0e629e923aae2a2ff8e000c58ecc06fd71c00c2988a7664bd452464e210609e5f738c72bf8985ebbefb751f574de657d73189921ce9ee113594e72ccec9