@@ -52,7 +52,7 @@ fn vec10000_axpy_f64(bh: &mut criterion::Criterion) {
5252 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
5353 let mut a = DVector :: new_random ( 10000 ) ;
5454 let b = DVector :: new_random ( 10000 ) ;
55- let n = rng. gen :: < f64 > ( ) ;
55+ let n = rng. random :: < f64 > ( ) ;
5656
5757 bh. bench_function ( "vec10000_axpy_f64" , move |bh| {
5858 bh. iter ( || a. axpy ( n, & b, 1.0 ) )
@@ -64,8 +64,8 @@ fn vec10000_axpy_beta_f64(bh: &mut criterion::Criterion) {
6464 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
6565 let mut a = DVector :: new_random ( 10000 ) ;
6666 let b = DVector :: new_random ( 10000 ) ;
67- let n = rng. gen :: < f64 > ( ) ;
68- let beta = rng. gen :: < f64 > ( ) ;
67+ let n = rng. random :: < f64 > ( ) ;
68+ let beta = rng. random :: < f64 > ( ) ;
6969
7070 bh. bench_function ( "vec10000_axpy_beta_f64" , move |bh| {
7171 bh. iter ( || a. axpy ( n, & b, beta) )
@@ -77,7 +77,7 @@ fn vec10000_axpy_f64_slice(bh: &mut criterion::Criterion) {
7777 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
7878 let mut a = DVector :: new_random ( 10000 ) ;
7979 let b = DVector :: new_random ( 10000 ) ;
80- let n = rng. gen :: < f64 > ( ) ;
80+ let n = rng. random :: < f64 > ( ) ;
8181
8282 bh. bench_function ( "vec10000_axpy_f64_slice" , move |bh| {
8383 bh. iter ( || {
@@ -94,7 +94,7 @@ fn vec10000_axpy_f64_static(bh: &mut criterion::Criterion) {
9494 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
9595 let mut a = SVector :: < f64 , 10000 > :: new_random ( ) ;
9696 let b = SVector :: < f64 , 10000 > :: new_random ( ) ;
97- let n = rng. gen :: < f64 > ( ) ;
97+ let n = rng. random :: < f64 > ( ) ;
9898
9999 // NOTE: for some reasons, it is much faster if the argument are boxed (Box::new(OVector...)).
100100 bh. bench_function ( "vec10000_axpy_f64_static" , move |bh| {
@@ -107,7 +107,7 @@ fn vec10000_axpy_f32(bh: &mut criterion::Criterion) {
107107 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
108108 let mut a = DVector :: new_random ( 10000 ) ;
109109 let b = DVector :: new_random ( 10000 ) ;
110- let n = rng. gen :: < f32 > ( ) ;
110+ let n = rng. random :: < f32 > ( ) ;
111111
112112 bh. bench_function ( "vec10000_axpy_f32" , move |bh| {
113113 bh. iter ( || a. axpy ( n, & b, 1.0 ) )
@@ -119,8 +119,8 @@ fn vec10000_axpy_beta_f32(bh: &mut criterion::Criterion) {
119119 let mut rng = IsaacRng :: seed_from_u64 ( 0 ) ;
120120 let mut a = DVector :: new_random ( 10000 ) ;
121121 let b = DVector :: new_random ( 10000 ) ;
122- let n = rng. gen :: < f32 > ( ) ;
123- let beta = rng. gen :: < f32 > ( ) ;
122+ let n = rng. random :: < f32 > ( ) ;
123+ let beta = rng. random :: < f32 > ( ) ;
124124
125125 bh. bench_function ( "vec10000_axpy_beta_f32" , move |bh| {
126126 bh. iter ( || a. axpy ( n, & b, beta) )
0 commit comments