summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/LAPACK
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-06 13:10:08 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-06 13:10:08 +0200
commitc04b342324001dc74baaa5e74264e61a76937f88 (patch)
tree1155bdcce361167dc62f76b537fb0f34b8e6aab5 /lib/Numeric/LinearAlgebra/LAPACK
parent8ecec15cee88462e46ec9d0ce361224c0fcdba31 (diff)
added qrgr
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index 51972eb..e5e45ef 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -930,6 +930,47 @@ int qr_l_C(KCMAT(a), CVEC(tau), CMAT(r)) {
930 OK 930 OK
931} 931}
932 932
933/* Subroutine */ int dorgqr_(integer *m, integer *n, integer *k, doublereal *
934 a, integer *lda, doublereal *tau, doublereal *work, integer *lwork,
935 integer *info);
936
937int c_dorgqr(KDMAT(a), KDVEC(tau), DMAT(r)) {
938 integer m = ar;
939 integer n = MIN(ac,ar);
940 integer k = taun;
941 DEBUGMSG("c_dorgqr");
942 integer lwork = 8*n; // FIXME
943 double *WORK = (double*)malloc(lwork*sizeof(double));
944 CHECK(!WORK,MEM);
945 memcpy(rp,ap,m*k*sizeof(double));
946 integer res;
947 dorgqr_ (&m,&n,&k,rp,&m,(double*)taup,WORK,&lwork,&res);
948 CHECK(res,res);
949 free(WORK);
950 OK
951}
952
953/* Subroutine */ int zungqr_(integer *m, integer *n, integer *k,
954 doublecomplex *a, integer *lda, doublecomplex *tau, doublecomplex *
955 work, integer *lwork, integer *info);
956
957int c_zungqr(KCMAT(a), KCVEC(tau), CMAT(r)) {
958 integer m = ar;
959 integer n = MIN(ac,ar);
960 integer k = taun;
961 DEBUGMSG("z_ungqr");
962 integer lwork = 8*n; // FIXME
963 doublecomplex *WORK = (doublecomplex*)malloc(lwork*sizeof(doublecomplex));
964 CHECK(!WORK,MEM);
965 memcpy(rp,ap,m*k*sizeof(doublecomplex));
966 integer res;
967 zungqr_ (&m,&n,&k,rp,&m,(doublecomplex*)taup,WORK,&lwork,&res);
968 CHECK(res,res);
969 free(WORK);
970 OK
971}
972
973
933//////////////////// Hessenberg factorization ///////////////////////// 974//////////////////// Hessenberg factorization /////////////////////////
934 975
935/* Subroutine */ int dgehrd_(integer *n, integer *ilo, integer *ihi, 976/* Subroutine */ int dgehrd_(integer *n, integer *ilo, integer *ihi,