275 Commits

Author SHA1 Message Date
Artyom Pavlov
890ad8b68b
Rename doc_cfg to docsrs and use doc_auto_cfg (#1450) 2024-05-10 13:46:26 +03:00
Artyom Pavlov
1b762b2867
Apply rustfmt and fix Clippy warnings (#1448) 2024-05-09 07:50:08 +01:00
Joshua Liebow-Feeser
1f818787ca
Use zerocopy 0.7.33, not 0.8.0-alpha (#1446) 2024-05-07 04:38:30 -07:00
Diggory Hardy
6389320091 Update Cargo.lock.msrv again 2024-04-27 09:17:29 +01:00
Diggory Hardy
3c0661b804 Rename rand_benches -> benches 2024-04-27 08:46:09 +01:00
Diggory Hardy
47d0b54f79 Remove pin on Rayon versions 2024-04-27 08:31:57 +01:00
Vinzent Steinberg
9855f37930 Pin rayon and rayon-core to support MSRV 1.61 2024-04-26 14:22:00 +02:00
Vinzent Steinberg
6f917e1f16 Move rand benches to their own crate 2024-04-26 14:21:28 +02:00
Vinzent Steinberg
d507f7e81b Upgrade criterion 2024-04-26 13:36:41 +02:00
Diggory Hardy
2eaf8545d4
Bump the MSRV to 1.61.0 (#1416) 2024-03-22 12:33:33 +00:00
Diggory Hardy
1015e709da
Prepare 0.9.0-alpha.1 (#1413) 2024-03-18 19:08:37 +00:00
Diggory Hardy
4cbbb340ad
Remove automatic (delayed) reseed-on-fork (#1379)
* benches/generators.rs: standardize thread_rng benchmarks
* Remove cfgs from examples
* Remove ReadRng
* Add ThreadRng::reseed and doc to use
* Remove fork protection from ReseedingRng; remove libc dep
* Enable ReseedingRng without std
* Move ReseedingRng up; remove module rand::rngs::adapter
2024-03-18 17:41:15 +00:00
dependabot[bot]
be75bf5b90
Update zerocopy requirement from =0.8.0-alpha.5 to =0.8.0-alpha.6 (#1401) 2024-03-18 09:27:47 +00:00
TheIronBorn
769bcb6e4c
Document more crate feature usage (#1411) 2024-03-18 08:42:42 +00:00
Diggory Hardy
7ff0fc9e59
Add path for benchmark (#1398) 2024-02-18 17:51:59 +00:00
Diggory Hardy
5577003615
Update CHANGELOGs and prepare rand 0.9.0-alpha.0 (#1395)
Also: add pull-request template
2024-02-18 17:02:05 +00:00
Diggory Hardy
e5a366d07f
Update zerocopy; trim unused methods (#1393)
* Remove mention of stdsimd
* Move fns FloatSIMDUtils::replace, extract to new cfg-gated trait FloatSIMDScalarUtils
* Remove unused utility methods on floats, bool
* Remove unused import
* Update to zerocopy 0.8.0-alpha.5
* Remove unneeded import of Float
2024-02-13 11:13:57 +00:00
Alex Saveau
ef89cbefaf
Support using std without getrandom or rand_chacha (#1354)
Support using std without getrandom or rand_chacha

Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2023-11-06 08:15:07 +00:00
Joshua Liebow-Feeser
5216f9a7fc Remove some unsafe code 2023-10-29 16:07:50 -04:00
bjorn3
e42c385872
MSRV=1.60, use more permissive cfg on test
* Use cfg(panic = unwind) instead of a check for wasm32 to see if unwinding is supported

This allows the test to run on a future wasm target with exception support as
well as running the test suite with panic=abort on non-wasm targets.

* Bump MSRV to 1.60
2023-10-11 08:54:54 +01:00
Guillaume Gomez
176e73647a
Add --generate-link-to-definition option when building on docs.rs (#1327)
* Add `--generate-link-to-definition` option when building on docs.rs

* Fix documentation issues
2023-07-29 08:12:57 +01:00
Vinzent Steinberg
026292d316
Merge branch 'master' into uniform-float 2023-05-01 16:39:12 +02:00
Diggory Hardy
22d0756b68
Uniform sampling: use Canon's method, Lemire's method (#1287)
Also:

* Add uniform distribution benchmarks
* Add "unbiased" feature flag
* Fix feature simd_support
* Uniform: impl PartialEq, Eq where possible
* CI: benches now require small_rng; build-test unbiased
2023-03-24 12:29:15 +00:00
Diggory Hardy
95b366ff53 Add uniform_float benchmark
Note: sample_single and sample_single_inclusive use
different code paths for sampling.
2023-02-21 12:58:18 +00:00
Mark Wainwright
4bde8a0adb
Performance improvements for shuffle and partial_shuffle (#1272)
* Made shuffle and partial_shuffle faster
* Use criterion benchmarks for shuffle
* Added a note about RNG word size
* Tidied comments
* Added a debug_assert
* Added a comment re possible further optimization
* Added and updated copyright notices
* Revert cfg mistake
* Reverted change to mod.rs
* Removed ChaCha20 benches from shuffle
* moved debug_assert out of a const fn
2023-01-08 16:14:26 +00:00
Mark Wainwright
1e96eb4593
Added new versions of choose and choose_stable (#1268)
* Added new versions of choose and choose_stable

* Removed coin_flipper tests which were unnecessary and not building on ci

* Performance optimizations in coin_flipper

* Clippy fixes and more documentation

* Added a correctness fix for coin_flipper

* Update benches/seq.rs

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>

* Update benches/seq.rs

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>

* Removed old version of choose and choose stable and updated value stability tests

* Moved sequence choose benchmarks to their own file

* Reworked coin_flipper

* Use criterion for seq_choose benches

* Removed an old comment

* Change how c is estimated in coin_flipper

* Revert "Use criterion for seq_choose benches"

This reverts commit 23395391370ab95694558be90686eb16494e590a.

* Added seq_choose benches for smaller numbers

* Removed some unneeded lines from seq_choose

* Improvements in coin_flipper.rs

* Small refactor of coin_flipper

* Tidied comments in coin_flipper

* Use criterion for seq_choose benchmarks

* Made choose not generate a random number if len=1

* small change to IteratorRandom::choose

* Made it easier to change seq_choose benchmarks RNG

* Added Pcg64 benchmarks for seq_choose

* Added TODO to coin_flipper

* Changed criterion settings in seq_choose

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>
2023-01-05 10:49:33 +00:00
Diggory Hardy
fbd95860b4
Add Criterion as dev-dependency, fix CI for MSRV and minimal-versions (#1275)
* Add criterion as dev-dependency

* CI[minimal-versions]: require regex 1.5.1
2022-12-11 17:47:51 +00:00
Diggory Hardy
19169cbce9
Bump MSRV to 1.56 (Edition 2021) (#1269)
* Bump MSRV to 1.56 (Edition 2021)

* Apply Clippy suggestions

* Bump edition and add rust-version field to Cargo.toml

* CI AVR test: unpin nightly rust version

* Disable AVR test

* Bump crate version numbers for a breaking release
2022-12-06 19:01:10 +00:00
Diggory Hardy
fbf06ff919 Optimized path of sample_efraimidis_spirakis is stable
This no longer requires nightly
2022-08-14 09:00:20 +01:00
Diggory Hardy
6951164ec6 Bump MSRV to 1.51.0: support const generics by default 2022-08-14 08:59:24 +01:00
TheIronBorn
2c16a920cf
Merge pull request #1239 from TheIronBorn/std-simd
switch to std::simd, expand SIMD & docs
2022-08-10 11:56:46 -07:00
TheIronBorn
599d7f8f6d switch to std::simd, expand SIMD stuff & docs
move __m128i to stable, expand documentation, add SIMD to Bernoulli, add maskNxM, add __m512i

genericize simd uniform int

remove some debug stuff

remove bernoulli

foo

foo
2022-07-09 11:03:38 -07:00
masonk
330efe9d42
Deterministic Rayon monte carlo example (#1236)
* Deterministic Rayon monte carlo

* Update deterministic mt with a batching example

* discuss determinism in the context of rayon + rand

* reword the discussion

Co-authored-by: Mason Kramer <mason@masonkramer.net>
2022-07-07 08:20:11 +01:00
Diggory Hardy
d3ca11b0bc Update to packed_simd_2 0.3.7 2022-02-08 09:33:33 +00:00
Vinzent Steinberg
da3b367d48 Merge branch 'fix-clippy' into fix-unsafe-block 2021-09-11 18:47:10 +02:00
Vinzent Steinberg
85c9bc57bf Fix tests on nightly
This basically requires fixing `packed_simd_2` by upgrading the minimal
version.
2021-09-10 15:23:11 +02:00
Vinzent Steinberg
db6e81f34e Bump versions 2021-08-19 20:49:50 +02:00
Diggory Hardy
32343a6f37 Rearrange Cargo.toml 2021-08-17 09:55:53 +01:00
Vinzent Steinberg
067238f057
Remove rand_hc (#1156)
* Remove `rand_hc`

We no longer need it for `rand`, so it can be moved to the `rngs`
repository.
2021-08-05 14:59:07 +02:00
Vinzent Steinberg
c60b7cd21b Remove special cases for emscripten
Because emscripten supports 128-bit integers now, we no longer have to
add special cases for it. In particular, we can now use ChaCha12 on all
platforms.
2021-07-08 16:29:02 +02:00
Diggory Hardy
1bfc53d57f Update changelogs and bump version numbers 2021-06-14 10:04:59 +01:00
Diggory Hardy
4726d328d6 Update minimum version of packed_simd_2 2021-05-27 11:00:13 +01:00
Diggory Hardy
f6bbfcfa89 serde for BlockRng, ReseedingRng and ReadRng 2021-05-27 10:17:01 +01:00
Noam Koren
5161f70fb7 Update docs 2021-03-24 21:44:09 +02:00
Noam Koren
773ba59c9a Update docs 2021-03-20 11:45:24 +02:00
Noam Koren
65b170759b Add min_const_gen feature 2021-03-15 00:08:01 +02:00
Diggory Hardy
8821743325 Prepare 0.8.3 2021-01-25 10:36:09 +00:00
Gautier Minster
2c9085a2de Bump to 0.8.2 and update changelog 2021-01-13 01:16:20 +02:00
Taiki Endo
e5eec8e650 Prepare rand 0.8.1 2020-12-31 23:10:13 +09:00
Taiki Endo
3c19b97b7a Enable all stable features in the playground 2020-12-31 15:59:10 +09:00