#include <flens/lapack/interface/include/config.h>
namespace flens { namespace lapack { extern "C" { //-- dorgqr -------------------------------------------------------------------- void LAPACK_DECL(dorgqr)(const INTEGER *M, const INTEGER *N, const INTEGER *K, DOUBLE *A, const INTEGER *LDA, const DOUBLE *TAU, DOUBLE *WORK, const INTEGER *LWORK, INTEGER *INFO) { using std::max; using std::min; // // Test the input parameters so that we pass LAPACK error checks // const bool lQuery = (*LWORK==-1); *INFO = 0; if (*M<0) { *INFO = -1; } else if (*N<0 || *N>*M) { *INFO = -2; } else if (*K<0 || *K>*N) { *INFO = -3; } else if (*LDA<max(INTEGER(1), *M)) { *INFO = -5; } else if (*LWORK<max(INTEGER(1), *N) && !lQuery) { *INFO = -8; } if (*INFO!=0) { *INFO = -(*INFO); LAPACK_ERROR("DORGQR", INFO); *INFO = -(*INFO); return; } // // Handle worksize query // if (lQuery) { // TODO: implement lqf_wsq ASSERT(0); } // // Call FLENS implementation // DGeMatrixView _A = DFSView(*M, *N, A, *LDA); DConstDenseVectorView _TAU = DConstArrayView(*K, TAU, 1); DDenseVectorView _WORK = DArrayView(*LWORK, WORK, 1); orgqr(_A, _TAU, _WORK); } } // extern "C" } } // namespace lapack, flens |