Beyn fix memory leaks and swapped arguments in zgeev.
Former-commit-id: a63ba1bbd2ce50f664a419e4742fcead2fb355e1
This commit is contained in:
parent
e898fd5ad8
commit
8666657fcc
12
qpms/beyn.c
12
qpms/beyn.c
|
@ -212,6 +212,7 @@ int ProcessAMatrices(BeynSolver *Solver, beyn_function_M_t M_function,
|
||||||
const gsl_complex zero = gsl_complex_rect(0,0);
|
const gsl_complex zero = gsl_complex_rect(0,0);
|
||||||
gsl_blas_zgemm(CblasConjTrans, CblasNoTrans, one,
|
gsl_blas_zgemm(CblasConjTrans, CblasNoTrans, one,
|
||||||
V0, A1, zero, TM2);
|
V0, A1, zero, TM2);
|
||||||
|
|
||||||
|
|
||||||
printf(" Multiplying TM*W0T->B...\n");
|
printf(" Multiplying TM*W0T->B...\n");
|
||||||
//TM2.Multiply(&W0T, &B, "--transB C"); // B <- TM2 * W0
|
//TM2.Multiply(&W0T, &B, "--transB C"); // B <- TM2 * W0
|
||||||
|
@ -254,16 +255,16 @@ int ProcessAMatrices(BeynSolver *Solver, beyn_function_M_t M_function,
|
||||||
'N' /* jobvl; don't compute left eigenvectors */,
|
'N' /* jobvl; don't compute left eigenvectors */,
|
||||||
'V' /* jobvr; do compute right eigenvectors */,
|
'V' /* jobvr; do compute right eigenvectors */,
|
||||||
K /* n */,
|
K /* n */,
|
||||||
(lapack_complex_double *)(S->data) /* a */,
|
(lapack_complex_double *)(B->data) /* a */,
|
||||||
S->tda /* lda */,
|
B->tda /* lda */,
|
||||||
(lapack_complex_double *) Lambda->data /* w */,
|
(lapack_complex_double *) Lambda->data /* w */,
|
||||||
NULL /* vl */,
|
NULL /* vl */,
|
||||||
M /* ldvl, not used by for some reason needed */,
|
M /* ldvl, not used by for some reason needed */,
|
||||||
(lapack_complex_double *)(B->data)/* vr */,
|
(lapack_complex_double *)(S->data)/* vr */,
|
||||||
B->tda/* ldvr */
|
S->tda/* ldvr */
|
||||||
));
|
));
|
||||||
|
|
||||||
|
gsl_matrix_complex_free(B);
|
||||||
|
|
||||||
//B.NSEig(&Lambda, &S);
|
//B.NSEig(&Lambda, &S);
|
||||||
|
|
||||||
|
@ -273,6 +274,7 @@ int ProcessAMatrices(BeynSolver *Solver, beyn_function_M_t M_function,
|
||||||
QPMS_ENSURE_SUCCESS(gsl_blas_zgemm(CblasNoTrans, CblasNoTrans,
|
QPMS_ENSURE_SUCCESS(gsl_blas_zgemm(CblasNoTrans, CblasNoTrans,
|
||||||
one, V0, S, zero, V0S));
|
one, V0, S, zero, V0S));
|
||||||
|
|
||||||
|
gsl_matrix_complex_free(V0);
|
||||||
|
|
||||||
|
|
||||||
int KRetained = 0;
|
int KRetained = 0;
|
||||||
|
|
Loading…
Reference in New Issue