Moving variable declaration up...seems to cause problem with certain compilers..Windows
authorjulie <julielangou@users.noreply.github.com>
Tue, 8 Dec 2015 06:48:18 +0000 (06:48 +0000)
committerjulie <julielangou@users.noreply.github.com>
Tue, 8 Dec 2015 06:48:18 +0000 (06:48 +0000)
LAPACKE/src/lapacke_cunmlq_work.c
LAPACKE/src/lapacke_zunmlq_work.c

index 1804b2b..b79a4f9 100644 (file)
@@ -42,6 +42,9 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
 {
     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,
@@ -51,10 +54,8 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans,
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
         r = LAPACKE_lsame( side, 'l' ) ? m : n;
-        lapack_int lda_t = MAX(1,k);
-        lapack_int ldc_t = MAX(1,m);
-        lapack_complex_float* a_t = NULL;
-        lapack_complex_float* c_t = NULL;
+        lda_t = MAX(1,k);
+        ldc_t = MAX(1,m);
         /* Check leading dimension(s) */
         if( lda < r ) {
             info = -8;
index bc2e16c..08d86ce 100644 (file)
@@ -42,6 +42,9 @@ lapack_int LAPACKE_zunmlq_work( int matrix_layout, char side, char trans,
 {
     lapack_int info = 0;
     lapack_int r;
+    lapack_int lda_t, ldc_t;
+    lapack_complex_double* a_t = NULL;
+    lapack_complex_double* c_t = NULL;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
@@ -51,10 +54,8 @@ lapack_int LAPACKE_zunmlq_work( int matrix_layout, char side, char trans,
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
         r = LAPACKE_lsame( side, 'l' ) ? m : n;
-        lapack_int lda_t = MAX(1,k);
-        lapack_int ldc_t = MAX(1,m);
-        lapack_complex_double* a_t = NULL;
-        lapack_complex_double* c_t = NULL;
+        lda_t = MAX(1,k);
+        ldc_t = MAX(1,m);
         /* Check leading dimension(s) */
         if( lda < r ) {
             info = -8;