Skip to content

Commit 0bc3f65

Browse files
Move rand distr (#1577)
1 parent 2677c49 commit 0bc3f65

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3
-10300
lines changed

.github/workflows/benches.yml

-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ on:
55
branches: [ master ]
66
paths-ignore:
77
- "**.md"
8-
- "distr_test/**"
98
- "examples/**"
109
pull_request:
1110
branches: [ master ]
1211
paths-ignore:
1312
- "**.md"
14-
- "distr_test/**"
1513
- "examples/**"
1614

1715
defaults:

.github/workflows/distr_test.yml

-43
This file was deleted.

.github/workflows/test.yml

-11
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ on:
66
paths-ignore:
77
- "**.md"
88
- "benches/**"
9-
- "distr_test/**"
109
pull_request:
1110
branches: [ master, '0.[0-9]+' ]
1211
paths-ignore:
1312
- "**.md"
1413
- "benches/**"
15-
- "distr_test/**"
1614

1715
permissions:
1816
contents: read # to fetch code (actions/checkout)
@@ -47,8 +45,6 @@ jobs:
4745
run: cargo doc --all-features --no-deps
4846
- name: rand_core
4947
run: cargo doc --all-features --package rand_core --no-deps
50-
- name: rand_distr
51-
run: cargo doc --all-features --package rand_distr --no-deps
5248
- name: rand_chacha
5349
run: cargo doc --all-features --package rand_chacha --no-deps
5450
- name: rand_pcg
@@ -122,11 +118,6 @@ jobs:
122118
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
123119
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features
124120
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features --features=os_rng
125-
- name: Test rand_distr
126-
run: |
127-
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --features=serde
128-
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --no-default-features
129-
cargo test --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --no-default-features --features=std,std_math
130121
- name: Test rand_pcg
131122
run: cargo test --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
132123
- name: Test rand_chacha
@@ -162,7 +153,6 @@ jobs:
162153
cross test --no-fail-fast --target ${{ matrix.target }} --features=serde,log,small_rng
163154
cross test --no-fail-fast --target ${{ matrix.target }} --examples
164155
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
165-
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_distr/Cargo.toml --features=serde
166156
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
167157
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml
168158
@@ -182,7 +172,6 @@ jobs:
182172
cargo miri test --manifest-path rand_core/Cargo.toml
183173
cargo miri test --manifest-path rand_core/Cargo.toml --features=serde
184174
cargo miri test --manifest-path rand_core/Cargo.toml --no-default-features
185-
#cargo miri test --manifest-path rand_distr/Cargo.toml # no unsafe and lots of slow tests
186175
cargo miri test --manifest-path rand_pcg/Cargo.toml --features=serde
187176
cargo miri test --manifest-path rand_chacha/Cargo.toml --no-default-features
188177

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ log = ["dep:log"]
6565
[workspace]
6666
members = [
6767
"rand_core",
68-
"rand_distr",
6968
"rand_chacha",
7069
"rand_pcg",
7170
]

benches/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ publish = false
1010
rand = { path = "..", features = ["small_rng", "nightly"] }
1111
rand_pcg = { path = "../rand_pcg" }
1212
rand_chacha = { path = "../rand_chacha" }
13-
rand_distr = { path = "../rand_distr" }
1413
criterion = "0.5"
1514
criterion-cycles-per-byte = "0.6"
1615

@@ -22,10 +21,6 @@ harness = false
2221
name = "bool"
2322
harness = false
2423

25-
[[bench]]
26-
name = "distr"
27-
harness = false
28-
2924
[[bench]]
3025
name = "generators"
3126
harness = false

benches/benches/distr.rs

-194
This file was deleted.

benches/benches/standard.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
use core::time::Duration;
1010
use criterion::measurement::WallTime;
1111
use criterion::{criterion_group, criterion_main, BenchmarkGroup, Criterion};
12-
use rand::distr::{Alphanumeric, StandardUniform};
12+
use rand::distr::{Alphanumeric, Open01, OpenClosed01, StandardUniform};
1313
use rand::prelude::*;
14-
use rand_distr::{Open01, OpenClosed01};
1514
use rand_pcg::Pcg64Mcg;
1615

1716
criterion_group!(
@@ -25,7 +24,7 @@ fn bench_ty<T, D>(g: &mut BenchmarkGroup<WallTime>, name: &str)
2524
where
2625
D: Distribution<T> + Default,
2726
{
28-
g.throughput(criterion::Throughput::Bytes(size_of::<T>() as u64));
27+
g.throughput(criterion::Throughput::Bytes(core::mem::size_of::<T>() as u64));
2928
g.bench_function(name, |b| {
3029
let mut rng = Pcg64Mcg::from_rng(&mut rand::rng());
3130

distr_test/Cargo.toml

-15
This file was deleted.

0 commit comments

Comments
 (0)