| @@ -14,6 +14,7 @@ lapack-3.4.2.tgz | |||
| lapack-netlib/make.inc | |||
| lapack-netlib/lapacke/include/lapacke_mangling.h | |||
| lapack-netlib/TESTING/testing_results.txt | |||
| lapack-netlib/INSTALL/test* | |||
| *.so | |||
| *.so.* | |||
| *.a | |||
| @@ -1,9 +1,9 @@ | |||
| prefix=@prefix@ | |||
| libdir=@libdir@ | |||
| prefix=@CMAKE_INSTALL_PREFIX@ | |||
| libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ | |||
| Name: blas | |||
| Description: Basic Linear Algebra Subprograms F77 reference implementations | |||
| Version: @LAPACK_VERSION@ | |||
| URL: http://www.netlib.org/blas/ | |||
| Libs: -L${libdir} -lblas | |||
| Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lblas | |||
| Libs.private: -lm | |||
| @@ -65,9 +65,9 @@ if(ALL_TARGETS) | |||
| list(GET ALL_TARGETS 0 _cblas_config_build_guard_target) | |||
| endif() | |||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-version.cmake.in | |||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-version.cmake.in | |||
| ${LAPACK_BINARY_DIR}/cblas-config-version.cmake @ONLY) | |||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/cblas-config-build.cmake.in | |||
| configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-build.cmake.in | |||
| ${LAPACK_BINARY_DIR}/cblas-config.cmake @ONLY) | |||
| @@ -16,7 +16,6 @@ macro(add_cblas_test output input target) | |||
| -DINTDIR=${CMAKE_CFG_INTDIR} | |||
| -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") | |||
| else() | |||
| string(REPLACE "." "_" input_name ${input}) | |||
| add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}" | |||
| -DTEST=$<TARGET_FILE:${target}> | |||
| -DOUTPUT=${TEST_OUTPUT} | |||
| @@ -41,7 +41,7 @@ all2: stest2 dtest2 ctest2 ztest2 | |||
| all3: stest3 dtest3 ctest3 ztest3 | |||
| clean: | |||
| rm -f core *.o a.out x* | |||
| rm -f core *.o *.out x* | |||
| cleanobj: | |||
| rm -f core *.o a.out | |||
| cleanexe: | |||
| @@ -1365,8 +1365,9 @@ | |||
| * | |||
| 150 CONTINUE | |||
| WRITE( NOUT, FMT = 9996 )SNAME | |||
| CALL CPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| IF( TRACE ) | |||
| $ CALL CPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| * | |||
| 160 CONTINUE | |||
| RETURN | |||
| @@ -1335,8 +1335,9 @@ | |||
| * | |||
| 150 CONTINUE | |||
| WRITE( NOUT, FMT = 9996 )SNAME | |||
| CALL DPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| IF( TRACE ) | |||
| $ CALL DPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| * | |||
| 160 CONTINUE | |||
| RETURN | |||
| @@ -1339,8 +1339,9 @@ | |||
| * | |||
| 150 CONTINUE | |||
| WRITE( NOUT, FMT = 9996 )SNAME | |||
| CALL SPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| IF( TRACE ) | |||
| $ CALL SPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| * | |||
| 160 CONTINUE | |||
| RETURN | |||
| @@ -1350,7 +1350,7 @@ | |||
| * | |||
| * Call the subroutine. | |||
| * | |||
| IF( SNAME( 4: 5 ).EQ.'mv' )THEN | |||
| IF( SNAME( 10: 11 ).EQ.'mv' )THEN | |||
| IF( FULL )THEN | |||
| IF( TRACE ) | |||
| $ WRITE( NTRA, FMT = 9993 )NC, SNAME, | |||
| @@ -1376,7 +1376,7 @@ | |||
| CALL CZTPMV( IORDER, UPLO, TRANS, DIAG, | |||
| $ N, AA, XX, INCX ) | |||
| END IF | |||
| ELSE IF( SNAME( 4: 5 ).EQ.'sv' )THEN | |||
| ELSE IF( SNAME( 10: 11 ).EQ.'sv' )THEN | |||
| IF( FULL )THEN | |||
| IF( TRACE ) | |||
| $ WRITE( NTRA, FMT = 9993 )NC, SNAME, | |||
| @@ -1465,7 +1465,7 @@ | |||
| END IF | |||
| * | |||
| IF( .NOT.NULL )THEN | |||
| IF( SNAME( 4: 5 ).EQ.'mv' )THEN | |||
| IF( SNAME( 10: 11 ).EQ.'mv' )THEN | |||
| * | |||
| * Check the result. | |||
| * | |||
| @@ -1473,7 +1473,7 @@ | |||
| $ INCX, ZERO, Z, INCX, XT, G, | |||
| $ XX, EPS, ERR, FATAL, NOUT, | |||
| $ .TRUE. ) | |||
| ELSE IF( SNAME( 4: 5 ).EQ.'sv' )THEN | |||
| ELSE IF( SNAME( 10: 11 ).EQ.'sv' )THEN | |||
| * | |||
| * Compute approximation to original vector. | |||
| * | |||
| @@ -1611,7 +1611,7 @@ | |||
| * .. Common blocks .. | |||
| COMMON /INFOC/INFOT, NOUTC, OK | |||
| * .. Executable Statements .. | |||
| CONJ = SNAME( 5: 5 ).EQ.'c' | |||
| CONJ = SNAME( 11: 11 ).EQ.'c' | |||
| * Define the number of arguments. | |||
| NARGS = 9 | |||
| * | |||
| @@ -1366,8 +1366,9 @@ | |||
| * | |||
| 150 CONTINUE | |||
| WRITE( NOUT, FMT = 9996 )SNAME | |||
| CALL ZPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| IF( TRACE ) | |||
| $ CALL ZPRCN3( NTRA, NC, SNAME, IORDER, SIDE, UPLO, TRANSA, DIAG, | |||
| $ M, N, ALPHA, LDA, LDB) | |||
| * | |||
| 160 CONTINUE | |||
| RETURN | |||
| @@ -18,7 +18,7 @@ | |||
| macro( _CHECK_FORTRAN_TYPE_SIZE _TYPE_NAME _TEST_SIZES ) | |||
| foreach( __TEST_SIZE ${_TEST_SIZES} ) | |||
| set( __TEST_FILE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortran${_TYPE_NAME}Size${__TEST_SIZE}.f90 ) | |||
| set( __TEST_FILE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortran${_TYPE_NAME}Size${__TEST_SIZE}.f90 ) | |||
| file( WRITE ${__TEST_FILE} | |||
| " | |||
| PROGRAM check_size | |||
| @@ -27,7 +27,7 @@ macro( _CHECK_FORTRAN_TYPE_SIZE _TYPE_NAME _TEST_SIZES ) | |||
| pa => a | |||
| END PROGRAM | |||
| ") | |||
| try_compile( SIZEOF_${_TYPE_NAME} ${PROJECT_BINARY_DIR} ${__TEST_FILE} ) | |||
| try_compile( SIZEOF_${_TYPE_NAME} ${PROJECT_BINARY_DIR} ${__TEST_FILE} ) | |||
| if( SIZEOF_${_TYPE_NAME} ) | |||
| message( STATUS "Testing default ${_TYPE_NAME}*${__TEST_SIZE} - found" ) | |||
| set( SIZEOF_${_TYPE_NAME} ${__TEST_SIZE} CACHE INTERNAL "Size of the default ${_TYPE_NAME} type" FORCE ) | |||
| @@ -3,7 +3,7 @@ project(LAPACK Fortran) | |||
| set(LAPACK_MAJOR_VERSION 3) | |||
| set(LAPACK_MINOR_VERSION 6) | |||
| set(LAPACK_PATCH_VERSION 0) | |||
| set(LAPACK_PATCH_VERSION 1) | |||
| set( | |||
| LAPACK_VERSION | |||
| ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} | |||
| @@ -17,11 +17,10 @@ set( | |||
| set(CMAKE_MACOSX_RPATH ON) | |||
| set(CMAKE_SKIP_BUILD_RPATH FALSE) | |||
| set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) | |||
| set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | |||
| set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | |||
| list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) | |||
| list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" isSystemDir) | |||
| if("${isSystemDir}" STREQUAL "-1") | |||
| set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | |||
| set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") | |||
| set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) | |||
| endif() | |||
| @@ -37,7 +36,7 @@ set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) | |||
| if (UNIX) | |||
| if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" ) | |||
| set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" ) | |||
| set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fp-model strict" ) | |||
| endif () | |||
| if ( "${CMAKE_Fortran_COMPILER}" MATCHES "xlf" ) | |||
| set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none" ) | |||
| @@ -47,6 +46,33 @@ if (UNIX) | |||
| STRING(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}") | |||
| endif () | |||
| if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq" ) | |||
| if ( WIN32 ) | |||
| if (CMAKE_GENERATOR STREQUAL "NMake Makefiles") | |||
| get_filename_component(CMAKE_Fortran_COMPILER_CMDNAM ${CMAKE_Fortran_COMPILER} NAME_WE) | |||
| message(STATUS "Using Compaq Fortran compiler with command name ${CMAKE_Fortran_COMPILER_CMDNAM}") | |||
| set( cmd ${CMAKE_Fortran_COMPILER_CMDNAM} ) | |||
| string( TOLOWER "${cmd}" cmdlc ) | |||
| if ( cmdlc STREQUAL "df" ) | |||
| message(STATUS "Assume the Compaq Visual Fortran Compiler is being used") | |||
| set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1) | |||
| set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_INCLUDES 1) | |||
| #This is a workaround that is needed to avoid forward-slashes in the | |||
| #filenames listed in response files from incorrectly being interpreted as | |||
| #introducing compiler command options | |||
| if (${BUILD_SHARED_LIBS}) | |||
| message(FATAL_ERROR "Making of shared libraries with CVF has not been tested.") | |||
| endif() | |||
| set(str "NMake version 9 or later should be used. NMake version 6.0 which is\n") | |||
| set(str "${str} included with the CVF distribution fails to build Lapack because\n") | |||
| set(str "${str} the number of source files exceeds the limit for NMake v6.0\n") | |||
| message(STATUS ${str}) | |||
| set(CMAKE_Fortran_LINK_EXECUTABLE "LINK /out:<TARGET> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS>") | |||
| endif() | |||
| endif() | |||
| endif() | |||
| endif() | |||
| # Get Python | |||
| find_package(PythonInterp) | |||
| message(STATUS "Looking for Python found - ${PYTHONINTERP_FOUND}") | |||
| @@ -210,7 +210,7 @@ INHERIT_DOCS = YES | |||
| # of the file/class/namespace that contains it. | |||
| # The default value is: NO. | |||
| SEPARATE_MEMBER_PAGES = NO | |||
| SEPARATE_MEMBER_PAGES = YES | |||
| # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen | |||
| # uses this value to replace tabs by spaces in code fragments. | |||
| @@ -1,7 +1,7 @@ | |||
| include ../make.inc | |||
| .SUFFIXES : .o .f | |||
| all: slamch.o dlamch.o testlsame testslamch testdlamch testsecond testdsecnd testieee testversion | |||
| all: testlsame testslamch testdlamch testsecond testdsecnd testieee testversion slamch.o dlamch.o | |||
| testlsame: lsame.o lsametst.o | |||
| $(LOADER) $(LOADOPTS) -o testlsame lsame.o lsametst.o | |||
| @@ -41,7 +41,7 @@ | |||
| *> \author Univ. of Colorado Denver | |||
| *> \author NAG Ltd. | |||
| * | |||
| *> \date November 2015 | |||
| *> \date June 2016 | |||
| * | |||
| *> \ingroup auxOTHERauxiliary | |||
| * | |||
| @@ -51,7 +51,7 @@ | |||
| * -- LAPACK computational routine (version 3.6.0) -- | |||
| * -- LAPACK is a software package provided by Univ. of Tennessee, -- | |||
| * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- | |||
| * November 2015 | |||
| * June 2016 | |||
| * | |||
| * ===================================================================== | |||
| * | |||
| @@ -59,7 +59,7 @@ | |||
| * ===================================================================== | |||
| VERS_MAJOR = 3 | |||
| VERS_MINOR = 6 | |||
| VERS_PATCH = 0 | |||
| VERS_PATCH = 1 | |||
| * ===================================================================== | |||
| * | |||
| RETURN | |||
| @@ -1,7 +1,7 @@ | |||
| #################################################################### | |||
| # LAPACK make include file. # | |||
| # LAPACK, Version 3.6.0 # | |||
| # November 2015 # | |||
| # June 2016 # | |||
| #################################################################### | |||
| # | |||
| SHELL = /bin/sh | |||
| @@ -13,9 +13,9 @@ SHELL = /bin/sh | |||
| # and desired load options for your machine. | |||
| # | |||
| FORTRAN = ifort | |||
| OPTS = -O3 | |||
| OPTS = -O3 -fp-model strict | |||
| DRVOPTS = $(OPTS) | |||
| NOOPT = -O3 -fltconsistency -fp_port | |||
| NOOPT = -O0 -fp-model strict | |||
| LOADER = ifort | |||
| LOADOPTS = | |||
| # | |||
| @@ -81,7 +81,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-install.cmake.in | |||
| install(FILES | |||
| ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake | |||
| ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake | |||
| DESTINATION lib/cmake/lapacke-${LAPACK_VERSION} | |||
| DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION} | |||
| ) | |||
| install(EXPORT lapacke-targets | |||
| @@ -180,14 +180,14 @@ lapack_int LAPACKE_zbdsqr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_int ldc ); | |||
| lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, float* d, float* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* z, lapack_int ldz, | |||
| lapack_int* superb ); | |||
| lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, double* d, double* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* z, lapack_int ldz, | |||
| lapack_int* superb ); | |||
| lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d, | |||
| @@ -999,29 +999,29 @@ lapack_int LAPACKE_zgesvd( int matrix_layout, char jobu, char jobvt, | |||
| lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* u, lapack_int ldu, | |||
| float* vt, lapack_int ldvt, | |||
| lapack_int* superb ); | |||
| lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* u, lapack_int ldu, | |||
| double* vt, lapack_int ldvt, | |||
| lapack_int* superb ); | |||
| lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, lapack_complex_float* u, lapack_int ldu, | |||
| lapack_complex_float* vt, lapack_int ldvt, | |||
| lapack_int* superb ); | |||
| lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, lapack_complex_double* u, lapack_int ldu, | |||
| lapack_complex_double* vt, lapack_int ldvt, | |||
| lapack_int* superb ); | |||
| @@ -4738,17 +4738,17 @@ lapack_int LAPACKE_dbdsdc_work( int matrix_layout, char uplo, char compq, | |||
| lapack_int* iwork ); | |||
| lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, float* d, float* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| float* s, float* z, lapack_int ldz, | |||
| float* work, lapack_int* iwork ); | |||
| lapack_int n, float* d, float* e, | |||
| float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* z, lapack_int ldz, | |||
| float* work, lapack_int* iwork ); | |||
| lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, double* d, double* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| double* s, double* z, lapack_int ldz, | |||
| double* work, lapack_int* iwork ); | |||
| lapack_int n, double* d, double* e, | |||
| double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* z, lapack_int ldz, | |||
| double* work, lapack_int* iwork ); | |||
| lapack_int LAPACKE_sbdsqr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_int ncvt, lapack_int nru, lapack_int ncc, | |||
| @@ -5760,30 +5760,30 @@ lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt, | |||
| lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* u, lapack_int ldu, | |||
| float* vt, lapack_int ldvt, | |||
| float* work, lapack_int lwork, lapack_int* iwork ); | |||
| lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* u, lapack_int ldu, | |||
| double* vt, lapack_int ldvt, | |||
| double* work, lapack_int lwork, lapack_int* iwork ); | |||
| lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, lapack_complex_float* u, lapack_int ldu, | |||
| lapack_complex_float* vt, lapack_int ldvt, | |||
| lapack_complex_float* work, lapack_int lwork, | |||
| float* rwork, lapack_int* iwork ); | |||
| lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, lapack_complex_double* u, lapack_int ldu, | |||
| lapack_complex_double* vt, lapack_int ldvt, | |||
| lapack_complex_double* work, lapack_int lwork, | |||
| @@ -10472,11 +10472,11 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2, | |||
| float* b22d, float* b22e, float* rwork, | |||
| lapack_int lrwork ); | |||
| lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int lda, | |||
| const lapack_int* ipiv ); | |||
| @@ -10502,17 +10502,17 @@ lapack_int LAPACKE_chetrs2_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* work ); | |||
| lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| lapack_complex_float* a, lapack_int lda, | |||
| const lapack_int* ipiv, lapack_complex_float* work ); | |||
| const lapack_int* ipiv, lapack_complex_float* e ); | |||
| lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, const lapack_int* ipiv, | |||
| lapack_complex_float* work ); | |||
| lapack_complex_float* e ); | |||
| lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int lda, | |||
| const lapack_int* ipiv ); | |||
| @@ -10590,14 +10590,14 @@ lapack_int LAPACKE_cuncsd2by1( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, lapack_int q, | |||
| lapack_complex_float* x11, lapack_int ldx11, | |||
| lapack_complex_float* x21, lapack_int ldx21, | |||
| lapack_complex_float* theta, lapack_complex_float* u1, | |||
| float* theta, lapack_complex_float* u1, | |||
| lapack_int ldu1, lapack_complex_float* u2, | |||
| lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t ); | |||
| lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, | |||
| lapack_int q, lapack_complex_float* x11, lapack_int ldx11, | |||
| lapack_complex_float* x21, lapack_int ldx21, | |||
| lapack_complex_float* theta, lapack_complex_float* u1, | |||
| float* theta, lapack_complex_float* u1, | |||
| lapack_int ldu1, lapack_complex_float* u2, | |||
| lapack_int ldu2, lapack_complex_float* v1t, | |||
| lapack_int ldv1t, lapack_complex_float* work, | |||
| @@ -10669,20 +10669,22 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| lapack_int ldu2, double* v1t, lapack_int ldv1t, | |||
| double* work, lapack_int lwork, lapack_int* iwork ); | |||
| lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| double* a, lapack_int lda, const lapack_int* ipiv, double* work); | |||
| double* a, lapack_int lda, const lapack_int* ipiv, double* e); | |||
| lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, double* a, lapack_int lda, | |||
| const lapack_int* ipiv, double* work ); | |||
| const lapack_int* ipiv, double* e ); | |||
| lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int i1, lapack_int i2 ); | |||
| double* a, lapack_int lda, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int i1, lapack_int i2 ); | |||
| double* a, lapack_int lda, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int lda, const lapack_int* ipiv ); | |||
| lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_double* work, lapack_int lwork ); | |||
| double* work, lapack_int lwork ); | |||
| lapack_int LAPACKE_dsytri2x( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int lda, const lapack_int* ipiv, | |||
| lapack_int nb ); | |||
| @@ -10762,20 +10764,22 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| lapack_int ldu2, float* v1t, lapack_int ldv1t, | |||
| float* work, lapack_int lwork, lapack_int* iwork ); | |||
| lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| float* a, lapack_int lda, const lapack_int* ipiv, float* work ); | |||
| float* a, lapack_int lda, const lapack_int* ipiv, float* e ); | |||
| lapack_int LAPACKE_ssyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, float* a, lapack_int lda, | |||
| const lapack_int* ipiv, float* work ); | |||
| const lapack_int* ipiv, float* e ); | |||
| lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| float* a, lapack_int i1, lapack_int i2 ); | |||
| float* a, lapack_int lda, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_int LAPACKE_ssyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| float* a, lapack_int i1, lapack_int i2 ); | |||
| float* a, lapack_int lda, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a, | |||
| lapack_int lda, const lapack_int* ipiv ); | |||
| lapack_int LAPACKE_ssytri2_work( int matrix_layout, char uplo, lapack_int n, | |||
| float* a, lapack_int lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_float* work, lapack_int lwork ); | |||
| float* work, lapack_int lwork ); | |||
| lapack_int LAPACKE_ssytri2x( int matrix_layout, char uplo, lapack_int n, | |||
| float* a, lapack_int lda, const lapack_int* ipiv, | |||
| lapack_int nb ); | |||
| @@ -10813,11 +10817,11 @@ lapack_int LAPACKE_zbbcsd_work( int matrix_layout, char jobu1, char jobu2, | |||
| double* b22d, double* b22e, double* rwork, | |||
| lapack_int lrwork ); | |||
| lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_double* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_zheswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_double* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int lda, | |||
| const lapack_int* ipiv ); | |||
| @@ -10843,17 +10847,17 @@ lapack_int LAPACKE_zhetrs2_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* work ); | |||
| lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| lapack_complex_double* a, lapack_int lda, | |||
| const lapack_int* ipiv, lapack_complex_double* work ); | |||
| const lapack_int* ipiv, lapack_complex_double* e ); | |||
| lapack_int LAPACKE_zsyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, lapack_complex_double* a, | |||
| lapack_int lda, const lapack_int* ipiv, | |||
| lapack_complex_double* work ); | |||
| lapack_complex_double* e ); | |||
| lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_double* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_zsyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int i1, | |||
| lapack_int i2 ); | |||
| lapack_complex_double* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ); | |||
| lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_double* a, lapack_int lda, | |||
| const lapack_int* ipiv ); | |||
| @@ -10931,14 +10935,14 @@ lapack_int LAPACKE_zuncsd2by1( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, lapack_int q, | |||
| lapack_complex_double* x11, lapack_int ldx11, | |||
| lapack_complex_double* x21, lapack_int ldx21, | |||
| lapack_complex_double* theta, lapack_complex_double* u1, | |||
| double* theta, lapack_complex_double* u1, | |||
| lapack_int ldu1, lapack_complex_double* u2, | |||
| lapack_int ldu2, lapack_complex_double* v1t, lapack_int ldv1t ); | |||
| lapack_int LAPACKE_zuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, | |||
| lapack_int q, lapack_complex_double* x11, lapack_int ldx11, | |||
| lapack_complex_double* x21, lapack_int ldx21, | |||
| lapack_complex_double* theta, lapack_complex_double* u1, | |||
| double* theta, lapack_complex_double* u1, | |||
| lapack_int ldu1, lapack_complex_double* u2, | |||
| lapack_int ldu2, lapack_complex_double* v1t, | |||
| lapack_int ldv1t, lapack_complex_double* work, | |||
| @@ -11243,7 +11247,7 @@ lapack_int LAPACKE_stprfb_work( int matrix_layout, char side, char trans, | |||
| lapack_int n, lapack_int k, lapack_int l, | |||
| const float* v, lapack_int ldv, const float* t, | |||
| lapack_int ldt, float* a, lapack_int lda, | |||
| float* b, lapack_int ldb, const float* work, | |||
| float* b, lapack_int ldb, float* work, | |||
| lapack_int ldwork ); | |||
| lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans, | |||
| char direct, char storev, lapack_int m, | |||
| @@ -11251,7 +11255,7 @@ lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans, | |||
| const double* v, lapack_int ldv, | |||
| const double* t, lapack_int ldt, double* a, | |||
| lapack_int lda, double* b, lapack_int ldb, | |||
| const double* work, lapack_int ldwork ); | |||
| double* work, lapack_int ldwork ); | |||
| lapack_int LAPACKE_ctprfb_work( int matrix_layout, char side, char trans, | |||
| char direct, char storev, lapack_int m, | |||
| lapack_int n, lapack_int k, lapack_int l, | |||
| @@ -11417,9 +11421,9 @@ lapack_int LAPACKE_zsyr_work( int matrix_layout, char uplo, lapack_int n, | |||
| const lapack_complex_double* x, | |||
| lapack_int incx, lapack_complex_double* a, | |||
| lapack_int lda ); | |||
| void LAPACKE_ilaver( const lapack_int* vers_major, | |||
| const lapack_int* vers_minor, | |||
| const lapack_int* vers_patch ); | |||
| void LAPACKE_ilaver( lapack_int* vers_major, | |||
| lapack_int* vers_minor, | |||
| lapack_int* vers_patch ); | |||
| #define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF) | |||
| @@ -14784,13 +14788,13 @@ void LAPACK_dbdsdc( char* uplo, char* compq, lapack_int* n, double* d, | |||
| lapack_int* iwork, lapack_int *info ); | |||
| void LAPACK_sbdsvdx( char* uplo, char* jobz, char* range, | |||
| lapack_int* n, float* d, float* e, | |||
| lapack_int* vl, lapack_int* vu, | |||
| float* vl, float* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, | |||
| float* s, float* z, lapack_int* ldz, | |||
| float* work, lapack_int *iwork, lapack_int *info ); | |||
| void LAPACK_dbdsvdx( char* uplo, char* jobz, char* range, | |||
| lapack_int* n, double* d, double* e, | |||
| lapack_int* vl, lapack_int* vu, | |||
| double* vl, double* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, | |||
| double* s, double* z, lapack_int* ldz, | |||
| double* work, lapack_int *iwork, lapack_int *info ); | |||
| @@ -16115,24 +16119,24 @@ void LAPACK_zgesvd( char* jobu, char* jobvt, lapack_int* m, lapack_int* n, | |||
| lapack_complex_double* work, lapack_int* lwork, | |||
| double* rwork, lapack_int *info ); | |||
| void LAPACK_sgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, | |||
| float* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, | |||
| float* a, lapack_int* lda, float* vl, float* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, float* s, float* u, | |||
| lapack_int* ldu, float* vt, lapack_int* ldvt, float* work, | |||
| lapack_int* lwork, lapack_int *iwork, lapack_int *info ); | |||
| void LAPACK_dgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, | |||
| double* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, | |||
| double* a, lapack_int* lda, double* vl, double* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, double* s, double* u, | |||
| lapack_int* ldu, double* vt, lapack_int* ldvt, double* work, | |||
| lapack_int* lwork, lapack_int *iwork, lapack_int *info ); | |||
| void LAPACK_cgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, | |||
| lapack_complex_float* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, | |||
| lapack_complex_float* a, lapack_int* lda, float* vl, float* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, float* s, | |||
| lapack_complex_float* u, lapack_int* ldu, | |||
| lapack_complex_float* vt, lapack_int* ldvt, | |||
| lapack_complex_float* work, lapack_int* lwork, float* rwork, | |||
| lapack_int *iwork, lapack_int *info ); | |||
| void LAPACK_zgesvdx( char* jobu, char* jobvt, char* range, lapack_int* m, lapack_int* n, | |||
| lapack_complex_double* a, lapack_int* lda, lapack_int* vl, lapack_int* vu, | |||
| lapack_complex_double* a, lapack_int* lda, double* vl, double* vu, | |||
| lapack_int* il, lapack_int* iu, lapack_int* ns, double* s, | |||
| lapack_complex_double* u, lapack_int* ldu, | |||
| lapack_complex_double* vt, lapack_int* ldvt, | |||
| @@ -17060,9 +17064,8 @@ void LAPACK_cbbcsd( char* jobu1, char* jobu2, | |||
| float* b12e, float* b21d, float* b21e, | |||
| float* b22d, float* b22e, float* rwork, | |||
| lapack_int* lrwork , lapack_int *info ); | |||
| void LAPACK_cheswapr( char* uplo, lapack_int* n, | |||
| lapack_complex_float* a, lapack_int* i1, | |||
| lapack_int* i2 ); | |||
| void LAPACK_cheswapr( char* uplo, lapack_int* n, lapack_complex_float* a, | |||
| lapack_int* lda, lapack_int* i1, lapack_int* i2 ); | |||
| void LAPACK_chetri2( char* uplo, lapack_int* n, | |||
| lapack_complex_float* a, lapack_int* lda, | |||
| const lapack_int* ipiv, | |||
| @@ -17079,10 +17082,10 @@ void LAPACK_chetrs2( char* uplo, lapack_int* n, | |||
| void LAPACK_csyconv( char* uplo, char* way, | |||
| lapack_int* n, lapack_complex_float* a, | |||
| lapack_int* lda, const lapack_int* ipiv, | |||
| lapack_complex_float* work , lapack_int *info ); | |||
| lapack_complex_float* e , lapack_int *info ); | |||
| void LAPACK_csyswapr( char* uplo, lapack_int* n, | |||
| lapack_complex_float* a, lapack_int* i1, | |||
| lapack_int* i2 ); | |||
| lapack_complex_float* a, lapack_int* lda, | |||
| lapack_int* i1, lapack_int* i2 ); | |||
| void LAPACK_csytri2( char* uplo, lapack_int* n, | |||
| lapack_complex_float* a, lapack_int* lda, | |||
| const lapack_int* ipiv, | |||
| @@ -17127,7 +17130,7 @@ void LAPACK_cuncsd2by1( char* jobu1, char* jobu2, | |||
| char* jobv1t, lapack_int* m, lapack_int* p, | |||
| lapack_int* q, lapack_complex_float* x11, | |||
| lapack_int* ldx11, lapack_complex_float* x21, | |||
| lapack_int* ldx21, lapack_complex_float* theta, | |||
| lapack_int* ldx21, float* theta, | |||
| lapack_complex_float* u1, lapack_int* ldu1, | |||
| lapack_complex_float* u2, lapack_int* ldu2, | |||
| lapack_complex_float* v1t, lapack_int* ldv1t, | |||
| @@ -17173,13 +17176,13 @@ void LAPACK_dorcsd2by1( char* jobu1, char* jobu2, | |||
| lapack_int* iwork , lapack_int *info ); | |||
| void LAPACK_dsyconv( char* uplo, char* way, | |||
| lapack_int* n, double* a, lapack_int* lda, | |||
| const lapack_int* ipiv, double* work , lapack_int *info ); | |||
| void LAPACK_dsyswapr( char* uplo, lapack_int* n, | |||
| double* a, lapack_int* i1, lapack_int* i2 ); | |||
| const lapack_int* ipiv, double* e , lapack_int *info ); | |||
| void LAPACK_dsyswapr( char* uplo, lapack_int* n, double* a, | |||
| lapack_int* lda, lapack_int* i1, lapack_int* i2 ); | |||
| void LAPACK_dsytri2( char* uplo, lapack_int* n, | |||
| double* a, lapack_int* lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_double* work, lapack_int* lwork , lapack_int *info ); | |||
| double* work, lapack_int* lwork , lapack_int *info ); | |||
| void LAPACK_dsytri2x( char* uplo, lapack_int* n, | |||
| double* a, lapack_int* lda, | |||
| const lapack_int* ipiv, double* work, | |||
| @@ -17227,13 +17230,13 @@ void LAPACK_sorcsd2by1( char* jobu1, char* jobu2, | |||
| lapack_int* iwork , lapack_int *info ); | |||
| void LAPACK_ssyconv( char* uplo, char* way, | |||
| lapack_int* n, float* a, lapack_int* lda, | |||
| const lapack_int* ipiv, float* work , lapack_int *info ); | |||
| void LAPACK_ssyswapr( char* uplo, lapack_int* n, | |||
| float* a, lapack_int* i1, lapack_int* i2 ); | |||
| const lapack_int* ipiv, float* e , lapack_int *info ); | |||
| void LAPACK_ssyswapr( char* uplo, lapack_int* n, float* a, | |||
| lapack_int* lda, lapack_int* i1, lapack_int* i2 ); | |||
| void LAPACK_ssytri2( char* uplo, lapack_int* n, | |||
| float* a, lapack_int* lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_float* work, lapack_int* lwork , lapack_int *info ); | |||
| float* work, lapack_int* lwork , lapack_int *info ); | |||
| void LAPACK_ssytri2x( char* uplo, lapack_int* n, | |||
| float* a, lapack_int* lda, | |||
| const lapack_int* ipiv, float* work, | |||
| @@ -17254,9 +17257,8 @@ void LAPACK_zbbcsd( char* jobu1, char* jobu2, | |||
| double* b12e, double* b21d, double* b21e, | |||
| double* b22d, double* b22e, double* rwork, | |||
| lapack_int* lrwork , lapack_int *info ); | |||
| void LAPACK_zheswapr( char* uplo, lapack_int* n, | |||
| lapack_complex_double* a, lapack_int* i1, | |||
| lapack_int* i2 ); | |||
| void LAPACK_zheswapr( char* uplo, lapack_int* n, lapack_complex_double* a, | |||
| lapack_int* lda, lapack_int* i1, lapack_int* i2 ); | |||
| void LAPACK_zhetri2( char* uplo, lapack_int* n, | |||
| lapack_complex_double* a, lapack_int* lda, | |||
| const lapack_int* ipiv, | |||
| @@ -17274,9 +17276,9 @@ void LAPACK_zhetrs2( char* uplo, lapack_int* n, | |||
| void LAPACK_zsyconv( char* uplo, char* way, | |||
| lapack_int* n, lapack_complex_double* a, | |||
| lapack_int* lda, const lapack_int* ipiv, | |||
| lapack_complex_double* work , lapack_int *info ); | |||
| void LAPACK_zsyswapr( char* uplo, lapack_int* n, | |||
| lapack_complex_double* a, lapack_int* i1, | |||
| lapack_complex_double* e , lapack_int *info ); | |||
| void LAPACK_zsyswapr( char* uplo, lapack_int* n, lapack_complex_double* a, | |||
| lapack_int* lda, lapack_int* i1, | |||
| lapack_int* i2 ); | |||
| void LAPACK_zsytri2( char* uplo, lapack_int* n, | |||
| lapack_complex_double* a, lapack_int* lda, | |||
| @@ -17323,7 +17325,7 @@ void LAPACK_zuncsd2by1( char* jobu1, char* jobu2, | |||
| char* jobv1t, lapack_int* m, lapack_int* p, | |||
| lapack_int* q, lapack_complex_double* x11, | |||
| lapack_int* ldx11, lapack_complex_double* x21, | |||
| lapack_int* ldx21, lapack_complex_double* theta, | |||
| lapack_int* ldx21, double* theta, | |||
| lapack_complex_double* u1, lapack_int* ldu1, | |||
| lapack_complex_double* u2, lapack_int* ldu2, | |||
| lapack_complex_double* v1t, lapack_int* ldv1t, | |||
| @@ -34,13 +34,6 @@ | |||
| #ifndef _LAPACKE_CONFIG_H_ | |||
| #define _LAPACKE_CONFIG_H_ | |||
| // For Android prior to API 21 (no <complex> include) | |||
| #if defined(__ANDROID__) | |||
| #if __ANDROID_API__ < 21 | |||
| #define LAPACK_COMPLEX_STRUCTURE | |||
| #endif | |||
| #endif | |||
| #ifdef __cplusplus | |||
| #if defined(LAPACK_COMPLEX_CPP) | |||
| #include <complex> | |||
| @@ -0,0 +1,17 @@ | |||
| #ifndef LAPACK_HEADER_INCLUDED | |||
| #define LAPACK_HEADER_INCLUDED | |||
| #ifndef LAPACK_GLOBAL | |||
| #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) | |||
| #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ | |||
| #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) | |||
| #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME | |||
| #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) | |||
| #define LAPACK_GLOBAL(lcname,UCNAME) lcname | |||
| #else | |||
| #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ | |||
| #endif | |||
| #endif | |||
| #endif | |||
| @@ -34,7 +34,7 @@ | |||
| # | |||
| include ../../make.inc | |||
| SRC_OBJA = \ | |||
| SRC_OBJ = \ | |||
| lapacke_cbbcsd.o \ | |||
| lapacke_cbbcsd_work.o \ | |||
| lapacke_cbdsqr.o \ | |||
| @@ -996,9 +996,7 @@ lapacke_dsytri2.o \ | |||
| lapacke_dsytri2_work.o \ | |||
| lapacke_dsytri2x.o \ | |||
| lapacke_dsytri2x_work.o \ | |||
| lapacke_dsytri_work.o | |||
| SRC_OBJB = \ | |||
| lapacke_dsytri_work.o \ | |||
| lapacke_dsytrs.o \ | |||
| lapacke_dsytrs_rook.o \ | |||
| lapacke_dsytrs2.o \ | |||
| @@ -2191,8 +2189,7 @@ lapacke_slagsy_work.o \ | |||
| lapacke_zlagsy.o \ | |||
| lapacke_zlagsy_work.o | |||
| ALLOBJA = $(SRC_OBJA) | |||
| ALLOBJB = $(SRC_OBJB) $(MATGEN_OBJ) | |||
| ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ) | |||
| ifdef USEXBLAS | |||
| ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) | |||
| @@ -2206,9 +2203,8 @@ OBJ_FILES := $(C_FILES:.o=.o) | |||
| all: ../../$(LAPACKELIB) | |||
| ../../$(LAPACKELIB): $(ALLOBJA) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED) | |||
| $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJA) | |||
| $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED) | |||
| ../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) | |||
| $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) | |||
| $(RANLIB) ../../$(LAPACKELIB) | |||
| .c.o: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -119,7 +119,7 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && | |||
| ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && | |||
| ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : | |||
| 1 )))))))); | |||
| 7 )))))))); | |||
| lapack_int* iwork = NULL; | |||
| float* rwork = NULL; | |||
| lapack_complex_float* cwork = NULL; | |||
| @@ -136,30 +136,29 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nu, n, u, ldu ) ) { | |||
| return -13; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nv, n, v, ldv ) ) { | |||
| return -15; | |||
| } | |||
| } | |||
| #endif | |||
| /* Allocate memory for working array(s) */ | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+2*n) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| lwork = MAX( lwork, 1 ); | |||
| { /* FIXUP LWORK */ | |||
| int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ); | |||
| int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ); | |||
| int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' ); | |||
| if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 2*n+1 ); // 1.1 | |||
| if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+3*n ); // 1.2 | |||
| if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 5*n+2*n*n ); // 4.1 | |||
| if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX( lwork, 4*n+n*n ); // 4.2 | |||
| } | |||
| cwork = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); | |||
| if( cwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| } | |||
| lrwork = MAX3( lrwork, 7, n+2*m ); | |||
| rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork ); | |||
| if( rwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,7 +46,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a, | |||
| &lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lwork, | |||
| &lda, sva, u, &ldu, v, &ldv, cwork, &lwork, rwork, &lrwork, | |||
| iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| @@ -54,6 +54,8 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; | |||
| lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 : | |||
| LAPACKE_lsame( jobu, 'f' ) ? m : n; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nu); | |||
| lapack_int ldv_t = MAX(1,nv); | |||
| @@ -66,7 +68,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| LAPACKE_xerbla( "LAPACKE_cgejsv_work", info ); | |||
| return info; | |||
| } | |||
| if( ldu < n ) { | |||
| if( ldu < ncols_u ) { | |||
| info = -14; | |||
| LAPACKE_xerbla( "LAPACKE_cgejsv_work", info ); | |||
| return info; | |||
| @@ -86,7 +88,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| u_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,n) ); | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| @@ -103,14 +105,6 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_cge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| LAPACKE_cge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t ); | |||
| } | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, | |||
| &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, cwork, &lwork, | |||
| @@ -121,7 +115,7 @@ lapack_int LAPACKE_cgejsv_work( int matrix_layout, char joba, char jobu, | |||
| /* Transpose output matrices */ | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cgemqrt | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -40,6 +40,7 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans, | |||
| lapack_int ldt, lapack_complex_float* c, | |||
| lapack_int ldc ) | |||
| { | |||
| lapack_int nrows_v; | |||
| lapack_int info = 0; | |||
| lapack_complex_float* work = NULL; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -48,13 +49,15 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) { | |||
| return -12; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) { | |||
| return -8; | |||
| } | |||
| #endif | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, lapack_complex_float* u, lapack_int ldu, | |||
| lapack_complex_float* vt, lapack_int ldvt, | |||
| lapack_int* superb ) | |||
| @@ -44,9 +44,9 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range | |||
| lapack_int info = 0; | |||
| lapack_int lwork = -1; | |||
| lapack_complex_float* work = NULL; | |||
| lapack_complex_float work_query; | |||
| lapack_complex_float work_query; | |||
| float* rwork = NULL; | |||
| lapack_int lrwork = MIN(m,n)*(MIN(m,n)*2+15*MIN(m,n)); | |||
| lapack_int lrwork = MAX(1, MIN(m,n)*(MIN(m,n)*2+15*MIN(m,n))); | |||
| lapack_int* iwork = NULL; | |||
| lapack_int i; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -68,18 +68,18 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range | |||
| } | |||
| lwork = LAPACK_C2INT (work_query); | |||
| /* Allocate memory for work arrays */ | |||
| rwork = (float*)LAPACKE_malloc( sizeof(float) * lwork ); | |||
| if( work == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| work = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lrwork ); | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); | |||
| if( work == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); | |||
| rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork ); | |||
| if( rwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_2; | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, lapack_complex_float* u, lapack_int ldu, | |||
| lapack_complex_float* vt, lapack_int ldvt, | |||
| lapack_complex_float* work, lapack_int lwork, | |||
| @@ -46,21 +46,23 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu, vt, &ldvt, | |||
| &il, &iu, ns, s, u, &ldu, vt, &ldvt, | |||
| work, &lwork, rwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || | |||
| LAPACKE_lsame( jobu, 's' ) ) ? m : 1; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : | |||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | |||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nrows_u); | |||
| lapack_int ldvt_t = MAX(1,nrows_vt); | |||
| lapack_complex_float* a_t = NULL; | |||
| lapack_complex_float* u_t = NULL; | |||
| lapack_complex_float* vt_t = NULL; | |||
| @@ -75,7 +77,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info ); | |||
| return info; | |||
| } | |||
| if( ldvt < n ) { | |||
| if( ldvt < ncols_vt ) { | |||
| info = -18; | |||
| LAPACKE_xerbla( "LAPACKE_cgesvdx_work", info ); | |||
| return info; | |||
| @@ -83,7 +85,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| &il, &iu, ns, s, u, &ldu_t, vt, | |||
| &ldvt_t, work, &lwork, rwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -94,7 +96,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| u_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| @@ -102,7 +104,7 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| goto exit_level_1; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| vt_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * ldvt_t * MAX(1,n) ); | |||
| if( vt_t == NULL ) { | |||
| @@ -113,28 +115,28 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Transpose input matrices */ | |||
| LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, | |||
| &il, &iu, ns, s, u_t, &ldu_t, vt_t, | |||
| &ldvt_t, work, &lwork, rwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, | |||
| u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, | |||
| ldvt ); | |||
| } | |||
| /* Release memory and exit */ | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_free( vt_t ); | |||
| } | |||
| exit_level_2: | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_free( u_t ); | |||
| } | |||
| exit_level_1: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -52,8 +52,8 @@ lapack_int LAPACKE_cgesvj( int matrix_layout, char joba, char jobu, char jobv, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0); | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -7; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -50,8 +50,8 @@ lapack_int LAPACKE_cgesvj_work( int matrix_layout, char joba, char jobu, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0); | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldv_t = MAX(1,nrows_v); | |||
| lapack_complex_float* a_t = NULL; | |||
| @@ -93,9 +93,9 @@ lapack_int LAPACKE_cggsvd3_work( int matrix_layout, char jobu, char jobv, | |||
| } | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, | |||
| &lda_t, b_t, &ldb_t, alpha, beta, u_t, &ldu_t, | |||
| v_t, &ldv_t, q_t, &ldq_t, work, &lwork, rwork, | |||
| LAPACK_cggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, | |||
| &lda_t, b, &ldb_t, alpha, beta, u, &ldu_t, | |||
| v, &ldv_t, q, &ldq_t, work, &lwork, rwork, | |||
| iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -87,16 +87,16 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| if( ldv < m ) { | |||
| if( ldv < p ) { | |||
| info = -19; | |||
| LAPACKE_xerbla( "LAPACKE_cggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, | |||
| &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, &ldv_t, | |||
| q_t, &ldq_t, iwork, rwork, tau, work, &lwork, &info ); | |||
| LAPACK_cggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b, | |||
| &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v, &ldv_t, | |||
| q, &ldq_t, iwork, rwork, tau, work, &lwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| @@ -124,7 +124,7 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| v_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * | |||
| ldv_t * MAX(1,m) ); | |||
| ldv_t * MAX(1,p) ); | |||
| if( v_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_3; | |||
| @@ -156,7 +156,7 @@ lapack_int LAPACKE_cggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv ); | |||
| } | |||
| if( LAPACKE_lsame( jobq, 'q' ) ) { | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function chbtrd | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -49,7 +49,7 @@ lapack_int LAPACKE_chbtrd( int matrix_layout, char vect, char uplo, lapack_int n | |||
| if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { | |||
| return -6; | |||
| } | |||
| if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { | |||
| if( LAPACKE_lsame( vect, 'u' ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) { | |||
| return -10; | |||
| } | |||
| @@ -28,14 +28,14 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cheswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ) | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ) | |||
| { | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| LAPACKE_xerbla( "LAPACKE_cheswapr", -1 ); | |||
| @@ -43,9 +43,9 @@ lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, n ) ) { | |||
| if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||
| return -4; | |||
| } | |||
| #endif | |||
| return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, i1, i2 ); | |||
| return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 ); | |||
| } | |||
| @@ -28,38 +28,39 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cheswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_cheswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ) | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cheswapr( &uplo, &n, a, &i1, &i2 ); | |||
| LAPACK_cheswapr( &uplo, &n, a, &lda, &i1, &i2 ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,n); | |||
| lapack_complex_float* a_t = NULL; | |||
| /* Allocate memory for temporary array(s) */ | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) ); | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) ); | |||
| if( a_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_che_trans( matrix_layout, uplo, n, a, n, a_t, n ); | |||
| LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cheswapr( &uplo, &n, a_t, &i1, &i2 ); | |||
| LAPACK_cheswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 ); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| /* Transpose output matrices */ | |||
| LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); | |||
| LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function chetri2x | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -45,7 +45,7 @@ lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||
| return -4; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function clantr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function slaswp | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,50 +46,64 @@ lapack_int LAPACKE_clascl( int matrix_layout, char type, lapack_int kl, | |||
| /* Optionally check input matrices for NaNs */ | |||
| switch (type) { | |||
| case 'G': | |||
| if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'L': | |||
| // TYPE = 'L' - lower triangular matrix. | |||
| if( LAPACKE_ctr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'L' - lower triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_cgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'U': | |||
| // TYPE = 'U' - upper triangular matrix | |||
| if( LAPACKE_ctr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'U' - upper triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_cgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'H': | |||
| // TYPE = 'H' - upper Hessenberg matrix | |||
| if( LAPACKE_chs_nancheck( matrix_layout, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| // TYPE = 'H' - part of upper Hessenberg matrix in general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_cgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_cgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| case 'B': | |||
| // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the lower | |||
| // half stored. | |||
| if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the upper | |||
| // half stored. | |||
| if( LAPACKE_chb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'B' - lower part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_chb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_chb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Z': | |||
| // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper | |||
| // bandwidth KU. See DGBTRF for storage details. | |||
| if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { | |||
| return -6; | |||
| } | |||
| // TYPE = 'Z' - band matrix laid out for ?GBTRF | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function slaswp | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,7 +46,10 @@ lapack_int LAPACKE_clascl_work( int matrix_layout, char type, lapack_int kl, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,lda); | |||
| lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 : | |||
| LAPACKE_lsame(type, 'q') ? ku + 1 : | |||
| LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m; | |||
| lapack_int lda_t = MAX(1,nrows_a); | |||
| lapack_complex_float* a_t = NULL; | |||
| /* Check leading dimension(s) */ | |||
| if( lda < n ) { | |||
| @@ -62,12 +65,14 @@ lapack_int LAPACKE_clascl_work( int matrix_layout, char type, lapack_int kl, | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); | |||
| LAPACKE_cge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_clascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); | |||
| LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cstedc | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -58,7 +58,7 @@ lapack_int LAPACKE_cstedc( int matrix_layout, char compz, lapack_int n, float* d | |||
| if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { | |||
| return -5; | |||
| } | |||
| if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) { | |||
| return -6; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function csteqr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -52,7 +52,7 @@ lapack_int LAPACKE_csteqr( int matrix_layout, char compz, lapack_int n, float* d | |||
| if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { | |||
| return -5; | |||
| } | |||
| if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) { | |||
| return -6; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function csyconv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -36,7 +36,7 @@ | |||
| lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| lapack_complex_float* a, lapack_int lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_float* work ) | |||
| lapack_complex_float* e ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -45,13 +45,13 @@ lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||
| return -5; | |||
| } | |||
| #endif | |||
| /* Call middle-level interface */ | |||
| info = LAPACKE_csyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv, | |||
| work ); | |||
| e ); | |||
| exit_level_0: | |||
| if( info == LAPACK_WORK_MEMORY_ERROR ) { | |||
| LAPACKE_xerbla( "LAPACKE_csyconv", info ); | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function csyconv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -36,12 +36,12 @@ | |||
| lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, lapack_complex_float* a, | |||
| lapack_int lda, const lapack_int* ipiv, | |||
| lapack_complex_float* work ) | |||
| lapack_complex_float* e ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_csyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info ); | |||
| LAPACK_csyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| @@ -64,7 +64,7 @@ lapack_int LAPACKE_csyconv_work( int matrix_layout, char uplo, char way, | |||
| /* Transpose input matrices */ | |||
| LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_csyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info ); | |||
| LAPACK_csyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| @@ -28,14 +28,14 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function csyswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ) | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ) | |||
| { | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| LAPACKE_xerbla( "LAPACKE_csyswapr", -1 ); | |||
| @@ -43,9 +43,9 @@ lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, n ) ) { | |||
| if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||
| return -4; | |||
| } | |||
| #endif | |||
| return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, i1, i2 ); | |||
| return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 ); | |||
| } | |||
| @@ -28,38 +28,39 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function csyswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_csyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| lapack_complex_float* a, lapack_int i1, | |||
| lapack_int i2 ) | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_csyswapr( &uplo, &n, a, &i1, &i2 ); | |||
| LAPACK_csyswapr( &uplo, &n, a, &lda, &i1, &i2 ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,n); | |||
| lapack_complex_float* a_t = NULL; | |||
| /* Allocate memory for temporary array(s) */ | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * n * MAX(1,n) ); | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) ); | |||
| if( a_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_csy_trans( matrix_layout, uplo, n, a, n, a_t, n ); | |||
| LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_csyswapr( &uplo, &n, a_t, &i1, &i2 ); | |||
| LAPACK_csyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 ); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| /* Transpose output matrices */ | |||
| LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); | |||
| LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function ctpmqrt | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -41,6 +41,8 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans, | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_complex_float* b, lapack_int ldb ) | |||
| { | |||
| lapack_int ncols_a, nrows_a; | |||
| lapack_int nrows_v; | |||
| lapack_int info = 0; | |||
| lapack_complex_float* work = NULL; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -49,16 +51,22 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) { | |||
| ncols_a = LAPACKE_lsame( side, 'L' ) ? n : | |||
| ( LAPACKE_lsame( side, 'R' ) ? k : 0 ); | |||
| nrows_a = LAPACKE_lsame( side, 'L' ) ? k : | |||
| ( LAPACKE_lsame( side, 'R' ) ? m : 0 ); | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) { | |||
| return -13; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) { | |||
| return -15; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) { | |||
| return -11; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) { | |||
| return -9; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function ctprfb | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -41,6 +41,7 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct | |||
| lapack_complex_float* a, lapack_int lda, | |||
| lapack_complex_float* b, lapack_int ldb ) | |||
| { | |||
| lapack_int ncols_v, nrows_v; | |||
| lapack_int info = 0; | |||
| lapack_int ldwork; | |||
| lapack_int work_size; | |||
| @@ -51,16 +52,28 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_lsame( storev, 'C' ) ) { | |||
| ncols_v = k; | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| } else if( LAPACKE_lsame( storev, 'R' ) ) { | |||
| ncols_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| nrows_v = k; | |||
| } else { | |||
| ncols_v = 0; | |||
| nrows_v = 0; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) { | |||
| return -14; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) { | |||
| return -16; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldt, k, t, ldt ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) { | |||
| return -12; | |||
| } | |||
| if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) { | |||
| return -10; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function cuncsd2by1 | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -37,7 +37,7 @@ lapack_int LAPACKE_cuncsd2by1( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, lapack_int q, | |||
| lapack_complex_float* x11, lapack_int ldx11, | |||
| lapack_complex_float* x21, lapack_int ldx21, | |||
| lapack_complex_float* theta, lapack_complex_float* u1, | |||
| float* theta, lapack_complex_float* u1, | |||
| lapack_int ldu1, lapack_complex_float* u2, | |||
| lapack_int ldu2, lapack_complex_float* v1t, lapack_int ldv1t ) | |||
| { | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cuncsd2by1 | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -37,7 +37,7 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| char jobv1t, lapack_int m, lapack_int p, | |||
| lapack_int q, lapack_complex_float* x11, lapack_int ldx11, | |||
| lapack_complex_float* x21, lapack_int ldx21, | |||
| lapack_complex_float* theta, lapack_complex_float* u1, | |||
| float* theta, lapack_complex_float* u1, | |||
| lapack_int ldu1, lapack_complex_float* u2, | |||
| lapack_int ldu2, lapack_complex_float* v1t, | |||
| lapack_int ldv1t, lapack_complex_float* work, | |||
| @@ -99,8 +99,8 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lrwork == -1 || lwork == -1 ) { | |||
| LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11, &ldx11_t, x21, &ldx21_t, | |||
| theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, | |||
| work, &lwork, rwork, &lrwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -146,8 +146,8 @@ lapack_int LAPACKE_cuncsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| ldx21_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_cuncsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11_t, &ldx11_t, x21_t, &ldx21_t, | |||
| theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t, | |||
| work, &lwork, rwork, &lrwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cunmbr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -73,9 +73,11 @@ lapack_int LAPACKE_cunmbr_work( int matrix_layout, char vect, char side, | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * | |||
| lda_t * MAX(1,MIN(nq,k)) ); | |||
| if( LAPACKE_lsame( vect, 'q' ) ) { | |||
| a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) ); | |||
| } else { | |||
| a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,nq) ); | |||
| } | |||
| if( a_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function cunmlq | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -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; | |||
| @@ -73,8 +74,13 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans, | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) ); | |||
| if( LAPACKE_lsame( side, 'l' ) ) { | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,m) ); | |||
| } else { | |||
| a_t = (lapack_complex_float*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) ); | |||
| } | |||
| if( a_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| @@ -28,20 +28,20 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dbdsvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, double* d, double* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* z, lapack_int ldz, | |||
| lapack_int* superb ) | |||
| { | |||
| lapack_int info = 0; | |||
| lapack_int lwork = 14*n; | |||
| lapack_int lwork = MAX(14*n,1); | |||
| double* work = NULL; | |||
| lapack_int* iwork = NULL; | |||
| lapack_int i; | |||
| @@ -54,7 +54,7 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| if( LAPACKE_d_nancheck( n, d, 1 ) ) { | |||
| return -6; | |||
| } | |||
| if( LAPACKE_d_nancheck( n, e, 1 ) ) { | |||
| if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) { | |||
| return -7; | |||
| } | |||
| #endif | |||
| @@ -64,14 +64,14 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*n) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(12*n,1) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| } | |||
| /* Call middle-level interface */ | |||
| info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz, range, | |||
| n, d, e, vl, vu, il, iu, ns, s, z, | |||
| n, d, e, vl, vu, il, iu, ns, s, z, | |||
| ldz, work, iwork); | |||
| /* Backup significant data from working array(s) */ | |||
| for( i=0; i<12*n-1; i++ ) { | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dbdsvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, double* d, double* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* z, lapack_int ldz, | |||
| double* work, lapack_int* iwork ) | |||
| { | |||
| @@ -44,25 +44,27 @@ lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char r | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, | |||
| &il, &iu, &ns, s, z, &ldz, | |||
| &il, &iu, ns, s, z, &ldz, | |||
| work, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? MAX(2, 2*n) : 1; | |||
| lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? 2*n : 0; | |||
| lapack_int ncols_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(0,iu - il + 1) : n + 1 ) : 0; | |||
| lapack_int ldz_t = MAX(1,nrows_z); | |||
| double* z_t = NULL; | |||
| /* Check leading dimension(s) */ | |||
| if( ldz < nrows_z ) { | |||
| if( ldz < ncols_z ) { | |||
| info = -3; | |||
| LAPACKE_xerbla( "LAPACKE_dbdsvdx_work", info ); | |||
| return info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| z_t = (double*) | |||
| LAPACKE_malloc( sizeof(double) * ldz_t * 2*n ); | |||
| LAPACKE_malloc( sizeof(double) * ldz_t * MAX(2*n,1) ); | |||
| if( z_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| @@ -70,17 +72,17 @@ lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char r | |||
| } | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, | |||
| &il, &iu, &ns, s, z_t, &ldz_t, work, | |||
| &il, &iu, ns, s, z_t, &ldz_t, work, | |||
| iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz); | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz); | |||
| } | |||
| /* Release memory and exit */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| LAPACKE_free( z_t ); | |||
| } | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -70,7 +70,7 @@ lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| ( LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'j' ) ) && | |||
| LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) : | |||
| 1) ) ) ) ) ); | |||
| 7) ) ) ) ) ); | |||
| lapack_int* iwork = NULL; | |||
| double* work = NULL; | |||
| lapack_int i; | |||
| @@ -86,25 +86,25 @@ lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nu, n, u, ldu ) ) { | |||
| return -13; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nv, n, v, ldv ) ) { | |||
| return -15; | |||
| } | |||
| } | |||
| #endif | |||
| /* Allocate memory for working array(s) */ | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+3*n) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| lwork = MAX3( lwork, 7, 2*m+n ); | |||
| { /* FIXUP LWORK */ | |||
| int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ); | |||
| int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ); | |||
| int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' ); | |||
| if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 4*n+1 ); // 1.1 | |||
| if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+4*n ); // 1.2 | |||
| if( !want_u && want_v ) lwork = MAX( lwork, 4*n+1 ); // 2 | |||
| if( want_u && !want_v ) lwork = MAX( lwork, 4*n+1 ); // 3 | |||
| if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 6*n+2*n*n ); // 4.1 | |||
| if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX3( lwork, 4*n+n*n, 2*n+n*n+6 ); // 4.2 | |||
| } | |||
| work = (double*)LAPACKE_malloc( sizeof(double) * lwork ); | |||
| if( work == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -53,6 +53,8 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; | |||
| lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 : | |||
| LAPACKE_lsame( jobu, 'f' ) ? m : n; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nu); | |||
| lapack_int ldv_t = MAX(1,nv); | |||
| @@ -65,7 +67,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu, | |||
| LAPACKE_xerbla( "LAPACKE_dgejsv_work", info ); | |||
| return info; | |||
| } | |||
| if( ldu < n ) { | |||
| if( ldu < ncols_u ) { | |||
| info = -14; | |||
| LAPACKE_xerbla( "LAPACKE_dgejsv_work", info ); | |||
| return info; | |||
| @@ -83,7 +85,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,n) ); | |||
| u_t = (double*)LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| @@ -99,14 +101,6 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_dge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| LAPACKE_dge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t ); | |||
| } | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, | |||
| &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork, | |||
| @@ -117,7 +111,7 @@ lapack_int LAPACKE_dgejsv_work( int matrix_layout, char joba, char jobu, | |||
| /* Transpose output matrices */ | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dgemqrt | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -39,6 +39,7 @@ lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans, | |||
| const double* t, lapack_int ldt, double* c, | |||
| lapack_int ldc ) | |||
| { | |||
| lapack_int nrows_v; | |||
| lapack_int info = 0; | |||
| double* work = NULL; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -47,13 +48,15 @@ lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { | |||
| return -12; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) { | |||
| return -8; | |||
| } | |||
| #endif | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* u, lapack_int ldu, | |||
| double* vt, lapack_int ldvt, | |||
| lapack_int* superb ) | |||
| @@ -71,7 +71,7 @@ lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, double* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, double vl, double vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| double* s, double* u, lapack_int ldu, | |||
| double* vt, lapack_int ldvt, | |||
| double* work, lapack_int lwork, lapack_int* iwork ) | |||
| @@ -45,21 +45,23 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu, vt, &ldvt, | |||
| &il, &iu, ns, s, u, &ldu, vt, &ldvt, | |||
| work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || | |||
| LAPACKE_lsame( jobu, 's' ) ) ? m : 1; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : | |||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | |||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nrows_u); | |||
| lapack_int ldvt_t = MAX(1,nrows_vt); | |||
| double* a_t = NULL; | |||
| double* u_t = NULL; | |||
| double* vt_t = NULL; | |||
| @@ -74,7 +76,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info ); | |||
| return info; | |||
| } | |||
| if( ldvt < n ) { | |||
| if( ldvt < ncols_vt ) { | |||
| info = -18; | |||
| LAPACKE_xerbla( "LAPACKE_dgesvdx_work", info ); | |||
| return info; | |||
| @@ -82,7 +84,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| &il, &iu, ns, s, u, &ldu_t, vt, | |||
| &ldvt_t, work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -92,7 +94,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| u_t = (double*) | |||
| LAPACKE_malloc( sizeof(double) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| @@ -100,7 +102,7 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| goto exit_level_1; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| vt_t = (double*) | |||
| LAPACKE_malloc( sizeof(double) * ldvt_t * MAX(1,n) ); | |||
| if( vt_t == NULL ) { | |||
| @@ -111,28 +113,28 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Transpose input matrices */ | |||
| LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, | |||
| &il, &iu, ns, s, u_t, &ldu_t, vt_t, | |||
| &ldvt_t, work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, | |||
| u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, | |||
| ldvt ); | |||
| } | |||
| /* Release memory and exit */ | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_free( vt_t ); | |||
| } | |||
| exit_level_2: | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_free( u_t ); | |||
| } | |||
| exit_level_1: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -49,8 +49,8 @@ lapack_int LAPACKE_dgesvj( int matrix_layout, char joba, char jobu, char jobv, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0); | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -7; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -48,8 +48,8 @@ lapack_int LAPACKE_dgesvj_work( int matrix_layout, char joba, char jobu, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0); | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldv_t = MAX(1,nrows_v); | |||
| double* a_t = NULL; | |||
| @@ -91,9 +91,9 @@ lapack_int LAPACKE_dggsvd3_work( int matrix_layout, char jobu, char jobv, | |||
| } | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, | |||
| b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, | |||
| q_t, &ldq_t, work, &lwork, iwork, &info ); | |||
| LAPACK_dggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t, | |||
| b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t, | |||
| q, &ldq_t, work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| @@ -84,15 +84,15 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| if( ldv < m ) { | |||
| if( ldv < p ) { | |||
| info = -19; | |||
| LAPACKE_xerbla( "LAPACKE_dggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| if( lwork == -1 ) { | |||
| LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, | |||
| &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, v_t, | |||
| &ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork, | |||
| LAPACK_dggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b, | |||
| &ldb_t, &tola, &tolb, k, l, u, &ldu_t, v, | |||
| &ldv_t, q, &ldq_t, iwork, tau, work, &lwork, | |||
| &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -115,7 +115,7 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,m) ); | |||
| v_t = (double*)LAPACKE_malloc( sizeof(double) * ldv_t * MAX(1,p) ); | |||
| if( v_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_3; | |||
| @@ -145,7 +145,7 @@ lapack_int LAPACKE_dggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv ); | |||
| } | |||
| if( LAPACKE_lsame( jobq, 'q' ) ) { | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dlantr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dlantr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dlaswp | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,50 +46,64 @@ lapack_int LAPACKE_dlascl( int matrix_layout, char type, lapack_int kl, | |||
| /* Optionally check input matrices for NaNs */ | |||
| switch (type) { | |||
| case 'G': | |||
| if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'L': | |||
| // TYPE = 'L' - lower triangular matrix. | |||
| if( LAPACKE_dtr_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'L' - lower triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_dgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'U': | |||
| // TYPE = 'U' - upper triangular matrix | |||
| if( LAPACKE_dtr_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'U' - upper triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_dgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'H': | |||
| // TYPE = 'H' - upper Hessenberg matrix | |||
| if( LAPACKE_dhs_nancheck( matrix_layout, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| // TYPE = 'H' - part of upper Hessenberg matrix in general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_dgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_dgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| case 'B': | |||
| // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the lower | |||
| // half stored. | |||
| if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the upper | |||
| // half stored. | |||
| if( LAPACKE_dsb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'B' - lower part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_dsb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_dsb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Z': | |||
| // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper | |||
| // bandwidth KU. See DGBTRF for storage details. | |||
| if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { | |||
| return -6; | |||
| } | |||
| // TYPE = 'Z' - band matrix laid out for ?GBTRF | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dlaswp | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,7 +46,10 @@ lapack_int LAPACKE_dlascl_work( int matrix_layout, char type, lapack_int kl, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,lda); | |||
| lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 : | |||
| LAPACKE_lsame(type, 'q') ? ku + 1 : | |||
| LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m; | |||
| lapack_int lda_t = MAX(1,nrows_a); | |||
| double* a_t = NULL; | |||
| /* Check leading dimension(s) */ | |||
| if( lda < n ) { | |||
| @@ -61,12 +64,14 @@ lapack_int LAPACKE_dlascl_work( int matrix_layout, char type, lapack_int kl, | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); | |||
| LAPACKE_dge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dlascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); | |||
| LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dorcsd2by1 | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -97,8 +97,8 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11, &ldx11_t, x21, &ldx21_t, | |||
| theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, | |||
| work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -144,8 +144,8 @@ lapack_int LAPACKE_dorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| ldx21_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11_t, &ldx11_t, x21_t, &ldx21_t, | |||
| theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t, | |||
| work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dormbr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dormlq | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dsbtrd | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -48,7 +48,7 @@ lapack_int LAPACKE_dsbtrd( int matrix_layout, char vect, char uplo, lapack_int n | |||
| if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { | |||
| return -6; | |||
| } | |||
| if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { | |||
| if( LAPACKE_lsame( vect, 'u' ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) { | |||
| return -10; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dstedc | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -55,7 +55,7 @@ lapack_int LAPACKE_dstedc( int matrix_layout, char compz, lapack_int n, | |||
| if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { | |||
| return -5; | |||
| } | |||
| if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) { | |||
| return -6; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dsteqr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -52,7 +52,7 @@ lapack_int LAPACKE_dsteqr( int matrix_layout, char compz, lapack_int n, | |||
| if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { | |||
| return -5; | |||
| } | |||
| if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) { | |||
| return -6; | |||
| } | |||
| @@ -28,13 +28,13 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dsyconv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n, | |||
| double* a, lapack_int lda, const lapack_int* ipiv, double* work ) | |||
| double* a, lapack_int lda, const lapack_int* ipiv, double* e ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -43,14 +43,14 @@ lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) { | |||
| return -5; | |||
| } | |||
| #endif | |||
| /* Call middle-level interface */ | |||
| info = LAPACKE_dsyconv_work( matrix_layout, uplo, way, n, a, lda, ipiv, | |||
| work ); | |||
| e ); | |||
| exit_level_0: | |||
| if( info == LAPACK_WORK_MEMORY_ERROR ) { | |||
| LAPACKE_xerbla( "LAPACKE_dsyconv", info ); | |||
| @@ -28,19 +28,19 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dsyconv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way, | |||
| lapack_int n, double* a, lapack_int lda, | |||
| const lapack_int* ipiv, double* work ) | |||
| const lapack_int* ipiv, double* e ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dsyconv( &uplo, &way, &n, a, &lda, ipiv, work, &info ); | |||
| LAPACK_dsyconv( &uplo, &way, &n, a, &lda, ipiv, e, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| @@ -62,7 +62,7 @@ lapack_int LAPACKE_dsyconv_work( int matrix_layout, char uplo, char way, | |||
| /* Transpose input matrices */ | |||
| LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, work, &info ); | |||
| LAPACK_dsyconv( &uplo, &way, &n, a_t, &lda_t, ipiv, e, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| @@ -28,13 +28,13 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dsyswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int i1, lapack_int i2 ) | |||
| double* a, lapack_int lda, lapack_int i1, lapack_int i2 ) | |||
| { | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| LAPACKE_xerbla( "LAPACKE_dsyswapr", -1 ); | |||
| @@ -42,9 +42,9 @@ lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, n ) ) { | |||
| if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { | |||
| return -4; | |||
| } | |||
| #endif | |||
| return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, i1, i2 ); | |||
| return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 ); | |||
| } | |||
| @@ -28,36 +28,38 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dsyswapr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_dsyswapr_work( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int i1, lapack_int i2 ) | |||
| double* a, lapack_int lda, | |||
| lapack_int i1, lapack_int i2 ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dsyswapr( &uplo, &n, a, &i1, &i2 ); | |||
| LAPACK_dsyswapr( &uplo, &n, a, &lda, &i1, &i2 ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,n); | |||
| double* a_t = NULL; | |||
| /* Allocate memory for temporary array(s) */ | |||
| a_t = (double*)LAPACKE_malloc( sizeof(double) * n * MAX(1,n) ); | |||
| a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) ); | |||
| if( a_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_dsy_trans( matrix_layout, uplo, n, a, n, a_t, n ); | |||
| LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_dsyswapr( &uplo, &n, a_t, &i1, &i2 ); | |||
| LAPACK_dsyswapr( &uplo, &n, a_t, &lda_t, &i1, &i2 ); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| /* Transpose output matrices */ | |||
| LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, n, a, n ); | |||
| LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dsytri2 | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -38,8 +38,8 @@ lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n, | |||
| { | |||
| lapack_int info = 0; | |||
| lapack_int lwork = -1; | |||
| lapack_complex_double* work = NULL; | |||
| lapack_complex_double work_query; | |||
| double* work = NULL; | |||
| double work_query; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| LAPACKE_xerbla( "LAPACKE_dsytri2", -1 ); | |||
| return -1; | |||
| @@ -58,8 +58,8 @@ lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n, | |||
| } | |||
| lwork = LAPACK_Z2INT( work_query ); | |||
| /* Allocate memory for work arrays */ | |||
| work = (lapack_complex_double*) | |||
| LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); | |||
| work = (double*) | |||
| LAPACKE_malloc( sizeof(double) * lwork ); | |||
| if( work == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dsytri2 | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -36,7 +36,7 @@ | |||
| lapack_int LAPACKE_dsytri2_work( int matrix_layout, char uplo, lapack_int n, | |||
| double* a, lapack_int lda, | |||
| const lapack_int* ipiv, | |||
| lapack_complex_double* work, lapack_int lwork ) | |||
| double* work, lapack_int lwork ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dtpmqrt | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -40,6 +40,8 @@ lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans, | |||
| double* a, lapack_int lda, double* b, | |||
| lapack_int ldb ) | |||
| { | |||
| lapack_int ncols_a, nrows_a; | |||
| lapack_int nrows_v; | |||
| lapack_int info = 0; | |||
| double* work = NULL; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -48,16 +50,22 @@ lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) { | |||
| ncols_a = LAPACKE_lsame( side, 'L' ) ? n : | |||
| ( LAPACKE_lsame( side, 'R' ) ? k : 0 ); | |||
| nrows_a = LAPACKE_lsame( side, 'L' ) ? k : | |||
| ( LAPACKE_lsame( side, 'R' ) ? m : 0 ); | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) { | |||
| return -13; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) { | |||
| return -15; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nb, k, t, ldt ) ) { | |||
| return -11; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) { | |||
| return -9; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dtprfb | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -39,6 +39,7 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct | |||
| lapack_int ldv, const double* t, lapack_int ldt, | |||
| double* a, lapack_int lda, double* b, lapack_int ldb ) | |||
| { | |||
| lapack_int ncols_v, nrows_v; | |||
| lapack_int info = 0; | |||
| lapack_int ldwork; | |||
| lapack_int work_size; | |||
| @@ -49,16 +50,28 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| if( LAPACKE_lsame( storev, 'C' ) ) { | |||
| ncols_v = k; | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| } else if( LAPACKE_lsame( storev, 'R' ) ) { | |||
| ncols_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| nrows_v = k; | |||
| } else { | |||
| ncols_v = 0; | |||
| nrows_v = 0; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) { | |||
| return -14; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) { | |||
| return -16; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldt, k, t, ldt ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) { | |||
| return -12; | |||
| } | |||
| if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) { | |||
| return -10; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function dtprfb | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -39,7 +39,7 @@ lapack_int LAPACKE_dtprfb_work( int matrix_layout, char side, char trans, | |||
| const double* v, lapack_int ldv, | |||
| const double* t, lapack_int ldt, double* a, | |||
| lapack_int lda, double* b, lapack_int ldb, | |||
| const double* work, lapack_int ldwork ) | |||
| double* work, lapack_int ldwork ) | |||
| { | |||
| lapack_int info = 0; | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| @@ -28,14 +28,14 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function dgesv | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| void LAPACKE_ilaver( const lapack_int* vers_major, | |||
| const lapack_int* vers_minor, | |||
| const lapack_int* vers_patch ) | |||
| void LAPACKE_ilaver( lapack_int* vers_major, | |||
| lapack_int* vers_minor, | |||
| lapack_int* vers_patch ) | |||
| { | |||
| /* Call LAPACK function */ | |||
| LAPACK_ilaver( vers_major, vers_minor, vers_patch ); | |||
| @@ -28,20 +28,20 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sbdsvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, float* d, float* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* z, lapack_int ldz, | |||
| lapack_int* superb ) | |||
| { | |||
| lapack_int info = 0; | |||
| lapack_int lwork = 14*n; | |||
| lapack_int lwork = MAX(14*n,1); | |||
| float* work = NULL; | |||
| lapack_int* iwork = NULL; | |||
| lapack_int i; | |||
| @@ -54,7 +54,7 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| if( LAPACKE_s_nancheck( n, d, 1 ) ) { | |||
| return -6; | |||
| } | |||
| if( LAPACKE_s_nancheck( n, e, 1 ) ) { | |||
| if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) { | |||
| return -7; | |||
| } | |||
| #endif | |||
| @@ -64,14 +64,14 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range, | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*n) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(12*n,1) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| } | |||
| /* Call middle-level interface */ | |||
| info = LAPACKE_sbdsvdx_work( matrix_layout, uplo, jobz, range, | |||
| n, d, e, vl, vu, il, iu, ns, s, z, | |||
| n, d, e, vl, vu, il, iu, ns, s, z, | |||
| ldz, work, iwork); | |||
| /* Backup significant data from working array(s) */ | |||
| for( i=0; i<12*n-1; i++ ) { | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sbdsvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, | |||
| lapack_int n, float* d, float* e, | |||
| lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* z, lapack_int ldz, | |||
| float* work, lapack_int* iwork ) | |||
| { | |||
| @@ -44,25 +44,27 @@ lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char r | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, | |||
| &il, &iu, &ns, s, z, &ldz, | |||
| &il, &iu, ns, s, z, &ldz, | |||
| work, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? MAX(2, 2*n) : 1; | |||
| lapack_int nrows_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? 2*n : 0; | |||
| lapack_int ncols_z = ( LAPACKE_lsame( jobz, 'v' ) ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(0,iu - il + 1) : n + 1 ) : 0; | |||
| lapack_int ldz_t = MAX(1,nrows_z); | |||
| float* z_t = NULL; | |||
| /* Check leading dimension(s) */ | |||
| if( ldz < nrows_z ) { | |||
| if( ldz < ncols_z ) { | |||
| info = -3; | |||
| LAPACKE_xerbla( "LAPACKE_sbdsvdx_work", info ); | |||
| return info; | |||
| } | |||
| /* Allocate memory for temporary array(s) */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| z_t = (float*) | |||
| LAPACKE_malloc( sizeof(float) * ldz_t * 2*n ); | |||
| LAPACKE_malloc( sizeof(float) * ldz_t * MAX(2*n,1) ); | |||
| if( z_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| @@ -70,17 +72,17 @@ lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char r | |||
| } | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, | |||
| &il, &iu, &ns, s, z_t, &ldz_t, work, | |||
| &il, &iu, ns, s, z_t, &ldz_t, work, | |||
| iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, nrows_z, z_t, ldz_t, z, ldz); | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_z, ncols_z, z_t, ldz_t, z, ldz); | |||
| } | |||
| /* Release memory and exit */ | |||
| if( LAPACKE_lsame( jobz, 'n' ) ) { | |||
| if( LAPACKE_lsame( jobz, 'v' ) ) { | |||
| LAPACKE_free( z_t ); | |||
| } | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -70,7 +70,7 @@ lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| ( LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'j' ) ) && | |||
| LAPACKE_lsame( jobv, 'j' ) ? MAX(7,m+3*n+n*n) : | |||
| 1) ) ) ) ) ); | |||
| 7) ) ) ) ) ); | |||
| lapack_int* iwork = NULL; | |||
| float* work = NULL; | |||
| lapack_int i; | |||
| @@ -86,25 +86,25 @@ lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv, | |||
| if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, nu, n, u, ldu ) ) { | |||
| return -13; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, nv, n, v, ldv ) ) { | |||
| return -15; | |||
| } | |||
| } | |||
| #endif | |||
| /* Allocate memory for working array(s) */ | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m+3*n) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(3,m+3*n) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| lwork = MAX3( lwork, 7, 2*m+n ); | |||
| { /* FIXUP LWORK */ | |||
| int want_u = LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ); | |||
| int want_v = LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ); | |||
| int want_sce = LAPACKE_lsame( joba, 'e' ) || LAPACKE_lsame( joba, 'g' ); | |||
| if( !want_u && !want_v && !want_sce ) lwork = MAX( lwork, 4*n+1 ); // 1.1 | |||
| if( !want_u && !want_v && want_sce ) lwork = MAX( lwork, n*n+4*n ); // 1.2 | |||
| if( !want_u && want_v ) lwork = MAX( lwork, 4*n+1 ); // 2 | |||
| if( want_u && !want_v ) lwork = MAX( lwork, 4*n+1 ); // 3 | |||
| if( want_u && LAPACKE_lsame( jobv, 'v' ) ) lwork = MAX( lwork, 6*n+2*n*n ); // 4.1 | |||
| if( want_u && LAPACKE_lsame( jobv, 'j' ) ) lwork = MAX3( lwork, 4*n+n*n, 2*n+n*n+6 ); // 4.2 | |||
| } | |||
| work = (float*)LAPACKE_malloc( sizeof(float) * lwork ); | |||
| if( work == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sgejsv | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -53,6 +53,8 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m; | |||
| lapack_int nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'n' ) ? 1 : | |||
| LAPACKE_lsame( jobu, 'f' ) ? m : n; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nu); | |||
| lapack_int ldv_t = MAX(1,nv); | |||
| @@ -65,7 +67,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu, | |||
| LAPACKE_xerbla( "LAPACKE_sgejsv_work", info ); | |||
| return info; | |||
| } | |||
| if( ldu < n ) { | |||
| if( ldu < ncols_u ) { | |||
| info = -14; | |||
| LAPACKE_xerbla( "LAPACKE_sgejsv_work", info ); | |||
| return info; | |||
| @@ -83,7 +85,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,n) ); | |||
| u_t = (float*)LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| @@ -99,14 +101,6 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu, | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_sge_trans( matrix_layout, nu, n, u, ldu, u_t, ldu_t ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| LAPACKE_sge_trans( matrix_layout, nv, n, v, ldv, v_t, ldv_t ); | |||
| } | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sgejsv( &joba, &jobu, &jobv, &jobr, &jobt, &jobp, &m, &n, a_t, | |||
| &lda_t, sva, u_t, &ldu_t, v_t, &ldv_t, work, &lwork, | |||
| @@ -117,7 +111,7 @@ lapack_int LAPACKE_sgejsv_work( int matrix_layout, char joba, char jobu, | |||
| /* Transpose output matrices */ | |||
| if( LAPACKE_lsame( jobu, 'f' ) || LAPACKE_lsame( jobu, 'u' ) || | |||
| LAPACKE_lsame( jobu, 'w' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nu, n, u_t, ldu_t, u, ldu ); | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nu, ncols_u, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'j' ) || LAPACKE_lsame( jobv, 'v' ) || | |||
| LAPACKE_lsame( jobv, 'w' ) ) { | |||
| @@ -28,7 +28,7 @@ | |||
| ****************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sgemqrt | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -39,6 +39,7 @@ lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans, | |||
| const float* t, lapack_int ldt, float* c, | |||
| lapack_int ldc ) | |||
| { | |||
| lapack_int nrows_v; | |||
| lapack_int info = 0; | |||
| float* work = NULL; | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -47,13 +48,15 @@ lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( side, 'L' ) ? m : | |||
| ( LAPACKE_lsame( side, 'R' ) ? n : 0 ); | |||
| if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { | |||
| return -12; | |||
| } | |||
| if( LAPACKE_sge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) { | |||
| return -10; | |||
| } | |||
| if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) { | |||
| return -8; | |||
| } | |||
| #endif | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* u, lapack_int ldu, | |||
| float* vt, lapack_int ldvt, | |||
| lapack_int* superb ) | |||
| @@ -71,7 +71,7 @@ lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * (12*MIN(m,n)) ); | |||
| iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,(12*MIN(m,n))) ); | |||
| if( iwork == NULL ) { | |||
| info = LAPACK_WORK_MEMORY_ERROR; | |||
| goto exit_level_1; | |||
| @@ -28,15 +28,15 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sgesvdx | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int lda, lapack_int vl, lapack_int vu, | |||
| lapack_int il, lapack_int iu, lapack_int ns, | |||
| lapack_int lda, float vl, float vu, | |||
| lapack_int il, lapack_int iu, lapack_int* ns, | |||
| float* s, float* u, lapack_int ldu, | |||
| float* vt, lapack_int ldvt, | |||
| float* work, lapack_int lwork, lapack_int* iwork ) | |||
| @@ -45,21 +45,23 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| if( matrix_layout == LAPACK_COL_MAJOR ) { | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu, vt, &ldvt, | |||
| &il, &iu, ns, s, u, &ldu, vt, &ldvt, | |||
| work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_u = ( LAPACKE_lsame( jobu, 'a' ) || | |||
| LAPACKE_lsame( jobu, 's' ) ) ? m : 1; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'a' ) ? m : | |||
| ( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n : | |||
| ( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1); | |||
| lapack_int nrows_u = LAPACKE_lsame( jobu, 'v' ) ? m : 0; | |||
| lapack_int ncols_u = LAPACKE_lsame( jobu, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'v' ) ? | |||
| ( LAPACKE_lsame( range, 'i' ) ? MAX(iu - il + 1, 0) : MIN(m,n)) : 0; | |||
| lapack_int ncols_vt = LAPACKE_lsame( jobvt, 'v' ) ? n : 0; | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldu_t = MAX(1,nrows_u); | |||
| lapack_int ldvt_t = MAX(1,nrows_vt); | |||
| float* a_t = NULL; | |||
| float* u_t = NULL; | |||
| float* vt_t = NULL; | |||
| @@ -74,7 +76,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info ); | |||
| return info; | |||
| } | |||
| if( ldvt < n ) { | |||
| if( ldvt < ncols_vt ) { | |||
| info = -18; | |||
| LAPACKE_xerbla( "LAPACKE_sgesvdx_work", info ); | |||
| return info; | |||
| @@ -82,7 +84,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| &il, &iu, ns, s, u, &ldu_t, vt, | |||
| &ldvt_t, work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -92,7 +94,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_0; | |||
| } | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| u_t = (float*) | |||
| LAPACKE_malloc( sizeof(float) * ldu_t * MAX(1,ncols_u) ); | |||
| if( u_t == NULL ) { | |||
| @@ -100,7 +102,7 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| goto exit_level_1; | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| vt_t = (float*) | |||
| LAPACKE_malloc( sizeof(float) * ldvt_t * MAX(1,n) ); | |||
| if( vt_t == NULL ) { | |||
| @@ -111,28 +113,28 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char | |||
| /* Transpose input matrices */ | |||
| LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, | |||
| &il, &iu, &ns, s, u, &ldu_t, vt, | |||
| LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, | |||
| &il, &iu, ns, s, u_t, &ldu_t, vt_t, | |||
| &ldvt_t, work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, n, a_t, lda_t, a, lda ); | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u, ncols_u, u_t, ldu_t, | |||
| u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_vt, n, vt_t, ldvt_t, vt, | |||
| ldvt ); | |||
| } | |||
| /* Release memory and exit */ | |||
| if( LAPACKE_lsame( jobvt, 'a' ) || LAPACKE_lsame( jobvt, 's' ) ) { | |||
| if( LAPACKE_lsame( jobvt, 'v' ) ) { | |||
| LAPACKE_free( vt_t ); | |||
| } | |||
| exit_level_2: | |||
| if( LAPACKE_lsame( jobu, 'a' ) || LAPACKE_lsame( jobu, 's' ) ) { | |||
| if( LAPACKE_lsame( jobu, 'v' ) ) { | |||
| LAPACKE_free( u_t ); | |||
| } | |||
| exit_level_1: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -49,8 +49,8 @@ lapack_int LAPACKE_sgesvj( int matrix_layout, char joba, char jobu, char jobv, | |||
| } | |||
| #ifndef LAPACK_DISABLE_NAN_CHECK | |||
| /* Optionally check input matrices for NaNs */ | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0 ); | |||
| if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -7; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sgesvj | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -48,8 +48,8 @@ lapack_int LAPACKE_sgesvj_work( int matrix_layout, char joba, char jobu, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? n : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? mv : 1); | |||
| lapack_int nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) : | |||
| ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0); | |||
| lapack_int lda_t = MAX(1,m); | |||
| lapack_int ldv_t = MAX(1,nrows_v); | |||
| float* a_t = NULL; | |||
| @@ -91,9 +91,9 @@ lapack_int LAPACKE_sggsvd3_work( int matrix_layout, char jobu, char jobv, | |||
| } | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a_t, &lda_t, | |||
| b_t, &ldb_t, alpha, beta, u_t, &ldu_t, v_t, &ldv_t, | |||
| q_t, &ldq_t, work, &lwork, iwork, &info ); | |||
| LAPACK_sggsvd3( &jobu, &jobv, &jobq, &m, &n, &p, k, l, a, &lda_t, | |||
| b, &ldb_t, alpha, beta, u, &ldu_t, v, &ldv_t, | |||
| q, &ldq_t, work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -84,16 +84,16 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| if( ldv < m ) { | |||
| if( ldv < p ) { | |||
| info = -19; | |||
| LAPACKE_xerbla( "LAPACKE_sggsvp3_work", info ); | |||
| return info; | |||
| } | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a_t, &lda_t, b_t, | |||
| &ldb_t, &tola, &tolb, k, l, u_t, &ldu_t, | |||
| v_t, &ldv_t, q_t, &ldq_t, iwork, tau, work, &lwork, | |||
| LAPACK_sggsvp3( &jobu, &jobv, &jobq, &m, &p, &n, a, &lda_t, b, | |||
| &ldb_t, &tola, &tolb, k, l, u, &ldu_t, | |||
| v, &ldv_t, q, &ldq_t, iwork, tau, work, &lwork, | |||
| &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -116,7 +116,7 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| } | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,m) ); | |||
| v_t = (float*)LAPACKE_malloc( sizeof(float) * ldv_t * MAX(1,p) ); | |||
| if( v_t == NULL ) { | |||
| info = LAPACK_TRANSPOSE_MEMORY_ERROR; | |||
| goto exit_level_3; | |||
| @@ -146,7 +146,7 @@ lapack_int LAPACKE_sggsvp3_work( int matrix_layout, char jobu, char jobv, | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, m, m, u_t, ldu_t, u, ldu ); | |||
| } | |||
| if( LAPACKE_lsame( jobv, 'v' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, m, v_t, ldv_t, v, ldv ); | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, p, p, v_t, ldv_t, v, ldv ); | |||
| } | |||
| if( LAPACKE_lsame( jobq, 'q' ) ) { | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, q_t, ldq_t, q, ldq ); | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function slantr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function slantr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,14 +28,14 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function slaswp | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl, | |||
| lapack_int ku, float cfrom, float cto, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int ku, float cfrom, float cto, | |||
| lapack_int m, lapack_int n, float* a, | |||
| lapack_int lda ) | |||
| { | |||
| if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { | |||
| @@ -46,50 +46,64 @@ lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl, | |||
| /* Optionally check input matrices for NaNs */ | |||
| switch (type) { | |||
| case 'G': | |||
| if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'L': | |||
| // TYPE = 'L' - lower triangular matrix. | |||
| if( LAPACKE_str_nancheck( matrix_layout, 'L', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'L' - lower triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_sgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'U': | |||
| // TYPE = 'U' - upper triangular matrix | |||
| if( LAPACKE_str_nancheck( matrix_layout, 'U', 'N', n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'U' - upper triangle of general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_sgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'H': | |||
| // TYPE = 'H' - upper Hessenberg matrix | |||
| if( LAPACKE_shs_nancheck( matrix_layout, n, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| // TYPE = 'H' - part of upper Hessenberg matrix in general matrix | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_sgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_sgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) { | |||
| return -9; | |||
| } | |||
| case 'B': | |||
| // TYPE = 'B' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the lower | |||
| // half stored. | |||
| if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - A is a symmetric band matrix with lower bandwidth KL | |||
| // and upper bandwidth KU and with the only the upper | |||
| // half stored. | |||
| if( LAPACKE_ssb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| // TYPE = 'B' - lower part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_ssb_nancheck( matrix_layout, 'L', n, kl, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Q': | |||
| // TYPE = 'Q' - upper part of symmetric band matrix (assume m==n) | |||
| if( LAPACKE_ssb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| case 'Z': | |||
| // TYPE = 'Z' - A is a band matrix with lower bandwidth KL and upper | |||
| // bandwidth KU. See DGBTRF for storage details. | |||
| if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, a, lda ) ) { | |||
| return -6; | |||
| } | |||
| // TYPE = 'Z' - band matrix laid out for ?GBTRF | |||
| if( matrix_layout == LAPACK_COL_MAJOR && | |||
| LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| if( matrix_layout == LAPACK_ROW_MAJOR && | |||
| LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) { | |||
| return -9; | |||
| } | |||
| break; | |||
| } | |||
| #endif | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function slaswp | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -46,7 +46,10 @@ lapack_int LAPACKE_slascl_work( int matrix_layout, char type, lapack_int kl, | |||
| info = info - 1; | |||
| } | |||
| } else if( matrix_layout == LAPACK_ROW_MAJOR ) { | |||
| lapack_int lda_t = MAX(1,lda); | |||
| lapack_int nrows_a = LAPACKE_lsame(type, 'b') ? kl + 1 : | |||
| LAPACKE_lsame(type, 'q') ? ku + 1 : | |||
| LAPACKE_lsame(type, 'z') ? 2 * kl + ku + 1 : m; | |||
| lapack_int lda_t = MAX(1,nrows_a); | |||
| float* a_t = NULL; | |||
| /* Check leading dimension(s) */ | |||
| if( lda < n ) { | |||
| @@ -61,12 +64,14 @@ lapack_int LAPACKE_slascl_work( int matrix_layout, char type, lapack_int kl, | |||
| goto exit_level_0; | |||
| } | |||
| /* Transpose input matrices */ | |||
| LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); | |||
| LAPACKE_sge_trans( matrix_layout, nrows_a, n, a, lda, a_t, lda_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_slascl( &type, &kl, &ku, &cfrom, &cto, &m, &n, a_t, &lda_t, &info); | |||
| info = 0; /* LAPACK call is ok! */ | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| } | |||
| /* Transpose output matrices */ | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); | |||
| LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_a, n, a_t, lda_t, a, lda ); | |||
| /* Release memory and exit */ | |||
| LAPACKE_free( a_t ); | |||
| exit_level_0: | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sorcsd2by1 | |||
| * Author: Intel Corporation | |||
| * Generated November, 2011 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -97,8 +97,8 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| /* Query optimal working array(s) size if requested */ | |||
| if( lwork == -1 ) { | |||
| LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11, &ldx11_t, x21, &ldx21_t, | |||
| theta, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, | |||
| work, &lwork, iwork, &info ); | |||
| return (info < 0) ? (info - 1) : info; | |||
| } | |||
| @@ -144,8 +144,8 @@ lapack_int LAPACKE_sorcsd2by1_work( int matrix_layout, char jobu1, char jobu2, | |||
| ldx21_t ); | |||
| /* Call LAPACK function and adjust info */ | |||
| LAPACK_sorcsd2by1( &jobu1, &jobu2, &jobv1t, &m, &p, | |||
| &q, x11, &ldx11, x21, &ldx21, | |||
| theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, | |||
| &q, x11_t, &ldx11_t, x21_t, &ldx21_t, | |||
| theta, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, &ldv1t_t, | |||
| work, &lwork, iwork, &info ); | |||
| if( info < 0 ) { | |||
| info = info - 1; | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sormbr | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native middle-level C interface to LAPACK function sormlq | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function ssbtrd | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -48,7 +48,7 @@ lapack_int LAPACKE_ssbtrd( int matrix_layout, char vect, char uplo, lapack_int n | |||
| if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) { | |||
| return -6; | |||
| } | |||
| if( LAPACKE_lsame( vect, 'u' ) || LAPACKE_lsame( vect, 'v' ) ) { | |||
| if( LAPACKE_lsame( vect, 'u' ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) { | |||
| return -10; | |||
| } | |||
| @@ -28,7 +28,7 @@ | |||
| ***************************************************************************** | |||
| * Contents: Native high-level C interface to LAPACK function sstedc | |||
| * Author: Intel Corporation | |||
| * Generated November 2015 | |||
| * Generated June 2016 | |||
| *****************************************************************************/ | |||
| #include "lapacke_utils.h" | |||
| @@ -55,7 +55,7 @@ lapack_int LAPACKE_sstedc( int matrix_layout, char compz, lapack_int n, float* d | |||
| if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { | |||
| return -5; | |||
| } | |||
| if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_lsame( compz, 'v' ) ) { | |||
| if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) { | |||
| return -6; | |||
| } | |||