summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index 058232c..8392feb 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -709,6 +709,11 @@ int schur_l_R(KDMAT(a), DMAT(u), DMAT(s)) {
709 integer n = ac; 709 integer n = ac;
710 REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE); 710 REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE);
711 DEBUGMSG("schur_l_R"); 711 DEBUGMSG("schur_l_R");
712 int k;
713 //printf("---------------------------\n");
714 //printf("%p: ",ap); for(k=0;k<n*n;k++) printf("%f ",ap[k]); printf("\n");
715 //printf("%p: ",up); for(k=0;k<n*n;k++) printf("%f ",up[k]); printf("\n");
716 //printf("%p: ",sp); for(k=0;k<n*n;k++) printf("%f ",sp[k]); printf("\n");
712 memcpy(sp,ap,n*n*sizeof(double)); 717 memcpy(sp,ap,n*n*sizeof(double));
713 integer lwork = 6*n; // fixme 718 integer lwork = 6*n; // fixme
714 double *WORK = (double*)malloc(lwork*sizeof(double)); 719 double *WORK = (double*)malloc(lwork*sizeof(double));
@@ -719,6 +724,12 @@ int schur_l_R(KDMAT(a), DMAT(u), DMAT(s)) {
719 integer res; 724 integer res;
720 integer sdim; 725 integer sdim;
721 dgees_ ("V","N",NULL,&n,sp,&n,&sdim,WR,WI,up,&n,WORK,&lwork,BWORK,&res); 726 dgees_ ("V","N",NULL,&n,sp,&n,&sdim,WR,WI,up,&n,WORK,&lwork,BWORK,&res);
727 //printf("%p: ",ap); for(k=0;k<n*n;k++) printf("%f ",ap[k]); printf("\n");
728 //printf("%p: ",up); for(k=0;k<n*n;k++) printf("%f ",up[k]); printf("\n");
729 //printf("%p: ",sp); for(k=0;k<n*n;k++) printf("%f ",sp[k]); printf("\n");
730 if(res>0) {
731 return NOCONVER;
732 }
722 CHECK(res,res); 733 CHECK(res,res);
723 free(WR); 734 free(WR);
724 free(WI); 735 free(WI);
@@ -747,6 +758,9 @@ int schur_l_C(KCMAT(a), CMAT(u), CMAT(s)) {
747 zgees_ ("V","N",NULL,&n,(doublecomplex*)sp,&n,&sdim,W, 758 zgees_ ("V","N",NULL,&n,(doublecomplex*)sp,&n,&sdim,W,
748 (doublecomplex*)up,&n, 759 (doublecomplex*)up,&n,
749 WORK,&lwork,RWORK,BWORK,&res); 760 WORK,&lwork,RWORK,BWORK,&res);
761 if(res>0) {
762 return NOCONVER;
763 }
750 CHECK(res,res); 764 CHECK(res,res);
751 free(W); 765 free(W);
752 free(BWORK); 766 free(BWORK);