lapack_traits/
lib.rs

1//! Generic real/complex scalar trait wrappers for BLAS and LAPACK routines
2
3pub trait Scalar : Copy{
4    type Real;
5}
6
7impl Scalar for f32{
8    type Real = f32;
9}
10
11impl Scalar for f64{
12    type Real = f64;
13}
14
15impl Scalar for c32{
16    type Real = f32;
17}
18
19impl Scalar for c64{
20    type Real = f64;
21}
22
23
24//#[cfg(not(feature = "simba"))]
25//pub use alga::general::{RealField, ComplexField};
26//#[cfg(not(feature = "simba"))]
27//pub use alga::general::{SubsetOf, SupersetOf};
28
29pub mod simba_feat;
30
31#[cfg(feature = "simba")]
32pub use simba_feat::LComplexField;
33
34
35pub use cblas::Layout as Layout;
36pub use cblas::Transpose as Transpose;
37
38pub use num_complex::Complex32 as c32;
39pub use num_complex::Complex64 as c64;
40
41
42pub mod blas;
43pub mod lapack;
44
45pub use blas::*;
46pub use lapack::*;
47
48#[cfg(test)]
49mod tests {
50    #[allow(unused_imports)]
51    use openblas_src;
52
53    #[test]
54    fn link() {
55        ()
56    }
57}