2017-08-03 01:37:44 +08:00
|
|
|
#![feature(test)]
|
2017-08-16 00:24:34 +08:00
|
|
|
#![allow(unused_macros)]
|
2017-08-03 01:37:44 +08:00
|
|
|
|
2018-02-02 19:26:35 +08:00
|
|
|
extern crate nalgebra as na;
|
2017-08-03 01:37:44 +08:00
|
|
|
extern crate rand;
|
2019-11-16 03:29:18 +08:00
|
|
|
extern crate rand_isaac;
|
2018-02-02 19:26:35 +08:00
|
|
|
extern crate test;
|
2017-08-03 01:37:44 +08:00
|
|
|
extern crate typenum;
|
|
|
|
|
2019-03-24 01:01:04 +08:00
|
|
|
#[macro_use]
|
|
|
|
extern crate criterion;
|
|
|
|
|
2017-08-03 01:37:44 +08:00
|
|
|
use na::DMatrix;
|
2019-11-16 03:29:18 +08:00
|
|
|
use rand::Rng;
|
|
|
|
use rand_isaac::IsaacRng;
|
2017-08-03 01:37:44 +08:00
|
|
|
|
2019-03-24 01:01:04 +08:00
|
|
|
pub mod core;
|
|
|
|
pub mod geometry;
|
|
|
|
pub mod linalg;
|
2017-08-03 01:37:44 +08:00
|
|
|
|
|
|
|
fn reproductible_dmatrix(nrows: usize, ncols: usize) -> DMatrix<f64> {
|
2018-12-29 19:12:56 +08:00
|
|
|
use rand::SeedableRng;
|
|
|
|
let mut rng = IsaacRng::seed_from_u64(0);
|
2017-08-03 01:37:44 +08:00
|
|
|
DMatrix::<f64>::from_fn(nrows, ncols, |_, _| rng.gen())
|
|
|
|
}
|
2019-03-24 01:01:04 +08:00
|
|
|
|
2019-03-24 02:07:16 +08:00
|
|
|
criterion_main!(
|
|
|
|
core::matrix,
|
|
|
|
core::vector,
|
|
|
|
geometry::quaternion,
|
|
|
|
linalg::bidiagonal,
|
|
|
|
linalg::cholesky,
|
|
|
|
linalg::full_piv_lu,
|
|
|
|
linalg::hessenberg,
|
|
|
|
linalg::lu,
|
|
|
|
linalg::qr,
|
|
|
|
linalg::schur,
|
|
|
|
linalg::solve,
|
|
|
|
linalg::svd,
|
|
|
|
linalg::symmetric_eigen,
|
2019-11-16 03:29:18 +08:00
|
|
|
);
|