|
17 | 17 | use criterion::{Criterion, criterion_group, criterion_main}; |
18 | 18 |
|
19 | 19 | fn floating_f32_reduce_sum_of_xy(c: &mut Criterion) { |
20 | | - use rand::Rng; |
| 20 | + use rand::RngExt; |
21 | 21 | let mut rng = rand::rng(); |
22 | 22 | let x = (0..4095) |
23 | 23 | .map(|_| rng.random_range(-1.0..=1.0f32)) |
@@ -62,7 +62,7 @@ fn floating_f32_reduce_sum_of_xy(c: &mut Criterion) { |
62 | 62 | } |
63 | 63 |
|
64 | 64 | fn floating_f32_reduce_sum_of_d2(c: &mut Criterion) { |
65 | | - use rand::Rng; |
| 65 | + use rand::RngExt; |
66 | 66 | let mut rng = rand::rng(); |
67 | 67 | let x = (0..4095) |
68 | 68 | .map(|_| rng.random_range(-1.0..=1.0f32)) |
@@ -107,7 +107,7 @@ fn floating_f32_reduce_sum_of_d2(c: &mut Criterion) { |
107 | 107 | } |
108 | 108 |
|
109 | 109 | fn floating_f16_reduce_sum_of_xy(c: &mut Criterion) { |
110 | | - use rand::Rng; |
| 110 | + use rand::RngExt; |
111 | 111 | use simd::{F16, f16}; |
112 | 112 | let mut rng = rand::rng(); |
113 | 113 | let x = (0..4095) |
@@ -155,7 +155,7 @@ fn floating_f16_reduce_sum_of_xy(c: &mut Criterion) { |
155 | 155 | } |
156 | 156 |
|
157 | 157 | fn floating_f16_reduce_sum_of_d2(c: &mut Criterion) { |
158 | | - use rand::Rng; |
| 158 | + use rand::RngExt; |
159 | 159 | use simd::{F16, f16}; |
160 | 160 | let mut rng = rand::rng(); |
161 | 161 | let x = (0..4095) |
@@ -203,7 +203,7 @@ fn floating_f16_reduce_sum_of_d2(c: &mut Criterion) { |
203 | 203 | } |
204 | 204 |
|
205 | 205 | fn byte_reduce_sum_of_xy(c: &mut Criterion) { |
206 | | - use rand::Rng; |
| 206 | + use rand::RngExt; |
207 | 207 | let mut rng = rand::rng(); |
208 | 208 | let x = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>(); |
209 | 209 | let y = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>(); |
@@ -248,7 +248,7 @@ fn byte_reduce_sum_of_xy(c: &mut Criterion) { |
248 | 248 | } |
249 | 249 |
|
250 | 250 | fn byte_reduce_sum_of_x(c: &mut Criterion) { |
251 | | - use rand::Rng; |
| 251 | + use rand::RngExt; |
252 | 252 | let mut rng = rand::rng(); |
253 | 253 | let this = (0..4095).map(|_| rng.random::<u8>()).collect::<Vec<_>>(); |
254 | 254 | #[cfg(target_arch = "x86_64")] |
@@ -278,7 +278,7 @@ fn byte_reduce_sum_of_x(c: &mut Criterion) { |
278 | 278 | } |
279 | 279 |
|
280 | 280 | fn halfbyte_reduce_sum_of_xy(c: &mut Criterion) { |
281 | | - use rand::Rng; |
| 281 | + use rand::RngExt; |
282 | 282 | let mut rng = rand::rng(); |
283 | 283 | let x = (0..2047).map(|_| rng.random::<u8>()).collect::<Vec<_>>(); |
284 | 284 | let y = (0..2047).map(|_| rng.random::<u8>()).collect::<Vec<_>>(); |
|
0 commit comments