use criterion::{criterion_group, criterion_main, Criterion};
use static_math::traits::LinearAlgebra;
use static_math::matrix6x6::M66;
use static_math::matrix4x4::M44;
fn inverse6x6_test() {
let m = M66::new([
[1.0, 1.0, 3.0, 4.0, 9.0, 3.0],
[10.0, 10.0, 1.0, 2.0, 2.0, 5.0],
[2.0, 9.0, 6.0, 10.0, 10.0, 9.0],
[10.0, 9.0, 9.0, 7.0, 3.0, 6.0],
[7.0, 6.0, 6.0, 2.0, 9.0, 5.0],
[3.0, 8.0, 1.0, 4.0, 1.0, 5.0],
]);
if let Some(_result) = m.inverse() {
}
}
fn inverse4x4_test() {
let m = M44::new([
[1.0, 1.0, 1.0, -1.0],
[1.0, 1.0, -1.0, 1.0],
[1.0, -1.0, 1.0, 1.0],
[-1.0, 1.0, 1.0, 1.0],
]);
if let Some(_result) = m.inverse() {
}
}
pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("inverse 6x6", |b| b.iter(|| inverse6x6_test()));
c.bench_function("inverse 4x4", |b| b.iter(|| inverse4x4_test()));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);