Merge branch 'develop' of github.com:xianyi/OpenBLAS into develop

This commit is contained in:
Zhang Xianyi 2015-12-14 10:07:10 -06:00
commit b9b52c295d
3 changed files with 24 additions and 8 deletions

View File

@ -73,8 +73,12 @@ lapack_int LAPACKE_dormbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
a_t = (double*) if( LAPACKE_lsame( vect, 'q' ) ) {
LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,MIN(nq,k)) ); 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 ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
@ -85,7 +89,11 @@ lapack_int LAPACKE_dormbr_work( int matrix_layout, char vect, char side,
goto exit_level_1; goto exit_level_1;
} }
/* Transpose input matrices */ /* Transpose input matrices */
LAPACKE_dge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t ); 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 ); LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t,

View File

@ -72,7 +72,11 @@ lapack_int LAPACKE_dormlq_work( int matrix_layout, char side, char trans,
return (info < 0) ? (info - 1) : info; return (info < 0) ? (info - 1) : info;
} }
/* Allocate memory for temporary array(s) */ /* Allocate memory for temporary array(s) */
if( LAPACKE_lsame( side, 'l' ) ) {
a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) ); a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
} else {
a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
}
if( a_t == NULL ) { if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR; info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0; goto exit_level_0;
@ -83,7 +87,12 @@ lapack_int LAPACKE_dormlq_work( int matrix_layout, char side, char trans,
goto exit_level_1; goto exit_level_1;
} }
/* Transpose input matrices */ /* Transpose input matrices */
if( LAPACKE_lsame( side, 'l' ) ){
LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t );
} else {
LAPACKE_dge_trans( matrix_layout, k, n, a, lda, a_t, lda_t );
}
LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t );
/* Call LAPACK function and adjust info */ /* Call LAPACK function and adjust info */
LAPACK_dormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t, LAPACK_dormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,

View File

@ -58,9 +58,8 @@ typedef int blasint;
/* C99 supports complex floating numbers natively, which GCC also offers as an /* C99 supports complex floating numbers natively, which GCC also offers as an
extension since version 3.0. If neither are available, use a compatible extension since version 3.0. If neither are available, use a compatible
structure as fallback (see Clause 6.2.5.13 of the C99 standard). */ structure as fallback (see Clause 6.2.5.13 of the C99 standard). */
#if (defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || \ #if ((defined(__STDC_IEC_559_COMPLEX__) || __STDC_VERSION__ >= 199901L || \
(__GNUC__ >= 3 && !defined(__cplusplus)) || \ (__GNUC__ >= 3 && !defined(__cplusplus))) && !(defined(FORCE_OPENBLAS_COMPLEX_STRUCT)))
(_MSC_VER >= 1800 && !defined(__cplusplus))) // Visual Studio 2013 supports complex
#define OPENBLAS_COMPLEX_C99 #define OPENBLAS_COMPLEX_C99
#ifndef __cplusplus #ifndef __cplusplus
#include <complex.h> #include <complex.h>