Import IsaacRng from rand_isaac instead of rand.

The rand crate removed IsaacRng in the 0.5 -> 0.6 transition, so the benchmarks that use it haven't compiled since 9c37c51203.
This commit is contained in:
Avi Weinstock 2019-11-15 14:29:18 -05:00 committed by Sébastien Crozet
parent d78309b1fd
commit 8404839233
5 changed files with 13 additions and 7 deletions

View File

@ -56,6 +56,7 @@ pest_derive = { version = "2.0", optional = true }
[dev-dependencies]
serde_json = "1.0"
rand_xorshift = "0.2"
rand_isaac = "0.2"
### Uncomment this line before running benchmarks.
### We can't just let this uncommented because that would break
### compilation for #[no-std] because of the terrible Cargo bug

View File

@ -1,5 +1,6 @@
use na::{DMatrix, DVector, Matrix2, Matrix3, Matrix4, MatrixN, Vector2, Vector3, Vector4, U10};
use rand::{IsaacRng, Rng};
use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub};
#[path = "../common/macros.rs"]
@ -237,4 +238,4 @@ criterion_group!(matrix,
mat_mul_mat,
mat100_from_fn,
mat500_from_fn,
);
);

View File

@ -1,5 +1,6 @@
use na::{DVector, Vector2, Vector3, Vector4, VectorN};
use rand::{IsaacRng, Rng};
use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub};
use typenum::U10000;

View File

@ -1,5 +1,6 @@
use na::{Quaternion, UnitQuaternion, Vector3};
use rand::{IsaacRng, Rng};
use rand::Rng;
use rand_isaac::IsaacRng;
use std::ops::{Add, Div, Mul, Sub};
#[path = "../common/macros.rs"]
@ -34,4 +35,4 @@ criterion_group!(quaternion,
quaternion_div_s,
quaternion_inv,
unit_quaternion_inv
);
);

View File

@ -3,6 +3,7 @@
extern crate nalgebra as na;
extern crate rand;
extern crate rand_isaac;
extern crate test;
extern crate typenum;
@ -10,7 +11,8 @@ extern crate typenum;
extern crate criterion;
use na::DMatrix;
use rand::{IsaacRng, Rng};
use rand::Rng;
use rand_isaac::IsaacRng;
pub mod core;
pub mod geometry;
@ -36,4 +38,4 @@ criterion_main!(
linalg::solve,
linalg::svd,
linalg::symmetric_eigen,
);
);