|
1 | 1 | /***************************************************************************** |
2 | | - Copyright (c) 2011, Intel Corp. |
| 2 | + Copyright (c) 2014, Intel Corp. |
3 | 3 | All rights reserved. |
4 | 4 |
|
5 | 5 | Redistribution and use in source and binary forms, with or without |
|
33 | 33 |
|
34 | 34 | #include "lapacke_utils.h" |
35 | 35 |
|
36 | | -lapack_int LAPACKE_zunmlq_work( int matrix_order, char side, char trans, |
| 36 | +lapack_int LAPACKE_zunmlq_work( int matrix_layout, char side, char trans, |
37 | 37 | lapack_int m, lapack_int n, lapack_int k, |
38 | 38 | const lapack_complex_double* a, lapack_int lda, |
39 | 39 | const lapack_complex_double* tau, |
40 | 40 | lapack_complex_double* c, lapack_int ldc, |
41 | 41 | lapack_complex_double* work, lapack_int lwork ) |
42 | 42 | { |
43 | 43 | lapack_int info = 0; |
44 | | - if( matrix_order == LAPACK_COL_MAJOR ) { |
| 44 | + lapack_int r; |
| 45 | + if( matrix_layout == LAPACK_COL_MAJOR ) { |
45 | 46 | /* Call LAPACK function and adjust info */ |
46 | 47 | LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, |
47 | 48 | &lwork, &info ); |
48 | 49 | if( info < 0 ) { |
49 | 50 | info = info - 1; |
50 | 51 | } |
51 | | - } else if( matrix_order == LAPACK_ROW_MAJOR ) { |
| 52 | + } else if( matrix_layout == LAPACK_ROW_MAJOR ) { |
| 53 | + r = LAPACKE_lsame( side, 'l' ) ? m : n; |
52 | 54 | lapack_int lda_t = MAX(1,k); |
53 | 55 | lapack_int ldc_t = MAX(1,m); |
54 | 56 | lapack_complex_double* a_t = NULL; |
55 | 57 | lapack_complex_double* c_t = NULL; |
56 | 58 | /* Check leading dimension(s) */ |
57 | | - if( lda < m ) { |
| 59 | + if( lda < r ) { |
58 | 60 | info = -8; |
59 | 61 | LAPACKE_xerbla( "LAPACKE_zunmlq_work", info ); |
60 | 62 | return info; |
@@ -84,8 +86,8 @@ lapack_int LAPACKE_zunmlq_work( int matrix_order, char side, char trans, |
84 | 86 | goto exit_level_1; |
85 | 87 | } |
86 | 88 | /* Transpose input matrices */ |
87 | | - LAPACKE_zge_trans( matrix_order, k, m, a, lda, a_t, lda_t ); |
88 | | - LAPACKE_zge_trans( matrix_order, m, n, c, ldc, c_t, ldc_t ); |
| 89 | + LAPACKE_zge_trans( matrix_layout, k, m, a, lda, a_t, lda_t ); |
| 90 | + LAPACKE_zge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); |
89 | 91 | /* Call LAPACK function and adjust info */ |
90 | 92 | LAPACK_zunmlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t, |
91 | 93 | work, &lwork, &info ); |
|
0 commit comments