- Code: Select all
/* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( vect, 'q' ) ){
a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * k );
}else{
a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * nq );
}
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
}
c_t = (double*)LAPACKE_malloc( sizeof(double) * ldc_t * MAX(1,n) );
if( c_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_1;
}
/* Transpose input matrices */
if( LAPACKE_lsame( vect, 'q' ) ){
LAPACKE_dge_trans( matrix_layout, nq, k, a, lda, a_t, lda_t );
}else{
LAPACKE_dge_trans( matrix_layout, k, nq, a, lda, a_t, lda_t );
}
LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );

