### Matrix transpose in LAPACKE_dsygvx

Posted:

**Sun Aug 28, 2016 10:29 pm**Hi,

I am working on LAPACKE_dsygvx. In LAPACKE_dsygvx_work.c, input and output matrices (matrix A & B) are transposed before and after calling LAPACK_dsygvx (line 110). The subroutine uses LAPACKE_dsy_trans to transpose symmetric matrix A, which seems reasonable to me. But it uses LAPACKE_dge_trans to transpose symmetric matrix B. From LAPACK document, B is triangular matrix as output. So it seems more straightforward for me to use LAPACKE_dsy_trans.

What is more, I still have a concern about this. If memory is limited, a user may use rest space to store other data. e.g., the upper triangular part of is used to store symmetric matrix and the lower triangular part (diagonal line excluded) can be used to store unit triangular matrix. So the data of the unit triangular matrix may be overwritten after transposing symmetric matrix back if LAPACKE_dge_trans is used.

Are there any other reasons for choosing LAPACKE_dge_trans?

I am working on LAPACKE_dsygvx. In LAPACKE_dsygvx_work.c, input and output matrices (matrix A & B) are transposed before and after calling LAPACK_dsygvx (line 110). The subroutine uses LAPACKE_dsy_trans to transpose symmetric matrix A, which seems reasonable to me. But it uses LAPACKE_dge_trans to transpose symmetric matrix B. From LAPACK document, B is triangular matrix as output. So it seems more straightforward for me to use LAPACKE_dsy_trans.

What is more, I still have a concern about this. If memory is limited, a user may use rest space to store other data. e.g., the upper triangular part of is used to store symmetric matrix and the lower triangular part (diagonal line excluded) can be used to store unit triangular matrix. So the data of the unit triangular matrix may be overwritten after transposing symmetric matrix back if LAPACKE_dge_trans is used.

Are there any other reasons for choosing LAPACKE_dge_trans?