diff --git a/lax/src/lib.rs b/lax/src/lib.rs index 41c15237..c04efe60 100644 --- a/lax/src/lib.rs +++ b/lax/src/lib.rs @@ -141,6 +141,11 @@ impl UPLO { UPLO::Lower => UPLO::Upper, } } + + /// To use Fortran LAPACK API in lapack-sys crate + pub fn as_ptr(&self) -> *const i8 { + self as *const UPLO as *const i8 + } } #[derive(Debug, Clone, Copy)] @@ -151,6 +156,13 @@ pub enum Transpose { Hermite = b'C', } +impl Transpose { + /// To use Fortran LAPACK API in lapack-sys crate + pub fn as_ptr(&self) -> *const i8 { + self as *const Transpose as *const i8 + } +} + #[derive(Debug, Clone, Copy)] #[repr(u8)] pub enum NormType { @@ -167,6 +179,11 @@ impl NormType { NormType::Frobenius => NormType::Frobenius, } } + + /// To use Fortran LAPACK API in lapack-sys crate + pub fn as_ptr(&self) -> *const i8 { + self as *const NormType as *const i8 + } } /// Create a vector without initialization