Here is code of lapacke_cunmql_work routine:
lda_t, ldc_t, a_t and c_t variables are declared inside the block for if( matrix_layout == LAPACK_ROW_MAJOR )
- Code: Select all
lapack_int LAPACKE_cunmql_work( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* tau,
lapack_complex_float* c, lapack_int ldc,
lapack_complex_float* work, lapack_int lwork )
{
lapack_int info = 0;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_cunmql( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
&lwork, &info );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
lapack_int lda_t = MAX(1,r);
lapack_int ldc_t = MAX(1,m);
lapack_complex_float* a_t = NULL;
lapack_complex_float* c_t = NULL;
But these variables are declared in the beginning of the routine lapacke_cunmlq_work :
- Code: Select all
lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
lapack_int m, lapack_int n, lapack_int k,
const lapack_complex_float* a, lapack_int lda,
const lapack_complex_float* tau,
lapack_complex_float* c, lapack_int ldc,
lapack_complex_float* work, lapack_int lwork )
{
lapack_int info = 0;
lapack_int r;
lapack_int lda_t, ldc_t;
lapack_complex_float* a_t = NULL;
lapack_complex_float* c_t = NULL;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
&lwork, &info );
if( info < 0 ) {
info = info - 1;
}
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
r = LAPACKE_lsame( side, 'l' ) ? m : n;
lda_t = MAX(1,k);
ldc_t = MAX(1,m);
Please find attached patch for lapacke_?(or/un)mlq_work routines.

