#ifndef IntfLapack_H_SEEN #define IntfLapack_H_SEEN #include "machdefs.h" #include "tarray.h" namespace SOPHYA { template class LapackServer { public: LapackServer(); virtual ~LapackServer(); virtual int LinSolve(TArray& a, TArray & b); virtual int SVD(TArray& a, TArray & s); virtual int SVD(TArray& a, TArray & s, TArray & u, TArray & vt); inline void SetWorkSpaceSizeFactor(int f = 2) { wspace_size_factor = (f > 1) ? f : 1; } inline int GetWorkSpaceSizeFactor() { return wspace_size_factor; } private: int SVDDriver(TArray& a, TArray & s, TArray* up=NULL, TArray * vtp=NULL); int wspace_size_factor; }; template inline int LapackLinSolve(TArray& a, TArray & b) { LapackServer lps; return( lps.LinSolve(a, b) ); } template inline int LapackSVD(TArray& a, TArray & s) { LapackServer lps; return( lps.SVD(a, s) ); } template inline int LapackSVD(TArray& a, TArray & s, TArray & u, TArray & vt) { LapackServer lps; return( lps.SVD(a, s, u, vt) ); } } // Fin du namespace void rztest_lapack(TArray& a, TArray& b); #endif