Update LAPACK to 3.8.0
authormartin <martin@xenopus.fritz.box>
Thu, 23 Nov 2017 17:13:35 +0000 (18:13 +0100)
committermartin <martin@xenopus.fritz.box>
Thu, 23 Nov 2017 17:13:35 +0000 (18:13 +0100)
2092 files changed:
Makefile
exports/gensymbol
lapack-netlib/.gitignore [new file with mode: 0644]
lapack-netlib/.travis.yml [new file with mode: 0644]
lapack-netlib/BLAS/CMakeLists.txt
lapack-netlib/BLAS/Makefile [new file with mode: 0644]
lapack-netlib/BLAS/SRC/CMakeLists.txt
lapack-netlib/BLAS/SRC/Makefile
lapack-netlib/BLAS/SRC/caxpy.f
lapack-netlib/BLAS/SRC/ccopy.f
lapack-netlib/BLAS/SRC/cdotc.f
lapack-netlib/BLAS/SRC/cdotu.f
lapack-netlib/BLAS/SRC/cgbmv.f
lapack-netlib/BLAS/SRC/cgemm.f
lapack-netlib/BLAS/SRC/cgemv.f
lapack-netlib/BLAS/SRC/cgerc.f
lapack-netlib/BLAS/SRC/cgeru.f
lapack-netlib/BLAS/SRC/chbmv.f
lapack-netlib/BLAS/SRC/chemm.f
lapack-netlib/BLAS/SRC/chemv.f
lapack-netlib/BLAS/SRC/cher.f
lapack-netlib/BLAS/SRC/cher2.f
lapack-netlib/BLAS/SRC/cher2k.f
lapack-netlib/BLAS/SRC/cherk.f
lapack-netlib/BLAS/SRC/chpmv.f
lapack-netlib/BLAS/SRC/chpr.f
lapack-netlib/BLAS/SRC/chpr2.f
lapack-netlib/BLAS/SRC/crotg.f
lapack-netlib/BLAS/SRC/cscal.f
lapack-netlib/BLAS/SRC/csscal.f
lapack-netlib/BLAS/SRC/cswap.f
lapack-netlib/BLAS/SRC/csymm.f
lapack-netlib/BLAS/SRC/csyr2k.f
lapack-netlib/BLAS/SRC/csyrk.f
lapack-netlib/BLAS/SRC/ctbmv.f
lapack-netlib/BLAS/SRC/ctbsv.f
lapack-netlib/BLAS/SRC/ctpmv.f
lapack-netlib/BLAS/SRC/ctpsv.f
lapack-netlib/BLAS/SRC/ctrmm.f
lapack-netlib/BLAS/SRC/ctrmv.f
lapack-netlib/BLAS/SRC/ctrsm.f
lapack-netlib/BLAS/SRC/ctrsv.f
lapack-netlib/BLAS/SRC/dasum.f
lapack-netlib/BLAS/SRC/daxpy.f
lapack-netlib/BLAS/SRC/dcabs1.f
lapack-netlib/BLAS/SRC/dcopy.f
lapack-netlib/BLAS/SRC/ddot.f
lapack-netlib/BLAS/SRC/dgbmv.f
lapack-netlib/BLAS/SRC/dgemm.f
lapack-netlib/BLAS/SRC/dgemv.f
lapack-netlib/BLAS/SRC/dger.f
lapack-netlib/BLAS/SRC/dnrm2.f
lapack-netlib/BLAS/SRC/drot.f
lapack-netlib/BLAS/SRC/drotg.f
lapack-netlib/BLAS/SRC/drotm.f
lapack-netlib/BLAS/SRC/drotmg.f
lapack-netlib/BLAS/SRC/dsbmv.f
lapack-netlib/BLAS/SRC/dscal.f
lapack-netlib/BLAS/SRC/dspmv.f
lapack-netlib/BLAS/SRC/dspr.f
lapack-netlib/BLAS/SRC/dspr2.f
lapack-netlib/BLAS/SRC/dswap.f
lapack-netlib/BLAS/SRC/dsymm.f
lapack-netlib/BLAS/SRC/dsymv.f
lapack-netlib/BLAS/SRC/dsyr.f
lapack-netlib/BLAS/SRC/dsyr2.f
lapack-netlib/BLAS/SRC/dsyr2k.f
lapack-netlib/BLAS/SRC/dsyrk.f
lapack-netlib/BLAS/SRC/dtbmv.f
lapack-netlib/BLAS/SRC/dtbsv.f
lapack-netlib/BLAS/SRC/dtpmv.f
lapack-netlib/BLAS/SRC/dtpsv.f
lapack-netlib/BLAS/SRC/dtrmm.f
lapack-netlib/BLAS/SRC/dtrmv.f
lapack-netlib/BLAS/SRC/dtrsm.f
lapack-netlib/BLAS/SRC/dtrsv.f
lapack-netlib/BLAS/SRC/dzasum.f
lapack-netlib/BLAS/SRC/dznrm2.f
lapack-netlib/BLAS/SRC/icamax.f
lapack-netlib/BLAS/SRC/idamax.f
lapack-netlib/BLAS/SRC/isamax.f
lapack-netlib/BLAS/SRC/izamax.f
lapack-netlib/BLAS/SRC/sasum.f
lapack-netlib/BLAS/SRC/saxpy.f
lapack-netlib/BLAS/SRC/scabs1.f
lapack-netlib/BLAS/SRC/scasum.f
lapack-netlib/BLAS/SRC/scnrm2.f
lapack-netlib/BLAS/SRC/scopy.f
lapack-netlib/BLAS/SRC/sdot.f
lapack-netlib/BLAS/SRC/sdsdot.f
lapack-netlib/BLAS/SRC/sgbmv.f
lapack-netlib/BLAS/SRC/sgemm.f
lapack-netlib/BLAS/SRC/sgemv.f
lapack-netlib/BLAS/SRC/sger.f
lapack-netlib/BLAS/SRC/snrm2.f
lapack-netlib/BLAS/SRC/srot.f
lapack-netlib/BLAS/SRC/srotg.f
lapack-netlib/BLAS/SRC/srotm.f
lapack-netlib/BLAS/SRC/srotmg.f
lapack-netlib/BLAS/SRC/ssbmv.f
lapack-netlib/BLAS/SRC/sscal.f
lapack-netlib/BLAS/SRC/sspmv.f
lapack-netlib/BLAS/SRC/sspr.f
lapack-netlib/BLAS/SRC/sspr2.f
lapack-netlib/BLAS/SRC/sswap.f
lapack-netlib/BLAS/SRC/ssymm.f
lapack-netlib/BLAS/SRC/ssymv.f
lapack-netlib/BLAS/SRC/ssyr.f
lapack-netlib/BLAS/SRC/ssyr2.f
lapack-netlib/BLAS/SRC/ssyr2k.f
lapack-netlib/BLAS/SRC/ssyrk.f
lapack-netlib/BLAS/SRC/stbmv.f
lapack-netlib/BLAS/SRC/stbsv.f
lapack-netlib/BLAS/SRC/stpmv.f
lapack-netlib/BLAS/SRC/stpsv.f
lapack-netlib/BLAS/SRC/strmm.f
lapack-netlib/BLAS/SRC/strmv.f
lapack-netlib/BLAS/SRC/strsm.f
lapack-netlib/BLAS/SRC/strsv.f
lapack-netlib/BLAS/SRC/zaxpy.f
lapack-netlib/BLAS/SRC/zcopy.f
lapack-netlib/BLAS/SRC/zdotc.f
lapack-netlib/BLAS/SRC/zdotu.f
lapack-netlib/BLAS/SRC/zdscal.f
lapack-netlib/BLAS/SRC/zgbmv.f
lapack-netlib/BLAS/SRC/zgemm.f
lapack-netlib/BLAS/SRC/zgemv.f
lapack-netlib/BLAS/SRC/zgerc.f
lapack-netlib/BLAS/SRC/zgeru.f
lapack-netlib/BLAS/SRC/zhbmv.f
lapack-netlib/BLAS/SRC/zhemm.f
lapack-netlib/BLAS/SRC/zhemv.f
lapack-netlib/BLAS/SRC/zher.f
lapack-netlib/BLAS/SRC/zher2.f
lapack-netlib/BLAS/SRC/zher2k.f
lapack-netlib/BLAS/SRC/zherk.f
lapack-netlib/BLAS/SRC/zhpmv.f
lapack-netlib/BLAS/SRC/zhpr.f
lapack-netlib/BLAS/SRC/zhpr2.f
lapack-netlib/BLAS/SRC/zrotg.f
lapack-netlib/BLAS/SRC/zscal.f
lapack-netlib/BLAS/SRC/zswap.f
lapack-netlib/BLAS/SRC/zsymm.f
lapack-netlib/BLAS/SRC/zsyr2k.f
lapack-netlib/BLAS/SRC/zsyrk.f
lapack-netlib/BLAS/SRC/ztbmv.f
lapack-netlib/BLAS/SRC/ztbsv.f
lapack-netlib/BLAS/SRC/ztpmv.f
lapack-netlib/BLAS/SRC/ztpsv.f
lapack-netlib/BLAS/SRC/ztrmm.f
lapack-netlib/BLAS/SRC/ztrmv.f
lapack-netlib/BLAS/SRC/ztrsm.f
lapack-netlib/BLAS/SRC/ztrsv.f
lapack-netlib/BLAS/TESTING/CMakeLists.txt
lapack-netlib/BLAS/TESTING/Makeblat1 [deleted file]
lapack-netlib/BLAS/TESTING/Makeblat2 [deleted file]
lapack-netlib/BLAS/TESTING/Makeblat3 [deleted file]
lapack-netlib/BLAS/TESTING/Makefile [new file with mode: 0644]
lapack-netlib/BLAS/TESTING/cblat2.in [moved from lapack-netlib/BLAS/cblat2.in with 100% similarity]
lapack-netlib/BLAS/TESTING/cblat3.in [moved from lapack-netlib/BLAS/cblat3.in with 100% similarity]
lapack-netlib/BLAS/TESTING/dblat1.f
lapack-netlib/BLAS/TESTING/dblat2.in [moved from lapack-netlib/BLAS/dblat2.in with 100% similarity]
lapack-netlib/BLAS/TESTING/dblat3.in [moved from lapack-netlib/BLAS/dblat3.in with 100% similarity]
lapack-netlib/BLAS/TESTING/sblat1.f
lapack-netlib/BLAS/TESTING/sblat2.in [moved from lapack-netlib/BLAS/sblat2.in with 100% similarity]
lapack-netlib/BLAS/TESTING/sblat3.in [moved from lapack-netlib/BLAS/sblat3.in with 100% similarity]
lapack-netlib/BLAS/TESTING/zblat2.in [moved from lapack-netlib/BLAS/zblat2.in with 100% similarity]
lapack-netlib/BLAS/TESTING/zblat3.in [moved from lapack-netlib/BLAS/zblat3.in with 100% similarity]
lapack-netlib/BLAS/blas.pc.in
lapack-netlib/CBLAS/CMakeLists.txt
lapack-netlib/CBLAS/Makefile
lapack-netlib/CBLAS/cblas.pc.in
lapack-netlib/CBLAS/cmake/cblas-config-install.cmake.in
lapack-netlib/CBLAS/examples/CMakeLists.txt
lapack-netlib/CBLAS/examples/Makefile
lapack-netlib/CBLAS/src/CMakeLists.txt
lapack-netlib/CBLAS/src/Makefile
lapack-netlib/CBLAS/testing/CMakeLists.txt
lapack-netlib/CBLAS/testing/Makefile
lapack-netlib/CMAKE/FindGcov.cmake [new file with mode: 0644]
lapack-netlib/CMAKE/Findcodecov.cmake [new file with mode: 0644]
lapack-netlib/CMakeLists.txt
lapack-netlib/DOCS/Doxyfile
lapack-netlib/DOCS/Doxyfile_man
lapack-netlib/DOCS/lawn81.tex
lapack-netlib/INSTALL/LAPACK_version.f
lapack-netlib/INSTALL/Makefile
lapack-netlib/INSTALL/dsecndtst.f
lapack-netlib/INSTALL/ilaver.f
lapack-netlib/INSTALL/make.inc.ALPHA
lapack-netlib/INSTALL/make.inc.HPPA
lapack-netlib/INSTALL/make.inc.IRIX64
lapack-netlib/INSTALL/make.inc.O2K
lapack-netlib/INSTALL/make.inc.SGI5
lapack-netlib/INSTALL/make.inc.SUN4
lapack-netlib/INSTALL/make.inc.SUN4SOL2
lapack-netlib/INSTALL/make.inc.XLF
lapack-netlib/INSTALL/make.inc.gfortran
lapack-netlib/INSTALL/make.inc.gfortran_debug
lapack-netlib/INSTALL/make.inc.ifort
lapack-netlib/INSTALL/make.inc.pgf95
lapack-netlib/INSTALL/make.inc.pghpf
lapack-netlib/INSTALL/secondtst.f
lapack-netlib/LAPACKE/CMakeLists.txt
lapack-netlib/LAPACKE/Makefile
lapack-netlib/LAPACKE/cmake/lapacke-config-install.cmake.in
lapack-netlib/LAPACKE/example/CMakeLists.txt
lapack-netlib/LAPACKE/example/Makefile
lapack-netlib/LAPACKE/include/lapacke.h
lapack-netlib/LAPACKE/lapacke.pc.in
lapack-netlib/LAPACKE/src/CMakeLists.txt
lapack-netlib/LAPACKE/src/Makefile
lapack-netlib/LAPACKE/src/lapacke_cbbcsd.c
lapack-netlib/LAPACKE/src/lapacke_cbbcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_cbdsqr.c
lapack-netlib/LAPACKE/src/lapacke_cgbbrd.c
lapack-netlib/LAPACKE/src/lapacke_cgbcon.c
lapack-netlib/LAPACKE/src/lapacke_cgbequ.c
lapack-netlib/LAPACKE/src/lapacke_cgbequb.c
lapack-netlib/LAPACKE/src/lapacke_cgbrfs.c
lapack-netlib/LAPACKE/src/lapacke_cgbrfsx.c
lapack-netlib/LAPACKE/src/lapacke_cgbsv.c
lapack-netlib/LAPACKE/src/lapacke_cgbsvx.c
lapack-netlib/LAPACKE/src/lapacke_cgbsvxx.c
lapack-netlib/LAPACKE/src/lapacke_cgbtrf.c
lapack-netlib/LAPACKE/src/lapacke_cgbtrs.c
lapack-netlib/LAPACKE/src/lapacke_cgebak.c
lapack-netlib/LAPACKE/src/lapacke_cgebal.c
lapack-netlib/LAPACKE/src/lapacke_cgebrd.c
lapack-netlib/LAPACKE/src/lapacke_cgecon.c
lapack-netlib/LAPACKE/src/lapacke_cgeequ.c
lapack-netlib/LAPACKE/src/lapacke_cgeequb.c
lapack-netlib/LAPACKE/src/lapacke_cgees.c
lapack-netlib/LAPACKE/src/lapacke_cgeesx.c
lapack-netlib/LAPACKE/src/lapacke_cgeev.c
lapack-netlib/LAPACKE/src/lapacke_cgeevx.c
lapack-netlib/LAPACKE/src/lapacke_cgehrd.c
lapack-netlib/LAPACKE/src/lapacke_cgejsv.c
lapack-netlib/LAPACKE/src/lapacke_cgelq.c
lapack-netlib/LAPACKE/src/lapacke_cgelq2.c
lapack-netlib/LAPACKE/src/lapacke_cgelqf.c
lapack-netlib/LAPACKE/src/lapacke_cgels.c
lapack-netlib/LAPACKE/src/lapacke_cgelsd.c
lapack-netlib/LAPACKE/src/lapacke_cgelss.c
lapack-netlib/LAPACKE/src/lapacke_cgelsy.c
lapack-netlib/LAPACKE/src/lapacke_cgemlq.c
lapack-netlib/LAPACKE/src/lapacke_cgemqr.c
lapack-netlib/LAPACKE/src/lapacke_cgemqrt.c
lapack-netlib/LAPACKE/src/lapacke_cgeqlf.c
lapack-netlib/LAPACKE/src/lapacke_cgeqp3.c
lapack-netlib/LAPACKE/src/lapacke_cgeqpf.c
lapack-netlib/LAPACKE/src/lapacke_cgeqr.c
lapack-netlib/LAPACKE/src/lapacke_cgeqr2.c
lapack-netlib/LAPACKE/src/lapacke_cgeqrf.c
lapack-netlib/LAPACKE/src/lapacke_cgeqrfp.c
lapack-netlib/LAPACKE/src/lapacke_cgeqrt.c
lapack-netlib/LAPACKE/src/lapacke_cgeqrt2.c
lapack-netlib/LAPACKE/src/lapacke_cgeqrt3.c
lapack-netlib/LAPACKE/src/lapacke_cgerfs.c
lapack-netlib/LAPACKE/src/lapacke_cgerfsx.c
lapack-netlib/LAPACKE/src/lapacke_cgerqf.c
lapack-netlib/LAPACKE/src/lapacke_cgesdd.c
lapack-netlib/LAPACKE/src/lapacke_cgesv.c
lapack-netlib/LAPACKE/src/lapacke_cgesvd.c
lapack-netlib/LAPACKE/src/lapacke_cgesvdx.c
lapack-netlib/LAPACKE/src/lapacke_cgesvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_cgesvj.c
lapack-netlib/LAPACKE/src/lapacke_cgesvj_work.c
lapack-netlib/LAPACKE/src/lapacke_cgesvx.c
lapack-netlib/LAPACKE/src/lapacke_cgesvxx.c
lapack-netlib/LAPACKE/src/lapacke_cgetf2.c
lapack-netlib/LAPACKE/src/lapacke_cgetrf.c
lapack-netlib/LAPACKE/src/lapacke_cgetrf2.c
lapack-netlib/LAPACKE/src/lapacke_cgetri.c
lapack-netlib/LAPACKE/src/lapacke_cgetrs.c
lapack-netlib/LAPACKE/src/lapacke_cgetsls.c
lapack-netlib/LAPACKE/src/lapacke_cggbak.c
lapack-netlib/LAPACKE/src/lapacke_cggbal.c
lapack-netlib/LAPACKE/src/lapacke_cgges.c
lapack-netlib/LAPACKE/src/lapacke_cgges3.c
lapack-netlib/LAPACKE/src/lapacke_cggesx.c
lapack-netlib/LAPACKE/src/lapacke_cggev.c
lapack-netlib/LAPACKE/src/lapacke_cggev3.c
lapack-netlib/LAPACKE/src/lapacke_cggevx.c
lapack-netlib/LAPACKE/src/lapacke_cggglm.c
lapack-netlib/LAPACKE/src/lapacke_cgghd3.c
lapack-netlib/LAPACKE/src/lapacke_cgghrd.c
lapack-netlib/LAPACKE/src/lapacke_cgglse.c
lapack-netlib/LAPACKE/src/lapacke_cggqrf.c
lapack-netlib/LAPACKE/src/lapacke_cggrqf.c
lapack-netlib/LAPACKE/src/lapacke_cggsvd.c
lapack-netlib/LAPACKE/src/lapacke_cggsvd3.c
lapack-netlib/LAPACKE/src/lapacke_cggsvp.c
lapack-netlib/LAPACKE/src/lapacke_cggsvp3.c
lapack-netlib/LAPACKE/src/lapacke_cgtcon.c
lapack-netlib/LAPACKE/src/lapacke_cgtrfs.c
lapack-netlib/LAPACKE/src/lapacke_cgtsv.c
lapack-netlib/LAPACKE/src/lapacke_cgtsvx.c
lapack-netlib/LAPACKE/src/lapacke_cgttrf.c
lapack-netlib/LAPACKE/src/lapacke_cgttrs.c
lapack-netlib/LAPACKE/src/lapacke_chbev.c
lapack-netlib/LAPACKE/src/lapacke_chbev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_chbev_2stage_work.c
lapack-netlib/LAPACKE/src/lapacke_chbevd.c
lapack-netlib/LAPACKE/src/lapacke_chbevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_chbevx.c
lapack-netlib/LAPACKE/src/lapacke_chbevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_chbgst.c
lapack-netlib/LAPACKE/src/lapacke_chbgv.c
lapack-netlib/LAPACKE/src/lapacke_chbgvd.c
lapack-netlib/LAPACKE/src/lapacke_chbgvx.c
lapack-netlib/LAPACKE/src/lapacke_chbtrd.c
lapack-netlib/LAPACKE/src/lapacke_checon.c
lapack-netlib/LAPACKE/src/lapacke_checon_3.c
lapack-netlib/LAPACKE/src/lapacke_cheequb.c
lapack-netlib/LAPACKE/src/lapacke_cheev.c
lapack-netlib/LAPACKE/src/lapacke_cheev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_cheevd.c
lapack-netlib/LAPACKE/src/lapacke_cheevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_cheevr.c
lapack-netlib/LAPACKE/src/lapacke_cheevr_2stage.c
lapack-netlib/LAPACKE/src/lapacke_cheevr_work.c
lapack-netlib/LAPACKE/src/lapacke_cheevx.c
lapack-netlib/LAPACKE/src/lapacke_cheevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_cheevx_work.c
lapack-netlib/LAPACKE/src/lapacke_chegst.c
lapack-netlib/LAPACKE/src/lapacke_chegv.c
lapack-netlib/LAPACKE/src/lapacke_chegv_2stage.c
lapack-netlib/LAPACKE/src/lapacke_chegvd.c
lapack-netlib/LAPACKE/src/lapacke_chegvx.c
lapack-netlib/LAPACKE/src/lapacke_chegvx_work.c
lapack-netlib/LAPACKE/src/lapacke_cherfs.c
lapack-netlib/LAPACKE/src/lapacke_cherfsx.c
lapack-netlib/LAPACKE/src/lapacke_chesv.c
lapack-netlib/LAPACKE/src/lapacke_chesv_aa.c
lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chesv_rk.c
lapack-netlib/LAPACKE/src/lapacke_chesvx.c
lapack-netlib/LAPACKE/src/lapacke_chesvxx.c
lapack-netlib/LAPACKE/src/lapacke_cheswapr.c
lapack-netlib/LAPACKE/src/lapacke_chetrd.c
lapack-netlib/LAPACKE/src/lapacke_chetrf.c
lapack-netlib/LAPACKE/src/lapacke_chetrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chetrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_chetrf_rk_work.c
lapack-netlib/LAPACKE/src/lapacke_chetrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_chetri.c
lapack-netlib/LAPACKE/src/lapacke_chetri2.c
lapack-netlib/LAPACKE/src/lapacke_chetri2x.c
lapack-netlib/LAPACKE/src/lapacke_chetri_3.c
lapack-netlib/LAPACKE/src/lapacke_chetrs.c
lapack-netlib/LAPACKE/src/lapacke_chetrs2.c
lapack-netlib/LAPACKE/src/lapacke_chetrs_3.c
lapack-netlib/LAPACKE/src/lapacke_chetrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_chetrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_chfrk.c
lapack-netlib/LAPACKE/src/lapacke_chgeqz.c
lapack-netlib/LAPACKE/src/lapacke_chpcon.c
lapack-netlib/LAPACKE/src/lapacke_chpev.c
lapack-netlib/LAPACKE/src/lapacke_chpevd.c
lapack-netlib/LAPACKE/src/lapacke_chpevx.c
lapack-netlib/LAPACKE/src/lapacke_chpgst.c
lapack-netlib/LAPACKE/src/lapacke_chpgv.c
lapack-netlib/LAPACKE/src/lapacke_chpgvd.c
lapack-netlib/LAPACKE/src/lapacke_chpgvx.c
lapack-netlib/LAPACKE/src/lapacke_chprfs.c
lapack-netlib/LAPACKE/src/lapacke_chpsv.c
lapack-netlib/LAPACKE/src/lapacke_chpsvx.c
lapack-netlib/LAPACKE/src/lapacke_chptrd.c
lapack-netlib/LAPACKE/src/lapacke_chptrf.c
lapack-netlib/LAPACKE/src/lapacke_chptri.c
lapack-netlib/LAPACKE/src/lapacke_chptrs.c
lapack-netlib/LAPACKE/src/lapacke_chsein.c
lapack-netlib/LAPACKE/src/lapacke_chseqr.c
lapack-netlib/LAPACKE/src/lapacke_clacgv.c
lapack-netlib/LAPACKE/src/lapacke_clacn2.c
lapack-netlib/LAPACKE/src/lapacke_clacp2.c
lapack-netlib/LAPACKE/src/lapacke_clacp2_work.c
lapack-netlib/LAPACKE/src/lapacke_clacpy.c
lapack-netlib/LAPACKE/src/lapacke_clacrm.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_clacrm_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_clag2z.c
lapack-netlib/LAPACKE/src/lapacke_clagge.c
lapack-netlib/LAPACKE/src/lapacke_claghe.c
lapack-netlib/LAPACKE/src/lapacke_clagsy.c
lapack-netlib/LAPACKE/src/lapacke_clange.c
lapack-netlib/LAPACKE/src/lapacke_clange_work.c
lapack-netlib/LAPACKE/src/lapacke_clanhe.c
lapack-netlib/LAPACKE/src/lapacke_clansy.c
lapack-netlib/LAPACKE/src/lapacke_clantr.c
lapack-netlib/LAPACKE/src/lapacke_clapmr.c
lapack-netlib/LAPACKE/src/lapacke_clapmt.c
lapack-netlib/LAPACKE/src/lapacke_clarcm.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_clarcm_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_clarfb.c
lapack-netlib/LAPACKE/src/lapacke_clarfg.c
lapack-netlib/LAPACKE/src/lapacke_clarft.c
lapack-netlib/LAPACKE/src/lapacke_clarfx.c
lapack-netlib/LAPACKE/src/lapacke_clascl.c
lapack-netlib/LAPACKE/src/lapacke_claset.c
lapack-netlib/LAPACKE/src/lapacke_classq.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_classq_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_claswp.c
lapack-netlib/LAPACKE/src/lapacke_claswp_work.c
lapack-netlib/LAPACKE/src/lapacke_clatms.c
lapack-netlib/LAPACKE/src/lapacke_clauum.c
lapack-netlib/LAPACKE/src/lapacke_cpbcon.c
lapack-netlib/LAPACKE/src/lapacke_cpbequ.c
lapack-netlib/LAPACKE/src/lapacke_cpbrfs.c
lapack-netlib/LAPACKE/src/lapacke_cpbstf.c
lapack-netlib/LAPACKE/src/lapacke_cpbsv.c
lapack-netlib/LAPACKE/src/lapacke_cpbsvx.c
lapack-netlib/LAPACKE/src/lapacke_cpbtrf.c
lapack-netlib/LAPACKE/src/lapacke_cpbtrs.c
lapack-netlib/LAPACKE/src/lapacke_cpftrf.c
lapack-netlib/LAPACKE/src/lapacke_cpftri.c
lapack-netlib/LAPACKE/src/lapacke_cpftrs.c
lapack-netlib/LAPACKE/src/lapacke_cpocon.c
lapack-netlib/LAPACKE/src/lapacke_cpoequ.c
lapack-netlib/LAPACKE/src/lapacke_cpoequb.c
lapack-netlib/LAPACKE/src/lapacke_cporfs.c
lapack-netlib/LAPACKE/src/lapacke_cporfsx.c
lapack-netlib/LAPACKE/src/lapacke_cposv.c
lapack-netlib/LAPACKE/src/lapacke_cposvx.c
lapack-netlib/LAPACKE/src/lapacke_cposvxx.c
lapack-netlib/LAPACKE/src/lapacke_cpotrf.c
lapack-netlib/LAPACKE/src/lapacke_cpotrf2.c
lapack-netlib/LAPACKE/src/lapacke_cpotri.c
lapack-netlib/LAPACKE/src/lapacke_cpotrs.c
lapack-netlib/LAPACKE/src/lapacke_cppcon.c
lapack-netlib/LAPACKE/src/lapacke_cppequ.c
lapack-netlib/LAPACKE/src/lapacke_cpprfs.c
lapack-netlib/LAPACKE/src/lapacke_cppsv.c
lapack-netlib/LAPACKE/src/lapacke_cppsvx.c
lapack-netlib/LAPACKE/src/lapacke_cpptrf.c
lapack-netlib/LAPACKE/src/lapacke_cpptri.c
lapack-netlib/LAPACKE/src/lapacke_cpptrs.c
lapack-netlib/LAPACKE/src/lapacke_cpstrf.c
lapack-netlib/LAPACKE/src/lapacke_cptcon.c
lapack-netlib/LAPACKE/src/lapacke_cpteqr.c
lapack-netlib/LAPACKE/src/lapacke_cptrfs.c
lapack-netlib/LAPACKE/src/lapacke_cptsv.c
lapack-netlib/LAPACKE/src/lapacke_cptsvx.c
lapack-netlib/LAPACKE/src/lapacke_cpttrf.c
lapack-netlib/LAPACKE/src/lapacke_cpttrs.c
lapack-netlib/LAPACKE/src/lapacke_cspcon.c
lapack-netlib/LAPACKE/src/lapacke_csprfs.c
lapack-netlib/LAPACKE/src/lapacke_cspsv.c
lapack-netlib/LAPACKE/src/lapacke_cspsvx.c
lapack-netlib/LAPACKE/src/lapacke_csptrf.c
lapack-netlib/LAPACKE/src/lapacke_csptri.c
lapack-netlib/LAPACKE/src/lapacke_csptrs.c
lapack-netlib/LAPACKE/src/lapacke_cstedc.c
lapack-netlib/LAPACKE/src/lapacke_cstegr.c
lapack-netlib/LAPACKE/src/lapacke_cstein.c
lapack-netlib/LAPACKE/src/lapacke_cstemr.c
lapack-netlib/LAPACKE/src/lapacke_cstemr_work.c
lapack-netlib/LAPACKE/src/lapacke_csteqr.c
lapack-netlib/LAPACKE/src/lapacke_csycon.c
lapack-netlib/LAPACKE/src/lapacke_csycon_3.c
lapack-netlib/LAPACKE/src/lapacke_csycon_3_work.c
lapack-netlib/LAPACKE/src/lapacke_csyconv.c
lapack-netlib/LAPACKE/src/lapacke_csyequb.c
lapack-netlib/LAPACKE/src/lapacke_csyr.c
lapack-netlib/LAPACKE/src/lapacke_csyrfs.c
lapack-netlib/LAPACKE/src/lapacke_csyrfsx.c
lapack-netlib/LAPACKE/src/lapacke_csysv.c
lapack-netlib/LAPACKE/src/lapacke_csysv_aa.c
lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csysv_rk.c
lapack-netlib/LAPACKE/src/lapacke_csysv_rook.c
lapack-netlib/LAPACKE/src/lapacke_csysvx.c
lapack-netlib/LAPACKE/src/lapacke_csysvxx.c
lapack-netlib/LAPACKE/src/lapacke_csyswapr.c
lapack-netlib/LAPACKE/src/lapacke_csytrf.c
lapack-netlib/LAPACKE/src/lapacke_csytrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csytrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_csytrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_csytri.c
lapack-netlib/LAPACKE/src/lapacke_csytri2.c
lapack-netlib/LAPACKE/src/lapacke_csytri2x.c
lapack-netlib/LAPACKE/src/lapacke_csytri_3.c
lapack-netlib/LAPACKE/src/lapacke_csytrs.c
lapack-netlib/LAPACKE/src/lapacke_csytrs2.c
lapack-netlib/LAPACKE/src/lapacke_csytrs_3.c
lapack-netlib/LAPACKE/src/lapacke_csytrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_csytrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_ctbcon.c
lapack-netlib/LAPACKE/src/lapacke_ctbrfs.c
lapack-netlib/LAPACKE/src/lapacke_ctbtrs.c
lapack-netlib/LAPACKE/src/lapacke_ctfsm.c
lapack-netlib/LAPACKE/src/lapacke_ctftri.c
lapack-netlib/LAPACKE/src/lapacke_ctfttp.c
lapack-netlib/LAPACKE/src/lapacke_ctfttr.c
lapack-netlib/LAPACKE/src/lapacke_ctgevc.c
lapack-netlib/LAPACKE/src/lapacke_ctgexc.c
lapack-netlib/LAPACKE/src/lapacke_ctgsen.c
lapack-netlib/LAPACKE/src/lapacke_ctgsja.c
lapack-netlib/LAPACKE/src/lapacke_ctgsna.c
lapack-netlib/LAPACKE/src/lapacke_ctgsyl.c
lapack-netlib/LAPACKE/src/lapacke_ctpcon.c
lapack-netlib/LAPACKE/src/lapacke_ctpmqrt.c
lapack-netlib/LAPACKE/src/lapacke_ctpqrt.c
lapack-netlib/LAPACKE/src/lapacke_ctpqrt2.c
lapack-netlib/LAPACKE/src/lapacke_ctprfb.c
lapack-netlib/LAPACKE/src/lapacke_ctprfs.c
lapack-netlib/LAPACKE/src/lapacke_ctptri.c
lapack-netlib/LAPACKE/src/lapacke_ctptrs.c
lapack-netlib/LAPACKE/src/lapacke_ctpttf.c
lapack-netlib/LAPACKE/src/lapacke_ctpttr.c
lapack-netlib/LAPACKE/src/lapacke_ctrcon.c
lapack-netlib/LAPACKE/src/lapacke_ctrevc.c
lapack-netlib/LAPACKE/src/lapacke_ctrexc.c
lapack-netlib/LAPACKE/src/lapacke_ctrrfs.c
lapack-netlib/LAPACKE/src/lapacke_ctrsen.c
lapack-netlib/LAPACKE/src/lapacke_ctrsna.c
lapack-netlib/LAPACKE/src/lapacke_ctrsyl.c
lapack-netlib/LAPACKE/src/lapacke_ctrtri.c
lapack-netlib/LAPACKE/src/lapacke_ctrtrs.c
lapack-netlib/LAPACKE/src/lapacke_ctrttf.c
lapack-netlib/LAPACKE/src/lapacke_ctrttp.c
lapack-netlib/LAPACKE/src/lapacke_ctzrzf.c
lapack-netlib/LAPACKE/src/lapacke_cunbdb.c
lapack-netlib/LAPACKE/src/lapacke_cunbdb_work.c
lapack-netlib/LAPACKE/src/lapacke_cuncsd.c
lapack-netlib/LAPACKE/src/lapacke_cuncsd2by1.c
lapack-netlib/LAPACKE/src/lapacke_cuncsd_work.c
lapack-netlib/LAPACKE/src/lapacke_cungbr.c
lapack-netlib/LAPACKE/src/lapacke_cunghr.c
lapack-netlib/LAPACKE/src/lapacke_cunglq.c
lapack-netlib/LAPACKE/src/lapacke_cungql.c
lapack-netlib/LAPACKE/src/lapacke_cungqr.c
lapack-netlib/LAPACKE/src/lapacke_cungrq.c
lapack-netlib/LAPACKE/src/lapacke_cungtr.c
lapack-netlib/LAPACKE/src/lapacke_cunmbr.c
lapack-netlib/LAPACKE/src/lapacke_cunmhr.c
lapack-netlib/LAPACKE/src/lapacke_cunmlq.c
lapack-netlib/LAPACKE/src/lapacke_cunmql.c
lapack-netlib/LAPACKE/src/lapacke_cunmqr.c
lapack-netlib/LAPACKE/src/lapacke_cunmrq.c
lapack-netlib/LAPACKE/src/lapacke_cunmrz.c
lapack-netlib/LAPACKE/src/lapacke_cunmtr.c
lapack-netlib/LAPACKE/src/lapacke_cupgtr.c
lapack-netlib/LAPACKE/src/lapacke_cupmtr.c
lapack-netlib/LAPACKE/src/lapacke_dbbcsd.c
lapack-netlib/LAPACKE/src/lapacke_dbbcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_dbdsdc.c
lapack-netlib/LAPACKE/src/lapacke_dbdsqr.c
lapack-netlib/LAPACKE/src/lapacke_dbdsvdx.c
lapack-netlib/LAPACKE/src/lapacke_dbdsvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_ddisna.c
lapack-netlib/LAPACKE/src/lapacke_dgbbrd.c
lapack-netlib/LAPACKE/src/lapacke_dgbcon.c
lapack-netlib/LAPACKE/src/lapacke_dgbequ.c
lapack-netlib/LAPACKE/src/lapacke_dgbequb.c
lapack-netlib/LAPACKE/src/lapacke_dgbrfs.c
lapack-netlib/LAPACKE/src/lapacke_dgbrfsx.c
lapack-netlib/LAPACKE/src/lapacke_dgbsv.c
lapack-netlib/LAPACKE/src/lapacke_dgbsvx.c
lapack-netlib/LAPACKE/src/lapacke_dgbsvxx.c
lapack-netlib/LAPACKE/src/lapacke_dgbtrf.c
lapack-netlib/LAPACKE/src/lapacke_dgbtrs.c
lapack-netlib/LAPACKE/src/lapacke_dgebak.c
lapack-netlib/LAPACKE/src/lapacke_dgebal.c
lapack-netlib/LAPACKE/src/lapacke_dgebrd.c
lapack-netlib/LAPACKE/src/lapacke_dgecon.c
lapack-netlib/LAPACKE/src/lapacke_dgeequ.c
lapack-netlib/LAPACKE/src/lapacke_dgeequb.c
lapack-netlib/LAPACKE/src/lapacke_dgees.c
lapack-netlib/LAPACKE/src/lapacke_dgeesx.c
lapack-netlib/LAPACKE/src/lapacke_dgeev.c
lapack-netlib/LAPACKE/src/lapacke_dgeevx.c
lapack-netlib/LAPACKE/src/lapacke_dgehrd.c
lapack-netlib/LAPACKE/src/lapacke_dgejsv.c
lapack-netlib/LAPACKE/src/lapacke_dgelq.c
lapack-netlib/LAPACKE/src/lapacke_dgelq2.c
lapack-netlib/LAPACKE/src/lapacke_dgelqf.c
lapack-netlib/LAPACKE/src/lapacke_dgels.c
lapack-netlib/LAPACKE/src/lapacke_dgelsd.c
lapack-netlib/LAPACKE/src/lapacke_dgelss.c
lapack-netlib/LAPACKE/src/lapacke_dgelsy.c
lapack-netlib/LAPACKE/src/lapacke_dgemlq.c
lapack-netlib/LAPACKE/src/lapacke_dgemqr.c
lapack-netlib/LAPACKE/src/lapacke_dgemqrt.c
lapack-netlib/LAPACKE/src/lapacke_dgeqlf.c
lapack-netlib/LAPACKE/src/lapacke_dgeqp3.c
lapack-netlib/LAPACKE/src/lapacke_dgeqpf.c
lapack-netlib/LAPACKE/src/lapacke_dgeqr.c
lapack-netlib/LAPACKE/src/lapacke_dgeqr2.c
lapack-netlib/LAPACKE/src/lapacke_dgeqrf.c
lapack-netlib/LAPACKE/src/lapacke_dgeqrfp.c
lapack-netlib/LAPACKE/src/lapacke_dgeqrt.c
lapack-netlib/LAPACKE/src/lapacke_dgeqrt2.c
lapack-netlib/LAPACKE/src/lapacke_dgeqrt3.c
lapack-netlib/LAPACKE/src/lapacke_dgerfs.c
lapack-netlib/LAPACKE/src/lapacke_dgerfsx.c
lapack-netlib/LAPACKE/src/lapacke_dgerqf.c
lapack-netlib/LAPACKE/src/lapacke_dgesdd.c
lapack-netlib/LAPACKE/src/lapacke_dgesv.c
lapack-netlib/LAPACKE/src/lapacke_dgesvd.c
lapack-netlib/LAPACKE/src/lapacke_dgesvdx.c
lapack-netlib/LAPACKE/src/lapacke_dgesvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_dgesvj.c
lapack-netlib/LAPACKE/src/lapacke_dgesvx.c
lapack-netlib/LAPACKE/src/lapacke_dgesvxx.c
lapack-netlib/LAPACKE/src/lapacke_dgetf2.c
lapack-netlib/LAPACKE/src/lapacke_dgetrf.c
lapack-netlib/LAPACKE/src/lapacke_dgetrf2.c
lapack-netlib/LAPACKE/src/lapacke_dgetri.c
lapack-netlib/LAPACKE/src/lapacke_dgetrs.c
lapack-netlib/LAPACKE/src/lapacke_dgetsls.c
lapack-netlib/LAPACKE/src/lapacke_dggbak.c
lapack-netlib/LAPACKE/src/lapacke_dggbal.c
lapack-netlib/LAPACKE/src/lapacke_dgges.c
lapack-netlib/LAPACKE/src/lapacke_dgges3.c
lapack-netlib/LAPACKE/src/lapacke_dggesx.c
lapack-netlib/LAPACKE/src/lapacke_dggev.c
lapack-netlib/LAPACKE/src/lapacke_dggev3.c
lapack-netlib/LAPACKE/src/lapacke_dggevx.c
lapack-netlib/LAPACKE/src/lapacke_dggglm.c
lapack-netlib/LAPACKE/src/lapacke_dgghd3.c
lapack-netlib/LAPACKE/src/lapacke_dgghrd.c
lapack-netlib/LAPACKE/src/lapacke_dgglse.c
lapack-netlib/LAPACKE/src/lapacke_dggqrf.c
lapack-netlib/LAPACKE/src/lapacke_dggrqf.c
lapack-netlib/LAPACKE/src/lapacke_dggsvd.c
lapack-netlib/LAPACKE/src/lapacke_dggsvd3.c
lapack-netlib/LAPACKE/src/lapacke_dggsvp.c
lapack-netlib/LAPACKE/src/lapacke_dggsvp3.c
lapack-netlib/LAPACKE/src/lapacke_dgtcon.c
lapack-netlib/LAPACKE/src/lapacke_dgtrfs.c
lapack-netlib/LAPACKE/src/lapacke_dgtsv.c
lapack-netlib/LAPACKE/src/lapacke_dgtsvx.c
lapack-netlib/LAPACKE/src/lapacke_dgttrf.c
lapack-netlib/LAPACKE/src/lapacke_dgttrs.c
lapack-netlib/LAPACKE/src/lapacke_dhgeqz.c
lapack-netlib/LAPACKE/src/lapacke_dhsein.c
lapack-netlib/LAPACKE/src/lapacke_dhseqr.c
lapack-netlib/LAPACKE/src/lapacke_dlacn2.c
lapack-netlib/LAPACKE/src/lapacke_dlacpy.c
lapack-netlib/LAPACKE/src/lapacke_dlag2s.c
lapack-netlib/LAPACKE/src/lapacke_dlagge.c
lapack-netlib/LAPACKE/src/lapacke_dlagsy.c
lapack-netlib/LAPACKE/src/lapacke_dlange.c
lapack-netlib/LAPACKE/src/lapacke_dlange_work.c
lapack-netlib/LAPACKE/src/lapacke_dlansy.c
lapack-netlib/LAPACKE/src/lapacke_dlansy_work.c
lapack-netlib/LAPACKE/src/lapacke_dlantr.c
lapack-netlib/LAPACKE/src/lapacke_dlapmr.c
lapack-netlib/LAPACKE/src/lapacke_dlapmt.c
lapack-netlib/LAPACKE/src/lapacke_dlapy2.c
lapack-netlib/LAPACKE/src/lapacke_dlapy3.c
lapack-netlib/LAPACKE/src/lapacke_dlarfb.c
lapack-netlib/LAPACKE/src/lapacke_dlarfg.c
lapack-netlib/LAPACKE/src/lapacke_dlarft.c
lapack-netlib/LAPACKE/src/lapacke_dlarfx.c
lapack-netlib/LAPACKE/src/lapacke_dlartgp.c
lapack-netlib/LAPACKE/src/lapacke_dlartgs.c
lapack-netlib/LAPACKE/src/lapacke_dlascl.c
lapack-netlib/LAPACKE/src/lapacke_dlaset.c
lapack-netlib/LAPACKE/src/lapacke_dlasrt.c
lapack-netlib/LAPACKE/src/lapacke_dlassq.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dlassq_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dlaswp.c
lapack-netlib/LAPACKE/src/lapacke_dlaswp_work.c
lapack-netlib/LAPACKE/src/lapacke_dlatms.c
lapack-netlib/LAPACKE/src/lapacke_dlauum.c
lapack-netlib/LAPACKE/src/lapacke_dopgtr.c
lapack-netlib/LAPACKE/src/lapacke_dopmtr.c
lapack-netlib/LAPACKE/src/lapacke_dorbdb.c
lapack-netlib/LAPACKE/src/lapacke_dorbdb_work.c
lapack-netlib/LAPACKE/src/lapacke_dorcsd.c
lapack-netlib/LAPACKE/src/lapacke_dorcsd2by1.c
lapack-netlib/LAPACKE/src/lapacke_dorcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_dorgbr.c
lapack-netlib/LAPACKE/src/lapacke_dorghr.c
lapack-netlib/LAPACKE/src/lapacke_dorglq.c
lapack-netlib/LAPACKE/src/lapacke_dorgql.c
lapack-netlib/LAPACKE/src/lapacke_dorgqr.c
lapack-netlib/LAPACKE/src/lapacke_dorgrq.c
lapack-netlib/LAPACKE/src/lapacke_dorgtr.c
lapack-netlib/LAPACKE/src/lapacke_dormbr.c
lapack-netlib/LAPACKE/src/lapacke_dormhr.c
lapack-netlib/LAPACKE/src/lapacke_dormlq.c
lapack-netlib/LAPACKE/src/lapacke_dormlq_work.c
lapack-netlib/LAPACKE/src/lapacke_dormql.c
lapack-netlib/LAPACKE/src/lapacke_dormqr.c
lapack-netlib/LAPACKE/src/lapacke_dormrq.c
lapack-netlib/LAPACKE/src/lapacke_dormrz.c
lapack-netlib/LAPACKE/src/lapacke_dormtr.c
lapack-netlib/LAPACKE/src/lapacke_dpbcon.c
lapack-netlib/LAPACKE/src/lapacke_dpbequ.c
lapack-netlib/LAPACKE/src/lapacke_dpbrfs.c
lapack-netlib/LAPACKE/src/lapacke_dpbstf.c
lapack-netlib/LAPACKE/src/lapacke_dpbsv.c
lapack-netlib/LAPACKE/src/lapacke_dpbsvx.c
lapack-netlib/LAPACKE/src/lapacke_dpbtrf.c
lapack-netlib/LAPACKE/src/lapacke_dpbtrs.c
lapack-netlib/LAPACKE/src/lapacke_dpftrf.c
lapack-netlib/LAPACKE/src/lapacke_dpftri.c
lapack-netlib/LAPACKE/src/lapacke_dpftrs.c
lapack-netlib/LAPACKE/src/lapacke_dpocon.c
lapack-netlib/LAPACKE/src/lapacke_dpoequ.c
lapack-netlib/LAPACKE/src/lapacke_dpoequb.c
lapack-netlib/LAPACKE/src/lapacke_dporfs.c
lapack-netlib/LAPACKE/src/lapacke_dporfsx.c
lapack-netlib/LAPACKE/src/lapacke_dposv.c
lapack-netlib/LAPACKE/src/lapacke_dposvx.c
lapack-netlib/LAPACKE/src/lapacke_dposvxx.c
lapack-netlib/LAPACKE/src/lapacke_dpotrf.c
lapack-netlib/LAPACKE/src/lapacke_dpotrf2.c
lapack-netlib/LAPACKE/src/lapacke_dpotri.c
lapack-netlib/LAPACKE/src/lapacke_dpotrs.c
lapack-netlib/LAPACKE/src/lapacke_dppcon.c
lapack-netlib/LAPACKE/src/lapacke_dppequ.c
lapack-netlib/LAPACKE/src/lapacke_dpprfs.c
lapack-netlib/LAPACKE/src/lapacke_dppsv.c
lapack-netlib/LAPACKE/src/lapacke_dppsvx.c
lapack-netlib/LAPACKE/src/lapacke_dpptrf.c
lapack-netlib/LAPACKE/src/lapacke_dpptri.c
lapack-netlib/LAPACKE/src/lapacke_dpptrs.c
lapack-netlib/LAPACKE/src/lapacke_dpstrf.c
lapack-netlib/LAPACKE/src/lapacke_dptcon.c
lapack-netlib/LAPACKE/src/lapacke_dpteqr.c
lapack-netlib/LAPACKE/src/lapacke_dptrfs.c
lapack-netlib/LAPACKE/src/lapacke_dptsv.c
lapack-netlib/LAPACKE/src/lapacke_dptsvx.c
lapack-netlib/LAPACKE/src/lapacke_dpttrf.c
lapack-netlib/LAPACKE/src/lapacke_dpttrs.c
lapack-netlib/LAPACKE/src/lapacke_dsbev.c
lapack-netlib/LAPACKE/src/lapacke_dsbev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsbevd.c
lapack-netlib/LAPACKE/src/lapacke_dsbevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsbevx.c
lapack-netlib/LAPACKE/src/lapacke_dsbevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsbgst.c
lapack-netlib/LAPACKE/src/lapacke_dsbgv.c
lapack-netlib/LAPACKE/src/lapacke_dsbgvd.c
lapack-netlib/LAPACKE/src/lapacke_dsbgvx.c
lapack-netlib/LAPACKE/src/lapacke_dsbtrd.c
lapack-netlib/LAPACKE/src/lapacke_dsfrk.c
lapack-netlib/LAPACKE/src/lapacke_dsgesv.c
lapack-netlib/LAPACKE/src/lapacke_dspcon.c
lapack-netlib/LAPACKE/src/lapacke_dspev.c
lapack-netlib/LAPACKE/src/lapacke_dspevd.c
lapack-netlib/LAPACKE/src/lapacke_dspevx.c
lapack-netlib/LAPACKE/src/lapacke_dspgst.c
lapack-netlib/LAPACKE/src/lapacke_dspgv.c
lapack-netlib/LAPACKE/src/lapacke_dspgvd.c
lapack-netlib/LAPACKE/src/lapacke_dspgvx.c
lapack-netlib/LAPACKE/src/lapacke_dsposv.c
lapack-netlib/LAPACKE/src/lapacke_dsprfs.c
lapack-netlib/LAPACKE/src/lapacke_dspsv.c
lapack-netlib/LAPACKE/src/lapacke_dspsvx.c
lapack-netlib/LAPACKE/src/lapacke_dsptrd.c
lapack-netlib/LAPACKE/src/lapacke_dsptrf.c
lapack-netlib/LAPACKE/src/lapacke_dsptri.c
lapack-netlib/LAPACKE/src/lapacke_dsptrs.c
lapack-netlib/LAPACKE/src/lapacke_dstebz.c
lapack-netlib/LAPACKE/src/lapacke_dstedc.c
lapack-netlib/LAPACKE/src/lapacke_dstegr.c
lapack-netlib/LAPACKE/src/lapacke_dstein.c
lapack-netlib/LAPACKE/src/lapacke_dstemr.c
lapack-netlib/LAPACKE/src/lapacke_dstemr_work.c
lapack-netlib/LAPACKE/src/lapacke_dsteqr.c
lapack-netlib/LAPACKE/src/lapacke_dsterf.c
lapack-netlib/LAPACKE/src/lapacke_dstev.c
lapack-netlib/LAPACKE/src/lapacke_dstevd.c
lapack-netlib/LAPACKE/src/lapacke_dstevr.c
lapack-netlib/LAPACKE/src/lapacke_dstevx.c
lapack-netlib/LAPACKE/src/lapacke_dsycon.c
lapack-netlib/LAPACKE/src/lapacke_dsycon_3.c
lapack-netlib/LAPACKE/src/lapacke_dsyconv.c
lapack-netlib/LAPACKE/src/lapacke_dsyequb.c
lapack-netlib/LAPACKE/src/lapacke_dsyev.c
lapack-netlib/LAPACKE/src/lapacke_dsyev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsyevd.c
lapack-netlib/LAPACKE/src/lapacke_dsyevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsyevr.c
lapack-netlib/LAPACKE/src/lapacke_dsyevr_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsyevr_work.c
lapack-netlib/LAPACKE/src/lapacke_dsyevx.c
lapack-netlib/LAPACKE/src/lapacke_dsyevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsyevx_work.c
lapack-netlib/LAPACKE/src/lapacke_dsygst.c
lapack-netlib/LAPACKE/src/lapacke_dsygv.c
lapack-netlib/LAPACKE/src/lapacke_dsygv_2stage.c
lapack-netlib/LAPACKE/src/lapacke_dsygvd.c
lapack-netlib/LAPACKE/src/lapacke_dsygvx.c
lapack-netlib/LAPACKE/src/lapacke_dsygvx_work.c
lapack-netlib/LAPACKE/src/lapacke_dsyrfs.c
lapack-netlib/LAPACKE/src/lapacke_dsyrfsx.c
lapack-netlib/LAPACKE/src/lapacke_dsysv.c
lapack-netlib/LAPACKE/src/lapacke_dsysv_aa.c
lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsysv_rk.c
lapack-netlib/LAPACKE/src/lapacke_dsysv_rook.c
lapack-netlib/LAPACKE/src/lapacke_dsysvx.c
lapack-netlib/LAPACKE/src/lapacke_dsysvxx.c
lapack-netlib/LAPACKE/src/lapacke_dsyswapr.c
lapack-netlib/LAPACKE/src/lapacke_dsytrd.c
lapack-netlib/LAPACKE/src/lapacke_dsytrf.c
lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsytrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_dsytrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_dsytri.c
lapack-netlib/LAPACKE/src/lapacke_dsytri2.c
lapack-netlib/LAPACKE/src/lapacke_dsytri2x.c
lapack-netlib/LAPACKE/src/lapacke_dsytri_3.c
lapack-netlib/LAPACKE/src/lapacke_dsytrs.c
lapack-netlib/LAPACKE/src/lapacke_dsytrs2.c
lapack-netlib/LAPACKE/src/lapacke_dsytrs_3.c
lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_dsytrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_dtbcon.c
lapack-netlib/LAPACKE/src/lapacke_dtbrfs.c
lapack-netlib/LAPACKE/src/lapacke_dtbtrs.c
lapack-netlib/LAPACKE/src/lapacke_dtfsm.c
lapack-netlib/LAPACKE/src/lapacke_dtftri.c
lapack-netlib/LAPACKE/src/lapacke_dtfttp.c
lapack-netlib/LAPACKE/src/lapacke_dtfttr.c
lapack-netlib/LAPACKE/src/lapacke_dtgevc.c
lapack-netlib/LAPACKE/src/lapacke_dtgexc.c
lapack-netlib/LAPACKE/src/lapacke_dtgsen.c
lapack-netlib/LAPACKE/src/lapacke_dtgsja.c
lapack-netlib/LAPACKE/src/lapacke_dtgsna.c
lapack-netlib/LAPACKE/src/lapacke_dtgsyl.c
lapack-netlib/LAPACKE/src/lapacke_dtpcon.c
lapack-netlib/LAPACKE/src/lapacke_dtpmqrt.c
lapack-netlib/LAPACKE/src/lapacke_dtpqrt.c
lapack-netlib/LAPACKE/src/lapacke_dtpqrt2.c
lapack-netlib/LAPACKE/src/lapacke_dtprfb.c
lapack-netlib/LAPACKE/src/lapacke_dtprfs.c
lapack-netlib/LAPACKE/src/lapacke_dtptri.c
lapack-netlib/LAPACKE/src/lapacke_dtptrs.c
lapack-netlib/LAPACKE/src/lapacke_dtpttf.c
lapack-netlib/LAPACKE/src/lapacke_dtpttr.c
lapack-netlib/LAPACKE/src/lapacke_dtrcon.c
lapack-netlib/LAPACKE/src/lapacke_dtrevc.c
lapack-netlib/LAPACKE/src/lapacke_dtrexc.c
lapack-netlib/LAPACKE/src/lapacke_dtrrfs.c
lapack-netlib/LAPACKE/src/lapacke_dtrsen.c
lapack-netlib/LAPACKE/src/lapacke_dtrsna.c
lapack-netlib/LAPACKE/src/lapacke_dtrsyl.c
lapack-netlib/LAPACKE/src/lapacke_dtrtri.c
lapack-netlib/LAPACKE/src/lapacke_dtrtrs.c
lapack-netlib/LAPACKE/src/lapacke_dtrttf.c
lapack-netlib/LAPACKE/src/lapacke_dtrttp.c
lapack-netlib/LAPACKE/src/lapacke_dtzrzf.c
lapack-netlib/LAPACKE/src/lapacke_nancheck.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_sbbcsd.c
lapack-netlib/LAPACKE/src/lapacke_sbbcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_sbdsdc.c
lapack-netlib/LAPACKE/src/lapacke_sbdsqr.c
lapack-netlib/LAPACKE/src/lapacke_sbdsvdx.c
lapack-netlib/LAPACKE/src/lapacke_sbdsvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_sdisna.c
lapack-netlib/LAPACKE/src/lapacke_sgbbrd.c
lapack-netlib/LAPACKE/src/lapacke_sgbcon.c
lapack-netlib/LAPACKE/src/lapacke_sgbequ.c
lapack-netlib/LAPACKE/src/lapacke_sgbequb.c
lapack-netlib/LAPACKE/src/lapacke_sgbrfs.c
lapack-netlib/LAPACKE/src/lapacke_sgbrfsx.c
lapack-netlib/LAPACKE/src/lapacke_sgbsv.c
lapack-netlib/LAPACKE/src/lapacke_sgbsvx.c
lapack-netlib/LAPACKE/src/lapacke_sgbsvxx.c
lapack-netlib/LAPACKE/src/lapacke_sgbtrf.c
lapack-netlib/LAPACKE/src/lapacke_sgbtrs.c
lapack-netlib/LAPACKE/src/lapacke_sgebak.c
lapack-netlib/LAPACKE/src/lapacke_sgebal.c
lapack-netlib/LAPACKE/src/lapacke_sgebrd.c
lapack-netlib/LAPACKE/src/lapacke_sgecon.c
lapack-netlib/LAPACKE/src/lapacke_sgeequ.c
lapack-netlib/LAPACKE/src/lapacke_sgeequb.c
lapack-netlib/LAPACKE/src/lapacke_sgees.c
lapack-netlib/LAPACKE/src/lapacke_sgeesx.c
lapack-netlib/LAPACKE/src/lapacke_sgeev.c
lapack-netlib/LAPACKE/src/lapacke_sgeevx.c
lapack-netlib/LAPACKE/src/lapacke_sgehrd.c
lapack-netlib/LAPACKE/src/lapacke_sgejsv.c
lapack-netlib/LAPACKE/src/lapacke_sgelq.c
lapack-netlib/LAPACKE/src/lapacke_sgelq2.c
lapack-netlib/LAPACKE/src/lapacke_sgelqf.c
lapack-netlib/LAPACKE/src/lapacke_sgels.c
lapack-netlib/LAPACKE/src/lapacke_sgelsd.c
lapack-netlib/LAPACKE/src/lapacke_sgelss.c
lapack-netlib/LAPACKE/src/lapacke_sgelsy.c
lapack-netlib/LAPACKE/src/lapacke_sgemlq.c
lapack-netlib/LAPACKE/src/lapacke_sgemqr.c
lapack-netlib/LAPACKE/src/lapacke_sgemqrt.c
lapack-netlib/LAPACKE/src/lapacke_sgeqlf.c
lapack-netlib/LAPACKE/src/lapacke_sgeqp3.c
lapack-netlib/LAPACKE/src/lapacke_sgeqpf.c
lapack-netlib/LAPACKE/src/lapacke_sgeqr.c
lapack-netlib/LAPACKE/src/lapacke_sgeqr2.c
lapack-netlib/LAPACKE/src/lapacke_sgeqrf.c
lapack-netlib/LAPACKE/src/lapacke_sgeqrfp.c
lapack-netlib/LAPACKE/src/lapacke_sgeqrt.c
lapack-netlib/LAPACKE/src/lapacke_sgeqrt2.c
lapack-netlib/LAPACKE/src/lapacke_sgeqrt3.c
lapack-netlib/LAPACKE/src/lapacke_sgerfs.c
lapack-netlib/LAPACKE/src/lapacke_sgerfsx.c
lapack-netlib/LAPACKE/src/lapacke_sgerqf.c
lapack-netlib/LAPACKE/src/lapacke_sgesdd.c
lapack-netlib/LAPACKE/src/lapacke_sgesv.c
lapack-netlib/LAPACKE/src/lapacke_sgesvd.c
lapack-netlib/LAPACKE/src/lapacke_sgesvdx.c
lapack-netlib/LAPACKE/src/lapacke_sgesvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_sgesvj.c
lapack-netlib/LAPACKE/src/lapacke_sgesvx.c
lapack-netlib/LAPACKE/src/lapacke_sgesvxx.c
lapack-netlib/LAPACKE/src/lapacke_sgetf2.c
lapack-netlib/LAPACKE/src/lapacke_sgetrf.c
lapack-netlib/LAPACKE/src/lapacke_sgetrf2.c
lapack-netlib/LAPACKE/src/lapacke_sgetri.c
lapack-netlib/LAPACKE/src/lapacke_sgetrs.c
lapack-netlib/LAPACKE/src/lapacke_sgetsls.c
lapack-netlib/LAPACKE/src/lapacke_sggbak.c
lapack-netlib/LAPACKE/src/lapacke_sggbal.c
lapack-netlib/LAPACKE/src/lapacke_sgges.c
lapack-netlib/LAPACKE/src/lapacke_sgges3.c
lapack-netlib/LAPACKE/src/lapacke_sggesx.c
lapack-netlib/LAPACKE/src/lapacke_sggev.c
lapack-netlib/LAPACKE/src/lapacke_sggev3.c
lapack-netlib/LAPACKE/src/lapacke_sggevx.c
lapack-netlib/LAPACKE/src/lapacke_sggglm.c
lapack-netlib/LAPACKE/src/lapacke_sgghd3.c
lapack-netlib/LAPACKE/src/lapacke_sgghrd.c
lapack-netlib/LAPACKE/src/lapacke_sgglse.c
lapack-netlib/LAPACKE/src/lapacke_sggqrf.c
lapack-netlib/LAPACKE/src/lapacke_sggrqf.c
lapack-netlib/LAPACKE/src/lapacke_sggsvd.c
lapack-netlib/LAPACKE/src/lapacke_sggsvd3.c
lapack-netlib/LAPACKE/src/lapacke_sggsvp.c
lapack-netlib/LAPACKE/src/lapacke_sggsvp3.c
lapack-netlib/LAPACKE/src/lapacke_sgtcon.c
lapack-netlib/LAPACKE/src/lapacke_sgtrfs.c
lapack-netlib/LAPACKE/src/lapacke_sgtsv.c
lapack-netlib/LAPACKE/src/lapacke_sgtsvx.c
lapack-netlib/LAPACKE/src/lapacke_sgttrf.c
lapack-netlib/LAPACKE/src/lapacke_sgttrs.c
lapack-netlib/LAPACKE/src/lapacke_shgeqz.c
lapack-netlib/LAPACKE/src/lapacke_shsein.c
lapack-netlib/LAPACKE/src/lapacke_shseqr.c
lapack-netlib/LAPACKE/src/lapacke_slacn2.c
lapack-netlib/LAPACKE/src/lapacke_slacpy.c
lapack-netlib/LAPACKE/src/lapacke_slag2d.c
lapack-netlib/LAPACKE/src/lapacke_slagge.c
lapack-netlib/LAPACKE/src/lapacke_slagsy.c
lapack-netlib/LAPACKE/src/lapacke_slange.c
lapack-netlib/LAPACKE/src/lapacke_slange_work.c
lapack-netlib/LAPACKE/src/lapacke_slansy.c
lapack-netlib/LAPACKE/src/lapacke_slansy_work.c
lapack-netlib/LAPACKE/src/lapacke_slantr.c
lapack-netlib/LAPACKE/src/lapacke_slapmr.c
lapack-netlib/LAPACKE/src/lapacke_slapmt.c
lapack-netlib/LAPACKE/src/lapacke_slapy2.c
lapack-netlib/LAPACKE/src/lapacke_slapy3.c
lapack-netlib/LAPACKE/src/lapacke_slarfb.c
lapack-netlib/LAPACKE/src/lapacke_slarfg.c
lapack-netlib/LAPACKE/src/lapacke_slarft.c
lapack-netlib/LAPACKE/src/lapacke_slarfx.c
lapack-netlib/LAPACKE/src/lapacke_slartgp.c
lapack-netlib/LAPACKE/src/lapacke_slartgs.c
lapack-netlib/LAPACKE/src/lapacke_slascl.c
lapack-netlib/LAPACKE/src/lapacke_slaset.c
lapack-netlib/LAPACKE/src/lapacke_slasrt.c
lapack-netlib/LAPACKE/src/lapacke_slassq.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_slassq_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_slaswp.c
lapack-netlib/LAPACKE/src/lapacke_slaswp_work.c
lapack-netlib/LAPACKE/src/lapacke_slatms.c
lapack-netlib/LAPACKE/src/lapacke_slauum.c
lapack-netlib/LAPACKE/src/lapacke_sopgtr.c
lapack-netlib/LAPACKE/src/lapacke_sopmtr.c
lapack-netlib/LAPACKE/src/lapacke_sorbdb.c
lapack-netlib/LAPACKE/src/lapacke_sorbdb_work.c
lapack-netlib/LAPACKE/src/lapacke_sorcsd.c
lapack-netlib/LAPACKE/src/lapacke_sorcsd2by1.c
lapack-netlib/LAPACKE/src/lapacke_sorcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_sorgbr.c
lapack-netlib/LAPACKE/src/lapacke_sorghr.c
lapack-netlib/LAPACKE/src/lapacke_sorglq.c
lapack-netlib/LAPACKE/src/lapacke_sorgql.c
lapack-netlib/LAPACKE/src/lapacke_sorgqr.c
lapack-netlib/LAPACKE/src/lapacke_sorgrq.c
lapack-netlib/LAPACKE/src/lapacke_sorgtr.c
lapack-netlib/LAPACKE/src/lapacke_sormbr.c
lapack-netlib/LAPACKE/src/lapacke_sormhr.c
lapack-netlib/LAPACKE/src/lapacke_sormlq.c
lapack-netlib/LAPACKE/src/lapacke_sormlq_work.c
lapack-netlib/LAPACKE/src/lapacke_sormql.c
lapack-netlib/LAPACKE/src/lapacke_sormqr.c
lapack-netlib/LAPACKE/src/lapacke_sormrq.c
lapack-netlib/LAPACKE/src/lapacke_sormrz.c
lapack-netlib/LAPACKE/src/lapacke_sormtr.c
lapack-netlib/LAPACKE/src/lapacke_spbcon.c
lapack-netlib/LAPACKE/src/lapacke_spbequ.c
lapack-netlib/LAPACKE/src/lapacke_spbrfs.c
lapack-netlib/LAPACKE/src/lapacke_spbstf.c
lapack-netlib/LAPACKE/src/lapacke_spbsv.c
lapack-netlib/LAPACKE/src/lapacke_spbsvx.c
lapack-netlib/LAPACKE/src/lapacke_spbtrf.c
lapack-netlib/LAPACKE/src/lapacke_spbtrs.c
lapack-netlib/LAPACKE/src/lapacke_spftrf.c
lapack-netlib/LAPACKE/src/lapacke_spftri.c
lapack-netlib/LAPACKE/src/lapacke_spftrs.c
lapack-netlib/LAPACKE/src/lapacke_spocon.c
lapack-netlib/LAPACKE/src/lapacke_spoequ.c
lapack-netlib/LAPACKE/src/lapacke_spoequb.c
lapack-netlib/LAPACKE/src/lapacke_sporfs.c
lapack-netlib/LAPACKE/src/lapacke_sporfsx.c
lapack-netlib/LAPACKE/src/lapacke_sposv.c
lapack-netlib/LAPACKE/src/lapacke_sposvx.c
lapack-netlib/LAPACKE/src/lapacke_sposvxx.c
lapack-netlib/LAPACKE/src/lapacke_spotrf.c
lapack-netlib/LAPACKE/src/lapacke_spotrf2.c
lapack-netlib/LAPACKE/src/lapacke_spotri.c
lapack-netlib/LAPACKE/src/lapacke_spotrs.c
lapack-netlib/LAPACKE/src/lapacke_sppcon.c
lapack-netlib/LAPACKE/src/lapacke_sppequ.c
lapack-netlib/LAPACKE/src/lapacke_spprfs.c
lapack-netlib/LAPACKE/src/lapacke_sppsv.c
lapack-netlib/LAPACKE/src/lapacke_sppsvx.c
lapack-netlib/LAPACKE/src/lapacke_spptrf.c
lapack-netlib/LAPACKE/src/lapacke_spptri.c
lapack-netlib/LAPACKE/src/lapacke_spptrs.c
lapack-netlib/LAPACKE/src/lapacke_spstrf.c
lapack-netlib/LAPACKE/src/lapacke_sptcon.c
lapack-netlib/LAPACKE/src/lapacke_spteqr.c
lapack-netlib/LAPACKE/src/lapacke_sptrfs.c
lapack-netlib/LAPACKE/src/lapacke_sptsv.c
lapack-netlib/LAPACKE/src/lapacke_sptsvx.c
lapack-netlib/LAPACKE/src/lapacke_spttrf.c
lapack-netlib/LAPACKE/src/lapacke_spttrs.c
lapack-netlib/LAPACKE/src/lapacke_ssbev.c
lapack-netlib/LAPACKE/src/lapacke_ssbev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssbevd.c
lapack-netlib/LAPACKE/src/lapacke_ssbevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssbevx.c
lapack-netlib/LAPACKE/src/lapacke_ssbevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssbgst.c
lapack-netlib/LAPACKE/src/lapacke_ssbgv.c
lapack-netlib/LAPACKE/src/lapacke_ssbgvd.c
lapack-netlib/LAPACKE/src/lapacke_ssbgvx.c
lapack-netlib/LAPACKE/src/lapacke_ssbtrd.c
lapack-netlib/LAPACKE/src/lapacke_ssfrk.c
lapack-netlib/LAPACKE/src/lapacke_sspcon.c
lapack-netlib/LAPACKE/src/lapacke_sspev.c
lapack-netlib/LAPACKE/src/lapacke_sspevd.c
lapack-netlib/LAPACKE/src/lapacke_sspevx.c
lapack-netlib/LAPACKE/src/lapacke_sspgst.c
lapack-netlib/LAPACKE/src/lapacke_sspgv.c
lapack-netlib/LAPACKE/src/lapacke_sspgvd.c
lapack-netlib/LAPACKE/src/lapacke_sspgvx.c
lapack-netlib/LAPACKE/src/lapacke_ssprfs.c
lapack-netlib/LAPACKE/src/lapacke_sspsv.c
lapack-netlib/LAPACKE/src/lapacke_sspsvx.c
lapack-netlib/LAPACKE/src/lapacke_ssptrd.c
lapack-netlib/LAPACKE/src/lapacke_ssptrf.c
lapack-netlib/LAPACKE/src/lapacke_ssptri.c
lapack-netlib/LAPACKE/src/lapacke_ssptrs.c
lapack-netlib/LAPACKE/src/lapacke_sstebz.c
lapack-netlib/LAPACKE/src/lapacke_sstedc.c
lapack-netlib/LAPACKE/src/lapacke_sstegr.c
lapack-netlib/LAPACKE/src/lapacke_sstein.c
lapack-netlib/LAPACKE/src/lapacke_sstemr.c
lapack-netlib/LAPACKE/src/lapacke_sstemr_work.c
lapack-netlib/LAPACKE/src/lapacke_ssteqr.c
lapack-netlib/LAPACKE/src/lapacke_ssterf.c
lapack-netlib/LAPACKE/src/lapacke_sstev.c
lapack-netlib/LAPACKE/src/lapacke_sstevd.c
lapack-netlib/LAPACKE/src/lapacke_sstevr.c
lapack-netlib/LAPACKE/src/lapacke_sstevx.c
lapack-netlib/LAPACKE/src/lapacke_ssycon.c
lapack-netlib/LAPACKE/src/lapacke_ssycon_3.c
lapack-netlib/LAPACKE/src/lapacke_ssyconv.c
lapack-netlib/LAPACKE/src/lapacke_ssyequb.c
lapack-netlib/LAPACKE/src/lapacke_ssyev.c
lapack-netlib/LAPACKE/src/lapacke_ssyev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssyevd.c
lapack-netlib/LAPACKE/src/lapacke_ssyevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssyevr.c
lapack-netlib/LAPACKE/src/lapacke_ssyevr_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssyevr_work.c
lapack-netlib/LAPACKE/src/lapacke_ssyevx.c
lapack-netlib/LAPACKE/src/lapacke_ssyevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssyevx_work.c
lapack-netlib/LAPACKE/src/lapacke_ssygst.c
lapack-netlib/LAPACKE/src/lapacke_ssygv.c
lapack-netlib/LAPACKE/src/lapacke_ssygv_2stage.c
lapack-netlib/LAPACKE/src/lapacke_ssygvd.c
lapack-netlib/LAPACKE/src/lapacke_ssygvx.c
lapack-netlib/LAPACKE/src/lapacke_ssygvx_work.c
lapack-netlib/LAPACKE/src/lapacke_ssyrfs.c
lapack-netlib/LAPACKE/src/lapacke_ssyrfsx.c
lapack-netlib/LAPACKE/src/lapacke_ssysv.c
lapack-netlib/LAPACKE/src/lapacke_ssysv_aa.c
lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssysv_rk.c
lapack-netlib/LAPACKE/src/lapacke_ssysv_rook.c
lapack-netlib/LAPACKE/src/lapacke_ssysvx.c
lapack-netlib/LAPACKE/src/lapacke_ssysvxx.c
lapack-netlib/LAPACKE/src/lapacke_ssyswapr.c
lapack-netlib/LAPACKE/src/lapacke_ssytrd.c
lapack-netlib/LAPACKE/src/lapacke_ssytrf.c
lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssytrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_ssytrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_ssytri.c
lapack-netlib/LAPACKE/src/lapacke_ssytri2.c
lapack-netlib/LAPACKE/src/lapacke_ssytri2x.c
lapack-netlib/LAPACKE/src/lapacke_ssytri_3.c
lapack-netlib/LAPACKE/src/lapacke_ssytrs.c
lapack-netlib/LAPACKE/src/lapacke_ssytrs2.c
lapack-netlib/LAPACKE/src/lapacke_ssytrs_3.c
lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_ssytrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_stbcon.c
lapack-netlib/LAPACKE/src/lapacke_stbrfs.c
lapack-netlib/LAPACKE/src/lapacke_stbtrs.c
lapack-netlib/LAPACKE/src/lapacke_stfsm.c
lapack-netlib/LAPACKE/src/lapacke_stftri.c
lapack-netlib/LAPACKE/src/lapacke_stfttp.c
lapack-netlib/LAPACKE/src/lapacke_stfttr.c
lapack-netlib/LAPACKE/src/lapacke_stgevc.c
lapack-netlib/LAPACKE/src/lapacke_stgexc.c
lapack-netlib/LAPACKE/src/lapacke_stgsen.c
lapack-netlib/LAPACKE/src/lapacke_stgsja.c
lapack-netlib/LAPACKE/src/lapacke_stgsna.c
lapack-netlib/LAPACKE/src/lapacke_stgsyl.c
lapack-netlib/LAPACKE/src/lapacke_stpcon.c
lapack-netlib/LAPACKE/src/lapacke_stpmqrt.c
lapack-netlib/LAPACKE/src/lapacke_stpqrt.c
lapack-netlib/LAPACKE/src/lapacke_stpqrt2.c
lapack-netlib/LAPACKE/src/lapacke_stprfb.c
lapack-netlib/LAPACKE/src/lapacke_stprfs.c
lapack-netlib/LAPACKE/src/lapacke_stptri.c
lapack-netlib/LAPACKE/src/lapacke_stptrs.c
lapack-netlib/LAPACKE/src/lapacke_stpttf.c
lapack-netlib/LAPACKE/src/lapacke_stpttr.c
lapack-netlib/LAPACKE/src/lapacke_strcon.c
lapack-netlib/LAPACKE/src/lapacke_strevc.c
lapack-netlib/LAPACKE/src/lapacke_strexc.c
lapack-netlib/LAPACKE/src/lapacke_strrfs.c
lapack-netlib/LAPACKE/src/lapacke_strsen.c
lapack-netlib/LAPACKE/src/lapacke_strsna.c
lapack-netlib/LAPACKE/src/lapacke_strsyl.c
lapack-netlib/LAPACKE/src/lapacke_strtri.c
lapack-netlib/LAPACKE/src/lapacke_strtrs.c
lapack-netlib/LAPACKE/src/lapacke_strttf.c
lapack-netlib/LAPACKE/src/lapacke_strttp.c
lapack-netlib/LAPACKE/src/lapacke_stzrzf.c
lapack-netlib/LAPACKE/src/lapacke_zbbcsd.c
lapack-netlib/LAPACKE/src/lapacke_zbbcsd_work.c
lapack-netlib/LAPACKE/src/lapacke_zbdsqr.c
lapack-netlib/LAPACKE/src/lapacke_zcgesv.c
lapack-netlib/LAPACKE/src/lapacke_zcposv.c
lapack-netlib/LAPACKE/src/lapacke_zgbbrd.c
lapack-netlib/LAPACKE/src/lapacke_zgbcon.c
lapack-netlib/LAPACKE/src/lapacke_zgbequ.c
lapack-netlib/LAPACKE/src/lapacke_zgbequb.c
lapack-netlib/LAPACKE/src/lapacke_zgbrfs.c
lapack-netlib/LAPACKE/src/lapacke_zgbrfsx.c
lapack-netlib/LAPACKE/src/lapacke_zgbsv.c
lapack-netlib/LAPACKE/src/lapacke_zgbsvx.c
lapack-netlib/LAPACKE/src/lapacke_zgbsvxx.c
lapack-netlib/LAPACKE/src/lapacke_zgbtrf.c
lapack-netlib/LAPACKE/src/lapacke_zgbtrs.c
lapack-netlib/LAPACKE/src/lapacke_zgebak.c
lapack-netlib/LAPACKE/src/lapacke_zgebal.c
lapack-netlib/LAPACKE/src/lapacke_zgebrd.c
lapack-netlib/LAPACKE/src/lapacke_zgecon.c
lapack-netlib/LAPACKE/src/lapacke_zgeequ.c
lapack-netlib/LAPACKE/src/lapacke_zgeequb.c
lapack-netlib/LAPACKE/src/lapacke_zgees.c
lapack-netlib/LAPACKE/src/lapacke_zgeesx.c
lapack-netlib/LAPACKE/src/lapacke_zgeev.c
lapack-netlib/LAPACKE/src/lapacke_zgeevx.c
lapack-netlib/LAPACKE/src/lapacke_zgehrd.c
lapack-netlib/LAPACKE/src/lapacke_zgejsv.c
lapack-netlib/LAPACKE/src/lapacke_zgelq.c
lapack-netlib/LAPACKE/src/lapacke_zgelq2.c
lapack-netlib/LAPACKE/src/lapacke_zgelqf.c
lapack-netlib/LAPACKE/src/lapacke_zgels.c
lapack-netlib/LAPACKE/src/lapacke_zgelsd.c
lapack-netlib/LAPACKE/src/lapacke_zgelss.c
lapack-netlib/LAPACKE/src/lapacke_zgelsy.c
lapack-netlib/LAPACKE/src/lapacke_zgemlq.c
lapack-netlib/LAPACKE/src/lapacke_zgemqr.c
lapack-netlib/LAPACKE/src/lapacke_zgemqrt.c
lapack-netlib/LAPACKE/src/lapacke_zgeqlf.c
lapack-netlib/LAPACKE/src/lapacke_zgeqp3.c
lapack-netlib/LAPACKE/src/lapacke_zgeqpf.c
lapack-netlib/LAPACKE/src/lapacke_zgeqr.c
lapack-netlib/LAPACKE/src/lapacke_zgeqr2.c
lapack-netlib/LAPACKE/src/lapacke_zgeqrf.c
lapack-netlib/LAPACKE/src/lapacke_zgeqrfp.c
lapack-netlib/LAPACKE/src/lapacke_zgeqrt.c
lapack-netlib/LAPACKE/src/lapacke_zgeqrt2.c
lapack-netlib/LAPACKE/src/lapacke_zgeqrt3.c
lapack-netlib/LAPACKE/src/lapacke_zgerfs.c
lapack-netlib/LAPACKE/src/lapacke_zgerfsx.c
lapack-netlib/LAPACKE/src/lapacke_zgerqf.c
lapack-netlib/LAPACKE/src/lapacke_zgesdd.c
lapack-netlib/LAPACKE/src/lapacke_zgesv.c
lapack-netlib/LAPACKE/src/lapacke_zgesvd.c
lapack-netlib/LAPACKE/src/lapacke_zgesvdx.c
lapack-netlib/LAPACKE/src/lapacke_zgesvdx_work.c
lapack-netlib/LAPACKE/src/lapacke_zgesvj.c
lapack-netlib/LAPACKE/src/lapacke_zgesvj_work.c
lapack-netlib/LAPACKE/src/lapacke_zgesvx.c
lapack-netlib/LAPACKE/src/lapacke_zgesvxx.c
lapack-netlib/LAPACKE/src/lapacke_zgetf2.c
lapack-netlib/LAPACKE/src/lapacke_zgetrf.c
lapack-netlib/LAPACKE/src/lapacke_zgetrf2.c
lapack-netlib/LAPACKE/src/lapacke_zgetri.c
lapack-netlib/LAPACKE/src/lapacke_zgetrs.c
lapack-netlib/LAPACKE/src/lapacke_zgetsls.c
lapack-netlib/LAPACKE/src/lapacke_zggbak.c
lapack-netlib/LAPACKE/src/lapacke_zggbal.c
lapack-netlib/LAPACKE/src/lapacke_zgges.c
lapack-netlib/LAPACKE/src/lapacke_zgges3.c
lapack-netlib/LAPACKE/src/lapacke_zggesx.c
lapack-netlib/LAPACKE/src/lapacke_zggev.c
lapack-netlib/LAPACKE/src/lapacke_zggev3.c
lapack-netlib/LAPACKE/src/lapacke_zggevx.c
lapack-netlib/LAPACKE/src/lapacke_zggglm.c
lapack-netlib/LAPACKE/src/lapacke_zgghd3.c
lapack-netlib/LAPACKE/src/lapacke_zgghrd.c
lapack-netlib/LAPACKE/src/lapacke_zgglse.c
lapack-netlib/LAPACKE/src/lapacke_zggqrf.c
lapack-netlib/LAPACKE/src/lapacke_zggrqf.c
lapack-netlib/LAPACKE/src/lapacke_zggsvd.c
lapack-netlib/LAPACKE/src/lapacke_zggsvd3.c
lapack-netlib/LAPACKE/src/lapacke_zggsvp.c
lapack-netlib/LAPACKE/src/lapacke_zggsvp3.c
lapack-netlib/LAPACKE/src/lapacke_zgtcon.c
lapack-netlib/LAPACKE/src/lapacke_zgtrfs.c
lapack-netlib/LAPACKE/src/lapacke_zgtsv.c
lapack-netlib/LAPACKE/src/lapacke_zgtsvx.c
lapack-netlib/LAPACKE/src/lapacke_zgttrf.c
lapack-netlib/LAPACKE/src/lapacke_zgttrs.c
lapack-netlib/LAPACKE/src/lapacke_zhbev.c
lapack-netlib/LAPACKE/src/lapacke_zhbev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zhbevd.c
lapack-netlib/LAPACKE/src/lapacke_zhbevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zhbevx.c
lapack-netlib/LAPACKE/src/lapacke_zhbevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zhbgst.c
lapack-netlib/LAPACKE/src/lapacke_zhbgv.c
lapack-netlib/LAPACKE/src/lapacke_zhbgvd.c
lapack-netlib/LAPACKE/src/lapacke_zhbgvx.c
lapack-netlib/LAPACKE/src/lapacke_zhbtrd.c
lapack-netlib/LAPACKE/src/lapacke_zhecon.c
lapack-netlib/LAPACKE/src/lapacke_zhecon_3.c
lapack-netlib/LAPACKE/src/lapacke_zheequb.c
lapack-netlib/LAPACKE/src/lapacke_zheev.c
lapack-netlib/LAPACKE/src/lapacke_zheev_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zheevd.c
lapack-netlib/LAPACKE/src/lapacke_zheevd_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zheevr.c
lapack-netlib/LAPACKE/src/lapacke_zheevr_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zheevr_work.c
lapack-netlib/LAPACKE/src/lapacke_zheevx.c
lapack-netlib/LAPACKE/src/lapacke_zheevx_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zheevx_work.c
lapack-netlib/LAPACKE/src/lapacke_zhegst.c
lapack-netlib/LAPACKE/src/lapacke_zhegv.c
lapack-netlib/LAPACKE/src/lapacke_zhegv_2stage.c
lapack-netlib/LAPACKE/src/lapacke_zhegvd.c
lapack-netlib/LAPACKE/src/lapacke_zhegvx.c
lapack-netlib/LAPACKE/src/lapacke_zhegvx_work.c
lapack-netlib/LAPACKE/src/lapacke_zherfs.c
lapack-netlib/LAPACKE/src/lapacke_zherfsx.c
lapack-netlib/LAPACKE/src/lapacke_zhesv.c
lapack-netlib/LAPACKE/src/lapacke_zhesv_aa.c
lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhesv_rk.c
lapack-netlib/LAPACKE/src/lapacke_zhesvx.c
lapack-netlib/LAPACKE/src/lapacke_zhesvxx.c
lapack-netlib/LAPACKE/src/lapacke_zheswapr.c
lapack-netlib/LAPACKE/src/lapacke_zhetrd.c
lapack-netlib/LAPACKE/src/lapacke_zhetrf.c
lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhetrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_zhetrf_rk_work.c
lapack-netlib/LAPACKE/src/lapacke_zhetrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_zhetri.c
lapack-netlib/LAPACKE/src/lapacke_zhetri2.c
lapack-netlib/LAPACKE/src/lapacke_zhetri2x.c
lapack-netlib/LAPACKE/src/lapacke_zhetri_3.c
lapack-netlib/LAPACKE/src/lapacke_zhetrs.c
lapack-netlib/LAPACKE/src/lapacke_zhetrs2.c
lapack-netlib/LAPACKE/src/lapacke_zhetrs_3.c
lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zhetrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_zhfrk.c
lapack-netlib/LAPACKE/src/lapacke_zhgeqz.c
lapack-netlib/LAPACKE/src/lapacke_zhpcon.c
lapack-netlib/LAPACKE/src/lapacke_zhpev.c
lapack-netlib/LAPACKE/src/lapacke_zhpevd.c
lapack-netlib/LAPACKE/src/lapacke_zhpevx.c
lapack-netlib/LAPACKE/src/lapacke_zhpgst.c
lapack-netlib/LAPACKE/src/lapacke_zhpgv.c
lapack-netlib/LAPACKE/src/lapacke_zhpgvd.c
lapack-netlib/LAPACKE/src/lapacke_zhpgvx.c
lapack-netlib/LAPACKE/src/lapacke_zhprfs.c
lapack-netlib/LAPACKE/src/lapacke_zhpsv.c
lapack-netlib/LAPACKE/src/lapacke_zhpsvx.c
lapack-netlib/LAPACKE/src/lapacke_zhptrd.c
lapack-netlib/LAPACKE/src/lapacke_zhptrf.c
lapack-netlib/LAPACKE/src/lapacke_zhptri.c
lapack-netlib/LAPACKE/src/lapacke_zhptrs.c
lapack-netlib/LAPACKE/src/lapacke_zhsein.c
lapack-netlib/LAPACKE/src/lapacke_zhseqr.c
lapack-netlib/LAPACKE/src/lapacke_zlacgv.c
lapack-netlib/LAPACKE/src/lapacke_zlacn2.c
lapack-netlib/LAPACKE/src/lapacke_zlacp2.c
lapack-netlib/LAPACKE/src/lapacke_zlacp2_work.c
lapack-netlib/LAPACKE/src/lapacke_zlacpy.c
lapack-netlib/LAPACKE/src/lapacke_zlacrm.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlacrm_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlag2c.c
lapack-netlib/LAPACKE/src/lapacke_zlagge.c
lapack-netlib/LAPACKE/src/lapacke_zlaghe.c
lapack-netlib/LAPACKE/src/lapacke_zlagsy.c
lapack-netlib/LAPACKE/src/lapacke_zlange.c
lapack-netlib/LAPACKE/src/lapacke_zlange_work.c
lapack-netlib/LAPACKE/src/lapacke_zlanhe.c
lapack-netlib/LAPACKE/src/lapacke_zlanhe_work.c
lapack-netlib/LAPACKE/src/lapacke_zlansy.c
lapack-netlib/LAPACKE/src/lapacke_zlansy_work.c
lapack-netlib/LAPACKE/src/lapacke_zlantr.c
lapack-netlib/LAPACKE/src/lapacke_zlapmr.c
lapack-netlib/LAPACKE/src/lapacke_zlapmt.c
lapack-netlib/LAPACKE/src/lapacke_zlarcm.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlarcm_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlarfb.c
lapack-netlib/LAPACKE/src/lapacke_zlarfg.c
lapack-netlib/LAPACKE/src/lapacke_zlarft.c
lapack-netlib/LAPACKE/src/lapacke_zlarfx.c
lapack-netlib/LAPACKE/src/lapacke_zlascl.c
lapack-netlib/LAPACKE/src/lapacke_zlaset.c
lapack-netlib/LAPACKE/src/lapacke_zlassq.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlassq_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zlaswp.c
lapack-netlib/LAPACKE/src/lapacke_zlaswp_work.c
lapack-netlib/LAPACKE/src/lapacke_zlatms.c
lapack-netlib/LAPACKE/src/lapacke_zlauum.c
lapack-netlib/LAPACKE/src/lapacke_zpbcon.c
lapack-netlib/LAPACKE/src/lapacke_zpbequ.c
lapack-netlib/LAPACKE/src/lapacke_zpbrfs.c
lapack-netlib/LAPACKE/src/lapacke_zpbstf.c
lapack-netlib/LAPACKE/src/lapacke_zpbsv.c
lapack-netlib/LAPACKE/src/lapacke_zpbsvx.c
lapack-netlib/LAPACKE/src/lapacke_zpbtrf.c
lapack-netlib/LAPACKE/src/lapacke_zpbtrs.c
lapack-netlib/LAPACKE/src/lapacke_zpftrf.c
lapack-netlib/LAPACKE/src/lapacke_zpftri.c
lapack-netlib/LAPACKE/src/lapacke_zpftrs.c
lapack-netlib/LAPACKE/src/lapacke_zpocon.c
lapack-netlib/LAPACKE/src/lapacke_zpoequ.c
lapack-netlib/LAPACKE/src/lapacke_zpoequb.c
lapack-netlib/LAPACKE/src/lapacke_zporfs.c
lapack-netlib/LAPACKE/src/lapacke_zporfsx.c
lapack-netlib/LAPACKE/src/lapacke_zposv.c
lapack-netlib/LAPACKE/src/lapacke_zposvx.c
lapack-netlib/LAPACKE/src/lapacke_zposvxx.c
lapack-netlib/LAPACKE/src/lapacke_zpotrf.c
lapack-netlib/LAPACKE/src/lapacke_zpotrf2.c
lapack-netlib/LAPACKE/src/lapacke_zpotri.c
lapack-netlib/LAPACKE/src/lapacke_zpotrs.c
lapack-netlib/LAPACKE/src/lapacke_zppcon.c
lapack-netlib/LAPACKE/src/lapacke_zppequ.c
lapack-netlib/LAPACKE/src/lapacke_zpprfs.c
lapack-netlib/LAPACKE/src/lapacke_zppsv.c
lapack-netlib/LAPACKE/src/lapacke_zppsvx.c
lapack-netlib/LAPACKE/src/lapacke_zpptrf.c
lapack-netlib/LAPACKE/src/lapacke_zpptri.c
lapack-netlib/LAPACKE/src/lapacke_zpptrs.c
lapack-netlib/LAPACKE/src/lapacke_zpstrf.c
lapack-netlib/LAPACKE/src/lapacke_zptcon.c
lapack-netlib/LAPACKE/src/lapacke_zpteqr.c
lapack-netlib/LAPACKE/src/lapacke_zptrfs.c
lapack-netlib/LAPACKE/src/lapacke_zptsv.c
lapack-netlib/LAPACKE/src/lapacke_zptsvx.c
lapack-netlib/LAPACKE/src/lapacke_zpttrf.c
lapack-netlib/LAPACKE/src/lapacke_zpttrs.c
lapack-netlib/LAPACKE/src/lapacke_zspcon.c
lapack-netlib/LAPACKE/src/lapacke_zsprfs.c
lapack-netlib/LAPACKE/src/lapacke_zspsv.c
lapack-netlib/LAPACKE/src/lapacke_zspsvx.c
lapack-netlib/LAPACKE/src/lapacke_zsptrf.c
lapack-netlib/LAPACKE/src/lapacke_zsptri.c
lapack-netlib/LAPACKE/src/lapacke_zsptrs.c
lapack-netlib/LAPACKE/src/lapacke_zstedc.c
lapack-netlib/LAPACKE/src/lapacke_zstegr.c
lapack-netlib/LAPACKE/src/lapacke_zstein.c
lapack-netlib/LAPACKE/src/lapacke_zstemr.c
lapack-netlib/LAPACKE/src/lapacke_zstemr_work.c
lapack-netlib/LAPACKE/src/lapacke_zsteqr.c
lapack-netlib/LAPACKE/src/lapacke_zsycon.c
lapack-netlib/LAPACKE/src/lapacke_zsycon_3.c
lapack-netlib/LAPACKE/src/lapacke_zsyconv.c
lapack-netlib/LAPACKE/src/lapacke_zsyequb.c
lapack-netlib/LAPACKE/src/lapacke_zsyr.c
lapack-netlib/LAPACKE/src/lapacke_zsyrfs.c
lapack-netlib/LAPACKE/src/lapacke_zsyrfsx.c
lapack-netlib/LAPACKE/src/lapacke_zsysv.c
lapack-netlib/LAPACKE/src/lapacke_zsysv_aa.c
lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsysv_rk.c
lapack-netlib/LAPACKE/src/lapacke_zsysv_rook.c
lapack-netlib/LAPACKE/src/lapacke_zsysvx.c
lapack-netlib/LAPACKE/src/lapacke_zsysvxx.c
lapack-netlib/LAPACKE/src/lapacke_zsyswapr.c
lapack-netlib/LAPACKE/src/lapacke_zsytrf.c
lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa.c
lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsytrf_rk.c
lapack-netlib/LAPACKE/src/lapacke_zsytrf_rook.c
lapack-netlib/LAPACKE/src/lapacke_zsytri.c
lapack-netlib/LAPACKE/src/lapacke_zsytri2.c
lapack-netlib/LAPACKE/src/lapacke_zsytri2x.c
lapack-netlib/LAPACKE/src/lapacke_zsytri_3.c
lapack-netlib/LAPACKE/src/lapacke_zsytrs.c
lapack-netlib/LAPACKE/src/lapacke_zsytrs2.c
lapack-netlib/LAPACKE/src/lapacke_zsytrs_3.c
lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa.c
lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage_work.c [new file with mode: 0644]
lapack-netlib/LAPACKE/src/lapacke_zsytrs_rook.c
lapack-netlib/LAPACKE/src/lapacke_ztbcon.c
lapack-netlib/LAPACKE/src/lapacke_ztbrfs.c
lapack-netlib/LAPACKE/src/lapacke_ztbtrs.c
lapack-netlib/LAPACKE/src/lapacke_ztfsm.c
lapack-netlib/LAPACKE/src/lapacke_ztftri.c
lapack-netlib/LAPACKE/src/lapacke_ztfttp.c
lapack-netlib/LAPACKE/src/lapacke_ztfttr.c
lapack-netlib/LAPACKE/src/lapacke_ztgevc.c
lapack-netlib/LAPACKE/src/lapacke_ztgexc.c
lapack-netlib/LAPACKE/src/lapacke_ztgsen.c
lapack-netlib/LAPACKE/src/lapacke_ztgsja.c
lapack-netlib/LAPACKE/src/lapacke_ztgsna.c
lapack-netlib/LAPACKE/src/lapacke_ztgsyl.c
lapack-netlib/LAPACKE/src/lapacke_ztpcon.c
lapack-netlib/LAPACKE/src/lapacke_ztpmqrt.c
lapack-netlib/LAPACKE/src/lapacke_ztpqrt.c
lapack-netlib/LAPACKE/src/lapacke_ztpqrt2.c
lapack-netlib/LAPACKE/src/lapacke_ztprfb.c
lapack-netlib/LAPACKE/src/lapacke_ztprfs.c
lapack-netlib/LAPACKE/src/lapacke_ztptri.c
lapack-netlib/LAPACKE/src/lapacke_ztptrs.c
lapack-netlib/LAPACKE/src/lapacke_ztpttf.c
lapack-netlib/LAPACKE/src/lapacke_ztpttr.c
lapack-netlib/LAPACKE/src/lapacke_ztrcon.c
lapack-netlib/LAPACKE/src/lapacke_ztrevc.c
lapack-netlib/LAPACKE/src/lapacke_ztrexc.c
lapack-netlib/LAPACKE/src/lapacke_ztrrfs.c
lapack-netlib/LAPACKE/src/lapacke_ztrsen.c
lapack-netlib/LAPACKE/src/lapacke_ztrsna.c
lapack-netlib/LAPACKE/src/lapacke_ztrsyl.c
lapack-netlib/LAPACKE/src/lapacke_ztrtri.c
lapack-netlib/LAPACKE/src/lapacke_ztrtrs.c
lapack-netlib/LAPACKE/src/lapacke_ztrttf.c
lapack-netlib/LAPACKE/src/lapacke_ztrttp.c
lapack-netlib/LAPACKE/src/lapacke_ztzrzf.c
lapack-netlib/LAPACKE/src/lapacke_zunbdb.c
lapack-netlib/LAPACKE/src/lapacke_zunbdb_work.c
lapack-netlib/LAPACKE/src/lapacke_zuncsd.c
lapack-netlib/LAPACKE/src/lapacke_zuncsd2by1.c
lapack-netlib/LAPACKE/src/lapacke_zuncsd_work.c
lapack-netlib/LAPACKE/src/lapacke_zungbr.c
lapack-netlib/LAPACKE/src/lapacke_zunghr.c
lapack-netlib/LAPACKE/src/lapacke_zunglq.c
lapack-netlib/LAPACKE/src/lapacke_zungql.c
lapack-netlib/LAPACKE/src/lapacke_zungqr.c
lapack-netlib/LAPACKE/src/lapacke_zungrq.c
lapack-netlib/LAPACKE/src/lapacke_zungtr.c
lapack-netlib/LAPACKE/src/lapacke_zunmbr.c
lapack-netlib/LAPACKE/src/lapacke_zunmhr.c
lapack-netlib/LAPACKE/src/lapacke_zunmlq.c
lapack-netlib/LAPACKE/src/lapacke_zunmql.c
lapack-netlib/LAPACKE/src/lapacke_zunmqr.c
lapack-netlib/LAPACKE/src/lapacke_zunmrq.c
lapack-netlib/LAPACKE/src/lapacke_zunmrz.c
lapack-netlib/LAPACKE/src/lapacke_zunmtr.c
lapack-netlib/LAPACKE/src/lapacke_zupgtr.c
lapack-netlib/LAPACKE/src/lapacke_zupmtr.c
lapack-netlib/LAPACKE/utils/CMakeLists.txt
lapack-netlib/LAPACKE/utils/Makefile
lapack-netlib/LAPACKE/utils/lapacke_ctp_trans.c
lapack-netlib/LAPACKE/utils/lapacke_dtp_trans.c
lapack-netlib/LAPACKE/utils/lapacke_stp_trans.c
lapack-netlib/LAPACKE/utils/lapacke_ztp_trans.c
lapack-netlib/LICENSE
lapack-netlib/Makefile
lapack-netlib/README.md
lapack-netlib/SRC/CMakeLists.txt
lapack-netlib/SRC/Makefile
lapack-netlib/SRC/VARIANTS/Makefile
lapack-netlib/SRC/VARIANTS/README
lapack-netlib/SRC/cbbcsd.f
lapack-netlib/SRC/cgebd2.f
lapack-netlib/SRC/cgebrd.f
lapack-netlib/SRC/cgeevx.f
lapack-netlib/SRC/cgejsv.f
lapack-netlib/SRC/cgelqt.f
lapack-netlib/SRC/cgelqt3.f
lapack-netlib/SRC/cgemlqt.f
lapack-netlib/SRC/cgeqrt.f
lapack-netlib/SRC/cgesv.f
lapack-netlib/SRC/cgesvdx.f
lapack-netlib/SRC/cgesvj.f
lapack-netlib/SRC/cgetsls.f
lapack-netlib/SRC/cggesx.f
lapack-netlib/SRC/cgghd3.f
lapack-netlib/SRC/cgsvj0.f
lapack-netlib/SRC/cgsvj1.f
lapack-netlib/SRC/chb2st_kernels.f
lapack-netlib/SRC/chbev_2stage.f
lapack-netlib/SRC/chbevd_2stage.f
lapack-netlib/SRC/chbevx_2stage.f
lapack-netlib/SRC/checon_3.f
lapack-netlib/SRC/cheequb.f
lapack-netlib/SRC/cheev_2stage.f
lapack-netlib/SRC/cheevd_2stage.f
lapack-netlib/SRC/cheevr_2stage.f
lapack-netlib/SRC/cheevx_2stage.f
lapack-netlib/SRC/chegv_2stage.f
lapack-netlib/SRC/chesv_aa.f
lapack-netlib/SRC/chesv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/chetrd_2stage.f
lapack-netlib/SRC/chetrd_hb2st.F
lapack-netlib/SRC/chetrd_he2hb.f
lapack-netlib/SRC/chetrf_aa.f
lapack-netlib/SRC/chetrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/chetri2.f
lapack-netlib/SRC/chetri_3.f
lapack-netlib/SRC/chetri_3x.f
lapack-netlib/SRC/chetrs_3.f
lapack-netlib/SRC/chetrs_aa.f
lapack-netlib/SRC/chetrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/cla_gbrfsx_extended.f
lapack-netlib/SRC/cla_heamv.f
lapack-netlib/SRC/cla_herfsx_extended.f
lapack-netlib/SRC/cla_porfsx_extended.f
lapack-netlib/SRC/cla_syamv.f
lapack-netlib/SRC/cla_syrfsx_extended.f
lapack-netlib/SRC/clabrd.f
lapack-netlib/SRC/clahef_aa.f
lapack-netlib/SRC/clalsa.f
lapack-netlib/SRC/clamswlq.f
lapack-netlib/SRC/clamtsqr.f
lapack-netlib/SRC/claqr1.f
lapack-netlib/SRC/claqr2.f
lapack-netlib/SRC/claqr3.f
lapack-netlib/SRC/claqr4.f
lapack-netlib/SRC/claqr5.f
lapack-netlib/SRC/clarfg.f
lapack-netlib/SRC/clarfgp.f
lapack-netlib/SRC/clarrv.f
lapack-netlib/SRC/claswlq.f
lapack-netlib/SRC/claswp.f
lapack-netlib/SRC/clasyf_aa.f
lapack-netlib/SRC/cstegr.f
lapack-netlib/SRC/cstemr.f
lapack-netlib/SRC/csycon_3.f
lapack-netlib/SRC/csyconvf.f
lapack-netlib/SRC/csyconvf_rook.f
lapack-netlib/SRC/csyequb.f
lapack-netlib/SRC/csysv_aa.f
lapack-netlib/SRC/csysv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/csytrf_aa.f
lapack-netlib/SRC/csytrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/csytri2.f
lapack-netlib/SRC/csytri2x.f
lapack-netlib/SRC/csytri_3.f
lapack-netlib/SRC/csytri_3x.f
lapack-netlib/SRC/csytrs_3.f
lapack-netlib/SRC/csytrs_aa.f
lapack-netlib/SRC/csytrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/ctgex2.f
lapack-netlib/SRC/ctgexc.f
lapack-netlib/SRC/ctgsen.f
lapack-netlib/SRC/ctplqt.f
lapack-netlib/SRC/ctplqt2.f
lapack-netlib/SRC/ctpmlqt.f
lapack-netlib/SRC/ctpmqrt.f
lapack-netlib/SRC/ctrevc3.f
lapack-netlib/SRC/cunbdb1.f
lapack-netlib/SRC/cunbdb2.f
lapack-netlib/SRC/cunbdb3.f
lapack-netlib/SRC/cunbdb4.f
lapack-netlib/SRC/cunbdb5.f
lapack-netlib/SRC/cunbdb6.f
lapack-netlib/SRC/cuncsd.f
lapack-netlib/SRC/cuncsd2by1.f
lapack-netlib/SRC/cunm22.f
lapack-netlib/SRC/dbbcsd.f
lapack-netlib/SRC/dbdsdc.f
lapack-netlib/SRC/dbdsqr.f
lapack-netlib/SRC/dbdsvdx.f
lapack-netlib/SRC/dgebal.f
lapack-netlib/SRC/dgebd2.f
lapack-netlib/SRC/dgebrd.f
lapack-netlib/SRC/dgejsv.f
lapack-netlib/SRC/dgelqt.f
lapack-netlib/SRC/dgelqt3.f
lapack-netlib/SRC/dgelsd.f
lapack-netlib/SRC/dgemlqt.f
lapack-netlib/SRC/dgeqrt.f
lapack-netlib/SRC/dgesc2.f
lapack-netlib/SRC/dgesvdx.f
lapack-netlib/SRC/dgesvj.f
lapack-netlib/SRC/dgetc2.f
lapack-netlib/SRC/dgetsls.f
lapack-netlib/SRC/dggesx.f
lapack-netlib/SRC/dgghd3.f
lapack-netlib/SRC/dgsvj0.f
lapack-netlib/SRC/dgsvj1.f
lapack-netlib/SRC/disnan.f
lapack-netlib/SRC/dla_gbamv.f
lapack-netlib/SRC/dla_gbrfsx_extended.f
lapack-netlib/SRC/dla_geamv.f
lapack-netlib/SRC/dla_gerfsx_extended.f
lapack-netlib/SRC/dla_porfsx_extended.f
lapack-netlib/SRC/dla_syamv.f
lapack-netlib/SRC/dla_syrfsx_extended.f
lapack-netlib/SRC/dlabrd.f
lapack-netlib/SRC/dlaed3.f
lapack-netlib/SRC/dlaisnan.f
lapack-netlib/SRC/dlalsa.f
lapack-netlib/SRC/dlamswlq.f
lapack-netlib/SRC/dlamtsqr.f
lapack-netlib/SRC/dlapy2.f
lapack-netlib/SRC/dlaqr1.f
lapack-netlib/SRC/dlaqr2.f
lapack-netlib/SRC/dlaqr3.f
lapack-netlib/SRC/dlaqr5.f
lapack-netlib/SRC/dlarfg.f
lapack-netlib/SRC/dlarfgp.f
lapack-netlib/SRC/dlarra.f
lapack-netlib/SRC/dlarrb.f
lapack-netlib/SRC/dlarrc.f
lapack-netlib/SRC/dlarrd.f
lapack-netlib/SRC/dlarre.f
lapack-netlib/SRC/dlarrf.f
lapack-netlib/SRC/dlarrj.f
lapack-netlib/SRC/dlarrk.f
lapack-netlib/SRC/dlarrr.f
lapack-netlib/SRC/dlarrv.f
lapack-netlib/SRC/dlartgs.f
lapack-netlib/SRC/dlasd0.f
lapack-netlib/SRC/dlasd2.f
lapack-netlib/SRC/dlasd3.f
lapack-netlib/SRC/dlasd8.f
lapack-netlib/SRC/dlasda.f
lapack-netlib/SRC/dlasq4.f
lapack-netlib/SRC/dlasq5.f
lapack-netlib/SRC/dlaswlq.f
lapack-netlib/SRC/dlaswp.f
lapack-netlib/SRC/dlasyf_aa.f
lapack-netlib/SRC/dorbdb1.f
lapack-netlib/SRC/dorbdb2.f
lapack-netlib/SRC/dorbdb3.f
lapack-netlib/SRC/dorbdb4.f
lapack-netlib/SRC/dorbdb5.f
lapack-netlib/SRC/dorbdb6.f
lapack-netlib/SRC/dorcsd.f
lapack-netlib/SRC/dorcsd2by1.f
lapack-netlib/SRC/dorm22.f
lapack-netlib/SRC/dppsvx.f
lapack-netlib/SRC/drscl.f
lapack-netlib/SRC/dsb2st_kernels.f
lapack-netlib/SRC/dsbev_2stage.f
lapack-netlib/SRC/dsbevd_2stage.f
lapack-netlib/SRC/dsbevx_2stage.f
lapack-netlib/SRC/dsgesv.f
lapack-netlib/SRC/dspevd.f
lapack-netlib/SRC/dspgv.f
lapack-netlib/SRC/dsposv.f
lapack-netlib/SRC/dspsvx.f
lapack-netlib/SRC/dstedc.f
lapack-netlib/SRC/dstegr.f
lapack-netlib/SRC/dstemr.f
lapack-netlib/SRC/dsycon_3.f
lapack-netlib/SRC/dsyconvf.f
lapack-netlib/SRC/dsyconvf_rook.f
lapack-netlib/SRC/dsyequb.f
lapack-netlib/SRC/dsyev_2stage.f
lapack-netlib/SRC/dsyevd_2stage.f
lapack-netlib/SRC/dsyevr.f
lapack-netlib/SRC/dsyevr_2stage.f
lapack-netlib/SRC/dsyevx_2stage.f
lapack-netlib/SRC/dsygv_2stage.f
lapack-netlib/SRC/dsysv_aa.f
lapack-netlib/SRC/dsysv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/dsytrd_2stage.f
lapack-netlib/SRC/dsytrd_sb2st.F
lapack-netlib/SRC/dsytrd_sy2sb.f
lapack-netlib/SRC/dsytrf_aa.f
lapack-netlib/SRC/dsytrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/dsytri2.f
lapack-netlib/SRC/dsytri2x.f
lapack-netlib/SRC/dsytri_3.f
lapack-netlib/SRC/dsytri_3x.f
lapack-netlib/SRC/dsytrs_3.f
lapack-netlib/SRC/dsytrs_aa.f
lapack-netlib/SRC/dsytrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/dtgsen.f
lapack-netlib/SRC/dtplqt.f
lapack-netlib/SRC/dtplqt2.f
lapack-netlib/SRC/dtpmlqt.f
lapack-netlib/SRC/dtpmqrt.f
lapack-netlib/SRC/dtrevc.f
lapack-netlib/SRC/dtrevc3.f
lapack-netlib/SRC/dtrsna.f
lapack-netlib/SRC/dtrttp.f
lapack-netlib/SRC/ilaclr.f
lapack-netlib/SRC/ilaenv.f
lapack-netlib/SRC/ilaenv2stage.f [new file with mode: 0644]
lapack-netlib/SRC/ilaslc.f
lapack-netlib/SRC/ilaver.f [deleted file]
lapack-netlib/SRC/iparam2stage.F
lapack-netlib/SRC/iparmq.f
lapack-netlib/SRC/sbbcsd.f
lapack-netlib/SRC/sbdsdc.f
lapack-netlib/SRC/sbdsqr.f
lapack-netlib/SRC/sbdsvdx.f
lapack-netlib/SRC/sgebd2.f
lapack-netlib/SRC/sgebrd.f
lapack-netlib/SRC/sgees.f
lapack-netlib/SRC/sgeevx.f
lapack-netlib/SRC/sgejsv.f
lapack-netlib/SRC/sgelqt.f
lapack-netlib/SRC/sgelqt3.f
lapack-netlib/SRC/sgelsd.f
lapack-netlib/SRC/sgemlqt.f
lapack-netlib/SRC/sgeqrt.f
lapack-netlib/SRC/sgesvdx.f
lapack-netlib/SRC/sgesvj.f
lapack-netlib/SRC/sgetrf2.f
lapack-netlib/SRC/sgetsls.f
lapack-netlib/SRC/sggesx.f
lapack-netlib/SRC/sgghd3.f
lapack-netlib/SRC/sgsvj0.f
lapack-netlib/SRC/sgsvj1.f
lapack-netlib/SRC/sisnan.f
lapack-netlib/SRC/sla_gbamv.f
lapack-netlib/SRC/sla_gbrfsx_extended.f
lapack-netlib/SRC/sla_geamv.f
lapack-netlib/SRC/sla_syamv.f
lapack-netlib/SRC/slabrd.f
lapack-netlib/SRC/slaed3.f
lapack-netlib/SRC/slaisnan.f
lapack-netlib/SRC/slalsa.f
lapack-netlib/SRC/slamswlq.f
lapack-netlib/SRC/slamtsqr.f
lapack-netlib/SRC/slapy2.f
lapack-netlib/SRC/slaqr1.f
lapack-netlib/SRC/slaqr2.f
lapack-netlib/SRC/slaqr3.f
lapack-netlib/SRC/slaqr5.f
lapack-netlib/SRC/slarfg.f
lapack-netlib/SRC/slarfgp.f
lapack-netlib/SRC/slarra.f
lapack-netlib/SRC/slarrb.f
lapack-netlib/SRC/slarrc.f
lapack-netlib/SRC/slarrd.f
lapack-netlib/SRC/slarre.f
lapack-netlib/SRC/slarrf.f
lapack-netlib/SRC/slarrj.f
lapack-netlib/SRC/slarrk.f
lapack-netlib/SRC/slarrr.f
lapack-netlib/SRC/slarrv.f
lapack-netlib/SRC/slartgs.f
lapack-netlib/SRC/slasd0.f
lapack-netlib/SRC/slasd3.f
lapack-netlib/SRC/slasd8.f
lapack-netlib/SRC/slasq4.f
lapack-netlib/SRC/slaswlq.f
lapack-netlib/SRC/slaswp.f
lapack-netlib/SRC/slasyf_aa.f
lapack-netlib/SRC/sorbdb1.f
lapack-netlib/SRC/sorbdb2.f
lapack-netlib/SRC/sorbdb3.f
lapack-netlib/SRC/sorbdb4.f
lapack-netlib/SRC/sorbdb5.f
lapack-netlib/SRC/sorbdb6.f
lapack-netlib/SRC/sorcsd.f
lapack-netlib/SRC/sorcsd2by1.f
lapack-netlib/SRC/sorm22.f
lapack-netlib/SRC/spotrf2.f
lapack-netlib/SRC/sppsvx.f
lapack-netlib/SRC/ssb2st_kernels.f
lapack-netlib/SRC/ssbev_2stage.f
lapack-netlib/SRC/ssbevd_2stage.f
lapack-netlib/SRC/ssbevx_2stage.f
lapack-netlib/SRC/ssbgvx.f
lapack-netlib/SRC/ssfrk.f
lapack-netlib/SRC/sspgv.f
lapack-netlib/SRC/sspsvx.f
lapack-netlib/SRC/sstegr.f
lapack-netlib/SRC/sstemr.f
lapack-netlib/SRC/ssycon_3.f
lapack-netlib/SRC/ssyconvf.f
lapack-netlib/SRC/ssyconvf_rook.f
lapack-netlib/SRC/ssyequb.f
lapack-netlib/SRC/ssyev_2stage.f
lapack-netlib/SRC/ssyevd_2stage.f
lapack-netlib/SRC/ssyevr_2stage.f
lapack-netlib/SRC/ssyevx_2stage.f
lapack-netlib/SRC/ssygv_2stage.f
lapack-netlib/SRC/ssygvx.f
lapack-netlib/SRC/ssysv_aa.f
lapack-netlib/SRC/ssysv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/ssytrd_2stage.f
lapack-netlib/SRC/ssytrd_sb2st.F
lapack-netlib/SRC/ssytrd_sy2sb.f
lapack-netlib/SRC/ssytrf_aa.f
lapack-netlib/SRC/ssytrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/ssytri2.f
lapack-netlib/SRC/ssytri2x.f
lapack-netlib/SRC/ssytri_3.f
lapack-netlib/SRC/ssytri_3x.f
lapack-netlib/SRC/ssytrs_3.f
lapack-netlib/SRC/ssytrs_aa.f
lapack-netlib/SRC/ssytrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/stfsm.f
lapack-netlib/SRC/stgex2.f
lapack-netlib/SRC/stgexc.f
lapack-netlib/SRC/stplqt.f
lapack-netlib/SRC/stplqt2.f
lapack-netlib/SRC/stpmlqt.f
lapack-netlib/SRC/stpmqrt.f
lapack-netlib/SRC/strevc3.f
lapack-netlib/SRC/strttp.f
lapack-netlib/SRC/zbbcsd.f
lapack-netlib/SRC/zcgesv.f
lapack-netlib/SRC/zcposv.f
lapack-netlib/SRC/zgebal.f
lapack-netlib/SRC/zgebd2.f
lapack-netlib/SRC/zgebrd.f
lapack-netlib/SRC/zgejsv.f
lapack-netlib/SRC/zgelqt.f
lapack-netlib/SRC/zgelqt3.f
lapack-netlib/SRC/zgelsd.f
lapack-netlib/SRC/zgemlqt.f
lapack-netlib/SRC/zgeqrt.f
lapack-netlib/SRC/zgesc2.f
lapack-netlib/SRC/zgesv.f
lapack-netlib/SRC/zgesvdx.f
lapack-netlib/SRC/zgesvj.f
lapack-netlib/SRC/zgetc2.f
lapack-netlib/SRC/zgetsls.f
lapack-netlib/SRC/zggesx.f
lapack-netlib/SRC/zgghd3.f
lapack-netlib/SRC/zgsvj0.f
lapack-netlib/SRC/zgsvj1.f
lapack-netlib/SRC/zhb2st_kernels.f
lapack-netlib/SRC/zhbev_2stage.f
lapack-netlib/SRC/zhbevd_2stage.f
lapack-netlib/SRC/zhbevx_2stage.f
lapack-netlib/SRC/zhecon_3.f
lapack-netlib/SRC/zhecon_rook.f
lapack-netlib/SRC/zheequb.f
lapack-netlib/SRC/zheev_2stage.f
lapack-netlib/SRC/zheevd_2stage.f
lapack-netlib/SRC/zheevr_2stage.f
lapack-netlib/SRC/zheevx_2stage.f
lapack-netlib/SRC/zhegv_2stage.f
lapack-netlib/SRC/zhesv_aa.f
lapack-netlib/SRC/zhesv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/zhetrd_2stage.f
lapack-netlib/SRC/zhetrd_hb2st.F
lapack-netlib/SRC/zhetrd_he2hb.f
lapack-netlib/SRC/zhetrf_aa.f
lapack-netlib/SRC/zhetrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/zhetri2.f
lapack-netlib/SRC/zhetri2x.f
lapack-netlib/SRC/zhetri_3.f
lapack-netlib/SRC/zhetri_3x.f
lapack-netlib/SRC/zhetrs_3.f
lapack-netlib/SRC/zhetrs_aa.f
lapack-netlib/SRC/zhetrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/zhfrk.f
lapack-netlib/SRC/zhpevd.f
lapack-netlib/SRC/zla_gbamv.f
lapack-netlib/SRC/zla_gbrfsx_extended.f
lapack-netlib/SRC/zla_geamv.f
lapack-netlib/SRC/zla_gerfsx_extended.f
lapack-netlib/SRC/zla_heamv.f
lapack-netlib/SRC/zla_herfsx_extended.f
lapack-netlib/SRC/zla_porfsx_extended.f
lapack-netlib/SRC/zla_syamv.f
lapack-netlib/SRC/zla_syrfsx_extended.f
lapack-netlib/SRC/zlabrd.f
lapack-netlib/SRC/zlahef_aa.f
lapack-netlib/SRC/zlalsa.f
lapack-netlib/SRC/zlalsd.f
lapack-netlib/SRC/zlamswlq.f
lapack-netlib/SRC/zlamtsqr.f
lapack-netlib/SRC/zlaqr1.f
lapack-netlib/SRC/zlaqr2.f
lapack-netlib/SRC/zlaqr3.f
lapack-netlib/SRC/zlaqr5.f
lapack-netlib/SRC/zlarfg.f
lapack-netlib/SRC/zlarfgp.f
lapack-netlib/SRC/zlarrv.f
lapack-netlib/SRC/zlaswlq.f
lapack-netlib/SRC/zlaswp.f
lapack-netlib/SRC/zlasyf_aa.f
lapack-netlib/SRC/zlatbs.f
lapack-netlib/SRC/zlatps.f
lapack-netlib/SRC/zlatrs.f
lapack-netlib/SRC/zstedc.f
lapack-netlib/SRC/zstegr.f
lapack-netlib/SRC/zstemr.f
lapack-netlib/SRC/zsycon_3.f
lapack-netlib/SRC/zsyconvf.f
lapack-netlib/SRC/zsyconvf_rook.f
lapack-netlib/SRC/zsyequb.f
lapack-netlib/SRC/zsysv_aa.f
lapack-netlib/SRC/zsysv_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/zsytrf_aa.f
lapack-netlib/SRC/zsytrf_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/zsytri2.f
lapack-netlib/SRC/zsytri2x.f
lapack-netlib/SRC/zsytri_3.f
lapack-netlib/SRC/zsytri_3x.f
lapack-netlib/SRC/zsytrs_3.f
lapack-netlib/SRC/zsytrs_aa.f
lapack-netlib/SRC/zsytrs_aa_2stage.f [new file with mode: 0644]
lapack-netlib/SRC/ztgex2.f
lapack-netlib/SRC/ztgexc.f
lapack-netlib/SRC/ztgsen.f
lapack-netlib/SRC/ztplqt.f
lapack-netlib/SRC/ztplqt2.f
lapack-netlib/SRC/ztpmlqt.f
lapack-netlib/SRC/ztpmqrt.f
lapack-netlib/SRC/ztrevc.f
lapack-netlib/SRC/ztrevc3.f
lapack-netlib/SRC/ztrsna.f
lapack-netlib/SRC/zunbdb1.f
lapack-netlib/SRC/zunbdb2.f
lapack-netlib/SRC/zunbdb3.f
lapack-netlib/SRC/zunbdb4.f
lapack-netlib/SRC/zunbdb5.f
lapack-netlib/SRC/zunbdb6.f
lapack-netlib/SRC/zuncsd.f
lapack-netlib/SRC/zuncsd2by1.f
lapack-netlib/SRC/zunm22.f
lapack-netlib/TESTING/EIG/CMakeLists.txt
lapack-netlib/TESTING/EIG/Makefile
lapack-netlib/TESTING/EIG/cchkhb2stg.f
lapack-netlib/TESTING/EIG/cdrvst2stg.f
lapack-netlib/TESTING/EIG/cerrst.f
lapack-netlib/TESTING/EIG/cget02.f
lapack-netlib/TESTING/EIG/clarhs.f
lapack-netlib/TESTING/EIG/dchksb2stg.f
lapack-netlib/TESTING/EIG/dget02.f
lapack-netlib/TESTING/EIG/dlarhs.f
lapack-netlib/TESTING/EIG/ilaenv.f
lapack-netlib/TESTING/EIG/schksb2stg.f
lapack-netlib/TESTING/EIG/sget02.f
lapack-netlib/TESTING/EIG/slarhs.f
lapack-netlib/TESTING/EIG/zchkhb2stg.f
lapack-netlib/TESTING/EIG/zdrvst2stg.f
lapack-netlib/TESTING/EIG/zerrst.f
lapack-netlib/TESTING/EIG/zget02.f
lapack-netlib/TESTING/EIG/zlarhs.f
lapack-netlib/TESTING/LIN/CMakeLists.txt
lapack-netlib/TESTING/LIN/Makefile
lapack-netlib/TESTING/LIN/cchkaa.f
lapack-netlib/TESTING/LIN/cchkhe_aa.f
lapack-netlib/TESTING/LIN/cchkhe_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/cchkrfp.f
lapack-netlib/TESTING/LIN/cchksy_aa.f
lapack-netlib/TESTING/LIN/cchksy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/cdrvhe_aa.f
lapack-netlib/TESTING/LIN/cdrvhe_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/cdrvls.f
lapack-netlib/TESTING/LIN/cdrvrf3.f
lapack-netlib/TESTING/LIN/cdrvrf4.f
lapack-netlib/TESTING/LIN/cdrvsy_aa.f
lapack-netlib/TESTING/LIN/cdrvsy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/cerrhe.f
lapack-netlib/TESTING/LIN/cerrsy.f
lapack-netlib/TESTING/LIN/cerrvx.f
lapack-netlib/TESTING/LIN/chet01_3.f
lapack-netlib/TESTING/LIN/chkxer.f
lapack-netlib/TESTING/LIN/clahilb.f
lapack-netlib/TESTING/LIN/clarhs.f
lapack-netlib/TESTING/LIN/csyt01_3.f
lapack-netlib/TESTING/LIN/dchkaa.f
lapack-netlib/TESTING/LIN/dchklqtp.f
lapack-netlib/TESTING/LIN/dchkrfp.f
lapack-netlib/TESTING/LIN/dchksy_aa.f
lapack-netlib/TESTING/LIN/dchksy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/ddrvls.f
lapack-netlib/TESTING/LIN/ddrvrf3.f
lapack-netlib/TESTING/LIN/ddrvsy_aa.f
lapack-netlib/TESTING/LIN/ddrvsy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/derrsy.f
lapack-netlib/TESTING/LIN/derrvx.f
lapack-netlib/TESTING/LIN/dlahilb.f
lapack-netlib/TESTING/LIN/dsyt01_3.f
lapack-netlib/TESTING/LIN/ilaenv.f
lapack-netlib/TESTING/LIN/schkaa.f
lapack-netlib/TESTING/LIN/schklqtp.f
lapack-netlib/TESTING/LIN/schkqrtp.f
lapack-netlib/TESTING/LIN/schkrfp.f
lapack-netlib/TESTING/LIN/schksy_aa.f
lapack-netlib/TESTING/LIN/schksy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/schksy_rk.f
lapack-netlib/TESTING/LIN/sdrvls.f
lapack-netlib/TESTING/LIN/sdrvrf3.f
lapack-netlib/TESTING/LIN/sdrvsy_aa.f
lapack-netlib/TESTING/LIN/sdrvsy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/serrsy.f
lapack-netlib/TESTING/LIN/serrvx.f
lapack-netlib/TESTING/LIN/slahilb.f
lapack-netlib/TESTING/LIN/sqrt04.f
lapack-netlib/TESTING/LIN/sqrt05.f
lapack-netlib/TESTING/LIN/ssyt01_3.f
lapack-netlib/TESTING/LIN/ssyt01_aa.f
lapack-netlib/TESTING/LIN/zchkaa.f
lapack-netlib/TESTING/LIN/zchkhe_aa.f
lapack-netlib/TESTING/LIN/zchkhe_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/zchkrfp.f
lapack-netlib/TESTING/LIN/zchksy_aa.f
lapack-netlib/TESTING/LIN/zchksy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/zchktsqr.f
lapack-netlib/TESTING/LIN/zdrvhe_aa.f
lapack-netlib/TESTING/LIN/zdrvhe_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/zdrvls.f
lapack-netlib/TESTING/LIN/zdrvrf3.f
lapack-netlib/TESTING/LIN/zdrvrf4.f
lapack-netlib/TESTING/LIN/zdrvsy_aa.f
lapack-netlib/TESTING/LIN/zdrvsy_aa_2stage.f [new file with mode: 0644]
lapack-netlib/TESTING/LIN/zerrhe.f
lapack-netlib/TESTING/LIN/zerrsy.f
lapack-netlib/TESTING/LIN/zerrvx.f
lapack-netlib/TESTING/LIN/zhet01_3.f
lapack-netlib/TESTING/LIN/zlahilb.f
lapack-netlib/TESTING/LIN/zlarhs.f
lapack-netlib/TESTING/LIN/zsyt01_3.f
lapack-netlib/TESTING/MATGEN/CMakeLists.txt
lapack-netlib/TESTING/MATGEN/Makefile
lapack-netlib/TESTING/MATGEN/clahilb.f
lapack-netlib/TESTING/MATGEN/dlahilb.f
lapack-netlib/TESTING/MATGEN/slahilb.f
lapack-netlib/TESTING/MATGEN/zlahilb.f
lapack-netlib/TESTING/Makefile
lapack-netlib/TESTING/ctest.in
lapack-netlib/TESTING/dbal.in
lapack-netlib/TESTING/dtest.in
lapack-netlib/TESTING/stest.in
lapack-netlib/TESTING/ztest.in
lapack-netlib/appveyor.yml [new file with mode: 0644]
lapack-netlib/lapack.pc.in
lapack-netlib/lapack_testing.py
lapack-netlib/make.inc.example

index a625732..5198f9e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -270,6 +270,7 @@ endif
 ifeq ($(BUILD_LAPACK_DEPRECATED), 1)
        -@echo "BUILD_DEPRECATED      = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
 endif
+       -@echo "LAPACKE_WITH_TMG      = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
        -@cat  make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
 endif
 
index f1983d4..b8c4b44 100644 (file)
     ilaenv, ieeeck, lsamen,  iparmq,
     ilaprec, ilatrans, ilauplo, iladiag,
     ilaver, slamch, slamc3,
-
+    
     # SCLAUX  -- Auxiliary routines called from both REAL and COMPLEX.
     # excluded: second_$(TIMER)
     sbdsdc,
     sladiv1,
     dladiv1,
     iparam2stage,
+    
+    # functions added for lapack-3.8.0
+
+    ilaenv2stage,
+    ssysv_aa_2stage,
+    ssytrf_aa_2stage,
+    ssytrs_aa_2stage,
+    chesv_aa_2stage,
+    chetrf_aa_2stage,
+    chetrs_aa_2stage,
+    csysv_aa_2stage,
+    csytrf_aa_2stage,
+    csytrs_aa_2stage,
+    dsysv_aa_2stage,
+    dsytrf_aa_2stage,
+    dsytrs_aa_2stage,
+    zhesv_aa_2stage,
+    zhetrf_aa_2stage,
+    zhetrs_aa_2stage,
+    zsysv_aa_2stage,
+    zsytrf_aa_2stage,
+    zsytrs_aa_2stage
 );
 
 @lapack_extendedprecision_objs = (
     LAPACKE_zuncsd2by1_work,
 
     ## new function from lapack-3.7.0
-
+    LAPACKE_cgelq,
+    LAPACKE_cgelq_work,
+    LAPACKE_cgemlq,
+    LAPACKE_cgemlq_work,
     LAPACKE_cgemqr,
     LAPACKE_cgemqr_work,
+    LAPACKE_cgeqr,
+    LAPACKE_cgeqr_work,
     LAPACKE_cgetsls,
     LAPACKE_cgetsls_work,
     LAPACKE_chbev_2stage,
     LAPACKE_csytrs_aa_work,
     LAPACKE_csytrs_3,
     LAPACKE_csytrs_3_work,
+    LAPACKE_dgelq,
+    LAPACKE_dgelq_work,
+    LAPACKE_dgemlq,
+    LAPACKE_dgemlq_work,
     LAPACKE_dgemqr,
     LAPACKE_dgemqr_work,
+    LAPACKE_dgeqr,
+    LAPACKE_dgeqr_work,
     LAPACKE_dgetsls,
     LAPACKE_dgetsls_work,
     LAPACKE_dsbev_2stage,
     LAPACKE_dsytrs_aa_work,
     LAPACKE_dsytrs_3,
     LAPACKE_dsytrs_3_work,
+    LAPACKE_sgelq,
+    LAPACKE_sgelq_work,
+    LAPACKE_sgemlq,
+    LAPACKE_sgemlq_work,
     LAPACKE_sgemqr,
     LAPACKE_sgemqr_work,
+    LAPACKE_sgeqr,
+    LAPACKE_sgeqr_work,
     LAPACKE_sgetsls,
     LAPACKE_sgetsls_work,
     LAPACKE_ssbev_2stage,
     LAPACKE_ssytrs_aa_work,
     LAPACKE_ssytrs_3,
     LAPACKE_ssytrs_3_work,
+    LAPACKE_zgelq,
+    LAPACKE_zgelq_work,
+    LAPACKE_zgemlq,
+    LAPACKE_zgemlq_work,
     LAPACKE_zgemqr,
     LAPACKE_zgemqr_work,
+    LAPACKE_zgeqr,
+    LAPACKE_zgeqr_work,
     LAPACKE_zgetsls,
     LAPACKE_zgetsls_work,
     LAPACKE_zhbev_2stage,
     LAPACKE_zsytrs_aa_work,
     LAPACKE_zsytrs_3,
     LAPACKE_zsytrs_3_work,
+    
+    ## new function from lapack-3.8.0
+    LAPACKE_chesv_aa_2stage,
+    LAPACKE_chesv_aa_2stage_work,
+    LAPACKE_chetrf_aa_2stage,
+    LAPACKE_chetrf_aa_2stage_work,
+    LAPACKE_chetrs_aa_2stage,
+    LAPACKE_chetrs_aa_2stage_work,
+    LAPACKE_clacrm,
+    LAPACKE_clacrm_work,
+    LAPACKE_clarcm,
+    LAPACKE_clarcm_work,
+    LAPACKE_classq,
+    LAPACKE_classq_work,
+    LAPACKE_csysv_aa_2stage,
+    LAPACKE_csysv_aa_2stage_work,
+    LAPACKE_csytrf_aa_2stage,
+    LAPACKE_csytrf_aa_2stage_work,
+    LAPACKE_csytrs_aa_2stage,
+    LAPACKE_csytrs_aa_2stage_work,
+    LAPACKE_dlassq,
+    LAPACKE_dlassq_work,
+    LAPACKE_dsysv_aa_2stage,
+    LAPACKE_dsysv_aa_2stage_work,
+    LAPACKE_dsytrf_aa_2stage,
+    LAPACKE_dsytrf_aa_2stage_work,
+    LAPACKE_dsytrs_aa_2stage,
+    LAPACKE_dsytrs_aa_2stage_work,
+    LAPACKE_get_nancheck,
+    LAPACKE_set_nancheck,
+    LAPACKE_slassq,
+    LAPACKE_slassq_work,
+    LAPACKE_ssysv_aa_2stage,
+    LAPACKE_ssysv_aa_2stage_work,
+    LAPACKE_ssytrf_aa_2stage,
+    LAPACKE_ssytrf_aa_2stage_work,
+    LAPACKE_ssytrs_aa_2stage,
+    LAPACKE_ssytrs_aa_2stage_work,
+    LAPACKE_zhbev_2stage,
+    LAPACKE_zhbev_2stage_work,
+    LAPACKE_zhbevd_2stage,
+    LAPACKE_zhbevd_2stage_work,
+    LAPACKE_zhbevx_2stage,
+    LAPACKE_zhbevx_2stage_work,
+    LAPACKE_zhesv_aa_2stage,
+    LAPACKE_zhesv_aa_2stage_work,
+    LAPACKE_zhetrf_aa_2stage,
+    LAPACKE_zhetrf_aa_2stage_work,
+    LAPACKE_zhetrs_aa_2stage,
+    LAPACKE_zhetrs_aa_2stage_work,
+    LAPACKE_zlacrm,
+    LAPACKE_zlacrm_work,
+    LAPACKE_zlarcm,
+    LAPACKE_zlarcm_work,
+    LAPACKE_zlassq,
+    LAPACKE_zlassq_work,
+    LAPACKE_zsysv_aa_2stage,
+    LAPACKE_zsysv_aa_2stage_work,
+    LAPACKE_zsytrf_aa_2stage,
+    LAPACKE_zsytrf_aa_2stage_work,
+    LAPACKE_zsytrs_aa_2stage,
+    LAPACKE_zsytrs_aa_2stage_work,
 );
 
 #These function may need 2 underscores.
diff --git a/lapack-netlib/.gitignore b/lapack-netlib/.gitignore
new file mode 100644 (file)
index 0000000..4ac9096
--- /dev/null
@@ -0,0 +1,37 @@
+# ignore objects and archives, anywhere in the tree.
+*.[oa]
+
+# test in INSTALL
+INSTALL/test*
+
+# local make.inc
+make.inc
+
+# BLAS testing
+BLAS/TESTING/*.out
+BLAS/TESTING/x*
+
+# CBLAS
+CBLAS/include/cblas_mangling.h
+
+# CBLAS testing
+CBLAS/testing/*.out
+CBLAS/testing/x*
+
+# CBLAS examples
+CBLAS/examples/cblas_ex1
+CBLAS/examples/cblas_ex2
+
+# LAPACK testing
+TESTING/LIN/xlintst*
+TESTING/EIG/xeigtst*
+TESTING/*.out
+TESTING/*.txt
+TESTING/x*
+
+# LAPACKE example
+LAPACKE/example/xexample*
+
+# SED
+SRC/*-e
+LAPACKE/src/*-e
diff --git a/lapack-netlib/.travis.yml b/lapack-netlib/.travis.yml
new file mode 100644 (file)
index 0000000..68cfa60
--- /dev/null
@@ -0,0 +1,62 @@
+language: cpp
+
+addons:
+  apt:
+    sources:
+      - george-edison55-precise-backports # cmake
+    packages:
+      - cmake
+      - cmake-data
+      - gfortran
+
+os:
+  - linux
+  - osx
+
+env:
+  - CMAKE_BUILD_TYPE=Release
+  - CMAKE_BUILD_TYPE=Coverage
+
+install:
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]];
+    then
+      for pkg in gcc cmake; do
+        if brew list -1 | grep -q "^${pkg}\$"; then
+          brew outdated $pkg || brew upgrade $pkg;
+        else
+          brew install $pkg;
+        fi
+      done
+    fi
+
+script:
+  - export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
+  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
+  - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
+  - export SRC_DIR=$(pwd)
+  - export BLD_DIR=${SRC_DIR}/lapack-travis-bld
+  - export INST_DIR=${SRC_DIR}/../lapack-travis-install
+  - mkdir -p ${BLD_DIR}
+  - cd ${BLD_DIR}
+# See issue #17 on github dashboard.  Once resolved, use -DCBLAS=ON
+#  - cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DLAPACKE=ON ${SRC_DIR}
+  - cmake -DBUILDNAME:STRING="travis-${TRAVIS_OS_NAME}-${BRANCH}"
+    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    -DCMAKE_INSTALL_PREFIX=${INST_DIR}
+    -DCBLAS:BOOL=ON
+    -DLAPACKE:BOOL=ON
+    -DBUILD_TESTING=ON
+    -DLAPACKE_WITH_TMG:BOOL=ON
+    ${SRC_DIR}
+  - ctest -D ExperimentalStart
+  - ctest -D ExperimentalConfigure
+  - ctest -D ExperimentalBuild -j2
+  - ctest -D ExperimentalTest --schedule-random -j2 --output-on-failure --timeout 100
+  - ctest -D ExperimentalSubmit
+  - make install -j2
+  - if [[ "$CMAKE_BUILD_TYPE" == "Coverage" ]];
+    then
+    echo "Coverage";
+    make coverage;
+    bash <(curl -s https://codecov.io/bash) -X gcov;
+    fi
index 42cd4f6..e122b2b 100644 (file)
@@ -1,6 +1,6 @@
 add_subdirectory(SRC)
 if(BUILD_TESTING)
-add_subdirectory(TESTING)
+  add_subdirectory(TESTING)
 endif()
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY)
 install(FILES
diff --git a/lapack-netlib/BLAS/Makefile b/lapack-netlib/BLAS/Makefile
new file mode 100644 (file)
index 0000000..f9c4b53
--- /dev/null
@@ -0,0 +1,22 @@
+include ../make.inc
+
+all: blas
+
+blas:
+       $(MAKE) -C SRC
+
+blas_testing: blas
+       $(MAKE) -C TESTING run
+
+clean:
+       $(MAKE) -C SRC clean
+       $(MAKE) -C TESTING clean
+cleanobj:
+       $(MAKE) -C SRC cleanobj
+       $(MAKE) -C TESTING cleanobj
+cleanlib:
+       $(MAKE) -C SRC cleanlib
+cleanexe:
+       $(MAKE) -C TESTING cleanexe
+cleantest:
+       $(MAKE) -C TESTING cleantest
index a9306fc..41c4804 100644 (file)
 #       DBLAS3 -- Double precision real BLAS3 routines
 #       ZBLAS3 -- Double precision complex BLAS3 routines
 #
-#  The library can be set up to include routines for any combination
-#  of the four precisions.  To create or add to the library, enter make
-#  followed by one or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Note that these commands are not safe for parallel builds.
-#
-#  Alternatively, the commands
-#       make all
-#  or
-#       make
-#  without any arguments creates a library of all four precisions.
-#  The name of the library is held in BLASLIB, which is set in the
-#  top-level make.inc
-#
-#  To remove the object files after the library is created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#---------------------------------------------------------------------
-#
-#  Edward Anderson, University of Tennessee
-#  March 26, 1990
-#  Susan Ostrouchov, Last updated September 30, 1994
-#  ejr, May 2006.
-#
 #######################################################################
 
 #---------------------------------------------------------
-#  Comment out the next 6 definitions if you already have
-#  the Level 1 BLAS.
+#  Level 1 BLAS
 #---------------------------------------------------------
 set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f
        srot.f srotg.f sscal.f sswap.f sdsdot.f srotmg.f srotm.f)
@@ -74,15 +45,12 @@ set(CB1AUX isamax.f sasum.f saxpy.f scopy.f snrm2.f sscal.f)
 set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f)
 
 #---------------------------------------------------------------------
-#  The following line defines auxiliary routines needed by both the
-#  Level 2 and Level 3 BLAS.  Comment it out only if you already have
-#  both the Level 2 and 3 BLAS.
+#  Auxiliary routines needed by both the Level 2 and Level 3 BLAS
 #---------------------------------------------------------------------
 set(ALLBLAS lsame.f xerbla.f xerbla_array.f)
 
 #---------------------------------------------------------
-#  Comment out the next 4 definitions if you already have
-#  the Level 2 BLAS.
+#  Level 2 BLAS
 #---------------------------------------------------------
 set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f
        strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f
@@ -101,8 +69,7 @@ set(ZBLAS2 zgemv.f zgbmv.f zhemv.f zhbmv.f zhpmv.f
        zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f)
 
 #---------------------------------------------------------
-#  Comment out the next 4 definitions if you already have
-#  the Level 3 BLAS.
+#  Level 3 BLAS
 #---------------------------------------------------------
 set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f)
 
@@ -113,37 +80,27 @@ set(DBLAS3 dgemm.f dsymm.f dsyrk.f dsyr2k.f dtrmm.f dtrsm.f)
 
 set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f
        zhemm.f zherk.f zher2k.f)
-# default build all of it
-set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3}
-       ${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1}
-       ${ZBLAS2} ${ZBLAS3} ${ALLBLAS})
-
-if(BLAS_SINGLE)
-  set(ALLOBJ ${SBLAS1} ${ALLBLAS}
-       ${SBLAS2} ${SBLAS3})
+
+
+set(SOURCES)
+if(BUILD_SINGLE)
+  list(APPEND SOURCES ${SBLAS1} ${ALLBLAS} ${SBLAS2} ${SBLAS3})
 endif()
-if(BLAS_DOUBLE)
-  set(ALLOBJ ${DBLAS1} ${ALLBLAS}
-       ${DBLAS2} ${DBLAS3})
+if(BUILD_DOUBLE)
+  list(APPEND SOURCES ${DBLAS1} ${ALLBLAS} ${DBLAS2} ${DBLAS3})
 endif()
-if(BLAS_COMPLEX)
-  set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX}
-       ${ALLBLAS} ${CBLAS2})
+if(BUILD_COMPLEX)
+  list(APPEND SOURCES ${CBLAS1} ${CB1AUX} ${ALLBLAS} ${CBLAS2} ${CBLAS3})
 endif()
-if(BLAS_COMPLEX16)
-  set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX}
-       ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
+if(BUILD_COMPLEX16)
+  list(APPEND SOURCES ${ZBLAS1} ${ZB1AUX} ${ALLBLAS} ${ZBLAS2} ${ZBLAS3})
 endif()
+list(REMOVE_DUPLICATES SOURCES)
 
-
-add_library(blas ${ALLOBJ})
-#if(UNIX)
-#  target_link_libraries(blas m)
-#endif()
+add_library(blas ${SOURCES})
 set_target_properties(
   blas PROPERTIES
   VERSION ${LAPACK_VERSION}
   SOVERSION ${LAPACK_MAJOR_VERSION}
   )
-target_link_libraries(blas)
 lapack_install_library(blas)
index 47a1582..a436365 100644 (file)
@@ -42,7 +42,7 @@ include ../../make.inc
 #  top-level make.inc
 #
 #  To remove the object files after the library is created, enter
-#       make clean
+#       make cleanobj
 #  To force the source files to be recompiled, enter, for example,
 #       make single FRC=FRC
 #
@@ -138,34 +138,33 @@ ALLOBJ = $(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \
        $(ZBLAS2) $(ZBLAS3) $(ALLBLAS)
 
 $(BLASLIB): $(ALLOBJ)
-       $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
+       $(ARCH) $(ARCHFLAGS) $@ $^
        $(RANLIB) $@
 
 single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3)
-       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(SBLAS1) $(ALLBLAS) \
-       $(SBLAS2) $(SBLAS3)
+       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
        $(RANLIB) $(BLASLIB)
 
 double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3)
-       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(DBLAS1) $(ALLBLAS) \
-       $(DBLAS2) $(DBLAS3)
+       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
        $(RANLIB) $(BLASLIB)
 
 complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3)
-       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(CBLAS1) $(CB1AUX) \
-       $(ALLBLAS) $(CBLAS2) $(CBLAS3)
+       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
        $(RANLIB) $(BLASLIB)
 
 complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
-       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(ZBLAS1) $(ZB1AUX) \
-       $(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
+       $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^
        $(RANLIB) $(BLASLIB)
 
 FRC:
        @FRC=$(FRC)
 
-clean:
+clean: cleanobj cleanlib
+cleanobj:
        rm -f *.o
+cleanlib:
+       #rm -f $(BLASLIB)  # May point to a system lib, e.g. -lblas
 
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
index 7ee7774..b0c7f78 100644 (file)
 *>    CAXPY constant times a vector plus a vector.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CA
+*> \verbatim
+*>          CA is COMPLEX
+*>           On entry, CA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*>          CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of CY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +72,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX CA
index eeb5f29..dfcf7e4 100644 (file)
 *>    CCOPY copies a vector x to a vector y.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*>
+*> \param[out] CY
+*> \verbatim
+*>          CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of CY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +65,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index cd34169..79901b7 100644 (file)
 *>
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*>          CX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*>
+*> \param[in] CY
+*> \verbatim
+*>          CY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of CY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +67,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 1e127bc..c05252c 100644 (file)
 *>
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*>          CX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*>
+*> \param[in] CY
+*> \verbatim
+*>          CY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of CY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +67,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index de12852..3cf3519 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry, the leading ( kl + ku + 1 ) by n part of the
 *>           array A must contain the matrix of coefficients, supplied
 *>           column by column, with the leading diagonal of the matrix in
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of DIMENSION at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array of DIMENSION at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index 018ffad..ba1d714 100644 (file)
@@ -97,7 +97,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.
 *>           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX array, dimension ( LDB, kb ), where kb is
 *>           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.
 *>           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index aeb9409..99bcdcd 100644 (file)
@@ -73,7 +73,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *> \endverbatim
@@ -88,7 +88,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of DIMENSION at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array of DIMENSION at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index e730edf..f3f96a6 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index bc7540f..f8342b5 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index 435c8dd..e25e6e2 100644 (file)
@@ -72,7 +72,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the hermitian matrix, supplied column by
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of DIMENSION at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array of DIMENSION at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the
 *>           vector y. On exit, Y is overwritten by the updated vector y.
index 834b209..8cf94fa 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is n  otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  hermitian matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index 2150929..be0f405 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
@@ -88,7 +88,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index 78a4e0b..fde0c85 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
index fd65f97..ca12834 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
index ace3c5d..fb9925d 100644 (file)
@@ -95,7 +95,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  hermitian matrix  and the strictly
index 1c47e57..79f4078 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  hermitian matrix  and the strictly
index b182bfb..bc0026a 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX array of DIMENSION at least
+*>          AP is COMPLEX array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
@@ -83,7 +83,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index 6212c04..25df894 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is COMPLEX array of DIMENSION at least
+*>          AP is COMPLEX array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
index 3ca388a..66ef2f2 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX array of dimension at least
+*>          Y is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is COMPLEX array of DIMENSION at least
+*>          AP is COMPLEX array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
index 1cdb662..6d06a5b 100644 (file)
 *> CROTG determines a complex Givens rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] CA
+*> \verbatim
+*>          CA is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] CB
+*> \verbatim
+*>          CB is COMPLEX
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is REAL
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is COMPLEX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CROTG(CA,CB,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX CA,CB,S
index 1405a97..b896af9 100644 (file)
 *>    CSCAL scales a vector by a constant.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CA
+*> \verbatim
+*>          CA is COMPLEX
+*>           On entry, CA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +61,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CSCAL(N,CA,CX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX CA
index dc02654..bc90c0d 100644 (file)
 *>    CSSCAL scales a complex vector by a real constant.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*>          SA is REAL
+*>           On entry, SA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +61,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CSSCAL(N,SA,CX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL SA
index 369a294..272acdf 100644 (file)
 *>   CSWAP interchanges two vectors.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of CX
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*>          CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of CY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +65,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_blas_level1
 *
 *  =====================================================================
       SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 906a572..8f05264 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is n  otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  symmetric matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index 1fdeadc..b321d09 100644 (file)
@@ -92,7 +92,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index c4494c5..c25384a 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index 1513c1a..205ab9c 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N ).
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index f4cc330..16050f1 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index 4582acc..e699791 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX array of DIMENSION at least
+*>          AP is COMPLEX array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
@@ -98,7 +98,7 @@
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 2fcd19b..2335ef5 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX array of DIMENSION at least
+*>          AP is COMPLEX array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index a23fb27..6f79d06 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, k ), where k is m
+*>          A is COMPLEX array, dimension ( LDA, k ), where k is m
 *>           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>           upper triangular part of the array  A must contain the upper
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX array, dimension ( LDB, N ).
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain the matrix  B,  and  on exit  is overwritten  by the
 *>           transformed matrix.
index 8795e87..1eec65b 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N ).
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 7ee5c94..2c2aff0 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, k ),
+*>          A is COMPLEX array, dimension ( LDA, k ),
 *>           where k is m when SIDE = 'L' or 'l'
 *>             and k is n when SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is COMPLEX array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
 *>           overwritten by the solution matrix  X.
index 7981a21..81c0824 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX array of dimension at least
+*>          X is COMPLEX array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index fd3d910..fa0d55e 100644 (file)
 *>    DASUM takes the sum of the absolute values.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 5203e50..4646737 100644 (file)
 *>    uses unrolled loops for increments equal to one.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DA
+*> \verbatim
+*>          DA is DOUBLE PRECISION
+*>           On entry, DA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[in,out] DY
+*> \verbatim
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of DY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +73,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION DA
index d71fe7a..95016bd 100644 (file)
 *> DCABS1 computes |Re(.)| + |Im(.)| of a double complex number
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] Z
+*> \verbatim
+*>          Z is COMPLEX*16
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DCABS1(Z)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX*16 Z
index bbc38a7..d7c350b 100644 (file)
 *> \verbatim
 *>
 *>    DCOPY copies a vector, x, to a vector, y.
-*>    uses unrolled loops for increments equal to one.
+*>    uses unrolled loops for increments equal to 1.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[out] DY
+*> \verbatim
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of DY
 *> \endverbatim
 *
 *  Authors:
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 1aea824..0edf212 100644 (file)
 *>    uses unrolled loops for increments equal to one.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of DY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 3769e18..29fb543 100644 (file)
@@ -85,7 +85,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry, the leading ( kl + ku + 1 ) by n part of the
 *>           array A must contain the matrix of coefficients, supplied
 *>           column by column, with the leading diagonal of the matrix in
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of DIMENSION at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of DIMENSION at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index 5c5a2ac..3a60ca4 100644 (file)
@@ -97,7 +97,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*>          A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.
 *>           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
+*>          B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is
 *>           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.
 *>           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*>          C is DOUBLE PRECISION array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index dd14c35..08e395b 100644 (file)
@@ -71,7 +71,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *> \endverbatim
@@ -86,7 +86,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of DIMENSION at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of DIMENSION at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index 289141e..bdc8ef4 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of dimension at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index 0d7062f..9e069fe 100644 (file)
 *>    DNRM2 := sqrt( x'*x )
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*>          X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -37,7 +57,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index baaae5c..abc90cd 100644 (file)
 *>    DROT applies a plane rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[in,out] DY
+*> \verbatim
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of DY
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*>          C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*>          S is DOUBLE PRECISION
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +76,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION C,S
index 85d04cd..c030d3c 100644 (file)
 *>    DROTG construct givens plane rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] DA
+*> \verbatim
+*>          DA is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] DB
+*> \verbatim
+*>          DB is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is DOUBLE PRECISION
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -31,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DROTG(DA,DB,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION C,DA,DB,S
index b006dbd..fc5d8fc 100644 (file)
@@ -51,8 +51,7 @@
 *>
 *> \param[in,out] DX
 *> \verbatim
-*>          DX is DOUBLE PRECISION array, dimension N
-*>         double precision vector with N elements
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
 *> \endverbatim
 *>
 *> \param[in] INCX
@@ -63,8 +62,7 @@
 *>
 *> \param[in,out] DY
 *> \verbatim
-*>          DY is DOUBLE PRECISION array, dimension N
-*>         double precision vector with N elements
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
 *> \endverbatim
 *>
 *> \param[in] INCY
@@ -73,9 +71,9 @@
 *>         storage spacing between elements of DY
 *> \endverbatim
 *>
-*> \param[in,out] DPARAM
+*> \param[in] DPARAM
 *> \verbatim
-*>          DPARAM is DOUBLE PRECISION array, dimension 5
+*>          DPARAM is DOUBLE PRECISION array, dimension (5)
 *>     DPARAM(1)=DFLAG
 *>     DPARAM(2)=DH11
 *>     DPARAM(3)=DH21
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 1fb025f..701e9de 100644 (file)
@@ -65,9 +65,9 @@
 *>          DY1 is DOUBLE PRECISION
 *> \endverbatim
 *>
-*> \param[in,out] DPARAM
+*> \param[out] DPARAM
 *> \verbatim
-*>          DPARAM is DOUBLE PRECISION array, dimension 5
+*>          DPARAM is DOUBLE PRECISION array, dimension (5)
 *>     DPARAM(1)=DFLAG
 *>     DPARAM(2)=DH11
 *>     DPARAM(3)=DH21
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION DD1,DD2,DX1,DY1
index aea1213..0f7c694 100644 (file)
@@ -72,7 +72,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the symmetric matrix, supplied column by
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of DIMENSION at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of DIMENSION at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the
 *>           vector y. On exit, Y is overwritten by the updated vector y.
index 8bbfec6..5f8b092 100644 (file)
 *> \verbatim
 *>
 *>    DSCAL scales a vector by a constant.
-*>    uses unrolled loops for increment equal to one.
+*>    uses unrolled loops for increment equal to 1.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DA
+*> \verbatim
+*>          DA is DOUBLE PRECISION
+*>           On entry, DA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
 *> \endverbatim
 *
 *  Authors:
@@ -36,7 +62,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DSCAL(N,DA,DX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION DA
index 72a28fe..6e26c0f 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array of DIMENSION at least
+*>          AP is DOUBLE PRECISION array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
@@ -81,7 +81,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of dimension at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index e89f87d..f9d709e 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array of DIMENSION at least
+*>          AP is DOUBLE PRECISION array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
index 4cd416f..175d8e8 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of dimension at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array of DIMENSION at least
+*>          AP is DOUBLE PRECISION array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
index 5bd8f7d..e09cabc 100644 (file)
 *>
 *> \verbatim
 *>
-*>    interchanges two vectors.
-*>    uses unrolled loops for increments equal one.
+*>    DSWAP interchanges two vectors.
+*>    uses unrolled loops for increments equal to 1.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[in,out] DY
+*> \verbatim
+*>          DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of DY
 *> \endverbatim
 *
 *  Authors:
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 77c797e..622d246 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*>          A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is  n otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  symmetric matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*>          B is DOUBLE PRECISION array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*>          C is DOUBLE PRECISION array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index af2dfd2..4bf973f 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
@@ -86,7 +86,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of dimension at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index c998ee8..7fe256f 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
index 8bfa5fe..8970c4d 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array of dimension at least
+*>          Y is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
index 6dd7ca2..f3a5940 100644 (file)
@@ -95,7 +95,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*>          A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
+*>          B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*>          C is DOUBLE PRECISION array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index bd70dfb..4be4d8d 100644 (file)
@@ -92,7 +92,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*>          A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*>          C is DOUBLE PRECISION array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index 20dd83e..e27d50f 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index ad46828..d8c6f14 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index 3b0e620..bad91f3 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array of DIMENSION at least
+*>          AP is DOUBLE PRECISION array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
@@ -98,7 +98,7 @@
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index a5d9faa..abcd077 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array of DIMENSION at least
+*>          AP is DOUBLE PRECISION array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index e315d59..0241c4d 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>           A is DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
+*>           A is DOUBLE PRECISION array, dimension ( LDA, k ), where k is m
 *>           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>           upper triangular part of the array  A must contain the upper
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*>          B is DOUBLE PRECISION array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain the matrix  B,  and  on exit  is overwritten  by the
 *>           transformed matrix.
index 83959d0..11c12ac 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index bc440f0..5a92bca 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, k ),
+*>          A is DOUBLE PRECISION array, dimension ( LDA, k ),
 *>           where k is m when SIDE = 'L' or 'l'
 *>             and k is n when SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*>          B is DOUBLE PRECISION array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
 *>           overwritten by the solution matrix  X.
index cab3fd9..331f1d4 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is DOUBLE PRECISION array of dimension at least
+*>          X is DOUBLE PRECISION array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index 9f0d3fd..f421018 100644 (file)
 *>    returns a single precision result.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +55,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 3b6bf61..f868c16 100644 (file)
 *>    DZNRM2 := sqrt( x**H*x )
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (N)
+*>         complex vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of X
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -37,7 +58,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_blas_level1
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 37035c7..8057ab0 100644 (file)
 *>    ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup aux_blas
 *
 *  =====================================================================
       INTEGER FUNCTION ICAMAX(N,CX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 9585660..7268534 100644 (file)
 *>    IDAMAX finds the index of the first element having maximum absolute value.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DX
+*> \verbatim
+*>          DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup aux_blas
 *
 *  =====================================================================
       INTEGER FUNCTION IDAMAX(N,DX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index e731223..5aaa50e 100644 (file)
 *>    ISAMAX finds the index of the first element having maximum absolute value.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup aux_blas
 *
 *  =====================================================================
       INTEGER FUNCTION ISAMAX(N,SX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 2ee9b66..63d8e97 100644 (file)
 *>    IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup aux_blas
 *
 *  =====================================================================
       INTEGER FUNCTION IZAMAX(N,ZX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index a453ff7..ba36382 100644 (file)
 *>    uses unrolled loops for increment equal to one.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +55,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SASUM(N,SX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 610dfe7..bf49818 100644 (file)
 *>    uses unrolled loops for increments equal to one.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*>          SA is REAL
+*>           On entry, SA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in,out] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of SY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +73,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL SA
index b68f76f..2303641 100644 (file)
 *> SCABS1 computes |Re(.)| + |Im(.)| of a complex number
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] Z
+*> \verbatim
+*>          Z is COMPLEX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SCABS1(Z)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX Z
index 5fc1a56..738b2ef 100644 (file)
 *>    returns a single precision result.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*>          CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +55,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SCASUM(N,CX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 4f1f03a..9fd7c66 100644 (file)
 *>    SCNRM2 := sqrt( x**H*x )
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*>          X is COMPLEX array, dimension (N)
+*>         complex vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of X
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -37,7 +58,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SCNRM2(N,X,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index 4755797..8406ba5 100644 (file)
 *>    uses unrolled loops for increments equal to 1.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[out] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of SY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 5a54ee2..3d26f83 100644 (file)
 *>    uses unrolled loops for increments equal to one.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of SY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 7ee6ad6..a0ec32b 100644 (file)
 *       REAL SX(*),SY(*)
 *       ..
 *
-*    PURPOSE
-*    =======
-*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
 *    Compute the inner product of two vectors with extended
 *    precision accumulation.
 *
 *    SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
 *    where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
 *    defined in a similar way using INCY.
+*> \endverbatim
 *
-*    AUTHOR
-*    ======
-*    Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
-*    Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
-*
-*    ARGUMENTS
-*    =========
-*
-*    N      (input) INTEGER
-*           number of elements in input vector(s)
-*
-*    SB     (input) REAL
-*           single precision scalar to be added to inner product
-*
-*    SX     (input) REAL array, dimension (N)
-*           single precision vector with N elements
-*
-*    INCX   (input) INTEGER
-*           storage spacing between elements of SX
-*
-*    SY     (input) REAL array, dimension (N)
-*           single precision vector with N elements
-*
-*    INCY   (input) INTEGER
-*           storage spacing between elements of SY
-*
-*    SDSDOT (output) REAL
-*           single precision dot product (SB if N .LE. 0)
+*  Arguments:
+*  ==========
 *
-*    Further Details
-*    ===============
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SB
+*> \verbatim
+*>          SB is REAL
+*>          single precision scalar to be added to inner product
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*>          single precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>          storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*>          single precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>          storage spacing between elements of SY
+*> \endverbatim
 *
-*    REFERENCES
+*  Authors:
+*  ========
 *
-*    C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
-*    Krogh, Basic linear algebra subprograms for Fortran
-*    usage, Algorithm No. 539, Transactions on Mathematical
-*    Software 5, 3 (September 1979), pp. 308-323.
+*> \author Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
+*> \author Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
 *
-*    REVISION HISTORY  (YYMMDD)
+*> \ingroup complex_blas_level1
 *
-*    791001  DATE WRITTEN
-*    890531  Changed all specific intrinsics to generic.  (WRB)
-*    890831  Modified array declarations.  (WRB)
-*    890831  REVISION DATE from Version 3.2
-*    891214  Prologue converted to Version 4.0 format.  (BAB)
-*    920310  Corrected definition of LX in DESCRIPTION.  (WRB)
-*    920501  Reformatted the REFERENCES section.  (WRB)
-*    070118  Reformat to LAPACK coding style
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>    REFERENCES
+*>
+*>    C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
+*>    Krogh, Basic linear algebra subprograms for Fortran
+*>    usage, Algorithm No. 539, Transactions on Mathematical
+*>    Software 5, 3 (September 1979), pp. 308-323.
+*>
+*>    REVISION HISTORY  (YYMMDD)
+*>
+*>    791001  DATE WRITTEN
+*>    890531  Changed all specific intrinsics to generic.  (WRB)
+*>    890831  Modified array declarations.  (WRB)
+*>    890831  REVISION DATE from Version 3.2
+*>    891214  Prologue converted to Version 4.0 format.  (BAB)
+*>    920310  Corrected definition of LX in DESCRIPTION.  (WRB)
+*>    920501  Reformatted the REFERENCES section.  (WRB)
+*>    070118  Reformat to LAPACK coding style
+*> \endverbatim
 *
 *    =====================================================================
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL SB
index 9289632..df13b58 100644 (file)
@@ -85,7 +85,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry, the leading ( kl + ku + 1 ) by n part of the
 *>           array A must contain the matrix of coefficients, supplied
 *>           column by column, with the leading diagonal of the matrix in
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of DIMENSION at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL array of DIMENSION at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index d7bdb9c..ca2fb17 100644 (file)
@@ -97,7 +97,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*>          A is REAL array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.
 *>           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is REAL array of DIMENSION ( LDB, kb ), where kb is
+*>          B is REAL array, dimension ( LDB, kb ), where kb is
 *>           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.
 *>           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is REAL array of DIMENSION ( LDC, n ).
+*>          C is REAL array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index 0dfb1fc..a769138 100644 (file)
@@ -71,7 +71,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *> \endverbatim
@@ -86,7 +86,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of DIMENSION at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL array of DIMENSION at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index c2a9958..7dbff21 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is REAL array of dimension at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index 7de03d2..b8799f1 100644 (file)
 *>    SNRM2 := sqrt( x'*x ).
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*>          X is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -37,7 +57,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       REAL FUNCTION SNRM2(N,X,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,N
index fa8e295..22c1b8b 100644 (file)
 *>    applies a plane rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in,out] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of SY
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*>          C is REAL
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*>          S is REAL
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +76,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL C,S
index b4484fb..1e2dba2 100644 (file)
 *>    SROTG construct givens plane rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] SA
+*> \verbatim
+*>          SA is REAL
+*> \endverbatim
+*>
+*> \param[in] SB
+*> \verbatim
+*>          SB is REAL
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is REAL
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is REAL
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -31,7 +54,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SROTG(SA,SB,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL C,S,SA,SB
index c71f7f0..99e0281 100644 (file)
@@ -52,8 +52,7 @@
 *>
 *> \param[in,out] SX
 *> \verbatim
-*>          SX is REAL array, dimension N
-*>         double precision vector with N elements
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
 *> \endverbatim
 *>
 *> \param[in] INCX
@@ -64,8 +63,7 @@
 *>
 *> \param[in,out] SY
 *> \verbatim
-*>          SY is REAL array, dimension N
-*>         double precision vector with N elements
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
 *> \endverbatim
 *>
 *> \param[in] INCY
@@ -74,9 +72,9 @@
 *>         storage spacing between elements of SY
 *> \endverbatim
 *>
-*> \param[in,out] SPARAM
+*> \param[in] SPARAM
 *> \verbatim
-*>          SPARAM is REAL array, dimension 5
+*>          SPARAM is REAL array, dimension (5)
 *>     SPARAM(1)=SFLAG
 *>     SPARAM(2)=SH11
 *>     SPARAM(3)=SH21
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index a5077c0..7e7a2c5 100644 (file)
@@ -65,9 +65,9 @@
 *>          SY1 is REAL
 *> \endverbatim
 *>
-*> \param[in,out] SPARAM
+*> \param[out] SPARAM
 *> \verbatim
-*>          SPARAM is REAL array, dimension 5
+*>          SPARAM is REAL array, dimension (5)
 *>     SPARAM(1)=SFLAG
 *>     SPARAM(2)=SH11
 *>     SPARAM(3)=SH21
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL SD1,SD2,SX1,SY1
index b711d8b..f0e2100 100644 (file)
@@ -72,7 +72,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the symmetric matrix, supplied column by
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of DIMENSION at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL array of DIMENSION at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the
 *>           vector y. On exit, Y is overwritten by the updated vector y.
index 2ffc1a2..14d7021 100644 (file)
 *>
 *> \verbatim
 *>
-*>    scales a vector by a constant.
+*>    SSCAL scales a vector by a constant.
 *>    uses unrolled loops for increment equal to 1.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*>          SA is REAL
+*>           On entry, SA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +62,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SSCAL(N,SA,SX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL SA
index bc8af3d..39fe277 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is REAL array of DIMENSION at least
+*>          AP is REAL array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
@@ -81,7 +81,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL array of dimension at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index 52cb731..79df3c2 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is REAL array of DIMENSION at least
+*>          AP is REAL array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
index b4c8118..da33c6c 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is REAL array of dimension at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is REAL array of DIMENSION at least
+*>          AP is REAL array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the symmetric matrix
index f821a1e..fee7df2 100644 (file)
 *>
 *> \verbatim
 *>
-*>    interchanges two vectors.
+*>    SSWAP interchanges two vectors.
 *>    uses unrolled loops for increments equal to 1.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*>          SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in,out] SY
+*> \verbatim
+*>          SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of SY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +66,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_blas_level1
 *
 *  =====================================================================
       SUBROUTINE SSWAP(N,SX,INCX,SY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index d3a193f..6263c17 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*>          A is REAL array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is  n otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  symmetric matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is REAL array of DIMENSION ( LDB, n ).
+*>          B is REAL array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is REAL array of DIMENSION ( LDC, n ).
+*>          C is REAL array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index a1fa54f..d3c4c38 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
@@ -86,7 +86,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL array of dimension at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index 9d73f86..bdc3944 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
index a2a083a..d2dcf8d 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is REAL array of dimension at least
+*>          Y is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the symmetric matrix and the strictly
index 4a705f7..b271fdc 100644 (file)
@@ -95,7 +95,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*>          A is REAL array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is REAL array of DIMENSION ( LDB, kb ), where kb is
+*>          B is REAL array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is REAL array of DIMENSION ( LDC, n ).
+*>          C is REAL array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index ecb1e4f..abaddf9 100644 (file)
@@ -92,7 +92,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*>          A is REAL array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is REAL array of DIMENSION ( LDC, n ).
+*>          C is REAL array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index 4323864..a714f20 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 00aaeba..721b804 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index 765e7f9..833f808 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is REAL array of DIMENSION at least
+*>          AP is REAL array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
@@ -98,7 +98,7 @@
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 5a29776..fe1f407 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is REAL array of DIMENSION at least
+*>          AP is REAL array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index dd20872..e11330a 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, k ), where k is m
+*>          A is REAL array, dimension ( LDA, k ), where k is m
 *>           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>           upper triangular part of the array  A must contain the upper
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is REAL array of DIMENSION ( LDB, n ).
+*>          B is REAL array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain the matrix  B,  and  on exit  is overwritten  by the
 *>           transformed matrix.
index ba3d7b6..e9f681e 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index f2927fe..aa805f6 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, k ),
+*>          A is REAL array, dimension ( LDA, k ),
 *>           where k is m when SIDE = 'L' or 'l'
 *>             and k is n when SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is REAL array of DIMENSION ( LDB, n ).
+*>          B is REAL array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
 *>           overwritten by the solution matrix  X.
index a31651b..d9e41e7 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is REAL array of dimension at least
+*>          X is REAL array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index bca78fb..d670a2b 100644 (file)
 *>    ZAXPY constant times a vector plus a vector.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZA
+*> \verbatim
+*>          ZA is COMPLEX*16
+*>           On entry, ZA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*>
+*> \param[in,out] ZY
+*> \verbatim
+*>          ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of ZY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +72,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZAXPY(N,ZA,ZX,INCX,ZY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX*16 ZA
index 830548a..5106916 100644 (file)
 *>    ZCOPY copies a vector, x, to a vector, y.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*>
+*> \param[out] ZY
+*> \verbatim
+*>          ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of ZY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +65,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZCOPY(N,ZX,INCX,ZY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 70119ec..36e33ae 100644 (file)
 *>
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZX
+*> \verbatim
+*>          ZX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*>
+*> \param[in] ZY
+*> \verbatim
+*>          ZY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of ZY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +67,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 318fae2..3661075 100644 (file)
 *>
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZX
+*> \verbatim
+*>          ZX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*>
+*> \param[in] ZY
+*> \verbatim
+*>          ZY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of ZY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -36,7 +67,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       COMPLEX*16 FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index def9078..a87a28f 100644 (file)
 *>    ZDSCAL scales a vector by a constant.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] DA
+*> \verbatim
+*>          DA is DOUBLE PRECISION
+*>           On entry, DA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +61,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZDSCAL(N,DA,ZX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION DA
index f49da22..7303df8 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry, the leading ( kl + ku + 1 ) by n part of the
 *>           array A must contain the matrix of coefficients, supplied
 *>           column by column, with the leading diagonal of the matrix in
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of DIMENSION at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index a172632..c3ac755 100644 (file)
@@ -97,7 +97,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.
 *>           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is
 *>           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.
 *>           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index 01e44d4..7088d38 100644 (file)
@@ -73,7 +73,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *> \endverbatim
@@ -88,7 +88,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of DIMENSION at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
index cf8e17d..058dccf 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index d191740..683a778 100644 (file)
@@ -57,7 +57,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the m
 *>           element vector x.
@@ -72,7 +72,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -87,7 +87,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients. On exit, A is
 *>           overwritten by the updated matrix.
index 8742215..19d8f7d 100644 (file)
@@ -72,7 +72,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the hermitian matrix, supplied column by
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of DIMENSION at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the
 *>           vector y. On exit, Y is overwritten by the updated vector y.
index 45a5eab..d63778b 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is n  otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  hermitian matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX*16 array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index 3791745..3ea0753 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
@@ -88,7 +88,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index f7def76..5e0c896 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
index 94c132c..e3a3831 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular part of the hermitian matrix and the strictly
index 407e8db..474c65e 100644 (file)
@@ -95,7 +95,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  hermitian matrix  and the strictly
index d181ca0..0d11f22 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  hermitian matrix  and the strictly
index 0d5d325..9bd3ea4 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX*16 array of DIMENSION at least
+*>          AP is COMPLEX*16 array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
@@ -83,7 +83,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y. On exit, Y is overwritten by the updated
index 70051c8..af82dfb 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is COMPLEX*16 array of DIMENSION at least
+*>          AP is COMPLEX*16 array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
index c9fb758..1b0fd3a 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x.
@@ -80,7 +80,7 @@
 *>
 *> \param[in] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array of dimension at least
+*>          Y is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ).
 *>           Before entry, the incremented array Y must contain the n
 *>           element vector y.
@@ -95,7 +95,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is COMPLEX*16 array of DIMENSION at least
+*>          AP is COMPLEX*16 array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular part of the hermitian matrix
index e5c406d..581117d 100644 (file)
 *>    ZROTG determines a double complex Givens rotation.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] CA
+*> \verbatim
+*>          CA is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] CB
+*> \verbatim
+*>          CB is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is COMPLEX*16
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZROTG(CA,CB,C,S)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX*16 CA,CB,S
index ca038aa..c52f622 100644 (file)
 *>    ZSCAL scales a vector by a constant.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] ZA
+*> \verbatim
+*>          ZA is COMPLEX*16
+*>           On entry, ZA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in,out] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -35,7 +61,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZSCAL(N,ZA,ZX,INCX)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX*16 ZA
index 02a5b97..6fd2d7f 100644 (file)
 *>    ZSWAP interchanges two vectors.
 *> \endverbatim
 *
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] ZX
+*> \verbatim
+*>          ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>         storage spacing between elements of ZX
+*> \endverbatim
+*>
+*> \param[in,out] ZY
+*> \verbatim
+*>          ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>         storage spacing between elements of ZY
+*> \endverbatim
+*
 *  Authors:
 *  ========
 *
@@ -34,7 +65,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_blas_level1
 *
 *  =====================================================================
       SUBROUTINE ZSWAP(N,ZX,INCX,ZY,INCY)
 *
-*  -- Reference BLAS level1 routine (version 3.7.0) --
+*  -- Reference BLAS level1 routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INCX,INCY,N
index 1dc267a..bd37934 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           m  when  SIDE = 'L' or 'l'  and is n  otherwise.
 *>           Before entry  with  SIDE = 'L' or 'l',  the  m by m  part of
 *>           the array  A  must contain the  symmetric matrix,  such that
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX*16 array, dimension ( LDB, N )
 *>           Before entry, the leading  m by n part of the array  B  must
 *>           contain the matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry, the leading  m by n  part of the array  C must
 *>           contain the matrix  C,  except when  beta  is zero, in which
 *>           case C need not be set on entry.
index d358ed0..92bbfee 100644 (file)
@@ -92,7 +92,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*>          B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  B  must contain the matrix  B,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index 79591b4..122539f 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*>          A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
 *>           k  when  TRANS = 'N' or 'n',  and is  n  otherwise.
 *>           Before entry with  TRANS = 'N' or 'n',  the  leading  n by k
 *>           part of the array  A  must contain the matrix  A,  otherwise
 *>
 *> \param[in,out] C
 *> \verbatim
-*>          C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*>          C is COMPLEX*16 array, dimension ( LDC, N )
 *>           Before entry  with  UPLO = 'U' or 'u',  the leading  n by n
 *>           upper triangular part of the array C must contain the upper
 *>           triangular part  of the  symmetric matrix  and the strictly
index 1e03f2b..a4d9c2e 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N ).
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>           ( k + 1 ).
 *> \endverbatim
 *>
-*> \param[in] X
+*> \param[in,out] X
 *> \verbatim
-*>          X is (input/output) COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 50c4bb4..eaf8500 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
 *>           by n part of the array A must contain the upper triangular
 *>           band part of the matrix of coefficients, supplied column by
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index d9aae42..65aa2a0 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX*16 array of DIMENSION at least
+*>          AP is COMPLEX*16 array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
@@ -96,9 +96,9 @@
 *>           A are not referenced, but are assumed to be unity.
 *> \endverbatim
 *>
-*> \param[in] X
+*> \param[in,out] X
 *> \verbatim
-*>          X is (input/output) COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index 5874fdc..5388884 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] AP
 *> \verbatim
-*>          AP is COMPLEX*16 array of DIMENSION at least
+*>          AP is COMPLEX*16 array, dimension at least
 *>           ( ( n*( n + 1 ) )/2 ).
 *>           Before entry with  UPLO = 'U' or 'u', the array AP must
 *>           contain the upper triangular matrix packed sequentially,
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index 229f332..0f445f5 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m
+*>          A is COMPLEX*16 array, dimension ( LDA, k ), where k is m
 *>           when  SIDE = 'L' or 'l'  and is  n  when  SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>           upper triangular part of the array  A must contain the upper
 *>           then LDA must be at least max( 1, n ).
 *> \endverbatim
 *>
-*> \param[in] B
+*> \param[in,out] B
 *> \verbatim
-*>          B is (input/output) COMPLEX*16 array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX*16 array, dimension ( LDB, N ).
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain the matrix  B,  and  on exit  is overwritten  by the
 *>           transformed matrix.
index ab9065c..52d1ae6 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N ).
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>           max( 1, n ).
 *> \endverbatim
 *>
-*> \param[in] X
+*> \param[in,out] X
 *> \verbatim
-*>          X is (input/output) COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element vector x. On exit, X is overwritten with the
index cc1af76..46a6afc 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, k ),
+*>          A is COMPLEX*16 array, dimension ( LDA, k ),
 *>           where k is m when SIDE = 'L' or 'l'
 *>             and k is n when SIDE = 'R' or 'r'.
 *>           Before entry  with  UPLO = 'U' or 'u',  the  leading  k by k
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*>          B is COMPLEX*16 array, dimension ( LDB, N )
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
 *>           overwritten by the solution matrix  X.
index 577b5ca..ba7aa35 100644 (file)
@@ -83,7 +83,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
 *>           Before entry with  UPLO = 'U' or 'u', the leading n by n
 *>           upper triangular part of the array A must contain the upper
 *>           triangular matrix and the strictly lower triangular part of
 *>
 *> \param[in,out] X
 *> \verbatim
-*>          X is COMPLEX*16 array of dimension at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ).
 *>           Before entry, the incremented array X must contain the n
 *>           element right-hand side vector b. On exit, X is overwritten
index f88c9a8..9b130db 100644 (file)
@@ -1,34 +1,6 @@
-#######################################################################
-#  This makefile creates the test programs for the BLAS 1 routines.
-#  The test files are grouped as follows:
-#       SBLAT1 -- Single precision real test routines
-#       CBLAT1 -- Single precision complex test routines
-#       DBLAT1 -- Double precision real test routines
-#       ZBLAT1 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
 macro(add_blas_test name src)
   get_filename_component(baseNAME ${src} NAME_WE)
-  set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in")
+  set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in")
   add_executable(${name} ${src})
   target_link_libraries(${name} blas)
   if(EXISTS "${TEST_INPUT}")
diff --git a/lapack-netlib/BLAS/TESTING/Makeblat1 b/lapack-netlib/BLAS/TESTING/Makeblat1
deleted file mode 100644 (file)
index ccd7e3c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 1 routines.
-#  The test files are grouped as follows:
-#       SBLAT1 -- Single precision real test routines
-#       CBLAT1 -- Single precision complex test routines
-#       DBLAT1 -- Double precision real test routines
-#       ZBLAT1 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT1 = sblat1.o
-CBLAT1 = cblat1.o
-DBLAT1 = dblat1.o
-ZBLAT1 = zblat1.o
-
-all: single double complex complex16
-
-single: ../xblat1s
-double: ../xblat1d
-complex: ../xblat1c
-complex16: ../xblat1z
-
-../xblat1s: $(SBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT1) $(BLASLIB)
-
-../xblat1c: $(CBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT1) $(BLASLIB)
-
-../xblat1d: $(DBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT1) $(BLASLIB)
-
-../xblat1z: $(ZBLAT1)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT1) $(BLASLIB)
-
-$(SBLAT1): $(FRC)
-$(CBLAT1): $(FRC)
-$(DBLAT1): $(FRC)
-$(ZBLAT1): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/lapack-netlib/BLAS/TESTING/Makeblat2 b/lapack-netlib/BLAS/TESTING/Makeblat2
deleted file mode 100644 (file)
index 9206078..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 2 routines.
-#  The test files are grouped as follows:
-#       SBLAT2 -- Single precision real test routines
-#       CBLAT2 -- Single precision complex test routines
-#       DBLAT2 -- Double precision real test routines
-#       ZBLAT2 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat2s, ../xblat2d, ../xblat2c, and ../xblat2z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT2 = sblat2.o
-CBLAT2 = cblat2.o
-DBLAT2 = dblat2.o
-ZBLAT2 = zblat2.o
-
-all: single double complex complex16
-
-single: ../xblat2s
-double: ../xblat2d
-complex: ../xblat2c
-complex16: ../xblat2z
-
-../xblat2s: $(SBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT2) $(BLASLIB)
-
-../xblat2c: $(CBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT2) $(BLASLIB)
-
-../xblat2d: $(DBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT2) $(BLASLIB)
-
-../xblat2z: $(ZBLAT2)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT2) $(BLASLIB)
-
-$(SBLAT2): $(FRC)
-$(CBLAT2): $(FRC)
-$(DBLAT2): $(FRC)
-$(ZBLAT2): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/lapack-netlib/BLAS/TESTING/Makeblat3 b/lapack-netlib/BLAS/TESTING/Makeblat3
deleted file mode 100644 (file)
index e454b34..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-include ../../make.inc
-
-#######################################################################
-#  This makefile creates the test programs for the BLAS 3 routines.
-#  The test files are grouped as follows:
-#       SBLAT3 -- Single precision real test routines
-#       CBLAT3 -- Single precision complex test routines
-#       DBLAT3 -- Double precision real test routines
-#       ZBLAT3 -- Double precision complex test routines
-#
-#  Test programs can be generated for all or some of the four different
-#  precisions.  To create the test programs, enter make followed by one
-#  or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files which are created are called
-#       ../xblat3s, ../xblat3d, ../xblat3c, and ../xblat3z
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  To force the source files to be recompiled, enter, for example,
-#       make single FRC=FRC
-#
-#######################################################################
-
-SBLAT3 = sblat3.o
-CBLAT3 = cblat3.o
-DBLAT3 = dblat3.o
-ZBLAT3 = zblat3.o
-
-all: single double complex complex16
-
-single: ../xblat3s
-double: ../xblat3d
-complex: ../xblat3c
-complex16: ../xblat3z
-
-../xblat3s: $(SBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(SBLAT3) $(BLASLIB)
-
-../xblat3c: $(CBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(CBLAT3) $(BLASLIB)
-
-../xblat3d: $(DBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(DBLAT3) $(BLASLIB)
-
-../xblat3z: $(ZBLAT3)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT3) $(BLASLIB)
-
-$(SBLAT3): $(FRC)
-$(CBLAT3): $(FRC)
-$(DBLAT3): $(FRC)
-$(ZBLAT3): $(FRC)
-
-FRC:
-       @FRC=$(FRC)
-
-clean:
-       rm -f *.o
-
-.f.o:
-       $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/lapack-netlib/BLAS/TESTING/Makefile b/lapack-netlib/BLAS/TESTING/Makefile
new file mode 100644 (file)
index 0000000..97150b1
--- /dev/null
@@ -0,0 +1,59 @@
+include ../../make.inc
+
+all: single double complex complex16
+single:    xblat1s xblat2s xblat3s
+double:    xblat1d xblat2d xblat3d
+complex:   xblat1c xblat2c xblat3c
+complex16: xblat1z xblat2z xblat3z
+
+xblat1s: sblat1.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat1d: dblat1.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat1c: cblat1.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat1z: zblat1.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+
+xblat2s: sblat2.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat2d: dblat2.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat2c: cblat2.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat2z: zblat2.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+
+xblat3s: sblat3.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat3d: dblat3.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat3c: cblat3.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xblat3z: zblat3.o $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+
+run: all
+       ./xblat1s > sblat1.out
+       ./xblat1d > dblat1.out
+       ./xblat1c > cblat1.out
+       ./xblat1z > zblat1.out
+       ./xblat2s < sblat2.in
+       ./xblat2d < dblat2.in
+       ./xblat2c < cblat2.in
+       ./xblat2z < zblat2.in
+       ./xblat3s < sblat3.in
+       ./xblat3d < dblat3.in
+       ./xblat3c < cblat3.in
+       ./xblat3z < zblat3.in
+
+clean: cleanobj cleanexe cleantest
+cleanobj:
+       rm -f *.o
+cleanexe:
+       rm -f xblat*
+cleantest:
+       rm -f *.out core
+
+.f.o:
+       $(FORTRAN) $(OPTS) -c -o $@ $<
index 7f606aa..f3255fe 100644 (file)
@@ -37,7 +37,7 @@
 *  =====================================================================
       PROGRAM DBLAT1
 *
-*  -- Reference BLAS test routine (version 3.7.0) --
+*  -- Reference BLAS test routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
       DOUBLE PRECISION  DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
      $                  DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
 *     .. External Subroutines ..
-      EXTERNAL          DROTG, DROTMG, STEST1
+      EXTERNAL          DROTG, DROTMG, STEST, STEST1
 *     .. Common blocks ..
       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
 *     .. Data statements ..
       DOUBLE PRECISION  DDOT, DSDOT
       EXTERNAL          DDOT, DSDOT
 *     .. External Subroutines ..
-      EXTERNAL          DAXPY, DCOPY, DROTM, DSWAP, STEST, STEST1
+      EXTERNAL          DAXPY, DCOPY, DROTM, DSWAP, STEST, STEST1,
+     $                  TESTDSDOT
 *     .. Intrinsic Functions ..
       INTRINSIC         ABS, MIN
 *     .. Common blocks ..
index 3ea607b..a5c1c6a 100644 (file)
@@ -37,7 +37,7 @@
 *  =====================================================================
       PROGRAM SBLAT1
 *
-*  -- Reference BLAS test routine (version 3.7.0) --
+*  -- Reference BLAS test routine (version 3.8.0) --
 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
       REAL              DA1(8), DATRUE(8), DB1(8), DBTRUE(8), DC1(8),
      +                  DS1(8), DAB(4,9), DTEMP(9), DTRUE(9,9)
 *     .. External Subroutines ..
-      EXTERNAL          SROTG, SROTMG, STEST1
+      EXTERNAL          SROTG, SROTMG, STEST, STEST1
 *     .. Common blocks ..
       COMMON            /COMBLA/ICASE, N, INCX, INCY, PASS
 *     .. Data statements ..
index 7fd6f1e..3780977 100644 (file)
@@ -1,9 +1,8 @@
-prefix=@prefix@
-libdir=@libdir@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: BLAS
 Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/blas/
 Libs: -L${libdir} -lblas
-Libs.private: -lm
index 580864f..d9fa245 100644 (file)
@@ -28,7 +28,7 @@ endforeach()
 endmacro()
 
 append_subdir_files(CBLAS_INCLUDE "include")
-install(FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION include)
+install(FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
 # --------------------------------------------------
 if(BUILD_TESTING)
@@ -45,7 +45,7 @@ endif()
 set(_cblas_config_install_guard_target "")
 if(ALL_TARGETS)
   install(EXPORT cblas-targets
-    DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION})
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
   # Choose one of the cblas targets to use as a guard for
   # cblas-config.cmake to load targets from the install tree.
   list(GET ALL_TARGETS 0 _cblas_config_install_guard_target)
@@ -78,8 +78,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cblas-config-install.cmake.in
 install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake
   ${LAPACK_BINARY_DIR}/cblas-config-version.cmake
-  DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION}
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}
   )
 
 #install(EXPORT cblas-targets
-#  DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION})
+#  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION})
index 5a398f8..513e8fc 100644 (file)
@@ -1,27 +1,31 @@
 include ../make.inc
 
-all:
-       cd include && cp cblas_mangling_with_flags.h.in cblas_mangling.h
-       cd src && $(MAKE) all
+all: cblas
 
+cblas: include/cblas_mangling.h
+       $(MAKE) -C src
 
-clean: cleanlib
+include/cblas_mangling.h: include/cblas_mangling_with_flags.h.in
+       cp $< $@
 
-cleanlib:
-       cd src && $(MAKE) clean
-
-cleanexe:
-       cd testing && $(MAKE) cleanexe
-
-cleanall: clean cleanexe
-       rm -f $(CBLASLIB)
-       cd examples && rm -f *.o cblas_ex1 cblas_ex2
+cblas_testing: cblas
+       $(MAKE) -C testing run
 
-cblas_testing:
-       cd testing && $(MAKE) all
+cblas_example: cblas
+       $(MAKE) -C examples
 
-runtst:
-       cd testing && $(MAKE) run
-
-example: all
-       cd examples && $(MAKE) all
+clean:
+       $(MAKE) -C src clean
+       $(MAKE) -C testing clean
+       $(MAKE) -C examples clean
+cleanobj:
+       $(MAKE) -C src cleanobj
+       $(MAKE) -C testing cleanobj
+       $(MAKE) -C examples cleanobj
+cleanlib:
+       $(MAKE) -C src cleanlib
+cleanexe:
+       $(MAKE) -C testing cleanexe
+       $(MAKE) -C examples cleanexe
+cleantest:
+       $(MAKE) -C testing cleantest
index 4a938fe..7c95ebb 100644 (file)
@@ -1,9 +1,10 @@
-prefix=@prefix@
-libdir=@libdir@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: CBLAS
 Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/blas/#_cblas
 Libs: -L${libdir} -lcblas
-Requires: blas
+Cflags: -I${includedir}
+Requires.private: blas
index a5e2183..215e28a 100644 (file)
@@ -5,7 +5,7 @@ get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
 get_filename_component(_CBLAS_PREFIX "${_CBLAS_PREFIX}" PATH)
 
 # Load the LAPACK package with which we were built.
-set(LAPACK_DIR "${_CBLAS_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
+set(LAPACK_DIR "${_CBLAS_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/lapack-@LAPACK_VERSION@")
 find_package(LAPACK NO_MODULE)
 
 # Load lapacke targets from the install tree.
index a4bab6b..0241fd1 100644 (file)
@@ -1,7 +1,7 @@
 add_executable(xexample1_CBLAS cblas_example1.c)
 add_executable(xexample2_CBLAS cblas_example2.c)
 
-target_link_libraries(xexample1_CBLAS cblas ${BLAS_LIBRARIES})
+target_link_libraries(xexample1_CBLAS cblas)
 target_link_libraries(xexample2_CBLAS cblas ${BLAS_LIBRARIES})
 
 add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS)
index 1d416a8..664b8bc 100644 (file)
@@ -1,14 +1,17 @@
 include ../../make.inc
 
-all: example1 example2
+all: cblas_ex1 cblas_ex2
 
-example1:
-       $(CC) $(CFLAGS) -I../include -c cblas_example1.c
-       $(LOADER) $(LOADOPTS) -o cblas_ex1 cblas_example1.o $(CBLASLIB) $(BLASLIB)
+cblas_ex1: cblas_example1.o $(CBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+cblas_ex2: cblas_example2.o $(CBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-example2:
-       $(CC) $(CFLAGS) -I../include -c cblas_example2.c
-       $(LOADER) $(LOADOPTS) -o cblas_ex2 cblas_example2.o $(CBLASLIB) $(BLASLIB)
+clean: cleanobj cleanexe
+cleanobj:
+       rm -f *.o
+cleanexe:
+       rm -f cblas_ex1 cblas_ex2
 
-cleanall:
-       rm -f *.o cblas_ex1 cblas_ex2
+.c.o:
+       $(CC) $(CFLAGS) -I../include -c -o $@ $<
index 20f8eb4..90e19f8 100644 (file)
@@ -1,7 +1,6 @@
 # This Makefile compiles the CBLAS routines
-#
-# Error handling routines for level 2 & 3
 
+# Error handling routines for level 2 & 3
 set(ERRHAND cblas_globals.c cblas_xerbla.c xerbla.c)
 
 #
@@ -12,50 +11,35 @@ set(ERRHAND cblas_globals.c cblas_xerbla.c xerbla.c)
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 1 single precision real
 set(SLEV1 cblas_srotg.c cblas_srotmg.c cblas_srot.c cblas_srotm.c
          cblas_sswap.c cblas_sscal.c  cblas_scopy.c cblas_saxpy.c
          cblas_sdot.c  cblas_sdsdot.c cblas_snrm2.c cblas_sasum.c
          cblas_isamax.c sdotsub.f sdsdotsub.f snrm2sub.f sasumsub.f
          isamaxsub.f)
 
-#
-# All object files for double real precision
-#
+# Files for level 1 double precision real
 set(DLEV1 cblas_drotg.c cblas_drotmg.c cblas_drot.c cblas_drotm.c
          cblas_dswap.c cblas_dscal.c  cblas_dcopy.c cblas_daxpy.c
          cblas_ddot.c  cblas_dsdot.c cblas_dnrm2.c cblas_dasum.c
          cblas_idamax.c ddotsub.f dsdotsub.f dnrm2sub.f
          dasumsub.f idamaxsub.f)
 
-#
-# All object files for single complex precision
-#
+# Files for level 1 single precision complex
 set(CLEV1 cblas_cswap.c cblas_cscal.c cblas_csscal.c cblas_ccopy.c
          cblas_caxpy.c cblas_cdotu_sub.c cblas_cdotc_sub.c
          cblas_icamax.c cdotcsub.f cdotusub.f icamaxsub.f)
 
-#
-# All object files for double complex precision
-#
+# Files for level 1 double precision complex
 set(ZLEV1 cblas_zswap.c cblas_zscal.c cblas_zdscal.c cblas_zcopy.c
          cblas_zaxpy.c cblas_zdotu_sub.c cblas_zdotc_sub.c cblas_dznrm2.c
          cblas_dzasum.c cblas_izamax.c zdotcsub.f zdotusub.f
          dzasumsub.f dznrm2sub.f izamaxsub.f)
 
-#
-# Common files for single complex precision
-#
+# Common files for level 1 single precision
 set(SCLEV1 cblas_scasum.c scasumsub.f cblas_scnrm2.c scnrm2sub.f)
 
 #
-# All object files
-#
-set(ALEV1 ${slev1} ${dlev1} ${clev1} ${zlev1} ${sclev1})
-
-#
 #
 # CBLAS routines
 #
@@ -63,44 +47,31 @@ set(ALEV1 ${slev1} ${dlev1} ${clev1} ${zlev1} ${sclev1})
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 2 single precision real
 set(SLEV2 cblas_sgemv.c cblas_sgbmv.c cblas_sger.c  cblas_ssbmv.c cblas_sspmv.c
         cblas_sspr.c  cblas_sspr2.c cblas_ssymv.c cblas_ssyr.c  cblas_ssyr2.c
         cblas_stbmv.c cblas_stbsv.c cblas_stpmv.c cblas_stpsv.c cblas_strmv.c
         cblas_strsv.c)
 
-#
-# All object files for double real precision
-#
+# Files for level 2 double precision real
 set(DLEV2 cblas_dgemv.c cblas_dgbmv.c cblas_dger.c  cblas_dsbmv.c cblas_dspmv.c
         cblas_dspr.c  cblas_dspr2.c cblas_dsymv.c cblas_dsyr.c  cblas_dsyr2.c
         cblas_dtbmv.c cblas_dtbsv.c cblas_dtpmv.c cblas_dtpsv.c cblas_dtrmv.c
         cblas_dtrsv.c)
 
-#
-# All object files for single complex precision
-#
+# Files for level 2 single precision complex
 set(CLEV2 cblas_cgemv.c cblas_cgbmv.c cblas_chemv.c cblas_chbmv.c cblas_chpmv.c
         cblas_ctrmv.c cblas_ctbmv.c cblas_ctpmv.c cblas_ctrsv.c cblas_ctbsv.c
         cblas_ctpsv.c cblas_cgeru.c cblas_cgerc.c cblas_cher.c  cblas_cher2.c
         cblas_chpr.c  cblas_chpr2.c)
 
-#
-# All object files for double complex precision
-#
+# Files for level 2 double precision complex
 set(ZLEV2 cblas_zgemv.c cblas_zgbmv.c cblas_zhemv.c cblas_zhbmv.c cblas_zhpmv.c
         cblas_ztrmv.c cblas_ztbmv.c cblas_ztpmv.c cblas_ztrsv.c cblas_ztbsv.c
         cblas_ztpsv.c cblas_zgeru.c cblas_zgerc.c cblas_zher.c  cblas_zher2.c
         cblas_zhpr.c  cblas_zhpr2.c)
 
 #
-# All object files
-#
-set(AVEL2 ${slev2} ${dlev2} ${clev2} ${zlev2})
-
-#
 #
 # CBLAS routines
 #
@@ -108,63 +79,50 @@ set(AVEL2 ${slev2} ${dlev2} ${clev2} ${zlev2})
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 3 single precision real
 set(SLEV3 cblas_sgemm.c cblas_ssymm.c cblas_ssyrk.c cblas_ssyr2k.c cblas_strmm.c
         cblas_strsm.c)
 
-#
-# All object files for double real precision
-#
+# Files for level 3 double precision real
 set(DLEV3 cblas_dgemm.c cblas_dsymm.c cblas_dsyrk.c cblas_dsyr2k.c cblas_dtrmm.c
         cblas_dtrsm.c)
 
-#
-# All object files for single complex precision
-#
+# Files for level 3 single precision complex
 set(CLEV3 cblas_cgemm.c cblas_csymm.c cblas_chemm.c cblas_cherk.c
         cblas_cher2k.c cblas_ctrmm.c cblas_ctrsm.c cblas_csyrk.c
         cblas_csyr2k.c)
 
-#
-# All object files for double complex precision
-#
+# Files for level 3 double precision complex
 set(ZLEV3 cblas_zgemm.c cblas_zsymm.c cblas_zhemm.c cblas_zherk.c
         cblas_zher2k.c cblas_ztrmm.c cblas_ztrsm.c cblas_zsyrk.c
         cblas_zsyr2k.c)
 
-#
-# All object files
-#
-set(ALEV3 ${slev3} ${dlev3} ${clev3} ${zlev3})
-
-# default build all of it
-set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}
-           ${DLEV1} ${DLEV2} ${DLEV3}
-           ${CLEV1} ${CLEV2} ${CLEV3}
-           ${ZLEV1} ${ZLEV2} ${ZLEV3})
 
-# Single real precision
-if(CBLAS_SINGLE)
-  set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND})
+set(SOURCES)
+if(BUILD_SINGLE)
+  list(APPEND SOURCES ${SLEV1} ${SCLEV1} ${SLEV2} ${SLEV3} ${ERRHAND})
 endif()
-
-# Double real precision
-if(CBLAS_DOUBLE)
-  set(ALLOBJ ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND})
+if(BUILD_DOUBLE)
+  list(APPEND SOURCES ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND})
 endif()
-
-# Single complex precision
-if(CBLAS_COMPLEX)
-  set(ALLOBJ ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND})
+if(BUILD_COMPLEX)
+  list(APPEND SOURCES ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND})
 endif()
-
-# Double complex precision
-if(CBLAS_COMPLEX16)
-  set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND})
+if(BUILD_COMPLEX16)
+  list(APPEND SOURCES ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND})
 endif()
-
-add_library(cblas ${ALLOBJ})
-target_link_libraries(cblas ${BLAS_LIBRARIES})
+list(REMOVE_DUPLICATES SOURCES)
+
+add_library(cblas ${SOURCES})
+set_target_properties(
+  cblas PROPERTIES
+  LINKER_LANGUAGE C
+  VERSION ${LAPACK_VERSION}
+  SOVERSION ${LAPACK_MAJOR_VERSION}
+  )
+target_include_directories(cblas PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
+  $<INSTALL_INTERFACE:include>
+)
+target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES})
 lapack_install_library(cblas)
index 1d1a0db..6c0518a 100644 (file)
@@ -1,22 +1,12 @@
 # This Makefile compiles the CBLAS routines
-#
-include ../../make.inc
 
-#
-# Erase all object and archive files
-#
-all: cblaslib
+include ../../make.inc
 
-clean:
-       rm -f *.o a.out core
+all: $(CBLASLIB)
 
 # Error handling routines for level 2 & 3
-
 errhand = cblas_globals.o cblas_xerbla.o xerbla.o
 
-# Object files of all routines
-alev = $(alev1) $(alev2) $(alev3) $(errhand)
-
 #
 #
 # CBLAS routines
@@ -25,76 +15,52 @@ alev = $(alev1) $(alev2) $(alev3) $(errhand)
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 1 single precision real
 slev1 = cblas_srotg.o cblas_srotmg.o cblas_srot.o  cblas_srotm.o \
         cblas_sswap.o cblas_sscal.o  cblas_scopy.o cblas_saxpy.o \
         cblas_sdot.o  cblas_sdsdot.o cblas_snrm2.o cblas_sasum.o \
         cblas_isamax.o sdotsub.o sdsdotsub.o snrm2sub.o sasumsub.o \
         isamaxsub.o
 
-#
-# All object files for double real precision
-#
+# Files for level 1 double precision real
 dlev1 = cblas_drotg.o cblas_drotmg.o cblas_drot.o  cblas_drotm.o \
         cblas_dswap.o cblas_dscal.o  cblas_dcopy.o cblas_daxpy.o \
         cblas_ddot.o  cblas_dsdot.o  cblas_dnrm2.o cblas_dasum.o \
         cblas_idamax.o ddotsub.o dsdotsub.o dnrm2sub.o \
         dasumsub.o idamaxsub.o
 
-#
-# All object files for single complex precision
-#
+# Files for level 1 single precision complex
 clev1 = cblas_cswap.o cblas_cscal.o cblas_csscal.o cblas_ccopy.o \
         cblas_caxpy.o cblas_cdotu_sub.o cblas_cdotc_sub.o \
         cblas_icamax.o cdotcsub.o cdotusub.o icamaxsub.o
 
-#
-# All object files for double complex precision
-#
+# Files for level 1 double precision complex
 zlev1 = cblas_zswap.o cblas_zscal.o cblas_zdscal.o cblas_zcopy.o \
         cblas_zaxpy.o cblas_zdotu_sub.o cblas_zdotc_sub.o cblas_dznrm2.o \
         cblas_dzasum.o cblas_izamax.o zdotcsub.o zdotusub.o \
         dzasumsub.o dznrm2sub.o izamaxsub.o
 
-#
-# Common files for single / complex precision
-#
+# Common files for level 1 single precision
 sclev1 = cblas_scasum.o scasumsub.o cblas_scnrm2.o scnrm2sub.o
 
-#
-# All object files
-#
-alev1 = $(slev1) $(dlev1) $(clev1) $(zlev1) $(sclev1)
-
-#
-# Make an archive file
-#
-
-# Single real precision
+# Single precision real
 slib1: $(slev1) $(sclev1)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev1) $(sclev1)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Double real precision
+# Double precision real
 dlib1: $(dlev1)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev1)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Single complex precision
+# Single precision complex
 clib1: $(clev1) $(sclev1)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev1) $(sclev1)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Double complex precision
+# Double precision complex
 zlib1: $(zlev1)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev1)
-       $(RANLIB) $(CBLASLIB)
-
-# All precisions
-all1: $(alev1)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev1)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
 #
@@ -105,70 +71,48 @@ all1: $(alev1)
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 2 single precision real
 slev2 = cblas_sgemv.o cblas_sgbmv.o cblas_sger.o  cblas_ssbmv.o cblas_sspmv.o \
         cblas_sspr.o  cblas_sspr2.o cblas_ssymv.o cblas_ssyr.o  cblas_ssyr2.o \
         cblas_stbmv.o cblas_stbsv.o cblas_stpmv.o cblas_stpsv.o cblas_strmv.o \
         cblas_strsv.o
 
-#
-# All object files for double real precision
-#
+# Files for level 2 double precision real
 dlev2 = cblas_dgemv.o cblas_dgbmv.o cblas_dger.o  cblas_dsbmv.o cblas_dspmv.o \
         cblas_dspr.o  cblas_dspr2.o cblas_dsymv.o cblas_dsyr.o  cblas_dsyr2.o \
         cblas_dtbmv.o cblas_dtbsv.o cblas_dtpmv.o cblas_dtpsv.o cblas_dtrmv.o \
         cblas_dtrsv.o
 
-#
-# All object files for single complex precision
-#
+# Files for level 2 single precision complex
 clev2 = cblas_cgemv.o cblas_cgbmv.o cblas_chemv.o cblas_chbmv.o cblas_chpmv.o \
         cblas_ctrmv.o cblas_ctbmv.o cblas_ctpmv.o cblas_ctrsv.o cblas_ctbsv.o \
         cblas_ctpsv.o cblas_cgeru.o cblas_cgerc.o cblas_cher.o  cblas_cher2.o \
         cblas_chpr.o  cblas_chpr2.o
 
-#
-# All object files for double complex precision
-#
+# Files for level 2 double precision complex
 zlev2 = cblas_zgemv.o cblas_zgbmv.o cblas_zhemv.o cblas_zhbmv.o cblas_zhpmv.o \
         cblas_ztrmv.o cblas_ztbmv.o cblas_ztpmv.o cblas_ztrsv.o cblas_ztbsv.o \
         cblas_ztpsv.o cblas_zgeru.o cblas_zgerc.o cblas_zher.o  cblas_zher2.o \
         cblas_zhpr.o  cblas_zhpr2.o
 
-#
-# All object files
-#
-alev2 = $(slev2) $(dlev2) $(clev2) $(zlev2)
-
-#
-# Make an archive file
-#
-
-# Single real precision
+# Single precision real
 slib2: $(slev2) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev2) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Double real precision
+# Double precision real
 dlib2: $(dlev2) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev2) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Single complex precision
+# Single precision complex
 clib2: $(clev2) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev2) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Double complex precision
+# Double precision complex
 zlib2: $(zlev2) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev2) $(errhand)
-       $(RANLIB) $(CBLASLIB)
-
-# All precisions
-all2: $(alev2) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev2) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
 #
@@ -179,76 +123,79 @@ all2: $(alev2) $(errhand)
 #
 #
 
-#
-# All object files for single real precision
-#
+# Files for level 3 single precision real
 slev3 = cblas_sgemm.o cblas_ssymm.o cblas_ssyrk.o cblas_ssyr2k.o cblas_strmm.o \
         cblas_strsm.o
 
-#
-# All object files for double real precision
-#
+# Files for level 3 double precision real
 dlev3 = cblas_dgemm.o cblas_dsymm.o cblas_dsyrk.o cblas_dsyr2k.o cblas_dtrmm.o \
         cblas_dtrsm.o
 
-#
-# All object files for single complex precision
-#
+# Files for level 3 single precision complex
 clev3 = cblas_cgemm.o cblas_csymm.o cblas_chemm.o cblas_cherk.o \
         cblas_cher2k.o cblas_ctrmm.o cblas_ctrsm.o cblas_csyrk.o \
         cblas_csyr2k.o
 
-#
-# All object files for double complex precision
-#
+# Files for level 3 double precision complex
 zlev3 = cblas_zgemm.o cblas_zsymm.o cblas_zhemm.o cblas_zherk.o \
         cblas_zher2k.o cblas_ztrmm.o cblas_ztrsm.o cblas_zsyrk.o \
         cblas_zsyr2k.o
 
-#
-# All object files
-#
-alev3 = $(slev3) $(dlev3) $(clev3) $(zlev3)
-
-#
-# Make an archive file
-#
-
-# Single real precision
+# Single precision real
 slib3: $(slev3) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev3) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Double real precision
+# Double precision real
 dlib3: $(dlev3) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev3) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Single complex precision
+# Single precision complex
 clib3: $(clev3) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev3) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# Single complex precision
+# Double precision complex
 zlib3: $(zlev3) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev3) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
+       $(RANLIB) $(CBLASLIB)
+
+
+alev1 = $(slev1) $(dlev1) $(clev1) $(zlev1) $(sclev1)
+alev2 = $(slev2) $(dlev2) $(clev2) $(zlev2)
+alev3 = $(slev3) $(dlev3) $(clev3) $(zlev3)
+
+# All level 1
+all1: $(alev1)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
-# All precisions
+# All level 2
+all2: $(alev2) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
+       $(RANLIB) $(CBLASLIB)
+
+# All level 3
 all3: $(alev3) $(errhand)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev3)
+       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^
        $(RANLIB) $(CBLASLIB)
 
 # All levels and precisions
-cblaslib: $(alev)
-       $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev)
-       $(RANLIB) $(CBLASLIB)
+$(CBLASLIB): $(alev1) $(alev2) $(alev3) $(errhand)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
 FRC:
        @FRC=$(FRC)
 
+clean: cleanobj cleanlib
+cleanobj:
+       rm -f *.o
+cleanlib:
+       rm -f $(CBLASLIB)
+
 .c.o:
        $(CC) $(CFLAGS) -I../include -c -o $@ $<
-
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
index fe9a51e..2459695 100644 (file)
@@ -25,22 +25,22 @@ macro(add_cblas_test output input target)
 endmacro()
 
 
-# Object files for single real precision
+# Object files for single precision real
 set(STESTL1O c_sblas1.c)
 set(STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c)
 set(STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c)
 
-# Object files for double real precision
+# Object files for double precision real
 set(DTESTL1O c_dblas1.c)
 set(DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c)
 set(DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c)
 
-# Object files for single complex precision
+# Object files for single precision complex
 set(CTESTL1O c_cblat1.f c_cblas1.c)
 set(CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c)
 set(CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c)
 
-# Object files for double complex precision
+# Object files for double precision complex
 set(ZTESTL1O c_zblas1.c)
 set(ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c)
 set(ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c)
@@ -52,9 +52,9 @@ if(BUILD_SINGLE)
   add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
 
-  target_link_libraries(xscblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xscblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xscblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xscblat1 cblas)
+  target_link_libraries(xscblat2 cblas)
+  target_link_libraries(xscblat3 cblas)
 
   add_cblas_test(stest1.out ""   xscblat1)
   add_cblas_test(stest2.out sin2 xscblat2)
@@ -66,9 +66,9 @@ if(BUILD_DOUBLE)
   add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
 
-  target_link_libraries(xdcblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xdcblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xdcblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xdcblat1 cblas)
+  target_link_libraries(xdcblat2 cblas)
+  target_link_libraries(xdcblat3 cblas)
 
   add_cblas_test(dtest1.out ""   xdcblat1)
   add_cblas_test(dtest2.out din2 xdcblat2)
@@ -81,8 +81,8 @@ if(BUILD_COMPLEX)
   add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
 
   target_link_libraries(xccblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xccblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xccblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xccblat2 cblas)
+  target_link_libraries(xccblat3 cblas)
 
   add_cblas_test(ctest1.out ""   xccblat1)
   add_cblas_test(ctest2.out cin2 xccblat2)
@@ -94,9 +94,9 @@ if(BUILD_COMPLEX16)
   add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
   add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h)
 
-  target_link_libraries(xzcblat1 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xzcblat2 cblas ${BLAS_LIBRARIES})
-  target_link_libraries(xzcblat3 cblas ${BLAS_LIBRARIES})
+  target_link_libraries(xzcblat1 cblas)
+  target_link_libraries(xzcblat2 cblas)
+  target_link_libraries(xzcblat3 cblas)
 
   add_cblas_test(ztest1.out ""   xzcblat1)
   add_cblas_test(ztest2.out zin2 xzcblat2)
index a5a0783..0182c3e 100644 (file)
@@ -7,120 +7,104 @@ include ../../make.inc
 # Archive files necessary to compile
 LIB = $(CBLASLIB) $(BLASLIB)
 
-# Object files for single real precision
+# Object files for single precision real
 stestl1o = c_sblas1.o
 stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o
 stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o
 
-# Object files for double real precision
+# Object files for double precision real
 dtestl1o = c_dblas1.o
 dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o
 dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o
 
-# Object files for single complex precision
+# Object files for single precision complex
 ctestl1o = c_cblas1.o
 ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o
 ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o
 
-# Object files for double complex precision
+# Object files for double precision complex
 ztestl1o = c_zblas1.o
 ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o
 ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o
 
 all: all1 all2 all3
-all1: stest1 dtest1 ctest1 ztest1
-all2: stest2 dtest2 ctest2 ztest2
-all3: stest3 dtest3 ctest3 ztest3
-
-clean:
-       rm -f core *.o *.out x*
-cleanobj:
-       rm -f core *.o a.out
-cleanexe:
-       rm -f x*
-
-stest1: xscblat1
-dtest1: xdcblat1
-ctest1: xccblat1
-ztest1: xzcblat1
-
-stest2: xscblat2
-dtest2: xdcblat2
-ctest2: xccblat2
-ztest2: xzcblat2
-
-stest3: xscblat3
-dtest3: xdcblat3
-ctest3: xccblat3
-ztest3: xzcblat3
+all1: xscblat1 xdcblat1 xccblat1 xzcblat1
+all2: xscblat2 xdcblat2 xccblat2 xzcblat2
+all3: xscblat3 xdcblat3 xccblat3 xzcblat3
 
 #
 # Compile each precision
 #
 
 # Single real
-xscblat1: $(stestl1o) c_sblat1.o
-       $(LOADER) $(LOADOPTS) -o $@ c_sblat1.o $(stestl1o) $(LIB)
-xscblat2: $(stestl2o) c_sblat2.o
-       $(LOADER) $(LOADOPTS) -o $@ c_sblat2.o $(stestl2o) $(LIB)
-xscblat3: $(stestl3o) c_sblat3.o
-       $(LOADER) $(LOADOPTS) -o $@ c_sblat3.o $(stestl3o) $(LIB)
+xscblat1: c_sblat1.o $(stestl1o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xscblat2: c_sblat2.o $(stestl2o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xscblat3: c_sblat3.o $(stestl3o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 # Double real
-xdcblat1: $(dtestl1o) c_dblat1.o
-       $(LOADER) $(LOADOPTS) -o $@ c_dblat1.o $(dtestl1o) $(LIB)
-xdcblat2: $(dtestl2o) c_dblat2.o
-       $(LOADER) $(LOADOPTS) -o $@ c_dblat2.o $(dtestl2o) $(LIB)
-xdcblat3: $(dtestl3o) c_dblat3.o
-       $(LOADER) $(LOADOPTS) -o $@ c_dblat3.o $(dtestl3o) $(LIB)
+xdcblat1: c_dblat1.o $(dtestl1o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xdcblat2: c_dblat2.o $(dtestl2o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xdcblat3: c_dblat3.o $(dtestl3o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 # Single complex
-xccblat1: $(ctestl1o) c_cblat1.o
-       $(LOADER) $(LOADOPTS) -o $@ c_cblat1.o $(ctestl1o) $(LIB)
-xccblat2: $(ctestl2o) c_cblat2.o
-       $(LOADER) $(LOADOPTS) -o $@ c_cblat2.o $(ctestl2o) $(LIB)
-xccblat3: $(ctestl3o) c_cblat3.o
-       $(LOADER) $(LOADOPTS) -o $@ c_cblat3.o $(ctestl3o) $(LIB)
+xccblat1: c_cblat1.o $(ctestl1o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xccblat2: c_cblat2.o $(ctestl2o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xccblat3: c_cblat3.o $(ctestl3o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 # Double complex
-xzcblat1: $(ztestl1o) c_zblat1.o
-       $(LOADER) $(LOADOPTS) -o $@ c_zblat1.o $(ztestl1o) $(LIB)
-xzcblat2: $(ztestl2o) c_zblat2.o
-       $(LOADER) $(LOADOPTS) -o $@ c_zblat2.o $(ztestl2o) $(LIB)
-xzcblat3: $(ztestl3o) c_zblat3.o
-       $(LOADER) $(LOADOPTS) -o $@ c_zblat3.o $(ztestl3o) $(LIB)
+xzcblat1: c_zblat1.o $(ztestl1o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xzcblat2: c_zblat2.o $(ztestl2o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
+xzcblat3: c_zblat3.o $(ztestl3o) $(LIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 
 # RUN TESTS
-run:
-       @echo "--> TESTING CBLAS 1 - SINGLE PRECISION <--"
+run: all
+       @echo "--> TESTING CBLAS 1 - SINGLE PRECISION REAL <--"
        @./xscblat1 > stest1.out
-       @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION <--"
+       @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION REAL <--"
        @./xdcblat1 > dtest1.out
-       @echo "--> TESTING CBLAS 1 - COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 1 - SINGLE PRECISION COMPLEX <--"
        @./xccblat1 > ctest1.out
-       @echo "--> TESTING CBLAS 1 - DOUBLE COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION COMPLEX <--"
        @./xzcblat1 > ztest1.out
-       @echo "--> TESTING CBLAS 2 - SINGLE PRECISION <--"
+       @echo "--> TESTING CBLAS 2 - SINGLE PRECISION REAL <--"
        @./xscblat2 < sin2 > stest2.out
-       @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION <--"
+       @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION REAL <--"
        @./xdcblat2 < din2 > dtest2.out
-       @echo "--> TESTING CBLAS 2 - COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 2 - SINGLE PRECISION COMPLEX <--"
        @./xccblat2 < cin2 > ctest2.out
-       @echo "--> TESTING CBLAS 2 - DOUBLE COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION COMPLEX <--"
        @./xzcblat2 < zin2 > ztest2.out
-       @echo "--> TESTING CBLAS 3 - SINGLE PRECISION <--"
+       @echo "--> TESTING CBLAS 3 - SINGLE PRECISION REAL <--"
        @./xscblat3 < sin3 > stest3.out
-       @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION <--"
+       @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION REAL <--"
        @./xdcblat3 < din3 > dtest3.out
-       @echo "--> TESTING CBLAS 3 - COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 3 - SINGLE PRECISION COMPLEX <--"
        @./xccblat3 < cin3 > ctest3.out
-       @echo "--> TESTING CBLAS 3 - DOUBLE COMPLEX PRECISION <--"
+       @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION COMPLEX <--"
        @./xzcblat3 < zin3 > ztest3.out
 
-.SUFFIXES: .o .f .c
+clean: cleanobj cleanexe cleantest
+cleanobj:
+       rm -f *.o
+cleanexe:
+       rm -f x*
+cleantest:
+       rm -f *.out core
 
+.SUFFIXES: .o .f .c
 .c.o:
        $(CC) $(CFLAGS) -I../include -c -o $@ $<
-
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
diff --git a/lapack-netlib/CMAKE/FindGcov.cmake b/lapack-netlib/CMAKE/FindGcov.cmake
new file mode 100644 (file)
index 0000000..4807f90
--- /dev/null
@@ -0,0 +1,155 @@
+# This file is part of CMake-codecov.
+#
+# https://github.com/RWTH-ELP/CMake-codecov
+#
+# Copyright (c)
+#   2015-2016 RWTH Aachen University, Federal Republic of Germany
+#
+# LICENSE : BSD 3-Clause License
+#
+# Written by Alexander Haase, alexander.haase@rwth-aachen.de
+# Updated by Guillaume Jacquenot, guillaume.jacquenot@gmail.com
+
+# include required Modules
+include(FindPackageHandleStandardArgs)
+
+
+# Search for gcov binary.
+set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
+set(CMAKE_REQUIRED_QUIET ${codecov_FIND_QUIETLY})
+
+get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
+foreach (LANG ${ENABLED_LANGUAGES})
+  # Gcov evaluation is dependend on the used compiler. Check gcov support for
+  # each compiler that is used. If gcov binary was already found for this
+  # compiler, do not try to find it again.
+  if(NOT GCOV_${CMAKE_${LANG}_COMPILER_ID}_BIN)
+    get_filename_component(COMPILER_PATH "${CMAKE_${LANG}_COMPILER}" PATH)
+
+    if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "GNU")
+      # Some distributions like OSX (homebrew) ship gcov with the compiler
+      # version appended as gcov-x. To find this binary we'll build the
+      # suggested binary name with the compiler version.
+      string(REGEX MATCH "^[0-9]+" GCC_VERSION
+        "${CMAKE_${LANG}_COMPILER_VERSION}")
+
+      find_program(GCOV_BIN NAMES gcov-${GCC_VERSION} gcov
+        HINTS ${COMPILER_PATH})
+
+    elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Clang")
+      # Some distributions like Debian ship llvm-cov with the compiler
+      # version appended as llvm-cov-x.y. To find this binary we'll build
+      # the suggested binary name with the compiler version.
+      string(REGEX MATCH "^[0-9]+.[0-9]+" LLVM_VERSION
+        "${CMAKE_${LANG}_COMPILER_VERSION}")
+
+      # llvm-cov prior version 3.5 seems to be not working with coverage
+      # evaluation tools, but these versions are compatible with the gcc
+      # gcov tool.
+      if(LLVM_VERSION VERSION_GREATER 3.4)
+        find_program(LLVM_COV_BIN NAMES "llvm-cov-${LLVM_VERSION}"
+          "llvm-cov" HINTS ${COMPILER_PATH})
+        mark_as_advanced(LLVM_COV_BIN)
+
+        if(LLVM_COV_BIN)
+          find_program(LLVM_COV_WRAPPER "llvm-cov-wrapper" PATHS
+            ${CMAKE_MODULE_PATH})
+          if(LLVM_COV_WRAPPER)
+            set(GCOV_BIN "${LLVM_COV_WRAPPER}" CACHE FILEPATH "")
+
+            # set additional parameters
+            set(GCOV_${CMAKE_${LANG}_COMPILER_ID}_ENV
+              "LLVM_COV_BIN=${LLVM_COV_BIN}" CACHE STRING
+              "Environment variables for llvm-cov-wrapper.")
+            mark_as_advanced(GCOV_${CMAKE_${LANG}_COMPILER_ID}_ENV)
+          endif()
+        endif()
+      endif()
+
+      if(NOT GCOV_BIN)
+        # Fall back to gcov binary if llvm-cov was not found or is
+        # incompatible. This is the default on OSX, but may crash on
+        # recent Linux versions.
+        find_program(GCOV_BIN gcov HINTS ${COMPILER_PATH})
+      endif()
+    endif()
+
+
+    if(GCOV_BIN)
+      set(GCOV_${CMAKE_${LANG}_COMPILER_ID}_BIN "${GCOV_BIN}" CACHE STRING
+        "${LANG} gcov binary.")
+
+      if(NOT CMAKE_REQUIRED_QUIET)
+        message("-- Found gcov evaluation for "
+        "${CMAKE_${LANG}_COMPILER_ID}: ${GCOV_BIN}")
+      endif()
+
+      unset(GCOV_BIN CACHE)
+    endif()
+  endif()
+endforeach ()
+
+
+# Add a new global target for all gcov targets. This target could be used to
+# generate the gcov files for the whole project instead of calling <TARGET>-gcov
+# for each target.
+if(NOT TARGET coverage)
+  add_custom_target(coverage)
+endif()
+
+
+# This function will add gcov evaluation for target <TNAME>. Only sources of
+# this target will be evaluated and no dependencies will be added. It will call
+# Gcov on any source file of <TNAME> once and store the gcov file in the same
+# directory.
+function (add_gcov_target TNAME)
+  set(TDIR ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TNAME}.dir)
+
+  # We don't have to check, if the target has support for coverage, thus this
+  # will be checked by add_coverage_target in Findcoverage.cmake. Instead we
+  # have to determine which gcov binary to use.
+  get_target_property(TSOURCES ${TNAME} SOURCES)
+  set(SOURCES "")
+  set(TCOMPILER "")
+  foreach (FILE ${TSOURCES})
+    codecov_path_of_source(${FILE} FILE)
+    if(NOT "${FILE}" STREQUAL "")
+      codecov_lang_of_source(${FILE} LANG)
+      if(NOT "${LANG}" STREQUAL "")
+        list(APPEND SOURCES "${FILE}")
+        set(TCOMPILER ${CMAKE_${LANG}_COMPILER_ID})
+      endif()
+    endif()
+  endforeach()
+
+  # If no gcov binary was found, coverage data can't be evaluated.
+  if(NOT GCOV_${TCOMPILER}_BIN)
+    message(WARNING "No coverage evaluation binary found for ${TCOMPILER}.")
+    return()
+  endif()
+
+  set(GCOV_BIN "${GCOV_${TCOMPILER}_BIN}")
+  set(GCOV_ENV "${GCOV_${TCOMPILER}_ENV}")
+
+
+  set(BUFFER "")
+  foreach(FILE ${SOURCES})
+    get_filename_component(FILE_PATH "${TDIR}/${FILE}" PATH)
+
+    # call gcov
+    add_custom_command(OUTPUT ${TDIR}/${FILE}.gcov
+      COMMAND ${GCOV_ENV} ${GCOV_BIN} ${TDIR}/${FILE}.gcno > /dev/null
+      DEPENDS ${TNAME} ${TDIR}/${FILE}.gcno
+      WORKING_DIRECTORY ${FILE_PATH}
+    )
+
+    list(APPEND BUFFER ${TDIR}/${FILE}.gcov)
+  endforeach()
+
+
+  # add target for gcov evaluation of <TNAME>
+  add_custom_target(${TNAME}-gcov DEPENDS ${BUFFER})
+
+  # add evaluation target to the global gcov target.
+  add_dependencies(coverage ${TNAME}-gcov)
+endfunction()
diff --git a/lapack-netlib/CMAKE/Findcodecov.cmake b/lapack-netlib/CMAKE/Findcodecov.cmake
new file mode 100644 (file)
index 0000000..1f33b2c
--- /dev/null
@@ -0,0 +1,202 @@
+# This file is part of CMake-codecov.
+#
+# https://github.com/RWTH-ELP/CMake-codecov
+#
+# Copyright (c)
+#   2015-2016 RWTH Aachen University, Federal Republic of Germany
+#
+# LICENSE : BSD 3-Clause License
+#
+# Written by Alexander Haase, alexander.haase@rwth-aachen.de
+# Updated by Guillaume Jacquenot, guillaume.jacquenot@gmail.com
+
+set(COVERAGE_FLAG_CANDIDATES
+  # gcc and clang
+  "-O0 -g -fprofile-arcs -ftest-coverage"
+
+  # gcc and clang fallback
+  "-O0 -g --coverage"
+)
+
+
+# To avoid error messages about CMP0051, this policy will be set to new. There
+# will be no problem, as TARGET_OBJECTS generator expressions will be filtered
+# with a regular expression from the sources.
+if(POLICY CMP0051)
+  cmake_policy(SET CMP0051 NEW)
+endif()
+
+
+# Add coverage support for target ${TNAME} and register target for coverage
+# evaluation.
+function(add_coverage TNAME)
+  foreach (TNAME ${ARGV})
+    add_coverage_target(${TNAME})
+  endforeach()
+endfunction()
+
+
+# Find the reuired flags foreach language.
+set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
+set(CMAKE_REQUIRED_QUIET ${codecov_FIND_QUIETLY})
+
+get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
+foreach (LANG ${ENABLED_LANGUAGES})
+  # Coverage flags are not dependend on language, but the used compiler. So
+  # instead of searching flags foreach language, search flags foreach compiler
+  # used.
+  set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
+  if(NOT COVERAGE_${COMPILER}_FLAGS)
+    foreach (FLAG ${COVERAGE_FLAG_CANDIDATES})
+      if(NOT CMAKE_REQUIRED_QUIET)
+        message(STATUS "Try ${COMPILER} code coverage flag = [${FLAG}]")
+      endif()
+
+      set(CMAKE_REQUIRED_FLAGS "${FLAG}")
+      unset(COVERAGE_FLAG_DETECTED CACHE)
+
+      if(${LANG} STREQUAL "C")
+        include(CheckCCompilerFlag)
+        check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)
+
+      elseif(${LANG} STREQUAL "CXX")
+        include(CheckCXXCompilerFlag)
+        check_cxx_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED)
+
+      elseif(${LANG} STREQUAL "Fortran")
+        # CheckFortranCompilerFlag was introduced in CMake 3.x. To be
+        # compatible with older Cmake versions, we will check if this
+        # module is present before we use it. Otherwise we will define
+        # Fortran coverage support as not available.
+        include(CheckFortranCompilerFlag OPTIONAL
+          RESULT_VARIABLE INCLUDED)
+        if(INCLUDED)
+          check_fortran_compiler_flag("${FLAG}"
+            COVERAGE_FLAG_DETECTED)
+        elseif(NOT CMAKE_REQUIRED_QUIET)
+          message("-- Performing Test COVERAGE_FLAG_DETECTED")
+          message("-- Performing Test COVERAGE_FLAG_DETECTED - Failed"
+            " (Check not supported)")
+        endif()
+      endif()
+
+      if(COVERAGE_FLAG_DETECTED)
+        set(COVERAGE_${COMPILER}_FLAGS "${FLAG}"
+          CACHE STRING "${COMPILER} flags for code coverage.")
+        mark_as_advanced(COVERAGE_${COMPILER}_FLAGS)
+        break()
+      endif()
+    endforeach()
+  endif()
+endforeach()
+
+set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})
+
+# Helper function to get the language of a source file.
+function (codecov_lang_of_source FILE RETURN_VAR)
+  get_filename_component(FILE_EXT "${FILE}" EXT)
+  string(TOLOWER "${FILE_EXT}" FILE_EXT)
+  string(SUBSTRING "${FILE_EXT}" 1 -1 FILE_EXT)
+
+  get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
+  foreach (LANG ${ENABLED_LANGUAGES})
+    list(FIND CMAKE_${LANG}_SOURCE_FILE_EXTENSIONS "${FILE_EXT}" TEMP)
+    if(NOT ${TEMP} EQUAL -1)
+      set(${RETURN_VAR} "${LANG}" PARENT_SCOPE)
+      return()
+    endif()
+  endforeach()
+
+  set(${RETURN_VAR} "" PARENT_SCOPE)
+endfunction()
+
+# Helper function to get the relative path of the source file destination path.
+# This path is needed by FindGcov and FindLcov cmake files to locate the
+# captured data.
+function (codecov_path_of_source FILE RETURN_VAR)
+  string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _source ${FILE})
+
+  # If expression was found, SOURCEFILE is a generator-expression for an
+  # object library. Currently we found no way to call this function automatic
+  # for the referenced target, so it must be called in the directoryso of the
+  # object library definition.
+  if(NOT "${_source}" STREQUAL "")
+    set(${RETURN_VAR} "" PARENT_SCOPE)
+    return()
+  endif()
+
+  string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" FILE "${FILE}")
+  if(IS_ABSOLUTE ${FILE})
+    file(RELATIVE_PATH FILE ${CMAKE_CURRENT_SOURCE_DIR} ${FILE})
+  endif()
+
+  # get the right path for file
+  string(REPLACE ".." "__" PATH "${FILE}")
+
+  set(${RETURN_VAR} "${PATH}" PARENT_SCOPE)
+endfunction()
+
+# Add coverage support for target ${TNAME} and register target for coverage
+# evaluation.
+function(add_coverage_target TNAME)
+  # Check if all sources for target use the same compiler. If a target uses
+  # e.g. C and Fortran mixed and uses different compilers (e.g. clang and
+  # gfortran) this can trigger huge problems, because different compilers may
+  # use different implementations for code coverage.
+  get_target_property(TSOURCES ${TNAME} SOURCES)
+  set(TARGET_COMPILER "")
+  set(ADDITIONAL_FILES "")
+  foreach (FILE ${TSOURCES})
+    # If expression was found, FILE is a generator-expression for an object
+    # library. Object libraries will be ignored.
+    string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _file ${FILE})
+    if("${_file}" STREQUAL "")
+      codecov_lang_of_source(${FILE} LANG)
+      if(LANG)
+        list(APPEND TARGET_COMPILER ${CMAKE_${LANG}_COMPILER_ID})
+
+        list(APPEND ADDITIONAL_FILES "${FILE}.gcno")
+        list(APPEND ADDITIONAL_FILES "${FILE}.gcda")
+      endif()
+    endif()
+  endforeach ()
+
+  list(REMOVE_DUPLICATES TARGET_COMPILER)
+  list(LENGTH TARGET_COMPILER NUM_COMPILERS)
+
+  if(NUM_COMPILERS GREATER 1)
+    message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} because "
+      "it will be compiled by different compilers.")
+    return()
+
+  elseif((NUM_COMPILERS EQUAL 0) OR
+    (NOT DEFINED "COVERAGE_${TARGET_COMPILER}_FLAGS"))
+    message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} "
+      "because there is no sanitizer available for target sources.")
+    return()
+  endif()
+
+
+  # enable coverage for target
+  set_property(TARGET ${TNAME} APPEND_STRING
+    PROPERTY COMPILE_FLAGS " ${COVERAGE_${TARGET_COMPILER}_FLAGS}")
+  set_property(TARGET ${TNAME} APPEND_STRING
+    PROPERTY LINK_FLAGS " ${COVERAGE_${TARGET_COMPILER}_FLAGS}")
+
+
+  # Add gcov files generated by compiler to clean target.
+  set(CLEAN_FILES "")
+  foreach (FILE ${ADDITIONAL_FILES})
+    codecov_path_of_source(${FILE} FILE)
+    list(APPEND CLEAN_FILES "CMakeFiles/${TNAME}.dir/${FILE}")
+  endforeach()
+
+  set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
+    "${CLEAN_FILES}")
+
+  add_gcov_target(${TNAME})
+endfunction()
+
+# Include modules for parsing the collected data and output it in a readable
+# format (like gcov).
+find_package(Gcov)
index beb7321..caa0e71 100644 (file)
@@ -1,22 +1,36 @@
-cmake_minimum_required(VERSION 2.8.10)
+cmake_minimum_required(VERSION 2.8.12)
+
+project(LAPACK Fortran C)
+
+set(LAPACK_MAJOR_VERSION 3)
+set(LAPACK_MINOR_VERSION 8)
+set(LAPACK_PATCH_VERSION 0)
+set(
+  LAPACK_VERSION
+  ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
+  )
+
+# Add the CMake directory for custon CMake modules
+set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
 
 # Set a default build type if none was specified
 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(STATUS "Setting build type to 'Release' as none was specified.")
   set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
   # Set the possible values of build type for cmake-gui
-  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage")
 endif()
 
-project(LAPACK Fortran)
+string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
+if(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
+  message(STATUS "Adding coverage")
+  find_package(codecov)
+endif()
 
-set(LAPACK_MAJOR_VERSION 3)
-set(LAPACK_MINOR_VERSION 7)
-set(LAPACK_PATCH_VERSION 0)
-set(
-  LAPACK_VERSION
-  ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
-  )
+# By default static library
+option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
+
+include(GNUInstallDirs)
 
 # Updated OSX RPATH settings
 # In response to CMake 3.0 generating warnings regarding policy CMP0042,
@@ -26,9 +40,9 @@ set(
 set(CMAKE_MACOSX_RPATH ON)
 set(CMAKE_SKIP_BUILD_RPATH FALSE)
 set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" isSystemDir)
+list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_FULL_LIBDIR} isSystemDir)
 if("${isSystemDir}" STREQUAL "-1")
-  set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+  set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 endif()
 
@@ -40,8 +54,6 @@ configure_file(
   @ONLY
 )
 
-# Add the CMake directory for custon CMake modules
-set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
 include(PreventInSourceBuilds)
 include(PreventInBuildInstalls)
 
@@ -96,42 +108,26 @@ endif()
 
 set(LAPACK_INSTALL_EXPORT_NAME lapack-targets)
 
-if(UNIX)
-  include(GNUInstallDirs)
-  set(ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
-  set(LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
-  set(RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
-else()
-  set(ARCHIVE_DIR lib${LIB_SUFFIX})
-  set(LIBRARY_DIR lib${LIB_SUFFIX})
-  set(RUNTIME_DIR bin)
-endif()
-
 macro(lapack_install_library lib)
   install(TARGETS ${lib}
     EXPORT ${LAPACK_INSTALL_EXPORT_NAME}
-    ARCHIVE DESTINATION ${ARCHIVE_DIR}
-    LIBRARY DESTINATION ${LIBRARY_DIR}
-    RUNTIME DESTINATION ${RUNTIME_DIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
   )
 endmacro()
 
-set(PKG_CONFIG_DIR ${LIBRARY_DIR}/pkgconfig)
-set(prefix ${CMAKE_INSTALL_PREFIX})
-if(NOT IS_ABSOLUTE ${LIBRARY_DIR})
-  set(libdir "\${prefix}/${LIBRARY_DIR}")
-else()
-  set(libdir "${LIBRARY_DIR}")
-endif()
+set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 
 # --------------------------------------------------
 # Testing
-
+option(BUILD_TESTING "Build tests" OFF)
 enable_testing()
 include(CTest)
 enable_testing()
-# --------------------------------------------------
+message(STATUS "Build tests: ${BUILD_TESTING}")
 
+# --------------------------------------------------
 # Organize output files.  On Windows this also keeps .dll files next
 # to the .exe files that need them, making tests easy to run.
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/bin)
@@ -158,21 +154,27 @@ message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as
 set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
 set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
 
-# By default static library
-option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-
-option(BUILD_TESTING "Build tests" OFF)
-
-# deprecated LAPACK routines
+# deprecated LAPACK and LAPACKE routines
 option(BUILD_DEPRECATED "Build deprecated routines" OFF)
+message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}")
 
 # --------------------------------------------------
 # Precision to build
 # By default all precisions are generated
-option(BUILD_SINGLE "Build LAPACK Single Precision" ON)
-option(BUILD_DOUBLE "Build LAPACK Double Precision" ON)
-option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON)
-option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON)
+option(BUILD_SINGLE "Build single precision real" ON)
+option(BUILD_DOUBLE "Build double precision real" ON)
+option(BUILD_COMPLEX "Build single precision complex" ON)
+option(BUILD_COMPLEX16 "Build double precision complex" ON)
+message(STATUS "Build single precision real: ${BUILD_SINGLE}")
+message(STATUS "Build double precision real: ${BUILD_DOUBLE}")
+message(STATUS "Build single precision complex: ${BUILD_COMPLEX}")
+message(STATUS "Build double precision complex: ${BUILD_COMPLEX16}")
+
+if(NOT (BUILD_SINGLE OR BUILD_DOUBLE OR BUILD_COMPLEX OR BUILD_COMPLEX16))
+  message(FATAL_ERROR "Nothing to build, no precision selected.
+  Please enable at least one of these:
+  BUILD_SINGLE, BUILD_DOUBLE, BUILD_COMPLEX, BUILD_COMPLEX16.")
+endif()
 
 # --------------------------------------------------
 # Subdirectories that need to be processed
@@ -275,7 +277,6 @@ else()
     CACHE STRING "Linker flags for shared libs" FORCE)
 endif()
 
-message(STATUS "BUILD TESTING : ${BUILD_TESTING}")
 if(BUILD_TESTING)
   add_subdirectory(TESTING)
 endif()
@@ -346,7 +347,7 @@ endif()
 set(_lapack_config_install_guard_target "")
 if(ALL_TARGETS)
   install(EXPORT lapack-targets
-    DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION})
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION})
 
   # Choose one of the lapack targets to use as a guard for
   # lapack-config.cmake to load targets from the install tree.
@@ -396,5 +397,5 @@ write_basic_package_version_file(
 install(FILES
   ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
   ${LAPACK_BINARY_DIR}/lapack-config-version.cmake
-  DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION}
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}
   )
index db9bb47..8f35585 100644 (file)
@@ -38,7 +38,7 @@ PROJECT_NAME           = LAPACK
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 3.7.0
+PROJECT_NUMBER         = 3.8.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
index 7b048a2..6fb339a 100644 (file)
@@ -38,7 +38,7 @@ PROJECT_NAME           = LAPACK
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 3.7.0
+PROJECT_NUMBER         = 3.8.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
index 73a4437..2917352 100644 (file)
@@ -507,7 +507,7 @@ LAPACK library, you would modify the \texttt{lapacklib} definition to be:
 
 \begin{verbatim}
 lapacklib:
-        ( cd SRC; $(MAKE) single )
+        $(MAKE) -C SRC single
 \end{verbatim}
 
 Likewise, you could specify \texttt{double, complex, or complex16} to
@@ -560,7 +560,7 @@ can be accomplished by the following:
 
 \begin{list}{}{}
 \item \texttt{cd LAPACK}
-\item \texttt{make clean}
+\item \texttt{make cleanobj}
 \end{list}
 
 \section{Further Details of the Installation Process}\label{furtherdetails}
index 163b7e2..0902e12 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup auxOTHERauxiliary
 *
-*  =====================================================================      PROGRAM LAPACK_VERSION
+*  =====================================================================
+      PROGRAM LAPACK_VERSION
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       INTEGER MAJOR, MINOR, PATCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL ILAVER
 *
-      CALL ILAVER ( MAJOR,MINOR, PATCH )
+      CALL ILAVER ( MAJOR, MINOR, PATCH )
       WRITE(*,*) "LAPACK ",MAJOR,".",MINOR,".",PATCH
 *
       END
index 15f5252..150a061 100644 (file)
@@ -1,33 +1,48 @@
 include ../make.inc
 
-.SUFFIXES: .o .f
 all: testlsame testslamch testdlamch testsecond testdsecnd testieee testversion
 
 testlsame: lsame.o lsametst.o
-       $(LOADER) $(LOADOPTS) -o $@ lsame.o lsametst.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testslamch: slamch.o lsame.o slamchtst.o
-       $(LOADER) $(LOADOPTS) -o $@ slamch.o lsame.o slamchtst.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testdlamch: dlamch.o lsame.o dlamchtst.o
-       $(LOADER) $(LOADOPTS) -o $@ dlamch.o lsame.o dlamchtst.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testsecond: second_$(TIMER).o secondtst.o
        @echo "[INFO] : TIMER value: $(TIMER) (given by make.inc)"
-       $(LOADER) $(LOADOPTS) -o $@ second_$(TIMER).o secondtst.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testdsecnd: dsecnd_$(TIMER).o dsecndtst.o
        @echo "[INFO] : TIMER value: $(TIMER) (given by make.inc)"
-       $(LOADER) $(LOADOPTS) -o $@ dsecnd_$(TIMER).o dsecndtst.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testieee: tstiee.o
-       $(LOADER) $(LOADOPTS) -o $@ tstiee.o
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 testversion: ilaver.o LAPACK_version.o
-       $(LOADER) $(LOADOPTS) -o $@ ilaver.o LAPACK_version.o
-
-clean:
+       $(LOADER) $(LOADOPTS) -o $@ $^
+
+run: all
+       ./testlsame
+       ./testslamch
+       ./testdlamch
+       ./testsecond
+       ./testdsecnd
+       ./testieee
+       ./testversion
+
+clean: cleanobj cleanexe cleantest
+cleanobj:
        rm -f *.o
+cleanexe:
+       rm -f test*
+cleantest:
+       rm -f core
+
+.SUFFIXES: .o .f
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
 
index a39e00c..430a46a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup auxOTHERauxiliary
 *
 *  =====================================================================      PROGRAM DSECNDTST
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 * =====================================================================
 *
@@ -48,6 +48,9 @@
       DOUBLE PRECISION   DSECND
       EXTERNAL           DSECND
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL           MYSUB
+*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE
 *     ..
index 8578953..e1d59f4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     June 2016
+*     June 2017
 *
 *  =====================================================================
 *
       INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
 *  =====================================================================
       VERS_MAJOR = 3
-      VERS_MINOR = 7
+      VERS_MINOR = 8
       VERS_PATCH = 0
 *  =====================================================================
 *
index b581587..0ceeaa1 100644 (file)
@@ -1,76 +1,81 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O4
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = -O4 -fpe1
+DRVOPTS = $(OPTS)
+NOOPT   =
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = -O4 -fpe1
-DRVOPTS  = $(OPTS)
-NOOPT    =
 LOADER   = f77
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O4
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
 #BLASLIB      = ../../librefblas.a
-BLASLIB     = -ldxml
+BLASLIB      = -ldxml
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
 TMGLIB       = libtmglib.a
index 869a7ec..8eabbbd 100644 (file)
@@ -1,76 +1,81 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS =
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = +O4 +U77
+DRVOPTS = $(OPTS) -K
+NOOPT   = +U77
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = +O4 +U77
-DRVOPTS  = $(OPTS) -K
-NOOPT    = +U77
 LOADER   = f77
 LOADOPTS = -Aa +U77
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS =
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
 #BLASLIB      = ../../librefblas.a
-BLASLIB     = -lblas
+BLASLIB      = -lblas
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
 TMGLIB       = libtmglib.a
index 6848206..d9e71e1 100644 (file)
@@ -1,78 +1,83 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /sbin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON
+#OPTS    = -g  -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON
+DRVOPTS = $(OPTS) -static
+NOOPT   = -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON
+#NOOPT   = -g  -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON
-#OPTS     = -g  -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON
-DRVOPTS  = $(OPTS) -static
-NOOPT    = -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON
-#NOOPT    = -g  -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON
 LOADER   = f77
 LOADOPTS = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON
 #LOADOPTS = -g  -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O3
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-#BLASLIB     = -lblas
+#BLASLIB      = -lblas
 BLASLIB      = ../../librefblas.a
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
index ceeccef..3ffcada 100644 (file)
@@ -1,79 +1,84 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /sbin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = -O3 -64 -mips4 -r10000
+#OPTS    = -O3 -64 -mips4 -r10000 -mp
+DRVOPTS = $(OPTS) -static
+NOOPT   = -64 -mips4 -r10000
+#NOOPT   = -64 -mips4 -r10000 -mp
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = -O3 -64 -mips4 -r10000
-#OPTS     = -O3 -64 -mips4 -r10000 -mp
-DRVOPTS  = $(OPTS) -static
-NOOPT    = -64 -mips4 -r10000
-#NOOPT    = -64 -mips4 -r10000 -mp
 LOADER   = f77
 LOADOPTS = -O3 -64 -mips4 -r10000
 #LOADOPTS = -O3 -64 -mips4 -r10000 -mp
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O3
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-BLASLIB     = -lblas
-#BLASLIB     = -lblas_mp
+BLASLIB      = -lblas
+#BLASLIB      = -lblas_mp
 #BLASLIB      = ../../librefblas.a
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
index de55f15..c7019ac 100644 (file)
@@ -1,75 +1,80 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /sbin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O4
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = -O4
+DRVOPTS = $(OPTS) -static
+NOOPT   =
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = -O4
-DRVOPTS  = $(OPTS) -static
-NOOPT    =
 LOADER   = f77
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O4
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-#BLASLIB     = -lblas
+#BLASLIB      = -lblas
 BLASLIB      = ../../librefblas.a
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
index d9c68c4..4e44f1b 100644 (file)
@@ -1,75 +1,80 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+OPTS    = -dalign -O4 -fast
+DRVOPTS = $(OPTS)
+NOOPT   =
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-OPTS     = -dalign -O4 -fast
-DRVOPTS  = $(OPTS)
-NOOPT    =
 LOADER   = f77
 LOADOPTS = -dalign -O4 -fast
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O3
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-#BLASLIB     = -lblas
+#BLASLIB      = -lblas
 BLASLIB      = ../../librefblas.a
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
index d3c7843..e6d79ad 100644 (file)
@@ -1,81 +1,86 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = cc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = f77
+#OPTS    = -O4 -u -f -mt
+#OPTS    = -u -f -dalign -native -xO5 -xarch=v8plusa
+OPTS    = -u -f -dalign -native -xO2 -xarch=v8plusa
+DRVOPTS = $(OPTS)
+NOOPT   = -u -f
+#NOOPT   = -u -f -mt
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = f77
-#OPTS     = -O4 -u -f -mt
-#OPTS     = -u -f -dalign -native -xO5 -xarch=v8plusa
-OPTS     = -u -f -dalign -native -xO2 -xarch=v8plusa
-DRVOPTS  = $(OPTS)
-NOOPT    = -u -f
-#NOOPT    = -u -f -mt
 LOADER   = f77
 #LOADOPTS = -mt
 LOADOPTS = -f -dalign -native -xO2 -xarch=v8plusa
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = cc
-CFLAGS = -O3
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
 #BLASLIB      = ../../librefblas.a
-#BLASLIB     = -xlic_lib=sunperf_mt
-BLASLIB     = -xlic_lib=sunperf
+#BLASLIB      = -xlic_lib=sunperf_mt
+BLASLIB      = -xlic_lib=sunperf
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
 TMGLIB       = libtmglib.a
index d7fa4b7..9466ee3 100644 (file)
@@ -1,77 +1,82 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+CC     = xlc
+CFLAGS = -O3 -qnosave
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-FORTRAN  = xlf
-OPTS     = -O3 -qfixed -qnosave
+FORTRAN = xlf
+OPTS    = -O3 -qfixed -qnosave
 # For -O2, add -qstrict=none
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0 -qfixed -qnosave
+DRVOPTS = $(OPTS)
+NOOPT   = -O0 -qfixed -qnosave
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
+#
 LOADER   = xlf
 LOADOPTS = -qnosave
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-#TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+#TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = xlc
-CFLAGS = -O3 -qnosave
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
 #BLASLIB      = ../../librefblas.a
-BLASLIB     = -lessl
+BLASLIB      = -lessl
 CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
 TMGLIB       = libtmglib.a
index ccd0994..39d98d4 100644 (file)
@@ -1,74 +1,79 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  November 2017                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+CC     = gcc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
 #  Note: During a regular execution, LAPACK might create NaN and Inf
 #  and handle these quantities appropriately. As a consequence, one
 #  should not compile LAPACK with flags such as -ffpe-trap=overflow.
 #
-FORTRAN  = gfortran
-OPTS     = -O2 -frecursive
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0 -frecursive
+FORTRAN = gfortran
+OPTS    = -O2 -frecursive
+DRVOPTS = $(OPTS)
+NOOPT   = -O0 -frecursive
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
+#
 LOADER   = gfortran
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
+#
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
+#
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+#TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
+#
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-#TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
-#
-# CC is the C compiler, normally invoked with options CFLAGS.
-#
-CC = gcc
-CFLAGS = -O3
-#
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
index f87b949..10e6381 100644 (file)
@@ -1,74 +1,79 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  November 2017                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader
-#  and desired load options for your machine.
+CC     = gcc
+CFLAGS = -g
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
 #  Note: During a regular execution, LAPACK might create NaN and Inf
 #  and handle these quantities appropriately. As a consequence, one
 #  should not compile LAPACK with flags such as -ffpe-trap=overflow.
 #
-FORTRAN  = gfortran -fimplicit-none -g -frecursive
-OPTS     =
-DRVOPTS  = $(OPTS)
-NOOPT    = -g -O0 -frecursive
+FORTRAN = gfortran -fimplicit-none -g -frecursive
+OPTS    =
+DRVOPTS = $(OPTS)
+NOOPT   = -g -O0 -frecursive
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
+#
 LOADER   = gfortran -g
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
+#
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
+#
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+#TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
+#
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-# TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
-TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
-#
-# CC is the C compiler, normally invoked with options CFLAGS.
-#
-CC = gcc
-CFLAGS = -g
-#
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
index b26e960..b067bd4 100644 (file)
@@ -1,70 +1,75 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  June 2016                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = icc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader
-#  and desired load options for your machine.
+FORTRAN = ifort
+OPTS    = -O3 -fp-model strict -assume protect_parens
+DRVOPTS = $(OPTS)
+NOOPT   = -O0 -fp-model strict -assume protect_parens
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = ifort
-OPTS     = -O3 -fp-model strict -assume protect_parens
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0 -fp-model strict -assume protect_parens
 LOADER   = ifort
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = icc
-CFLAGS = -O3
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
index 595b64c..a9a5cec 100644 (file)
@@ -1,70 +1,75 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = pgcc
+CFLAGS =
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = pgf95
+OPTS    = -O3
+DRVOPTS = $(OPTS)
+NOOPT   = -O0
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = pgf95
-OPTS     = -O3
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0
 LOADER   = $(FORTRAN)
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-# TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
- TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+#TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = pgcc
-CFLAGS =
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
index 8639530..1d9bf54 100644 (file)
@@ -1,77 +1,82 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.6.0                                           #
-#  November 2015                                                   #
+#  LAPACK, Version 3.7.0                                           #
+#  December 2016                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
+#
+CC     = pghpc
+CFLAGS =
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+FORTRAN = pghpf
+OPTS    = -O4 -Mnohpfc -Mdclchk
+DRVOPTS = $(OPTS)
+NOOPT   = -Mnohpfc -Mdclchk
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
 #
-FORTRAN  = pghpf
-OPTS     = -O4 -Mnohpfc -Mdclchk
-DRVOPTS  = $(OPTS)
-NOOPT    = -Mnohpfc -Mdclchk
 LOADER   = pghpf
 LOADOPTS =
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-# TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = echo
+
+#  Timer for the SECOND and DSECND routines
 #
-# CC is the C compiler, normally invoked with options CFLAGS.
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+#TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
-CC = pghpc
-CFLAGS =
+#BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# LAPACKE has also the interface to some routines from tmglib,
-# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
 #LAPACKE_WITH_TMG = Yes
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = echo
-#
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)
 #
-#BLASLIB     = -lessl
+#BLASLIB      = -lessl
 BLASLIB      = ../../librefblas.a
-CBLASLIB      = ../../libcblas.a
+CBLASLIB     = ../../libcblas.a
 LAPACKLIB    = liblapack.a
 TMGLIB       = libtmglib.a
 LAPACKELIB   = liblapacke.a
index 03f19ab..9eaa181 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================      PROGRAM SECONDTST
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 * =====================================================================
 *
@@ -44,6 +44,9 @@
       REAL               SECOND
       EXTERNAL           SECOND
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL           MYSUB
+*     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          REAL
 *     ..
index 2a60a1e..42faef5 100644 (file)
@@ -36,26 +36,42 @@ macro(append_subdir_files variable dirname)
 endmacro()
 
 append_subdir_files(LAPACKE_INCLUDE "include")
-append_subdir_files(SRC_OBJ "src")
-append_subdir_files(SRCX_OBJ "src")
-append_subdir_files(MATGEN_OBJ "src")
-append_subdir_files(UTILS_OBJ "utils")
+append_subdir_files(SOURCES "src")
+append_subdir_files(DEPRECATED "src")
+append_subdir_files(EXTENDED "src")
+append_subdir_files(MATGEN "src")
+append_subdir_files(UTILS "utils")
 
+if(BUILD_DEPRECATED)
+  list(APPEND SOURCES ${DEPRECATED})
+endif()
 if(USE_XBLAS)
-  add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
-  target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
-else()
-  if(LAPACKE_WITH_TMG)
-    add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
-    target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-  else()
-    add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
-    target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-  endif()
+  list(APPEND SOURCES ${EXTENDED})
+endif()
+if(LAPACKE_WITH_TMG)
+  list(APPEND SOURCES ${MATGEN})
+endif()
+list(APPEND SOURCES ${UTILS})
+
+add_library(lapacke ${SOURCES})
+set_target_properties(
+  lapacke PROPERTIES
+  LINKER_LANGUAGE C
+  VERSION ${LAPACK_VERSION}
+  SOVERSION ${LAPACK_MAJOR_VERSION}
+  )
+target_include_directories(lapacke PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
+  $<INSTALL_INTERFACE:include>
+)
+
+if(LAPACKE_WITH_TMG)
+  target_link_libraries(lapacke PRIVATE tmglib)
 endif()
+target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES})
 
 lapack_install_library(lapacke)
-install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include)
+install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
 if(BUILD_TESTING)
   add_subdirectory(example)
@@ -78,8 +94,8 @@ 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 ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION}
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}
   )
 
 install(EXPORT lapacke-targets
-  DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION})
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION})
index f1b07ad..016f8a2 100644 (file)
@@ -35,7 +35,7 @@
 # To generate lapacke library type 'make lapacke'
 # To make both just type 'make'
 #
-# To remove lapacke object files type 'make cleanlib'
+# To remove lapacke object files type 'make cleanobj'
 # To clean all above type 'make clean'
 # To clean everything including lapacke library type
 # 'make cleanall'
@@ -44,20 +44,26 @@ include ../make.inc
 
 all: lapacke
 
-lapacke:
-       cd include && cp lapacke_mangling_with_flags.h.in lapacke_mangling.h
-       cd src && $(MAKE)
-       cd utils && $(MAKE)
+lapacke: include/lapacke_mangling.h
+       $(MAKE) -C src
+       $(MAKE) -C utils
 
-lapacke_example:
-       cd example && $(MAKE)
+include/lapacke_mangling.h: include/lapacke_mangling_with_flags.h.in
+       cp $< $@
 
-clean: cleanlib
+lapacke_example: lapacke
+       $(MAKE) -C example
 
+#clean: cleanlib
+clean: cleanobj
+       $(MAKE) -C src clean
+       $(MAKE) -C utils clean
+       $(MAKE) -C example clean
+cleanobj:
+       $(MAKE) -C src cleanobj
+       $(MAKE) -C utils cleanobj
+       $(MAKE) -C example cleanobj
 cleanlib:
-       cd src && $(MAKE) clean
-       cd utils && $(MAKE) clean
-
-cleanall: clean
-       rm -f $(LAPACKE)
-       cd example && $(MAKE) clean
+       rm -f ../$(LAPACKELIB)
+cleanexe:
+       $(MAKE) -C example cleanexe
index 9b2452b..caa459a 100644 (file)
@@ -5,7 +5,7 @@ get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH)
 get_filename_component(_LAPACKE_PREFIX "${_LAPACKE_PREFIX}" PATH)
 
 # Load the LAPACK package with which we were built.
-set(LAPACK_DIR "${_LAPACKE_PREFIX}/@{LIBRARY_DIR@/cmake/lapack-@LAPACK_VERSION@")
+set(LAPACK_DIR "${_LAPACKE_PREFIX}/@CMAKE_INSTALL_LIBDIR@/cmake/lapack-@LAPACK_VERSION@")
 find_package(LAPACK NO_MODULE)
 
 # Load lapacke targets from the install tree.
index a1c5909..fa75c73 100644 (file)
@@ -3,10 +3,10 @@ add_executable(xexample_DGESV_colmajor example_DGESV_colmajor.c lapacke_example_
 add_executable(xexample_DGELS_rowmajor example_DGELS_rowmajor.c lapacke_example_aux.c lapacke_example_aux.h)
 add_executable(xexample_DGELS_colmajor example_DGELS_colmajor.c lapacke_example_aux.c lapacke_example_aux.h)
 
-target_link_libraries(xexample_DGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGESV_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGELS_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
-target_link_libraries(xexample_DGELS_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+target_link_libraries(xexample_DGESV_rowmajor lapacke)
+target_link_libraries(xexample_DGESV_colmajor lapacke)
+target_link_libraries(xexample_DGELS_rowmajor lapacke)
+target_link_libraries(xexample_DGELS_colmajor lapacke)
 
 add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor)
 add_test(example_DGESV_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor)
index 80968e8..f959a2b 100644 (file)
@@ -9,23 +9,26 @@ LIBRARIES = ../../$(LAPACKELIB) ../../$(LAPACKLIB) $(BLASLIB)
 
 # Double Precision Examples
 xexample_DGESV_rowmajor: example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
-       $(LOADER) $(LOADOPTS) -o $@ example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
+       $(LOADER) $(LOADOPTS) -o $@ $^
        ./$@
 
 xexample_DGESV_colmajor: example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES)
-       $(LOADER) $(LOADOPTS) -o $@ example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES)
+       $(LOADER) $(LOADOPTS) -o $@ $^
        ./$@
 
 xexample_DGELS_rowmajor: example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
-       $(LOADER) $(LOADOPTS) -o $@ example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
+       $(LOADER) $(LOADOPTS) -o $@ $^
        ./$@
 
 xexample_DGELS_colmajor: example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES)
-       $(LOADER) $(LOADOPTS) -o $@ example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES)
+       $(LOADER) $(LOADOPTS) -o $@ $^
        ./$@
 
+clean: cleanobj cleanexe
+cleanobj:
+       rm -f *.o
+cleanexe:
+       rm -f x*
+
 .c.o:
        $(CC) $(CFLAGS) -I. -I../include -c -o $@ $<
-
-clean:
-       rm -f *.o x*
index cacdef9..6ded78c 100644 (file)
@@ -2398,6 +2398,28 @@ float LAPACKE_clanhe( int matrix_layout, char norm, char uplo, lapack_int n,
 double LAPACKE_zlanhe( int matrix_layout, char norm, char uplo, lapack_int n,
                            const lapack_complex_double* a, lapack_int lda );
 
+lapack_int LAPACKE_clacrm( int matrix_layout, lapack_int m, lapack_int n,
+                          const lapack_complex_float* a,
+                          lapack_int lda, const float* b,
+                          lapack_int ldb, lapack_complex_float* c,
+                          lapack_int ldc );
+lapack_int LAPACKE_zlacrm( int matrix_layout, lapack_int m, lapack_int n,
+                           const lapack_complex_double* a,
+                           lapack_int lda, const double* b,
+                           lapack_int ldb, lapack_complex_double* c,
+                           lapack_int ldc );
+
+lapack_int LAPACKE_clarcm( int matrix_layout, lapack_int m, lapack_int n,
+                          const float* a, lapack_int lda,
+                          const lapack_complex_float* b,
+                          lapack_int ldb, lapack_complex_float* c,
+                          lapack_int ldc );
+lapack_int LAPACKE_zlarcm( int matrix_layout, lapack_int m, lapack_int n,
+                           const double* a, lapack_int lda,
+                           const lapack_complex_double* b,
+                           lapack_int ldb, lapack_complex_double* c,
+                           lapack_int ldc );
+
 float LAPACKE_slansy( int matrix_layout, char norm, char uplo, lapack_int n,
                            const float* a, lapack_int lda );
 double LAPACKE_dlansy( int matrix_layout, char norm, char uplo, lapack_int n,
@@ -2533,6 +2555,11 @@ lapack_int LAPACKE_zlaset( int matrix_layout, char uplo, lapack_int m,
 lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d );
 lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d );
 
+lapack_int LAPACKE_slassq( lapack_int n,                 float* x, lapack_int incx,  float* scale,  float* sumsq );
+lapack_int LAPACKE_dlassq( lapack_int n,                double* x, lapack_int incx, double* scale, double* sumsq );
+lapack_int LAPACKE_classq( lapack_int n,  lapack_complex_float* x, lapack_int incx,  float* scale,  float* sumsq );
+lapack_int LAPACKE_zlassq( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq );
+
 lapack_int LAPACKE_slaswp( int matrix_layout, lapack_int n, float* a,
                            lapack_int lda, lapack_int k1, lapack_int k2,
                            const lapack_int* ipiv, lapack_int incx );
@@ -5759,35 +5786,35 @@ lapack_int LAPACKE_zgesvd_work( int matrix_layout, char jobu, char jobvt,
                                 lapack_int lwork, double* rwork );
 
 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, 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 m, lapack_int n, 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 LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range,
-                                       lapack_int m, lapack_int n, 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 m, lapack_int n, 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 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, 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 m, lapack_int n, 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 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, 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,
-                                double* rwork, lapack_int* iwork );
+                                 lapack_int m, lapack_int n, 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,
+                                 lapack_complex_double* work, lapack_int lwork,
+                                 double* rwork, lapack_int* iwork );
 
 lapack_int LAPACKE_sgesvj_work( int matrix_layout, char joba, char jobu,
                                 char jobv, lapack_int m, lapack_int n, float* a,
@@ -5804,7 +5831,7 @@ lapack_int LAPACKE_cgesvj_work( int matrix_layout, char joba, char jobu,
                                 lapack_int lda, float* sva, lapack_int mv,
                                 lapack_complex_float* v, lapack_int ldv,
                                 lapack_complex_float* cwork, lapack_int lwork,
-                                                               float* rwork,lapack_int lrwork );
+                                float* rwork,lapack_int lrwork );
 lapack_int LAPACKE_zgesvj_work( int matrix_layout, char joba, char jobu,
                                 char jobv, lapack_int m, lapack_int n,
                                 lapack_complex_double* a, lapack_int lda, double* sva,
@@ -7581,6 +7608,28 @@ double LAPACKE_zlanhe_work( int matrix_layout, char norm, char uplo,
                                 lapack_int n, const lapack_complex_double* a,
                                 lapack_int lda, double* work );
 
+lapack_int LAPACKE_clacrm_work( int matrix_layout, lapack_int m, lapack_int n,
+                                const lapack_complex_float* a,
+                                lapack_int lda, const float* b,
+                                lapack_int ldb, lapack_complex_float* c,
+                                lapack_int ldc, float* work );
+lapack_int LAPACKE_zlacrm_work( int matrix_layout, lapack_int m, lapack_int n,
+                                const lapack_complex_double* a,
+                                lapack_int lda, const double* b,
+                                lapack_int ldb, lapack_complex_double* c,
+                                lapack_int ldc, double* work );
+
+lapack_int LAPACKE_clarcm_work( int matrix_layout, lapack_int m, lapack_int n,
+                                const float* a, lapack_int lda,
+                                const lapack_complex_float* b,
+                                lapack_int ldb, lapack_complex_float* c,
+                                lapack_int ldc, float* work );
+lapack_int LAPACKE_zlarcm_work( int matrix_layout, lapack_int m, lapack_int n,
+                                const double* a, lapack_int lda,
+                                const lapack_complex_double* b,
+                                lapack_int ldb, lapack_complex_double* c,
+                                lapack_int ldc, double* work );
+
 float LAPACKE_slansy_work( int matrix_layout, char norm, char uplo,
                                 lapack_int n, const float* a, lapack_int lda,
                                 float* work );
@@ -7729,6 +7778,11 @@ lapack_int LAPACKE_zlaset_work( int matrix_layout, char uplo, lapack_int m,
 lapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d );
 lapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d );
 
+lapack_int LAPACKE_slassq_work( lapack_int n,                 float* x, lapack_int incx,  float* scale,  float* sumsq );
+lapack_int LAPACKE_dlassq_work( lapack_int n,                double* x, lapack_int incx, double* scale, double* sumsq );
+lapack_int LAPACKE_classq_work( lapack_int n,  lapack_complex_float* x, lapack_int incx,  float* scale,  float* sumsq );
+lapack_int LAPACKE_zlassq_work( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq );
+
 lapack_int LAPACKE_slaswp_work( int matrix_layout, lapack_int n, float* a,
                                 lapack_int lda, lapack_int k1, lapack_int k2,
                                 const lapack_int* ipiv, lapack_int incx );
@@ -11619,7 +11673,7 @@ lapack_int LAPACKE_zhesv_rk_work( int matrix_layout, char uplo, lapack_int n,
                                lapack_int lda, lapack_complex_double* e, lapack_int* ipiv,
                                lapack_complex_double* b, lapack_int ldb,
                                lapack_complex_double* work, lapack_int lwork );
-                               
+
 lapack_int LAPACKE_ssytrf_rk( int matrix_layout, char uplo, lapack_int n, float* a,
                            lapack_int lda, float* e, lapack_int* ipiv );
 lapack_int LAPACKE_dsytrf_rk( int matrix_layout, char uplo, lapack_int n, double* a,
@@ -11773,12 +11827,12 @@ lapack_int LAPACKE_csycon_3( int matrix_layout, char uplo, lapack_int n,
                            const lapack_int* ipiv, float anorm, float* rcond );
 lapack_int LAPACKE_zsycon_3( int matrix_layout, char uplo, lapack_int n,
                            const lapack_complex_double* a, lapack_int lda,
-                           const lapack_complex_double* e, 
+                           const lapack_complex_double* e,
                            const lapack_int* ipiv, double anorm,
                            double* rcond );
 lapack_int LAPACKE_checon_3( int matrix_layout, char uplo, lapack_int n,
                            const lapack_complex_float* a, lapack_int lda,
-                           const lapack_complex_float* e, 
+                           const lapack_complex_float* e,
                            const lapack_int* ipiv, float anorm, float* rcond );
 lapack_int LAPACKE_zhecon_3( int matrix_layout, char uplo, lapack_int n,
                            const lapack_complex_double* a, lapack_int lda,
@@ -11803,7 +11857,7 @@ lapack_int LAPACKE_zsycon_3_work( int matrix_layout, char uplo, lapack_int n,
                                 const lapack_complex_double* a, lapack_int lda,
                                 const lapack_complex_double* e,
                                 const lapack_int* ipiv, double anorm,
-                                double* rcond, lapack_complex_double* work );                                               
+                                double* rcond, lapack_complex_double* work );
 lapack_int LAPACKE_checon_3_work( int matrix_layout, char uplo, lapack_int n,
                                 const lapack_complex_float* a, lapack_int lda,
                                 const lapack_complex_float* e,
@@ -12367,6 +12421,187 @@ lapack_int LAPACKE_zhegv_2stage_work( int matrix_layout, lapack_int itype, char
                                double* w, lapack_complex_double* work,
                                lapack_int lwork, double* rwork );
 
+//LAPACK 3.8.0
+lapack_int LAPACKE_ssysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, float* a, lapack_int lda,
+                          float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, float* b, lapack_int ldb );
+lapack_int LAPACKE_ssysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, lapack_int* ipiv,
+                               lapack_int* ipiv2, float* b, lapack_int ldb,
+                               float* work, lapack_int lwork );
+lapack_int LAPACKE_dsysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, double* a, lapack_int lda,
+                          double* tb, lapack_int ltb,
+                          lapack_int* ipiv, lapack_int* ipiv2, 
+                          double* b, lapack_int ldb );
+lapack_int LAPACKE_dsysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, double* a, lapack_int lda,
+                               double* tb, lapack_int ltb,
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               double* b, lapack_int ldb,
+                               double* work, lapack_int lwork );
+lapack_int LAPACKE_csysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_csysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* b, lapack_int ldb,
+                               lapack_complex_float* work, lapack_int lwork );
+lapack_int LAPACKE_zsysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb );
+lapack_int LAPACKE_zsysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* b, lapack_int ldb,
+                               lapack_complex_double* work, lapack_int lwork );
+lapack_int LAPACKE_chesv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_chesv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* b, lapack_int ldb,
+                               lapack_complex_float* work, lapack_int lwork );
+lapack_int LAPACKE_zhesv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb );
+lapack_int LAPACKE_zhesv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* b, lapack_int ldb,
+                               lapack_complex_double* work, lapack_int lwork );
+                               
+lapack_int LAPACKE_ssytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          float* a, lapack_int lda,
+                          float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2 );
+lapack_int LAPACKE_ssytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, lapack_int* ipiv,
+                               lapack_int* ipiv2,
+                               float* work, lapack_int lwork );
+lapack_int LAPACKE_dsytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          double* a, lapack_int lda,
+                          double* tb, lapack_int ltb,
+                          lapack_int* ipiv, lapack_int* ipiv2 );
+lapack_int LAPACKE_dsytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               double* a, lapack_int lda,
+                               double* tb, lapack_int ltb,
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               double* work, lapack_int lwork );
+lapack_int LAPACKE_csytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 );
+lapack_int LAPACKE_csytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* work, lapack_int lwork );
+lapack_int LAPACKE_zsytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 );
+lapack_int LAPACKE_zsytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* work, lapack_int lwork );
+lapack_int LAPACKE_chetrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 );
+lapack_int LAPACKE_chetrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* work, lapack_int lwork );
+lapack_int LAPACKE_zhetrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 );
+lapack_int LAPACKE_zhetrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* work, lapack_int lwork );
+
+
+lapack_int LAPACKE_ssytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, float* a, lapack_int lda,
+                          float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, float* b, lapack_int ldb );
+lapack_int LAPACKE_ssytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, lapack_int* ipiv,
+                               lapack_int* ipiv2, float* b, lapack_int ldb );
+lapack_int LAPACKE_dsytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, double* a, lapack_int lda,
+                          double* tb, lapack_int ltb,
+                          lapack_int* ipiv, lapack_int* ipiv2, 
+                          double* b, lapack_int ldb );
+lapack_int LAPACKE_dsytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, double* a, lapack_int lda,
+                               double* tb, lapack_int ltb,
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               double* b, lapack_int ldb );
+lapack_int LAPACKE_csytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_csytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_zsytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb );
+lapack_int LAPACKE_zsytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* b, lapack_int ldb );
+lapack_int LAPACKE_chetrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_chetrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a,
+                               lapack_int lda, lapack_complex_float* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* b, lapack_int ldb );
+lapack_int LAPACKE_zhetrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb );
+lapack_int LAPACKE_zhetrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a,
+                               lapack_int lda, lapack_complex_double* tb,
+                               lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* b, lapack_int ldb );
+
 #define LAPACK_sgetrf LAPACK_GLOBAL(sgetrf,SGETRF)
 #define LAPACK_dgetrf LAPACK_GLOBAL(dgetrf,DGETRF)
 #define LAPACK_cgetrf LAPACK_GLOBAL(cgetrf,CGETRF)
@@ -13337,6 +13572,10 @@ lapack_int LAPACKE_zhegv_2stage_work( int matrix_layout, lapack_int itype, char
 #define LAPACK_zlange LAPACK_GLOBAL(zlange,ZLANGE)
 #define LAPACK_clanhe LAPACK_GLOBAL(clanhe,CLANHE)
 #define LAPACK_zlanhe LAPACK_GLOBAL(zlanhe,ZLANHE)
+#define LAPACK_clarcm LAPACK_GLOBAL(clarcm,CLARCM)
+#define LAPACK_zlarcm LAPACK_GLOBAL(zlarcm,ZLARCM)
+#define LAPACK_clacrm LAPACK_GLOBAL(clacrm,CLACRM)
+#define LAPACK_zlacrm LAPACK_GLOBAL(zlacrm,ZLACRM)
 #define LAPACK_slansy LAPACK_GLOBAL(slansy,SLANSY)
 #define LAPACK_dlansy LAPACK_GLOBAL(dlansy,DLANSY)
 #define LAPACK_clansy LAPACK_GLOBAL(clansy,CLANSY)
@@ -13359,6 +13598,10 @@ lapack_int LAPACKE_zhegv_2stage_work( int matrix_layout, lapack_int itype, char
 #define LAPACK_dlarfg LAPACK_GLOBAL(dlarfg,DLARFG)
 #define LAPACK_clarfg LAPACK_GLOBAL(clarfg,CLARFG)
 #define LAPACK_zlarfg LAPACK_GLOBAL(zlarfg,ZLARFG)
+#define LAPACK_slassq LAPACK_GLOBAL(slassq,SLASSQ)
+#define LAPACK_dlassq LAPACK_GLOBAL(dlassq,DLASSQ)
+#define LAPACK_classq LAPACK_GLOBAL(classq,CLASSQ)
+#define LAPACK_zlassq LAPACK_GLOBAL(zlassq,ZLASSQ)
 #define LAPACK_slarft LAPACK_GLOBAL(slarft,SLARFT)
 #define LAPACK_dlarft LAPACK_GLOBAL(dlarft,DLARFT)
 #define LAPACK_clarft LAPACK_GLOBAL(clarft,CLARFT)
@@ -13577,6 +13820,26 @@ lapack_int LAPACKE_zhegv_2stage_work( int matrix_layout, lapack_int itype, char
 #define LAPACK_cgetsls LAPACK_GLOBAL(cgetsls,CGETSLS)
 #define LAPACK_zgetsls LAPACK_GLOBAL(zgetsls,ZGETSLS)
 
+// LAPACK 3.8.0
+#define LAPACK_ssysv_aa_2stage LAPACK_GLOBAL(ssysv_aa_2stage,SSYSV_AA_2STAGE)
+#define LAPACK_dsysv_aa_2stage LAPACK_GLOBAL(dsysv_aa_2stage,DSYSV_AA_2STAGE)
+#define LAPACK_chesv_aa_2stage LAPACK_GLOBAL(chesv_aa_2stage,CHESV_AA_2STAGE)
+#define LAPACK_zsysv_aa_2stage LAPACK_GLOBAL(zsysv_aa_2stage,ZSYSV_AA_2STAGE)
+#define LAPACK_csysv_aa_2stage LAPACK_GLOBAL(csysv_aa_2stage,CSYSV_AA_2STAGE)
+#define LAPACK_zhesv_aa_2stage LAPACK_GLOBAL(zhesv_aa_2stage,ZHESV_AA_2STAGE)
+#define LAPACK_ssytrs_aa_2stage LAPACK_GLOBAL(ssytrs_aa_2stage,SSYTRS_AA_2STAGE)
+#define LAPACK_dsytrs_aa_2stage LAPACK_GLOBAL(dsytrs_aa_2stage,DSYTRS_AA_2STAGE)
+#define LAPACK_csytrs_aa_2stage LAPACK_GLOBAL(csytrs_aa_2stage,CSYTRS_AA_2STAGE)
+#define LAPACK_zsytrs_aa_2stage LAPACK_GLOBAL(zsytrs_aa_2stage,ZSYTRS_AA_2STAGE)
+#define LAPACK_chetrs_aa_2stage LAPACK_GLOBAL(chetrs_aa_2stage,CHETRS_AA_2STAGE)
+#define LAPACK_zhetrs_aa_2stage LAPACK_GLOBAL(zhetrs_aa_2stage,ZHETRS_AA_2STAGE)
+#define LAPACK_ssytrf_aa_2stage LAPACK_GLOBAL(ssytrf_aa_2stage,SSYTRF_AA_2STAGE)
+#define LAPACK_dsytrf_aa_2stage LAPACK_GLOBAL(dsytrf_aa_2stage,DSYTRF_AA_2STAGE)
+#define LAPACK_csytrf_aa_2stage LAPACK_GLOBAL(csytrf_aa_2stage,CSYTRF_AA_2STAGE)
+#define LAPACK_zsytrf_aa_2stage LAPACK_GLOBAL(zsytrf_aa_2stage,ZSYTRF_AA_2STAGE)
+#define LAPACK_chetrf_aa_2stage LAPACK_GLOBAL(chetrf_aa_2stage,CHETRF_AA_2STAGE)
+#define LAPACK_zhetrf_aa_2stage LAPACK_GLOBAL(zhetrf_aa_2stage,ZHETRF_AA_2STAGE)
+
 
 void LAPACK_sgetrf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda,
                     lapack_int* ipiv, lapack_int *info );
@@ -17882,6 +18145,22 @@ float LAPACK_clanhe( char* norm, char* uplo, lapack_int* n,
                     const lapack_complex_float* a, lapack_int* lda, float* work );
 double LAPACK_zlanhe( char* norm, char* uplo, lapack_int* n,
                     const lapack_complex_double* a, lapack_int* lda, double* work );
+void LAPACK_clarcm( lapack_int* m, lapack_int* n, const float* a,
+                    lapack_int* lda, const lapack_complex_float* b,
+                    lapack_int* ldb, lapack_complex_float* c,
+                    lapack_int* ldc, float* work );
+void LAPACK_zlarcm( lapack_int* m, lapack_int* n, const double* a,
+                    lapack_int* lda, const lapack_complex_double* b,
+                    lapack_int* ldb, lapack_complex_double* c,
+                    lapack_int* ldc, double* work );
+void LAPACK_clacrm( lapack_int* m, lapack_int* n, const lapack_complex_float* a,
+                    lapack_int* lda, const float* b,
+                    lapack_int* ldb, lapack_complex_float* c,
+                    lapack_int* ldc, float* work );
+void LAPACK_zlacrm( lapack_int* m, lapack_int* n, const lapack_complex_double* a,
+                    lapack_int* lda, const double* b,
+                    lapack_int* ldb, lapack_complex_double* c,
+                    lapack_int* ldc, double* work );
 float LAPACK_slansy( char* norm, char* uplo, lapack_int* n, const float* a,
                     lapack_int* lda, float* work );
 double LAPACK_dlansy( char* norm, char* uplo, lapack_int* n, const double* a,
@@ -17943,6 +18222,10 @@ void LAPACK_clarfg( lapack_int* n, lapack_complex_float* alpha,
 void LAPACK_zlarfg( lapack_int* n, lapack_complex_double* alpha,
                     lapack_complex_double* x, lapack_int* incx,
                     lapack_complex_double* tau );
+void LAPACK_slassq( lapack_int *n,                 float* x, lapack_int *incx,  float* scale,  float* sumsq );
+void LAPACK_dlassq( lapack_int *n,                double* x, lapack_int *incx, double* scale, double* sumsq );
+void LAPACK_classq( lapack_int *n,  lapack_complex_float* x, lapack_int *incx,  float* scale,  float* sumsq );
+void LAPACK_zlassq( lapack_int *n, lapack_complex_double* x, lapack_int *incx, double* scale, double* sumsq );
 void LAPACK_slarft( char* direct, char* storev, lapack_int* n, lapack_int* k,
                     const float* v, lapack_int* ldv, const float* tau, float* t,
                     lapack_int* ldt );
@@ -18758,7 +19041,7 @@ void LAPACK_zhetrs_3( char* uplo, lapack_int* n,
                      const lapack_int* ipiv,
                      lapack_complex_double* b, lapack_int* ldb,  lapack_int *info );
 
-void LAPACK_ssytri_3( char* uplo, lapack_int* n, float* a, lapack_int* lda, const float* e, 
+void LAPACK_ssytri_3( char* uplo, lapack_int* n, float* a, lapack_int* lda, const float* e,
                     const lapack_int* ipiv, float* work, lapack_int* lwork, lapack_int *info );
 void LAPACK_dsytri_3( char* uplo, lapack_int* n, double* a, lapack_int* lda, const double* e,
                     const lapack_int* ipiv, double* work, lapack_int* lwork, lapack_int *info );
@@ -18775,7 +19058,7 @@ void LAPACK_zhetri_3( char* uplo, lapack_int* n, lapack_complex_double* a,
                     lapack_int* lda, const lapack_complex_double* e, const lapack_int* ipiv,
                     lapack_complex_double* work, lapack_int* lwork, lapack_int *info );
 
-void LAPACK_ssycon_3( char* uplo, lapack_int* n, const float* a, lapack_int* lda, const float* e, 
+void LAPACK_ssycon_3( char* uplo, lapack_int* n, const float* a, lapack_int* lda, const float* e,
                     const lapack_int* ipiv, float* anorm, float* rcond,
                     float* work, lapack_int* iwork, lapack_int *info );
 void LAPACK_dsycon_3( char* uplo, lapack_int* n, const double* a, lapack_int* lda, const double* e,
@@ -19054,6 +19337,117 @@ void LAPACK_zhegv_2stage( lapack_int* itype, char* jobz, char* uplo, lapack_int*
                    lapack_complex_double* work, lapack_int* lwork,
                    double* rwork, lapack_int *info );
 
+//LAPACK 3.8.0
+
+void LAPACK_ssysv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs, 
+                                  float* a, lapack_int* lda, float* tb, lapack_int* ltb,
+                                  lapack_int* ipiv, lapack_int* ipiv2, float* b, lapack_int* ldb,
+                   float* work, lapack_int* lwork, lapack_int *info );
+void LAPACK_dsysv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs, double* a,
+                   lapack_int* lda, double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2, double* b,
+                   lapack_int* ldb, double* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_csysv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_float* a, lapack_int* lda, 
+                   lapack_complex_float* tb, lapack_int* ltb, 
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* b, lapack_int* ldb,
+                   lapack_complex_float* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_zsysv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* b, lapack_int* ldb,
+                   lapack_complex_double* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_chesv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_float* a, lapack_int* lda,
+                   lapack_complex_float* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* b, lapack_int* ldb,
+                   lapack_complex_float* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_zhesv_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* b, lapack_int* ldb,
+                   lapack_complex_double* work, lapack_int* lwork,
+                   lapack_int *info );
+
+void LAPACK_ssytrf_aa_2stage( char* uplo, lapack_int* n,
+                                  float* a, lapack_int* lda, float* tb, lapack_int* ltb,
+                                  lapack_int* ipiv, lapack_int* ipiv2, 
+                   float* work, lapack_int* lwork, lapack_int *info );
+void LAPACK_dsytrf_aa_2stage( char* uplo, lapack_int* n, double* a,
+                   lapack_int* lda, double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   double* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_csytrf_aa_2stage( char* uplo, lapack_int* n, 
+                   lapack_complex_float* a, lapack_int* lda, 
+                   lapack_complex_float* tb, lapack_int* ltb, 
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_zsytrf_aa_2stage( char* uplo, lapack_int* n, 
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_chetrf_aa_2stage( char* uplo, lapack_int* n, 
+                   lapack_complex_float* a, lapack_int* lda,
+                   lapack_complex_float* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* work, lapack_int* lwork,
+                   lapack_int *info );
+void LAPACK_zhetrf_aa_2stage( char* uplo, lapack_int* n, 
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* work, lapack_int* lwork,
+                   lapack_int *info );
+
+void LAPACK_ssytrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs, 
+                                  float* a, lapack_int* lda, float* tb, lapack_int* ltb,
+                                  lapack_int* ipiv, lapack_int* ipiv2, float* b, lapack_int* ldb,
+                lapack_int *info );
+void LAPACK_dsytrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs, double* a,
+                   lapack_int* lda, double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2, double* b,
+                   lapack_int* ldb, lapack_int *info );
+void LAPACK_csytrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_float* a, lapack_int* lda, 
+                   lapack_complex_float* tb, lapack_int* ltb, 
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* b, lapack_int* ldb,
+                   lapack_int *info );
+void LAPACK_zsytrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* b, lapack_int* ldb,
+                   lapack_int *info );
+void LAPACK_chetrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_float* a, lapack_int* lda,
+                   lapack_complex_float* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_float* b, lapack_int* ldb,
+                   lapack_int *info );
+void LAPACK_zhetrs_aa_2stage( char* uplo, lapack_int* n, lapack_int* nrhs,
+                   lapack_complex_double* a, lapack_int* lda,
+                   lapack_complex_double* tb, lapack_int* ltb,
+                   lapack_int* ipiv, lapack_int* ipiv2,
+                   lapack_complex_double* b, lapack_int* ldb,
+                   lapack_int *info );
+                   
+/* APIs for set/get nancheck flags */
+void LAPACKE_set_nancheck( int flag );
+int LAPACKE_get_nancheck( );
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index 028f8da..68da739 100644 (file)
@@ -1,9 +1,10 @@
-prefix=@prefix@
-libdir=@libdir@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: LAPACKE
 Description: C Standard Interface to LAPACK Linear Algebra PACKage
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack
 Libs: -L${libdir} -llapacke
-Requires: lapack blas
+Cflags: -I${includedir}
+Requires.private: lapack
index 1144e97..26e52ac 100644 (file)
@@ -1,6 +1,4 @@
-#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ)
-
-set(SRC_OBJ
+set(SOURCES
 lapacke_cbbcsd.c
 lapacke_cbbcsd_work.c
 lapacke_cbdsqr.c
@@ -47,6 +45,8 @@ lapacke_cgehrd.c
 lapacke_cgehrd_work.c
 lapacke_cgejsv.c
 lapacke_cgejsv_work.c
+lapacke_cgelq.c
+lapacke_cgelq_work.c
 lapacke_cgelq2.c
 lapacke_cgelq2_work.c
 lapacke_cgelqf.c
@@ -59,6 +59,8 @@ lapacke_cgelss.c
 lapacke_cgelss_work.c
 lapacke_cgelsy.c
 lapacke_cgelsy_work.c
+lapacke_cgemlq.c
+lapacke_cgemlq_work.c
 lapacke_cgemqr.c
 lapacke_cgemqr_work.c
 lapacke_cgemqrt.c
@@ -67,6 +69,8 @@ lapacke_cgeqlf.c
 lapacke_cgeqlf_work.c
 lapacke_cgeqp3.c
 lapacke_cgeqp3_work.c
+lapacke_cgeqr.c
+lapacke_cgeqr_work.c
 lapacke_cgeqr2.c
 lapacke_cgeqr2_work.c
 lapacke_cgeqrf.c
@@ -210,7 +214,9 @@ lapacke_cherfs_work.c
 lapacke_chesv.c
 lapacke_chesv_work.c
 lapacke_chesv_aa.c
+lapacke_chesv_aa_2stage.c
 lapacke_chesv_aa_work.c
+lapacke_chesv_aa_2stage_work.c
 lapacke_chesv_rk.c
 lapacke_chesv_rk_work.c
 lapacke_chesvx.c
@@ -224,7 +230,9 @@ lapacke_chetrf_rook.c
 lapacke_chetrf_work.c
 lapacke_chetrf_rook_work.c
 lapacke_chetrf_aa.c
+lapacke_chetrf_aa_2stage.c
 lapacke_chetrf_aa_work.c
+lapacke_chetrf_aa_2stage_work.c
 lapacke_chetrf_rk.c
 lapacke_chetrf_rk_work.c
 lapacke_chetri.c
@@ -242,7 +250,9 @@ lapacke_chetrs2_work.c
 lapacke_chetrs_work.c
 lapacke_chetrs_rook_work.c
 lapacke_chetrs_aa.c
+lapacke_chetrs_aa_2stage.c
 lapacke_chetrs_aa_work.c
+lapacke_chetrs_aa_2stage_work.c
 lapacke_chetrs_3.c
 lapacke_chetrs_3_work.c
 lapacke_chfrk.c
@@ -291,6 +301,8 @@ lapacke_clacp2.c
 lapacke_clacp2_work.c
 lapacke_clacpy.c
 lapacke_clacpy_work.c
+lapacke_clacrm.c
+lapacke_clacrm_work.c
 lapacke_clag2z.c
 lapacke_clag2z_work.c
 lapacke_clange.c
@@ -305,6 +317,8 @@ lapacke_clapmr.c
 lapacke_clapmr_work.c
 lapacke_clapmt.c
 lapacke_clapmt_work.c
+lapacke_clarcm.c
+lapacke_clarcm_work.c
 lapacke_clarfb.c
 lapacke_clarfb_work.c
 lapacke_clarfg.c
@@ -319,6 +333,8 @@ lapacke_clascl.c
 lapacke_clascl_work.c
 lapacke_claset.c
 lapacke_claset_work.c
+lapacke_classq.c
+lapacke_classq_work.c
 lapacke_claswp.c
 lapacke_claswp_work.c
 lapacke_clauum.c
@@ -436,7 +452,9 @@ lapacke_csysv_rook.c
 lapacke_csysv_rook_work.c
 lapacke_csysv_work.c
 lapacke_csysv_aa.c
+lapacke_csysv_aa_2stage.c
 lapacke_csysv_aa_work.c
+lapacke_csysv_aa_2stage_work.c
 lapacke_csysv_rk.c
 lapacke_csysv_rk_work.c
 lapacke_csysvx.c
@@ -448,7 +466,9 @@ lapacke_csytrf_work.c
 lapacke_csytrf_rook.c
 lapacke_csytrf_rook_work.c
 lapacke_csytrf_aa.c
+lapacke_csytrf_aa_2stage.c
 lapacke_csytrf_aa_work.c
+lapacke_csytrf_aa_2stage_work.c
 lapacke_csytrf_rk.c
 lapacke_csytrf_rk_work.c
 lapacke_csytri.c
@@ -466,7 +486,9 @@ lapacke_csytrs2_work.c
 lapacke_csytrs_work.c
 lapacke_csytrs_rook_work.c
 lapacke_csytrs_aa.c
+lapacke_csytrs_aa_2stage.c
 lapacke_csytrs_aa_work.c
+lapacke_csytrs_aa_2stage_work.c
 lapacke_csytrs_3.c
 lapacke_csytrs_3_work.c
 lapacke_ctbcon.c
@@ -631,6 +653,8 @@ lapacke_dgehrd.c
 lapacke_dgehrd_work.c
 lapacke_dgejsv.c
 lapacke_dgejsv_work.c
+lapacke_dgelq.c
+lapacke_dgelq_work.c
 lapacke_dgelq2.c
 lapacke_dgelq2_work.c
 lapacke_dgelqf.c
@@ -643,6 +667,8 @@ lapacke_dgelss.c
 lapacke_dgelss_work.c
 lapacke_dgelsy.c
 lapacke_dgelsy_work.c
+lapacke_dgemlq.c
+lapacke_dgemlq_work.c
 lapacke_dgemqr.c
 lapacke_dgemqr_work.c
 lapacke_dgemqrt.c
@@ -651,6 +677,8 @@ lapacke_dgeqlf.c
 lapacke_dgeqlf_work.c
 lapacke_dgeqp3.c
 lapacke_dgeqp3_work.c
+lapacke_dgeqr.c
+lapacke_dgeqr_work.c
 lapacke_dgeqr2.c
 lapacke_dgeqr2_work.c
 lapacke_dgeqrf.c
@@ -783,6 +811,8 @@ lapacke_dlaset.c
 lapacke_dlaset_work.c
 lapacke_dlasrt.c
 lapacke_dlasrt_work.c
+lapacke_dlassq.c
+lapacke_dlassq_work.c
 lapacke_dlaswp.c
 lapacke_dlaswp_work.c
 lapacke_dlauum.c
@@ -1022,7 +1052,9 @@ lapacke_dsysv_rook.c
 lapacke_dsysv_rook_work.c
 lapacke_dsysv_work.c
 lapacke_dsysv_aa.c
+lapacke_dsysv_aa_2stage.c
 lapacke_dsysv_aa_work.c
+lapacke_dsysv_aa_2stage_work.c
 lapacke_dsysv_rk.c
 lapacke_dsysv_rk_work.c
 lapacke_dsysvx.c
@@ -1036,7 +1068,9 @@ lapacke_dsytrf_work.c
 lapacke_dsytrf_rook.c
 lapacke_dsytrf_rook_work.c
 lapacke_dsytrf_aa.c
+lapacke_dsytrf_aa_2stage.c
 lapacke_dsytrf_aa_work.c
+lapacke_dsytrf_aa_2stage_work.c
 lapacke_dsytrf_rk.c
 lapacke_dsytrf_rk_work.c
 lapacke_dsytri.c
@@ -1052,7 +1086,9 @@ lapacke_dsytrs_rook.c
 lapacke_dsytrs2.c
 lapacke_dsytrs2_work.c
 lapacke_dsytrs_aa.c
+lapacke_dsytrs_aa_2stage.c
 lapacke_dsytrs_aa_work.c
+lapacke_dsytrs_aa_2stage_work.c
 lapacke_dsytrs_3.c
 lapacke_dsytrs_3_work.c
 lapacke_dsytrs_work.c
@@ -1127,6 +1163,7 @@ lapacke_dtrttp.c
 lapacke_dtrttp_work.c
 lapacke_dtzrzf.c
 lapacke_dtzrzf_work.c
+lapacke_nancheck.c
 lapacke_sbbcsd.c
 lapacke_sbbcsd_work.c
 lapacke_sbdsdc.c
@@ -1179,6 +1216,8 @@ lapacke_sgehrd.c
 lapacke_sgehrd_work.c
 lapacke_sgejsv.c
 lapacke_sgejsv_work.c
+lapacke_sgelq.c
+lapacke_sgelq_work.c
 lapacke_sgelq2.c
 lapacke_sgelq2_work.c
 lapacke_sgelqf.c
@@ -1191,6 +1230,8 @@ lapacke_sgelss.c
 lapacke_sgelss_work.c
 lapacke_sgelsy.c
 lapacke_sgelsy_work.c
+lapacke_sgemlq.c
+lapacke_sgemlq_work.c
 lapacke_sgemqr.c
 lapacke_sgemqr_work.c
 lapacke_sgemqrt.c
@@ -1199,6 +1240,8 @@ lapacke_sgeqlf.c
 lapacke_sgeqlf_work.c
 lapacke_sgeqp3.c
 lapacke_sgeqp3_work.c
+lapacke_sgeqr.c
+lapacke_sgeqr_work.c
 lapacke_sgeqr2.c
 lapacke_sgeqr2_work.c
 lapacke_sgeqrf.c
@@ -1331,6 +1374,8 @@ lapacke_slaset.c
 lapacke_slaset_work.c
 lapacke_slasrt.c
 lapacke_slasrt_work.c
+lapacke_slassq.c
+lapacke_slassq_work.c
 lapacke_slaswp.c
 lapacke_slaswp_work.c
 lapacke_slauum.c
@@ -1567,6 +1612,8 @@ lapacke_ssysv_rook_work.c
 lapacke_ssysv_work.c
 lapacke_ssysv_aa.c
 lapacke_ssysv_aa_work.c
+lapacke_ssysv_aa_2stage.c
+lapacke_ssysv_aa_2stage_work.c
 lapacke_ssysv_rk.c
 lapacke_ssysv_rk_work.c
 lapacke_ssysvx.c
@@ -1580,7 +1627,9 @@ lapacke_ssytrf_work.c
 lapacke_ssytrf_rook.c
 lapacke_ssytrf_rook_work.c
 lapacke_ssytrf_aa.c
+lapacke_ssytrf_aa_2stage.c
 lapacke_ssytrf_aa_work.c
+lapacke_ssytrf_aa_2stage_work.c
 lapacke_ssytrf_rk.c
 lapacke_ssytrf_rk_work.c
 lapacke_ssytri.c
@@ -1596,7 +1645,9 @@ lapacke_ssytrs_rook.c
 lapacke_ssytrs2.c
 lapacke_ssytrs2_work.c
 lapacke_ssytrs_aa.c
+lapacke_ssytrs_aa_2stage.c
 lapacke_ssytrs_aa_work.c
+lapacke_ssytrs_aa_2stage_work.c
 lapacke_ssytrs_3.c
 lapacke_ssytrs_3_work.c
 lapacke_ssytrs_work.c
@@ -1721,6 +1772,8 @@ lapacke_zgehrd.c
 lapacke_zgehrd_work.c
 lapacke_zgejsv.c
 lapacke_zgejsv_work.c
+lapacke_zgelq.c
+lapacke_zgelq_work.c
 lapacke_zgelq2.c
 lapacke_zgelq2_work.c
 lapacke_zgelqf.c
@@ -1733,6 +1786,8 @@ lapacke_zgelss.c
 lapacke_zgelss_work.c
 lapacke_zgelsy.c
 lapacke_zgelsy_work.c
+lapacke_zgemlq.c
+lapacke_zgemlq_work.c
 lapacke_zgemqr.c
 lapacke_zgemqr_work.c
 lapacke_zgemqrt.c
@@ -1741,6 +1796,8 @@ lapacke_zgeqlf.c
 lapacke_zgeqlf_work.c
 lapacke_zgeqp3.c
 lapacke_zgeqp3_work.c
+lapacke_zgeqr.c
+lapacke_zgeqr_work.c
 lapacke_zgeqr2.c
 lapacke_zgeqr2_work.c
 lapacke_zgeqrf.c
@@ -1831,6 +1888,12 @@ lapacke_zhbevd.c
 lapacke_zhbevd_work.c
 lapacke_zhbevx.c
 lapacke_zhbevx_work.c
+lapacke_zhbev_2stage.c
+lapacke_zhbev_2stage_work.c
+lapacke_zhbevd_2stage.c
+lapacke_zhbevd_2stage_work.c
+lapacke_zhbevx_2stage.c
+lapacke_zhbevx_2stage_work.c
 lapacke_zhbgst.c
 lapacke_zhbgst_work.c
 lapacke_zhbgv.c
@@ -1878,7 +1941,9 @@ lapacke_zherfs_work.c
 lapacke_zhesv.c
 lapacke_zhesv_work.c
 lapacke_zhesv_aa.c
+lapacke_zhesv_aa_2stage.c
 lapacke_zhesv_aa_work.c
+lapacke_zhesv_aa_2stage_work.c
 lapacke_zhesv_rk.c
 lapacke_zhesv_rk_work.c
 lapacke_zhesvx.c
@@ -1892,7 +1957,9 @@ lapacke_zhetrf_rook.c
 lapacke_zhetrf_work.c
 lapacke_zhetrf_rook_work.c
 lapacke_zhetrf_aa.c
+lapacke_zhetrf_aa_2stage.c
 lapacke_zhetrf_aa_work.c
+lapacke_zhetrf_aa_2stage_work.c
 lapacke_zhetrf_rk.c
 lapacke_zhetrf_rk_work.c
 lapacke_zhetri.c
@@ -1909,7 +1976,9 @@ lapacke_zhetrs2.c
 lapacke_zhetrs2_work.c
 lapacke_zhetrs_work.c
 lapacke_zhetrs_aa.c
+lapacke_zhetrs_aa_2stage.c
 lapacke_zhetrs_aa_work.c
+lapacke_zhetrs_aa_2stage_work.c
 lapacke_zhetrs_3.c
 lapacke_zhetrs_3_work.c
 lapacke_zhetrs_rook_work.c
@@ -1959,6 +2028,8 @@ lapacke_zlacp2.c
 lapacke_zlacp2_work.c
 lapacke_zlacpy.c
 lapacke_zlacpy_work.c
+lapacke_zlacrm.c
+lapacke_zlacrm_work.c
 lapacke_zlag2c.c
 lapacke_zlag2c_work.c
 lapacke_zlange.c
@@ -1973,6 +2044,8 @@ lapacke_zlapmr.c
 lapacke_zlapmr_work.c
 lapacke_zlapmt.c
 lapacke_zlapmt_work.c
+lapacke_zlarcm.c
+lapacke_zlarcm_work.c
 lapacke_zlarfb.c
 lapacke_zlarfb_work.c
 lapacke_zlarfg.c
@@ -1987,6 +2060,8 @@ lapacke_zlascl.c
 lapacke_zlascl_work.c
 lapacke_zlaset.c
 lapacke_zlaset_work.c
+lapacke_zlassq.c
+lapacke_zlassq_work.c
 lapacke_zlaswp.c
 lapacke_zlaswp_work.c
 lapacke_zlauum.c
@@ -2104,7 +2179,9 @@ lapacke_zsysv_rook.c
 lapacke_zsysv_rook_work.c
 lapacke_zsysv_work.c
 lapacke_zsysv_aa.c
+lapacke_zsysv_aa_2stage.c
 lapacke_zsysv_aa_work.c
+lapacke_zsysv_aa_2stage_work.c
 lapacke_zsysv_rk.c
 lapacke_zsysv_rk_work.c
 lapacke_zsysvx.c
@@ -2116,7 +2193,9 @@ lapacke_zsytrf_work.c
 lapacke_zsytrf_rook.c
 lapacke_zsytrf_rook_work.c
 lapacke_zsytrf_aa.c
+lapacke_zsytrf_aa_2stage.c
 lapacke_zsytrf_aa_work.c
+lapacke_zsytrf_aa_2stage_work.c
 lapacke_zsytrf_rk.c
 lapacke_zsytrf_rk_work.c
 lapacke_zsytri.c
@@ -2134,7 +2213,9 @@ lapacke_zsytrs2_work.c
 lapacke_zsytrs_work.c
 lapacke_zsytrs_rook_work.c
 lapacke_zsytrs_aa.c
+lapacke_zsytrs_aa_2stage.c
 lapacke_zsytrs_aa_work.c
+lapacke_zsytrs_aa_2stage_work.c
 lapacke_zsytrs_3.c
 lapacke_zsytrs_3_work.c
 lapacke_ztbcon.c
@@ -2254,36 +2335,34 @@ lapacke_csyr_work.c
 lapacke_ilaver.c
 )
 
-if(BUILD_DEPRECATED)
-       list(APPEND SRC_OBJ
-       lapacke_cggsvp.c
-       lapacke_cggsvp_work.c
-       lapacke_dggsvp.c
-       lapacke_dggsvp_work.c
-       lapacke_sggsvp.c
-       lapacke_sggsvp_work.c
-       lapacke_zggsvp.c
-       lapacke_zggsvp_work.c
-       lapacke_cggsvd.c
-       lapacke_cggsvd_work.c
-       lapacke_dggsvd.c
-       lapacke_dggsvd_work.c
-       lapacke_sggsvd.c
-       lapacke_sggsvd_work.c
-       lapacke_zggsvd.c
-       lapacke_zggsvd_work.c
-       lapacke_cgeqpf.c
-       lapacke_cgeqpf_work.c
-       lapacke_dgeqpf.c
-       lapacke_dgeqpf_work.c
-       lapacke_sgeqpf.c
-       lapacke_sgeqpf_work.c
-       lapacke_zgeqpf.c
-       lapacke_zgeqpf_work.c)
-       message(STATUS "Building LAPACKE deprecated routines")
-endif()
+set(DEPRECATED
+lapacke_cggsvp.c
+lapacke_cggsvp_work.c
+lapacke_dggsvp.c
+lapacke_dggsvp_work.c
+lapacke_sggsvp.c
+lapacke_sggsvp_work.c
+lapacke_zggsvp.c
+lapacke_zggsvp_work.c
+lapacke_cggsvd.c
+lapacke_cggsvd_work.c
+lapacke_dggsvd.c
+lapacke_dggsvd_work.c
+lapacke_sggsvd.c
+lapacke_sggsvd_work.c
+lapacke_zggsvd.c
+lapacke_zggsvd_work.c
+lapacke_cgeqpf.c
+lapacke_cgeqpf_work.c
+lapacke_dgeqpf.c
+lapacke_dgeqpf_work.c
+lapacke_sgeqpf.c
+lapacke_sgeqpf_work.c
+lapacke_zgeqpf.c
+lapacke_zgeqpf_work.c
+)
 
-set(SRCX_OBJ
+set(EXTENDED
 lapacke_cgbrfsx.c       lapacke_cporfsx.c       lapacke_dgerfsx.c       lapacke_sgbrfsx.c       lapacke_ssyrfsx.c       lapacke_zherfsx.c
 lapacke_cgbrfsx_work.c  lapacke_cporfsx_work.c  lapacke_dgerfsx_work.c  lapacke_sgbrfsx_work.c  lapacke_ssyrfsx_work.c  lapacke_zherfsx_work.c
 lapacke_cgerfsx.c       lapacke_csyrfsx.c       lapacke_dporfsx.c       lapacke_sgerfsx.c       lapacke_zgbrfsx.c       lapacke_zporfsx.c
@@ -2299,7 +2378,7 @@ lapacke_chesvxx_work.c  lapacke_dgbsvxx_work.c  lapacke_dsysvxx_work.c  lapacke_
 )
 
 # FILE PARTS OF TMGLIB
-set(MATGEN_OBJ
+set(MATGEN
 lapacke_clatms.c
 lapacke_clatms_work.c
 lapacke_dlatms.c
index c899c63..6009843 100644 (file)
 ##############################################################################
 # makefile for LAPACKE, used to build lapacke binary.
 #
+# Note: we use multiple OBJ_A, OBJ_B, etc, instead of a single OBJ
+# to allow build with mingw (argument list too long for the msys ar)
+#
 include ../../make.inc
 
-SRC_OBJA = \
+OBJ_A = \
 lapacke_cbbcsd.o \
 lapacke_cbbcsd_work.o \
 lapacke_cbdsqr.o \
@@ -79,6 +82,8 @@ lapacke_cgeevx.o \
 lapacke_cgeevx_work.o \
 lapacke_cgehrd.o \
 lapacke_cgehrd_work.o \
+lapacke_cgelq.o \
+lapacke_cgelq_work.o \
 lapacke_cgelq2.o \
 lapacke_cgelq2_work.o \
 lapacke_cgejsv.o \
@@ -93,6 +98,8 @@ lapacke_cgelss.o \
 lapacke_cgelss_work.o \
 lapacke_cgelsy.o \
 lapacke_cgelsy_work.o \
+lapacke_cgemlq.o \
+lapacke_cgemlq_work.o \
 lapacke_cgemqr.o \
 lapacke_cgemqr_work.o \
 lapacke_cgemqrt.o \
@@ -101,6 +108,8 @@ lapacke_cgeqlf.o \
 lapacke_cgeqlf_work.o \
 lapacke_cgeqp3.o \
 lapacke_cgeqp3_work.o \
+lapacke_cgeqr.o \
+lapacke_cgeqr_work.o \
 lapacke_cgeqr2.o \
 lapacke_cgeqr2_work.o \
 lapacke_cgeqrf.o \
@@ -245,6 +254,8 @@ lapacke_chesv.o \
 lapacke_chesv_work.o \
 lapacke_chesv_aa.o \
 lapacke_chesv_aa_work.o \
+lapacke_chesv_aa_2stage.o \
+lapacke_chesv_aa_2stage_work.o \
 lapacke_chesv_rk.o \
 lapacke_chesv_rk_work.o \
 lapacke_chesvx.o \
@@ -258,7 +269,9 @@ lapacke_chetrf_rook.o \
 lapacke_chetrf_work.o \
 lapacke_chetrf_rook_work.o \
 lapacke_chetrf_aa.o \
+lapacke_chetrf_aa_2stage.o \
 lapacke_chetrf_aa_work.o \
+lapacke_chetrf_aa_2stage_work.o \
 lapacke_chetrf_rk.o \
 lapacke_chetrf_rk_work.o \
 lapacke_chetri.o \
@@ -276,7 +289,9 @@ lapacke_chetrs2_work.o \
 lapacke_chetrs_work.o \
 lapacke_chetrs_rook_work.o \
 lapacke_chetrs_aa.o \
+lapacke_chetrs_aa_2stage.o \
 lapacke_chetrs_aa_work.o \
+lapacke_chetrs_aa_2stage_work.o \
 lapacke_chetrs_3.o \
 lapacke_chetrs_3_work.o \
 lapacke_chfrk.o \
@@ -325,6 +340,8 @@ lapacke_clacp2.o \
 lapacke_clacp2_work.o \
 lapacke_clacpy.o \
 lapacke_clacpy_work.o \
+lapacke_clacrm.o \
+lapacke_clacrm_work.o \
 lapacke_clag2z.o \
 lapacke_clag2z_work.o \
 lapacke_clange.o \
@@ -339,6 +356,8 @@ lapacke_clapmr.o \
 lapacke_clapmr_work.o \
 lapacke_clapmt.o \
 lapacke_clapmt_work.o \
+lapacke_clarcm.o \
+lapacke_clarcm_work.o \
 lapacke_clarfb.o \
 lapacke_clarfb_work.o \
 lapacke_clarfg.o \
@@ -353,6 +372,8 @@ lapacke_clascl.o \
 lapacke_clascl_work.o \
 lapacke_claset.o \
 lapacke_claset_work.o \
+lapacke_classq.o \
+lapacke_classq_work.o \
 lapacke_claswp.o \
 lapacke_claswp_work.o \
 lapacke_clauum.o \
@@ -471,6 +492,8 @@ lapacke_csysv_rook_work.o \
 lapacke_csysv_work.o \
 lapacke_csysv_aa.o \
 lapacke_csysv_aa_work.o \
+lapacke_csysv_aa_2stage.o \
+lapacke_csysv_aa_2stage_work.o \
 lapacke_csysv_rk.o \
 lapacke_csysv_rk_work.o \
 lapacke_csysvx.o \
@@ -482,7 +505,9 @@ lapacke_csytrf_work.o \
 lapacke_csytrf_rook.o \
 lapacke_csytrf_rook_work.o \
 lapacke_csytrf_aa.o \
+lapacke_csytrf_aa_2stage.o \
 lapacke_csytrf_aa_work.o \
+lapacke_csytrf_aa_2stage_work.o \
 lapacke_csytrf_rk.o \
 lapacke_csytrf_rk_work.o \
 lapacke_csytri.o \
@@ -500,7 +525,9 @@ lapacke_csytrs2_work.o \
 lapacke_csytrs_work.o \
 lapacke_csytrs_rook_work.o \
 lapacke_csytrs_aa.o \
+lapacke_csytrs_aa_2stage.o \
 lapacke_csytrs_aa_work.o \
+lapacke_csytrs_aa_2stage_work.o \
 lapacke_csytrs_3.o \
 lapacke_csytrs_3_work.o \
 lapacke_ctbcon.o \
@@ -665,6 +692,8 @@ lapacke_dgehrd.o \
 lapacke_dgehrd_work.o \
 lapacke_dgejsv.o \
 lapacke_dgejsv_work.o \
+lapacke_dgelq.o \
+lapacke_dgelq_work.o \
 lapacke_dgelq2.o \
 lapacke_dgelq2_work.o \
 lapacke_dgelqf.o \
@@ -677,6 +706,8 @@ lapacke_dgelss.o \
 lapacke_dgelss_work.o \
 lapacke_dgelsy.o \
 lapacke_dgelsy_work.o \
+lapacke_dgemlq.o \
+lapacke_dgemlq_work.o \
 lapacke_dgemqr.o \
 lapacke_dgemqr_work.o \
 lapacke_dgemqrt.o \
@@ -685,6 +716,8 @@ lapacke_dgeqlf.o \
 lapacke_dgeqlf_work.o \
 lapacke_dgeqp3.o \
 lapacke_dgeqp3_work.o \
+lapacke_dgeqr.o \
+lapacke_dgeqr_work.o \
 lapacke_dgeqr2.o \
 lapacke_dgeqr2_work.o \
 lapacke_dgeqrf.o \
@@ -817,6 +850,8 @@ lapacke_dlaset.o \
 lapacke_dlaset_work.o \
 lapacke_dlasrt.o \
 lapacke_dlasrt_work.o \
+lapacke_dlassq.o \
+lapacke_dlassq_work.o \
 lapacke_dlaswp.o \
 lapacke_dlaswp_work.o \
 lapacke_dlauum.o \
@@ -1057,6 +1092,8 @@ lapacke_dsysv_rook_work.o \
 lapacke_dsysv_work.o \
 lapacke_dsysv_aa.o \
 lapacke_dsysv_aa_work.o \
+lapacke_dsysv_aa_2stage.o \
+lapacke_dsysv_aa_2stage_work.o \
 lapacke_dsysv_rk.o \
 lapacke_dsysv_rk_work.o \
 lapacke_dsysvx.o \
@@ -1071,6 +1108,8 @@ lapacke_dsytrf_rook.o \
 lapacke_dsytrf_rook_work.o \
 lapacke_dsytrf_aa.o \
 lapacke_dsytrf_aa_work.o \
+lapacke_dsytrf_aa_2stage.o \
+lapacke_dsytrf_aa_2stage_work.o \
 lapacke_dsytrf_rk.o \
 lapacke_dsytrf_rk_work.o \
 lapacke_dsytri.o \
@@ -1080,9 +1119,9 @@ lapacke_dsytri_3.o \
 lapacke_dsytri_3_work.o \
 lapacke_dsytri2x.o \
 lapacke_dsytri2x_work.o \
-lapacke_dsytri_work.o 
+lapacke_dsytri_work.o
 
-SRC_OBJB = \
+OBJ_B = \
 lapacke_dsytrs.o \
 lapacke_dsytrs_rook.o \
 lapacke_dsytrs2.o \
@@ -1090,7 +1129,9 @@ lapacke_dsytrs2_work.o \
 lapacke_dsytrs_work.o \
 lapacke_dsytrs_rook_work.o \
 lapacke_dsytrs_aa.o \
+lapacke_dsytrs_aa_2stage.o \
 lapacke_dsytrs_aa_work.o \
+lapacke_dsytrs_aa_2stage_work.o \
 lapacke_dsytrs_3.o \
 lapacke_dsytrs_3_work.o \
 lapacke_dtbcon.o \
@@ -1163,6 +1204,7 @@ lapacke_dtrttp.o \
 lapacke_dtrttp_work.o \
 lapacke_dtzrzf.o \
 lapacke_dtzrzf_work.o \
+lapacke_nancheck.o  \
 lapacke_sbbcsd.o \
 lapacke_sbbcsd_work.o \
 lapacke_sbdsdc.o \
@@ -1215,6 +1257,8 @@ lapacke_sgehrd.o \
 lapacke_sgehrd_work.o \
 lapacke_sgejsv.o \
 lapacke_sgejsv_work.o \
+lapacke_sgelq.o \
+lapacke_sgelq_work.o \
 lapacke_sgelq2.o \
 lapacke_sgelq2_work.o \
 lapacke_sgelqf.o \
@@ -1227,6 +1271,8 @@ lapacke_sgelss.o \
 lapacke_sgelss_work.o \
 lapacke_sgelsy.o \
 lapacke_sgelsy_work.o \
+lapacke_sgemlq.o \
+lapacke_sgemlq_work.o \
 lapacke_sgemqr.o \
 lapacke_sgemqr_work.o \
 lapacke_sgemqrt.o \
@@ -1235,6 +1281,8 @@ lapacke_sgeqlf.o \
 lapacke_sgeqlf_work.o \
 lapacke_sgeqp3.o \
 lapacke_sgeqp3_work.o \
+lapacke_sgeqr.o \
+lapacke_sgeqr_work.o \
 lapacke_sgeqr2.o \
 lapacke_sgeqr2_work.o \
 lapacke_sgeqrf.o \
@@ -1367,6 +1415,8 @@ lapacke_slaset.o \
 lapacke_slaset_work.o \
 lapacke_slasrt.o \
 lapacke_slasrt_work.o \
+lapacke_slassq.o \
+lapacke_slassq_work.o \
 lapacke_slaswp.o \
 lapacke_slaswp_work.o \
 lapacke_slauum.o \
@@ -1603,6 +1653,8 @@ lapacke_ssysv_rook_work.o \
 lapacke_ssysv_work.o \
 lapacke_ssysv_aa.o \
 lapacke_ssysv_aa_work.o \
+lapacke_ssysv_aa_2stage.o \
+lapacke_ssysv_aa_2stage_work.o \
 lapacke_ssysv_rk.o \
 lapacke_ssysv_rk_work.o \
 lapacke_ssysvx.o \
@@ -1617,6 +1669,8 @@ lapacke_ssytrf_rook.o \
 lapacke_ssytrf_rook_work.o \
 lapacke_ssytrf_aa.o \
 lapacke_ssytrf_aa_work.o \
+lapacke_ssytrf_aa_2stage.o \
+lapacke_ssytrf_aa_2stage_work.o \
 lapacke_ssytrf_rk.o \
 lapacke_ssytrf_rk_work.o \
 lapacke_ssytri.o \
@@ -1634,7 +1688,9 @@ lapacke_ssytrs2_work.o \
 lapacke_ssytrs_work.o \
 lapacke_ssytrs_rook_work.o \
 lapacke_ssytrs_aa.o \
+lapacke_ssytrs_aa_2stage.o \
 lapacke_ssytrs_aa_work.o \
+lapacke_ssytrs_aa_2stage_work.o \
 lapacke_ssytrs_3.o \
 lapacke_ssytrs_3_work.o \
 lapacke_stbcon.o \
@@ -1757,6 +1813,8 @@ lapacke_zgehrd.o \
 lapacke_zgehrd_work.o \
 lapacke_zgejsv.o \
 lapacke_zgejsv_work.o \
+lapacke_zgelq.o \
+lapacke_zgelq_work.o \
 lapacke_zgelq2.o \
 lapacke_zgelq2_work.o \
 lapacke_zgelqf.o \
@@ -1769,6 +1827,8 @@ lapacke_zgelss.o \
 lapacke_zgelss_work.o \
 lapacke_zgelsy.o \
 lapacke_zgelsy_work.o \
+lapacke_zgemlq.o \
+lapacke_zgemlq_work.o \
 lapacke_zgemqr.o \
 lapacke_zgemqr_work.o \
 lapacke_zgemqrt.o \
@@ -1777,6 +1837,8 @@ lapacke_zgeqlf.o \
 lapacke_zgeqlf_work.o \
 lapacke_zgeqp3.o \
 lapacke_zgeqp3_work.o \
+lapacke_zgeqr.o \
+lapacke_zgeqr_work.o \
 lapacke_zgeqr2.o \
 lapacke_zgeqr2_work.o \
 lapacke_zgeqrf.o \
@@ -1921,6 +1983,8 @@ lapacke_zhesv.o \
 lapacke_zhesv_work.o \
 lapacke_zhesv_aa.o \
 lapacke_zhesv_aa_work.o \
+lapacke_zhesv_aa_2stage.o \
+lapacke_zhesv_aa_2stage_work.o \
 lapacke_zhesv_rk.o \
 lapacke_zhesv_rk_work.o \
 lapacke_zhesvx.o \
@@ -1934,7 +1998,9 @@ lapacke_zhetrf_rook.o \
 lapacke_zhetrf_work.o \
 lapacke_zhetrf_rook_work.o \
 lapacke_zhetrf_aa.o \
+lapacke_zhetrf_aa_2stage.o \
 lapacke_zhetrf_aa_work.o \
+lapacke_zhetrf_aa_2stage_work.o \
 lapacke_zhetrf_rk.o \
 lapacke_zhetrf_rk_work.o \
 lapacke_zhetri.o \
@@ -1952,7 +2018,9 @@ lapacke_zhetrs2_work.o \
 lapacke_zhetrs_work.o \
 lapacke_zhetrs_rook_work.o \
 lapacke_zhetrs_aa.o \
+lapacke_zhetrs_aa_2stage.o \
 lapacke_zhetrs_aa_work.o \
+lapacke_zhetrs_aa_2stage_work.o \
 lapacke_zhetrs_3.o \
 lapacke_zhetrs_3_work.o \
 lapacke_zhfrk.o \
@@ -2001,6 +2069,8 @@ lapacke_zlacp2.o \
 lapacke_zlacp2_work.o \
 lapacke_zlacpy.o \
 lapacke_zlacpy_work.o \
+lapacke_zlacrm.o \
+lapacke_zlacrm_work.o \
 lapacke_zlag2c.o \
 lapacke_zlag2c_work.o \
 lapacke_zlange.o \
@@ -2015,6 +2085,8 @@ lapacke_zlapmr.o \
 lapacke_zlapmr_work.o \
 lapacke_zlapmt.o \
 lapacke_zlapmt_work.o \
+lapacke_zlarcm.o \
+lapacke_zlarcm_work.o \
 lapacke_zlarfb.o \
 lapacke_zlarfb_work.o \
 lapacke_zlarfg.o \
@@ -2029,6 +2101,8 @@ lapacke_zlascl.o \
 lapacke_zlascl_work.o \
 lapacke_zlaset.o \
 lapacke_zlaset_work.o \
+lapacke_zlassq.o \
+lapacke_zlassq_work.o \
 lapacke_zlaswp.o \
 lapacke_zlaswp_work.o \
 lapacke_zlauum.o \
@@ -2147,6 +2221,8 @@ lapacke_zsysv_rook_work.o \
 lapacke_zsysv_work.o \
 lapacke_zsysv_aa.o \
 lapacke_zsysv_aa_work.o \
+lapacke_zsysv_aa_2stage.o \
+lapacke_zsysv_aa_2stage_work.o \
 lapacke_zsysv_rk.o \
 lapacke_zsysv_rk_work.o \
 lapacke_zsysvx.o \
@@ -2158,7 +2234,9 @@ lapacke_zsytrf_work.o \
 lapacke_zsytrf_rook.o \
 lapacke_zsytrf_rook_work.o \
 lapacke_zsytrf_aa.o \
+lapacke_zsytrf_aa_2stage.o \
 lapacke_zsytrf_aa_work.o \
+lapacke_zsytrf_aa_2stage_work.o \
 lapacke_zsytrf_rk.o \
 lapacke_zsytrf_rk_work.o \
 lapacke_zsytri.o \
@@ -2176,7 +2254,9 @@ lapacke_zsytrs2_work.o \
 lapacke_zsytrs_work.o \
 lapacke_zsytrs_rook_work.o \
 lapacke_zsytrs_aa.o \
+lapacke_zsytrs_aa_2stage.o \
 lapacke_zsytrs_aa_work.o \
+lapacke_zsytrs_aa_2stage_work.o \
 lapacke_zsytrs_3.o \
 lapacke_zsytrs_3_work.o \
 lapacke_ztbcon.o \
@@ -2295,7 +2375,8 @@ lapacke_zsyr_work.o \
 lapacke_csyr_work.o \
 lapacke_ilaver.o
 
-DEPRECSRC = \
+ifdef BUILD_DEPRECATED
+DEPRECATED = \
 lapacke_cggsvp.o \
 lapacke_cggsvp_work.o \
 lapacke_dggsvp.o \
@@ -2320,8 +2401,10 @@ lapacke_sgeqpf.o \
 lapacke_sgeqpf_work.o \
 lapacke_zgeqpf.o \
 lapacke_zgeqpf_work.o
+endif
 
-SRCX_OBJ = \
+ifdef USEXBLAS
+EXTENDED = \
 lapacke_cgbrfsx.o       lapacke_cporfsx.o       lapacke_dgerfsx.o       lapacke_sgbrfsx.o       lapacke_ssyrfsx.o       lapacke_zherfsx.o \
 lapacke_cgbrfsx_work.o  lapacke_cporfsx_work.o  lapacke_dgerfsx_work.o  lapacke_sgbrfsx_work.o  lapacke_ssyrfsx_work.o  lapacke_zherfsx_work.o \
 lapacke_cgerfsx.o       lapacke_csyrfsx.o       lapacke_dporfsx.o       lapacke_sgerfsx.o       lapacke_zgbrfsx.o       lapacke_zporfsx.o \
@@ -2334,10 +2417,11 @@ lapacke_cgesvxx.o       lapacke_csysvxx.o       lapacke_dposvxx.o       lapacke_
 lapacke_cgesvxx_work.o  lapacke_csysvxx_work.o  lapacke_dposvxx_work.o  lapacke_sgesvxx_work.o  lapacke_zgbsvxx_work.o  lapacke_zposvxx_work.o \
 lapacke_chesvxx.o       lapacke_dgbsvxx.o       lapacke_dsysvxx.o       lapacke_sposvxx.o       lapacke_zgesvxx.o       lapacke_zsysvxx.o \
 lapacke_chesvxx_work.o  lapacke_dgbsvxx_work.o  lapacke_dsysvxx_work.o  lapacke_sposvxx_work.o  lapacke_zgesvxx_work.o  lapacke_zsysvxx_work.o
+endif
 
-
+ifdef LAPACKE_WITH_TMG
 # FILE PARTS OF TMGLIB
-MATGEN_OBJ = \
+MATGEN = \
 lapacke_clatms.o \
 lapacke_clatms_work.o \
 lapacke_dlatms.o \
@@ -2366,27 +2450,21 @@ lapacke_slagsy.o \
 lapacke_slagsy_work.o \
 lapacke_zlagsy.o \
 lapacke_zlagsy_work.o
-
-ALLOBJA = $(SRC_OBJA)
-ALLOBJB = $(SRC_OBJB) $(MATGEN_OBJ)
-
-ifdef USEXBLAS
-ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
-endif
-
-ifdef BUILD_DEPRECATED
-DEPRECATED = $(DEPRECSRC)
 endif
 
 all: ../../$(LAPACKELIB)
 
-../../$(LAPACKELIB): $(ALLOBJA) $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED)
-       $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJA) 
-       $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJB) $(ALLXOBJ) $(DEPRECATED)
+../../$(LAPACKELIB): $(OBJ_A) $(OBJ_B) $(DEPRECATED) $(EXTENDED) $(MATGEN)
+       $(ARCH) $(ARCHFLAGS) $@ $(OBJ_A)
+       $(ARCH) $(ARCHFLAGS) $@ $(OBJ_B)
+       $(ARCH) $(ARCHFLAGS) $@ $(DEPRECATED)
+       $(ARCH) $(ARCHFLAGS) $@ $(EXTENDED)
+       $(ARCH) $(ARCHFLAGS) $@ $(MATGEN)
        $(RANLIB) $@
 
+clean: cleanobj
+cleanobj:
+       rm -f *.o
+
 .c.o:
        $(CC) $(CFLAGS) -I../include -c -o $@ $<
-
-clean:
-       rm -f *.o
index 5fba06d..32dd5cc 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,41 +47,44 @@ lapack_int LAPACKE_cbbcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int lrwork = -1;
     float* rwork = NULL;
     float rwork_query;
-    lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_cbbcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-    nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-    nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-    nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-    if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
-        return -10;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_lsame( jobu1, 'y' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
-            return -12;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( jobu2, 'y' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
-            return -14;
+        if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
-            return -16;
+        if( LAPACKE_lsame( jobu1, 'y' ) ) {
+            if( LAPACKE_cge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
+                return -12;
+            }
         }
-    }
-    if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
-            return -18;
+        if( LAPACKE_lsame( jobu2, 'y' ) ) {
+            if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+            if( LAPACKE_cge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
+                return -16;
+            }
+        }
+        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+            if( LAPACKE_cge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
+                return -18;
+            }
         }
     }
 #endif
index 31ad6b5..0547472 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,156 +47,36 @@ lapack_int LAPACKE_cbbcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int lrwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+        LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &m, &p, &q,
                        theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
                        &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e,
                        rwork, &lrwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_complex_float* u1_t = NULL;
-        lapack_complex_float* u2_t = NULL;
-        lapack_complex_float* v1t_t = NULL;
-        lapack_complex_float* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -13;
-            LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -15;
-            LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -17;
-            LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -19;
-            LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lrwork == -1 ) {
-            LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                           theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
-                           v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
-                           b22d, b22e, rwork, &lrwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_0;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_1;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_2;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_3;
-            }
-        }
-        /* Transpose input matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_cge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
-                               ldu1_t );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_cge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
-                               ldu2_t );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_cge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
-                               ldv1t_t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_cge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
-                               ldv2t_t );
-        }
-        /* Call LAPACK function and adjust info */
-        LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                       theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
-                       &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
-                       b21e, b22d, b22e, rwork, &lrwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_3:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_2:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_1:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info );
index a9f142a..dac495f 100644 (file)
@@ -47,26 +47,28 @@ lapack_int LAPACKE_cbdsqr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( ncc != 0 ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( ncc != 0 ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+                return -13;
+            }
         }
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -8;
-    }
-    if( nru != 0 ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
-            return -11;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( ncvt != 0 ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -8;
+        }
+        if( nru != 0 ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+                return -11;
+            }
+        }
+        if( ncvt != 0 ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 18182a6..ef5997b 100644 (file)
@@ -49,13 +49,15 @@ lapack_int LAPACKE_cgbbrd( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( ncc != 0 ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
-            return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -8;
+        }
+        if( ncc != 0 ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+                return -16;
+            }
         }
     }
 #endif
index 3fb0b5d..3ec8517 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cgbcon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e7d8f08..05b1f2b 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_cgbequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 4eca4c8..1428863 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_cgbequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 3c1dc3f..84924af 100644 (file)
@@ -50,18 +50,20 @@ lapack_int LAPACKE_cgbrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -9;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -9;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ed63259..fb70b3a 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_cgbrfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -13;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -14;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -17;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -17;
     }
 #endif
     /* Allocate memory for working array(s) */
index e5164e4..1b48c3d 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_cgbsv( int matrix_layout, lapack_int n, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_cgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
index faf1ba3..95855a4 100644 (file)
@@ -51,29 +51,31 @@ lapack_int LAPACKE_cgbsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index 6c371e7..332cdf9 100644 (file)
@@ -53,34 +53,36 @@ lapack_int LAPACKE_cgbsvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -27;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -27;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index 7aaa5d6..0cc2b38 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_cgbtrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
index 165731a..3e009f9 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_cgbtrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_cgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
index eb8348b..28f5e93 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cgebak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_cgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
index cb2f8bc..9cfa2a7 100644 (file)
@@ -42,11 +42,13 @@ lapack_int LAPACKE_cgebal( int matrix_layout, char job, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
-        LAPACKE_lsame( job, 's' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+            LAPACKE_lsame( job, 's' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
     }
 #endif
index 37cfce5..9c11279 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_cgebrd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0eec38f..5029ee9 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_cgecon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 26c5d54..f2095ca 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_cgeequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 1ae9481..728686d 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_cgeequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 781815e..6efd677 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_cgees( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a5d440c..efff6ed 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_cgeesx( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 82a2207..2c0c2a1 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_cgeev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 98dee6b..c3d99b2 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_cgeevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a1694e4..23600c2 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index fbf8d11..7d371f6 100644 (file)
@@ -41,22 +41,22 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
 {
     lapack_int info = 0;
     lapack_int lwork = (
-                       // 1.1
-       (            LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+                // 1.1
+        (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? 2*n+1 :
 
                 //1.2
-     (   (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+     (   (       LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? n*n+3*n :
 
                 //2.1
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
-              !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+              !( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) )&&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
 
 
                 //2.2
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
               !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
 
@@ -81,8 +81,8 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 4*n*n:
                        1) ) ) ) ) ) ) );
     lapack_int lrwork = (
-                       // 1.1
-       (            LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+                // 1.1
+        (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,n+2*m) :
 
                 //1.2
@@ -90,13 +90,13 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,2*n) :
 
                 //2.1
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
-              !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+              !( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
 
 
                 //2.2
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
               !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
 
@@ -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) :
-                       7 ))))))));
+                       7) ) ) ) ) ) ) );
     lapack_int* iwork = NULL;
     float* rwork = NULL;
     lapack_complex_float* cwork = NULL;
@@ -130,11 +130,13 @@ lapack_int LAPACKE_cgejsv( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
-    nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+        nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index df1d488..2dda846 100644 (file)
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cgelq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
-lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n,
-                               lapack_complex_float* a, lapack_int lda,
-                               lapack_complex_float* t, lapack_int tsize )
+lapack_int LAPACKE_cgelq( int matrix_layout, lapack_int m, lapack_int n,
+                          lapack_complex_float* a, lapack_int lda,
+                          lapack_complex_float* t, lapack_int tsize )
 {
     lapack_int info = 0;
     lapack_int lwork = -1;
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e67e13d..6b14b85 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_cgelq2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bf77f0f..18bc040 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgelqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8a2dfd6..f53bb3b 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_cgels( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index cf1587a..2ee8919 100644 (file)
@@ -55,15 +55,17 @@ lapack_int LAPACKE_cgelsd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 33bc7b7..94efbdd 100644 (file)
@@ -49,15 +49,17 @@ lapack_int LAPACKE_cgelss( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3bf9efd..2fea967 100644 (file)
@@ -49,15 +49,17 @@ lapack_int LAPACKE_cgelsy( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ae39111..ef0aec1 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cgemlq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,15 +48,17 @@ lapack_int LAPACKE_cgemlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 229a413..8ad40e6 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cgemqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c0631af..c29f260 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_cgemqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #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, nb, k, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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, nb, k, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0f24233..53ee3d4 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgeqlf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 118a25d..28c5ace 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_cgeqp3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a30c9fb..6467994 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_cgeqpf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 264b135..b97414a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cgeqr
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgeqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e39cd67..a55a4a9 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_cgeqr2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 79475b6..1f1f8d9 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgeqrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3581c10..1f6d3cc 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 410e705..be40560 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_cgeqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7ff59b1..4ffe111 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
index 46e924d..c51a8d8 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
index ff4da54..d16dee4 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_cgerfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5e34348..d892dd1 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_cgerfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -11;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -12;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
     }
 #endif
     /* Allocate memory for working array(s) */
index f92ba64..37a3827 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgerqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3ba34e1..e96957c 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cgesdd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -52,16 +52,18 @@ lapack_int LAPACKE_cgesdd( int matrix_layout, char jobz, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
     if( LAPACKE_lsame( jobz, 'n' ) ) {
         lrwork = MAX(1,7*MIN(m,n));
     } else {
-        lrwork = (size_t)MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1);
+        lrwork = (size_t)MAX(1,MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1));
     }
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)
index f57ffcf..ce91af9 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_cgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
index e48331d..9bc7dca 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_cgesvd( int matrix_layout, char jobu, char jobvt,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6882a8b..0acddf5 100644 (file)
@@ -54,14 +54,16 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
     info = LAPACKE_cgesvdx_work( matrix_layout, jobu, jobvt, range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
                                  ldu, vt, ldvt, &work_query, lwork, rwork, iwork );
     if( info != 0 ) {
         goto exit_level_0;
@@ -69,7 +71,7 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range
     lwork = LAPACK_C2INT (work_query);
     /* Allocate memory for work arrays */
     work = (lapack_complex_float*)
-       LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+        LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
     if( work == NULL ) {
         info = LAPACK_WORK_MEMORY_ERROR;
         goto exit_level_1;
@@ -86,8 +88,8 @@ lapack_int LAPACKE_cgesvdx( int matrix_layout, char jobu, char jobvt, char range
     }
     /* Call middle-level interface */
     info = LAPACKE_cgesvdx_work( matrix_layout, jobu, jobvt,  range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
-                                ldu, vt, ldvt, work, lwork, rwork, iwork );
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 ldu, vt, ldvt, work, lwork, rwork, iwork );
     /* Backup significant data from working array(s) */
     for( i=0; i<12*MIN(m,n)-1; i++ ) {
         superb[i] = iwork[i+1];
index a5955ef..ddbc0a5 100644 (file)
 #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, 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 m, lapack_int n, 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 = 0;
     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;
@@ -85,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;
         }
@@ -116,8 +116,8 @@ lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char
         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_t, &lda_t, &vl, &vu,
-                                       &il, &iu, ns, s, u_t, &ldu_t, vt_t,
-                            &ldvt_t, work, &lwork, rwork, iwork, &info );
+                        &il, &iu, ns, s, u_t, &ldu_t, vt_t,
+                        &ldvt_t, work, &lwork, rwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index 9d3b81e..253cbf0 100644 (file)
@@ -51,15 +51,17 @@ lapack_int LAPACKE_cgesvj( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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;
-    }
-    if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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;
+        }
+        if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+                return -11;
+            }
         }
     }
 #endif
index e2bbbfe..138e229 100644 (file)
@@ -76,7 +76,7 @@ lapack_int LAPACKE_cgesvj_work( int matrix_layout, char joba, char jobu,
         }
         if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
             v_t = (lapack_complex_float*)
-               LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,n) );
+                LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,n) );
             if( v_t == NULL ) {
                 info = LAPACK_TRANSPOSE_MEMORY_ERROR;
                 goto exit_level_1;
index c8896ba..5958316 100644 (file)
@@ -51,28 +51,30 @@ lapack_int LAPACKE_cgesvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 1750325..1c31110 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_cgesvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 6a9741d..343e366 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cgetf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgetf2_work( matrix_layout, m, n, a, lda, ipiv );
index 2f5ea4d..18d4221 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cgetrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgetrf_work( matrix_layout, m, n, a, lda, ipiv );
index b2e4282..fb2ec9e 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cgetrf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgetrf2_work( matrix_layout, m, n, a, lda, ipiv );
index d84031d..243e984 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cgetri( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a96a9c5..cf10e63 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cgetrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_cgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
index 8b35c10..c9ff167 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_cgetsls( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2c4ac84..58298ed 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_cggbak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_cggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
index 564173f..6903c07 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_cggbal( int matrix_layout, char job, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
-    }
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-            return -6;
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+                return -6;
+            }
         }
     }
 #endif
index d11bc0d..6809297 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_cgges( int matrix_layout, char jobvsl, char jobvsr, char sort
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 09cd9b9..f288dd2 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_cgges3( int matrix_layout, char jobvsl, char jobvsr, char sor
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2aedc13..fc939a3 100644 (file)
@@ -58,12 +58,14 @@ lapack_int LAPACKE_cggesx( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6a11dfa..8a0323c 100644 (file)
@@ -51,12 +51,14 @@ lapack_int LAPACKE_cggev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e9f94ce..e44e1e5 100644 (file)
@@ -52,12 +52,14 @@ lapack_int LAPACKE_cggev3( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 548c02c..94c081a 100644 (file)
@@ -58,12 +58,14 @@ lapack_int LAPACKE_cggevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index 52d5885..5b84dee 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_cggglm( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ff2f110..fcc1a9b 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_cgghd3( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index 01f8d29..99cc29a 100644 (file)
@@ -45,21 +45,23 @@ lapack_int LAPACKE_cgghrd( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index 480b4e8..aa1086a 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_cgglse( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( m, c, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_c_nancheck( p, d, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( m, c, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_c_nancheck( p, d, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 81ef19b..a885134 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_cggqrf( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 84c4200..ce25c34 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_cggrqf( int matrix_layout, lapack_int m, lapack_int p,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2a683f9..6656db2 100644 (file)
@@ -51,12 +51,14 @@ lapack_int LAPACKE_cggsvd( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 97995ae..34cb131 100644 (file)
@@ -45,7 +45,7 @@ lapack_int LAPACKE_cggsvd3( int matrix_layout, char jobu, char jobv, char jobq,
 {
     lapack_int info = 0;
     float* rwork = NULL;
-               lapack_int lwork = -1;
+    lapack_int lwork = -1;
     lapack_complex_float* work = NULL;
     lapack_complex_float work_query;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -53,21 +53,23 @@ lapack_int LAPACKE_cggsvd3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Query optimal size for working array */
     info = LAPACKE_cggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
                                  a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q,
                                  ldq, &work_query, lwork, rwork, iwork );
-               if( info != 0 )
-                       goto exit_level_0;
-               lwork = LAPACK_C2INT( work_query );
+    if( info != 0 )
+        goto exit_level_0;
+    lwork = LAPACK_C2INT( work_query );
     /* Allocate memory for working array(s) */
     rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) );
     if( rwork == NULL ) {
index 7a77408..a5bf20d 100644 (file)
@@ -52,18 +52,20 @@ lapack_int LAPACKE_cggsvp( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 25cc974..d3f1e2a 100644 (file)
@@ -54,18 +54,20 @@ lapack_int LAPACKE_cggsvp3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal size for working array */
index 17c7813..279b079 100644 (file)
@@ -43,21 +43,23 @@ lapack_int LAPACKE_cgtcon( char norm, lapack_int n,
     lapack_int info = 0;
     lapack_complex_float* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 20d3f93..a7f253e 100644 (file)
@@ -54,33 +54,35 @@ lapack_int LAPACKE_cgtrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_c_nancheck( n, df, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_c_nancheck( n, df, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+            return -11;
+        }
+        if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ce53609..16e8633 100644 (file)
@@ -43,18 +43,20 @@ lapack_int LAPACKE_cgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
index 1a6ab7c..170e59e 100644 (file)
@@ -53,37 +53,39 @@ lapack_int LAPACKE_cgtsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_c_nancheck( n, df, 1 ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
-            return -9;
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_c_nancheck( n, df, 1 ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
-            return -11;
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_c_nancheck( n-1, dlf, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_c_nancheck( n-1, duf, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index e660399..4b0500d 100644 (file)
@@ -38,15 +38,17 @@ lapack_int LAPACKE_cgttrf( lapack_int n, lapack_complex_float* dl,
                            lapack_complex_float* du2, lapack_int* ipiv )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cgttrf_work( n, dl, d, du, du2, ipiv );
index 08ca872..4f5c916 100644 (file)
@@ -46,21 +46,23 @@ lapack_int LAPACKE_cgttrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_c_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( n-2, du2, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_cgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
index 0106c82..d79802a 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chbev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5be09b6..d62e9a9 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_chbev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 075b853..f5736c1 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function chbev_2stage
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -44,7 +44,7 @@ lapack_int LAPACKE_chbev_2stage_work( int matrix_layout, char jobz, char uplo,
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         LAPACK_chbev_2stage( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work, &lwork,
-                                 rwork, &info );
+                             rwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index 6cfda97..024cf25 100644 (file)
@@ -53,9 +53,11 @@ lapack_int LAPACKE_chbevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 293701b..63f7d8c 100644 (file)
@@ -53,9 +53,11 @@ lapack_int LAPACKE_chbevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ba356cb..1f30a83 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_chbevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 9b64a8a..401f47c 100644 (file)
@@ -52,21 +52,23 @@ lapack_int LAPACKE_chbevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index f741c0d..da97284 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_chbgst( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b46db05..31f4531 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_chbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0801afe..d44f6c6 100644 (file)
@@ -54,12 +54,14 @@ lapack_int LAPACKE_chbgvd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5e2705a..5acacca 100644 (file)
@@ -51,24 +51,26 @@ lapack_int LAPACKE_chbgvx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -18;
-    }
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -15;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -18;
+        }
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -15;
+            }
         }
     }
 #endif
index 351382e..634d803 100644 (file)
@@ -45,13 +45,15 @@ lapack_int LAPACKE_chbtrd( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( vect, 'u' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( vect, 'u' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 168730d..54866ea 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_checon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d96cb98..1481359 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function checon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_checon_3( int matrix_layout, char uplo, lapack_int n,
 {
     lapack_int info = 0;
     lapack_complex_float* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_checon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6136930..f11eb1d 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_cheequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0be6510..7118f4d 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cheev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 52e6a30..bf231c3 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_cheev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dea004b..d0dea37 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_cheevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 339d43d..d87481a 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_cheevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c84c43e..6fe2616 100644 (file)
@@ -55,21 +55,23 @@ lapack_int LAPACKE_cheevr( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index cb4c0b9..5b3f5c7 100644 (file)
@@ -55,21 +55,23 @@ lapack_int LAPACKE_cheevr_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index a8628d3..e3d1d89 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cheevr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -54,8 +54,9 @@ lapack_int LAPACKE_cheevr_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 5dbe529..f7a41d6 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_cheevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 5f3dafe..93add3f 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_cheevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 87fa020..c1bd5a1 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cheevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -53,8 +53,9 @@ lapack_int LAPACKE_cheevx_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 10bd1f2..c628017 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_chegst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
index 6c8fd2c..15d0529 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_chegv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 53a5d42..537b945 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_chegv_2stage( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 85a9e2e..2959cb0 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_chegvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c120b42..3ba6274 100644 (file)
@@ -52,24 +52,26 @@ lapack_int LAPACKE_chegvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 8251662..3551d39 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function chegvx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index ae10202..ecf1379 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_cherfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0991b67..4a89798 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_cherfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index 447efbe..9a0a81f 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_chesv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2323bd2..af13d53 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_chesv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage.c
new file mode 100644 (file)
index 0000000..cd8a0cf
--- /dev/null
@@ -0,0 +1,90 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function chesv_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_float* work = NULL;
+    lapack_complex_float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_chesv_aa_2stage_work( matrix_layout, uplo, n, nrhs,  
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_C2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_float*)
+        LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_chesv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                                              a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_chesv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..d9a44d3
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function chesv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chesv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb,
+                               lapack_complex_float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_chesv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_float* a_t = NULL;
+        lapack_complex_float* tb_t = NULL;
+        lapack_complex_float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_chesv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            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,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_chesv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_chesv_aa_2stage_work", info );
+    }
+    return info;
+}
index 04b5f6a..4741d45 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function chesv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,15 +48,14 @@ lapack_int LAPACKE_chesv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 666fd26..4c7b29d 100644 (file)
@@ -51,17 +51,19 @@ lapack_int LAPACKE_chesvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index 469e423..0976461 100644 (file)
@@ -53,26 +53,28 @@ lapack_int LAPACKE_chesvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_che_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index de512fd..5265dd4 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cheswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index 4bf71b8..06b55da 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chetrd( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 93dab7a..87539d6 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chetrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4987481..72373c1 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chetrf_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..bd352c5
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function chetrf_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_float* work = NULL;
+    lapack_complex_float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_chetrf_aa_2stage_work( matrix_layout, uplo, n,
+                               a, lda, tb, ltb, ipiv, ipiv2,
+                               &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_C2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_float*)
+        LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_chetrf_aa_2stage_work( matrix_layout, uplo, n,
+                                              a, lda, tb, ltb, ipiv, ipiv2,
+                               work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_chetrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..bb2bb8d
--- /dev/null
@@ -0,0 +1,108 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function chetrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb, 
+                               lapack_int* ipiv, lapack_int* ipiv2, 
+                               lapack_complex_float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_chetrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        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;
+        lapack_complex_float* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_chetrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            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,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_chetrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_chetrf_aa_2stage_work", info );
+    }
+    return info;
+}
index b9133e7..15085b8 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function chetrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,11 @@ lapack_int LAPACKE_chetrf_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1a7df7c..01034cf 100644 (file)
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function chetrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
 lapack_int LAPACKE_chetrf_rk_work( int matrix_layout, char uplo, lapack_int n,
                                 lapack_complex_float* a, lapack_int lda,
-                                lapack_complex_float* e, 
+                                lapack_complex_float* e,
                                 lapack_int* ipiv, lapack_complex_float* work,
                                 lapack_int lwork )
 {
index 4f71f2e..56cd7a1 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chetrf_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index cdc6fd3..239caaa 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_chetri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e5757c7..18ef7e5 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_chetri2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 23957f1..6937752 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_chetri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8ce3ad3..d9692e0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function chetri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,17 +41,20 @@ lapack_int LAPACKE_chetri_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int lwork = -1;
     lapack_complex_float* work = NULL;
     lapack_complex_float work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_chetri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a199f8a..2f06593 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_chetrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_chetrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 13434ea..8a12e5e 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_chetrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 77a5f24..3c06232 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function chetrs_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -44,17 +44,19 @@ lapack_int LAPACKE_chetrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_chetrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
-                                                         e, ipiv, b, ldb );
+                                  e, ipiv, b, ldb );
 }
index 6a635cf..4cad1f8 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_chetrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..455622b
--- /dev/null
@@ -0,0 +1,66 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function chetrs_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a,
+                          lapack_int lda, lapack_complex_float* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+       /* Call middle-level interface */
+    info = LAPACKE_chetrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                                              a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb );
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_chetrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..41d293d
--- /dev/null
@@ -0,0 +1,115 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function chetrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_chetrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_chetrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, 
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_float* a_t = NULL;
+        lapack_complex_float* tb_t = NULL;
+        lapack_complex_float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        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;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_chetrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_chetrs_aa_2stage_work", info );
+    }
+    return info;
+}
index eef4249..e032ae7 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_chetrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_chetrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index aa45808..6b2e321 100644 (file)
@@ -44,20 +44,22 @@ lapack_int LAPACKE_chfrk( int matrix_layout, char transr, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
-    na = LAPACKE_lsame( trans, 'n' ) ? n : k;
-    if( LAPACKE_cge_nancheck( matrix_layout, na, ka, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_cpf_nancheck( n, c ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+        na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+        if( LAPACKE_cge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_cpf_nancheck( n, c ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_chfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
index 040a262..ccaf5a6 100644 (file)
@@ -52,21 +52,23 @@ lapack_int LAPACKE_chgeqz( int matrix_layout, char job, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -16;
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -16;
+            }
         }
     }
 #endif
index fcb6da5..52638b7 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_chpcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1567cff..6598928 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_chpev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 350a747..47c7bbe 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_chpevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7bc52ed..6b6bc0a 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_chpevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index c22655d..088be12 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_chpgst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_chp_nancheck( n, bp ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_chp_nancheck( n, bp ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_chpgst_work( matrix_layout, itype, uplo, n, ap, bp );
index e2e6e8c..4640125 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_chpgv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_chp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_chp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 22bc00f..568882e 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_chpgvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_chp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_chp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0bbe9b0..2e11c10 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_chpgvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -13;
-    }
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_chp_nancheck( n, bp ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -10;
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_chp_nancheck( n, bp ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -10;
+            }
         }
     }
 #endif
index f50e1a6..3412dbe 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_chprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 73df97b..7be90ee 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_chpsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_chpsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index f6bfee4..37ec619 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_chpsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_chp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_chp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 3d1cbd4..88df3ab 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_chptrd( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_chptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
index 3441a00..2e1afd4 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_chptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_chptrf_work( matrix_layout, uplo, n, ap, ipiv );
index 598ce3b..a88a35b 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_chptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2440d99..210d5cc 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_chptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_chp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_chp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_chptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index b528108..a3b1a9d 100644 (file)
@@ -49,22 +49,24 @@ lapack_int LAPACKE_chsein( int matrix_layout, char job, char eigsrc, char initv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_c_nancheck( n, w, 1 ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_c_nancheck( n, w, 1 ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index a264514..76578a5 100644 (file)
@@ -48,13 +48,15 @@ lapack_int LAPACKE_chseqr( int matrix_layout, char job, char compz, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 4e62f4f..0014906 100644 (file)
@@ -37,9 +37,11 @@ lapack_int LAPACKE_clacgv( lapack_int n, lapack_complex_float* x,
                            lapack_int incx )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_c_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_c_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_clacgv_work( n, x, incx );
index 890c486..0d374d1 100644 (file)
@@ -38,12 +38,14 @@ lapack_int LAPACKE_clacn2( lapack_int n, lapack_complex_float* v,
                            float* est, lapack_int* kase, lapack_int* isave )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n, x, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n, x, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_clacn2_work( n, v, x, est, kase, isave );
index 0878e62..0c415c4 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_clacp2( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_clacp2_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
index 69ba290..8f1d6b4 100644 (file)
@@ -31,7 +31,6 @@
 * Generated January, 2013
 *****************************************************************************/
 
-#include "lapacke.h"
 #include "lapacke_utils.h"
 
 lapack_int LAPACKE_clacp2_work( int matrix_layout, char uplo, lapack_int m,
index c45f145..3e0433b 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_clacpy( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_clacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_clacrm.c b/lapack-netlib/LAPACKE/src/lapacke_clacrm.c
new file mode 100644 (file)
index 0000000..2c2c2b0
--- /dev/null
@@ -0,0 +1,76 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function clacrm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacrm(int matrix_layout, lapack_int m,
+                           lapack_int n, const lapack_complex_float* a,
+                           lapack_int lda, const float* b, lapack_int ldb,
+                           lapack_complex_float* c, lapack_int ldc)
+{
+    lapack_int info = 0;
+    float* rwork = NULL;
+
+    if (matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR) {
+        LAPACKE_xerbla("LAPACKE_clacrm", -1);
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if ( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -6;
+        }
+    }
+#endif
+    /* Allocate memory for work array(s) */
+    rwork = (float*)
+        LAPACKE_malloc(sizeof(float) * MAX(1, 2 * m * n));
+    if (rwork == NULL) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_clacrm_work(matrix_layout, m, n, a, lda, b, ldb,
+                                c, ldc, rwork);
+    /* Release memory and exit */
+    LAPACKE_free(rwork);
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_clacrm", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_clacrm_work.c b/lapack-netlib/LAPACKE/src/lapacke_clacrm_work.c
new file mode 100644 (file)
index 0000000..5bfab7f
--- /dev/null
@@ -0,0 +1,110 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function clacrm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clacrm_work(int matrix_layout, lapack_int m, lapack_int n,
+                                const lapack_complex_float* a, lapack_int lda,
+                                const float* b, lapack_int ldb,
+                                lapack_complex_float* c, lapack_int ldc,
+                                float* rwork)
+{
+    lapack_int info = 0;
+    if (matrix_layout == LAPACK_COL_MAJOR) {
+        /* Call LAPACK function */
+        LAPACK_clacrm(&m, &n, a, &lda, b, &ldb, c, &ldc, rwork);
+    } else if (matrix_layout == LAPACK_ROW_MAJOR) {
+        lapack_int lda_t = MAX(1,m);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_int ldc_t = MAX(1,m);
+        lapack_complex_float* a_t = NULL;
+        float* b_t = NULL;
+        lapack_complex_float* c_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -5;
+            LAPACKE_xerbla( "LAPACKE_clacrm_work", info );
+            return info;
+        }
+        if( ldb < n ) {
+            info = -7;
+            LAPACKE_xerbla( "LAPACKE_clacrm_work", info );
+            return info;
+        }
+        if( ldc < n ) {
+            info = -9;
+            LAPACKE_xerbla( "LAPACKE_clacrm_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_float*)
+            LAPACKE_malloc(sizeof(lapack_complex_float) * lda_t * MAX(1,n));
+        b_t = (float*)
+            LAPACKE_malloc(sizeof(float) * ldb_t * MAX(1,n));
+        c_t = (lapack_complex_float*)
+            LAPACKE_malloc((sizeof(lapack_complex_float) * ldc_t * MAX(1,n)));
+        if (a_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        if (b_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        if (c_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_cge_trans(matrix_layout, m, n, a, lda, a_t, lda_t);
+        LAPACKE_sge_trans(matrix_layout, n, n, b, ldb, b_t, ldb_t);
+        /* Call LAPACK function */
+        LAPACK_clacrm(&m, &n, a_t, &lda_t, b_t, &ldb_t, c_t, &ldc_t, rwork);
+        /* Transpose output matrices */
+        LAPACKE_cge_trans(LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc);
+        /* Release memory and exit */
+        LAPACKE_free(c_t);
+exit_level_2:
+        LAPACKE_free(b_t);
+exit_level_1:
+        LAPACKE_free(a_t);
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_clacrm_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla("LAPACKE_clacrm_work", -1);
+    }
+    return info;
+}
index 21349b2..cd989ff 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_clag2z( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_clag2z_work( matrix_layout, m, n, sa, ldsa, a, lda );
index 9e18621..0b6c4c2 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_clagge( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2e7a082..d153922 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_claghe( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a7782f5..f4f98fe 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_clagsy( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2cbf672..472a6c5 100644 (file)
@@ -45,9 +45,11 @@ float LAPACKE_clange( int matrix_layout, char norm, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 740f872..ce5ee25 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function clange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -39,37 +39,41 @@ float LAPACKE_clange_work( int matrix_layout, char norm, lapack_int m,
 {
     lapack_int info = 0;
     float res = 0.;
+    char norm_lapack;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
+        /* Call LAPACK function */
         res = LAPACK_clange( &norm, &m, &n, a, &lda, work );
-        if( info < 0 ) {
-            info = info - 1;
-        }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int lda_t = MAX(1,m);
-        lapack_complex_float* a_t = NULL;
+        float* work_lapack = NULL;
         /* Check leading dimension(s) */
         if( lda < n ) {
             info = -6;
             LAPACKE_xerbla( "LAPACKE_clange_work", info );
             return info;
         }
-        /* Allocate memory for temporary array(s) */
-        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;
+        if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) {
+            norm_lapack = 'i';
+        } else if( LAPACKE_lsame( norm, 'i' ) ) {
+            norm_lapack = '1';
+        } else {
+            norm_lapack = norm;
+        }
+        /* Allocate memory for work array(s) */
+        if( LAPACKE_lsame( norm_lapack, 'i' ) ) {
+            work_lapack = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+            if( work_lapack == NULL ) {
+                info = LAPACK_WORK_MEMORY_ERROR;
+                goto exit_level_0;
+            }
         }
-        /* Transpose input matrices */
-        LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
-        /* Call LAPACK function and adjust info */
-        res = LAPACK_clange( &norm, &m, &n, a_t, &lda_t, work );
-        info = 0;  /* LAPACK call is ok! */
+        /* Call LAPACK function */
+        res = LAPACK_clange( &norm_lapack, &n, &m, a, &lda, work_lapack );
         /* Release memory and exit */
-        LAPACKE_free( a_t );
+        if( work_lapack ) {
+            LAPACKE_free( work_lapack );
+        }
 exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+        if( info == LAPACK_WORK_MEMORY_ERROR ) {
             LAPACKE_xerbla( "LAPACKE_clange_work", info );
         }
     } else {
index b688372..5c40c29 100644 (file)
@@ -44,9 +44,11 @@ float LAPACKE_clanhe( int matrix_layout, char norm, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d08a471..a02264e 100644 (file)
@@ -44,9 +44,11 @@ float LAPACKE_clansy( int matrix_layout, char norm, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5a38fb0..2ddd2e2 100644 (file)
@@ -45,9 +45,11 @@ float LAPACKE_clantr( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ffa5ea5..e8f9ced 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_clapmr( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_clapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 9a35d4c..e0bb395 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_clapmt( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_clapmt_work( matrix_layout, forwrd, m, n, x, ldx, k );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_clarcm.c b/lapack-netlib/LAPACKE/src/lapacke_clarcm.c
new file mode 100644 (file)
index 0000000..7f80b78
--- /dev/null
@@ -0,0 +1,76 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function clarcm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarcm(int matrix_layout, lapack_int m,
+                           lapack_int n, const float* a, lapack_int lda,
+                           const lapack_complex_float* b, lapack_int ldb,
+                           lapack_complex_float* c, lapack_int ldc)
+{
+    lapack_int info = 0;
+    float* rwork = NULL;
+
+    if (matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR) {
+        LAPACKE_xerbla("LAPACKE_clarcm", -1);
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if ( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
+    }
+#endif
+    /* Allocate memory for work array(s) */
+    rwork = (float*)
+        LAPACKE_malloc(sizeof(float) * MAX(1, 2 * m * n));
+    if (rwork == NULL) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_clarcm_work(matrix_layout, m, n, a, lda, b, ldb,
+                                c, ldc, rwork);
+    /* Release memory and exit */
+    LAPACKE_free(rwork);
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_clarcm", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_clarcm_work.c b/lapack-netlib/LAPACKE/src/lapacke_clarcm_work.c
new file mode 100644 (file)
index 0000000..cd12ee3
--- /dev/null
@@ -0,0 +1,110 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function clarcm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_clarcm_work(int matrix_layout, lapack_int m, lapack_int n,
+                                const float* a, lapack_int lda,
+                                const lapack_complex_float* b, lapack_int ldb,
+                                lapack_complex_float* c, lapack_int ldc,
+                                float* rwork)
+{
+    lapack_int info = 0;
+    if (matrix_layout == LAPACK_COL_MAJOR) {
+        /* Call LAPACK function */
+        LAPACK_clarcm(&m, &n, a, &lda, b, &ldb, c, &ldc, rwork);
+    } else if (matrix_layout == LAPACK_ROW_MAJOR) {
+        lapack_int lda_t = MAX(1,m);
+        lapack_int ldb_t = MAX(1,m);
+        lapack_int ldc_t = MAX(1,m);
+        float* a_t = NULL;
+        lapack_complex_float* b_t = NULL;
+        lapack_complex_float* c_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < m ) {
+            info = -5;
+            LAPACKE_xerbla( "LAPACKE_clarcm_work", info );
+            return info;
+        }
+        if( ldb < n ) {
+            info = -7;
+            LAPACKE_xerbla( "LAPACKE_clarcm_work", info );
+            return info;
+        }
+        if( ldc < n ) {
+            info = -9;
+            LAPACKE_xerbla( "LAPACKE_clarcm_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (float*)
+            LAPACKE_malloc(sizeof(float) * lda_t * MAX(1,m));
+        b_t = (lapack_complex_float*)
+            LAPACKE_malloc(sizeof(lapack_complex_float) * ldb_t * MAX(1,n));
+        c_t = (lapack_complex_float*)
+            LAPACKE_malloc((sizeof(lapack_complex_float) * ldc_t * MAX(1,n)));
+        if (a_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        if (b_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        if (c_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_sge_trans(matrix_layout, m, m, a, lda, a_t, lda_t);
+        LAPACKE_cge_trans(matrix_layout, m, n, b, ldb, b_t, ldb_t);
+        /* Call LAPACK function */
+        LAPACK_clarcm(&m, &n, a_t, &lda_t, b_t, &ldb_t, c_t, &ldc_t, rwork);
+        /* Transpose output matrices */
+        LAPACKE_cge_trans(LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc);
+        /* Release memory and exit */
+        LAPACKE_free(c_t);
+exit_level_2:
+        LAPACKE_free(b_t);
+exit_level_1:
+        LAPACKE_free(a_t);
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_clarcm_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla("LAPACKE_clarcm_work", -1);
+    }
+    return info;
+}
index c1d3130..18e2450 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function clarfb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,7 +41,7 @@ lapack_int LAPACKE_clarfb( int matrix_layout, char side, char trans, char direct
                            lapack_int ldc )
 {
     lapack_int info = 0;
-    lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+    lapack_int ldwork;
     lapack_complex_float* work = NULL;
     lapack_int ncols_v, nrows_v;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -49,57 +49,66 @@ lapack_int LAPACKE_clarfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
-    nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -13;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
-        if( k > nrows_v ) {
-            LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+        nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -13;
         }
-        if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k,
-            &v[(nrows_v-k)*ldv], ldv ) )
-            return -9;
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( k > ncols_v ) {
-            LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
-            return -8;
+        if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+            if( k > nrows_v ) {
+                LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k,
+                &v[(nrows_v-k)*ldv], ldv ) )
+                return -9;
+            if( LAPACKE_cge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_ctr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( k > ncols_v ) {
+                LAPACKE_xerbla( "LAPACKE_clarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+                ldv ) )
+                return -9;
+            if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+                return -9;
         }
-        if( LAPACKE_ctr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
-            ldv ) )
-            return -9;
-        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
-            return -9;
     }
 #endif
+    if( LAPACKE_lsame( side, 'l' ) ) {
+        ldwork = n;
+    } else if( LAPACKE_lsame( side, 'r' ) ) {
+        ldwork = m;
+    } else {
+        ldwork = 1;
+    }
     /* Allocate memory for working array(s) */
     work = (lapack_complex_float*)
         LAPACKE_malloc( sizeof(lapack_complex_float) * ldwork * MAX(1,k) );
index 945b799..0381a42 100644 (file)
@@ -38,12 +38,14 @@ lapack_int LAPACKE_clarfg( lapack_int n, lapack_complex_float* alpha,
                            lapack_complex_float* tau )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_c_nancheck( 1, alpha, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_c_nancheck( 1, alpha, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_clarfg_work( n, alpha, x, incx, tau );
index cd69bd4..961d7cb 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_clarft( int matrix_layout, char direct, char storev,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
-    nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+        nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_clarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
index bf6e887..977e283 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_clarfx( int matrix_layout, char side, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( 1, &tau, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_c_nancheck( m, v, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( 1, &tau, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_c_nancheck( m, v, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_clarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
index 5e31695..fdcb029 100644 (file)
@@ -43,68 +43,70 @@ lapack_int LAPACKE_clascl( int matrix_layout, char type, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    switch (type) {
-    case 'G':
-        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        switch (type) {
+        case 'G':
+            if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+                return -9;
+            }
+            break;
+        case 'L':
+            // 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 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' - 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' - 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' -  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;
         }
-        break;
-    case 'L':
-        // 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 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' - 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' - 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' -  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
     return LAPACKE_clascl_work( matrix_layout, type, kl, ku, cfrom, cto, m,  n, a, lda );
index fd18fd1..3884e6a 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_claset( int matrix_layout, char uplo, lapack_int m,
 *****************************************************************************/
 
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( 1, &beta, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( 1, &beta, 1 ) ) {
+            return -6;
+        }
     }
 #endif
 
diff --git a/lapack-netlib/LAPACKE/src/lapacke_classq.c b/lapack-netlib/LAPACKE/src/lapacke_classq.c
new file mode 100644 (file)
index 0000000..b8f231d
--- /dev/null
@@ -0,0 +1,54 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function classq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_classq( lapack_int n, lapack_complex_float* x,
+                           lapack_int incx, float* scale, float* sumsq )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
+        if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( 1, scale, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) {
+            return -5;
+        }
+    }
+#endif
+    return LAPACKE_classq_work( n, x, incx, scale, sumsq );
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_classq_work.c b/lapack-netlib/LAPACKE/src/lapacke_classq_work.c
new file mode 100644 (file)
index 0000000..9e9c3a3
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function classq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_classq_work( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq )
+{
+    lapack_int info = 0;
+    LAPACK_classq( &n, x, &incx, scale, sumsq );
+    return info;
+}
index bc5d4dd..cba497a 100644 (file)
@@ -43,19 +43,21 @@ lapack_int LAPACKE_claswp( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-/*****************************************************************************
-*      Disable the check as is below, the check below was checking for NaN
-*      from lda to n since there is no (obvious) way to knowing m. This is not
-*      a good idea. We could get a lower bound of m by scanning from ipiv. Or
-*      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
-*      the buggy Nan check.
-*      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
-*****************************************************************************/
-/*  if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
-*       return -3;
-*   }
-*/
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+    /*****************************************************************************
+    *      Disable the check as is below, the check below was checking for NaN
+    *      from lda to n since there is no (obvious) way to knowing m. This is not
+    *      a good idea. We could get a lower bound of m by scanning from ipiv. Or
+    *      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
+    *      the buggy Nan check.
+    *      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
+    *****************************************************************************/
+    /*  if( LAPACKE_cge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+    *       return -3;
+    *   }
+    */
+    }
 #endif
     return LAPACKE_claswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
 }
index 599e72f..1867987 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function claswp
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index 96415ca..19a0843 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_clatms( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5b34e31..1ce7078 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_clauum( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_clauum_work( matrix_layout, uplo, n, a, lda );
index c67909b..3bf733f 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_cpbcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4aa5bb4..4468f57 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_cpbequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
index 241a3d0..64ef7bd 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_cpbrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c8bfa5f..bb52e9d 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cpbstf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
index 04990d0..6528cec 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cpbsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_cpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index 6fa6b81..a14d5e1 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_cpbsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 28f3528..975c081 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cpbtrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
index e3b2467..9ff63c1 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cpbtrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_cpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index a57d692..382dd63 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpftrf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cpftrf_work( matrix_layout, transr, uplo, n, a );
index e74457d..57b73d0 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpftri( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cpftri_work( matrix_layout, transr, uplo, n, a );
index 4a0c37b..410ab4d 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cpftrs( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpf_nancheck( n, a ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpf_nancheck( n, a ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_cpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
index 5388526..b2ba482 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_cpocon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e7c635e..9ee9764 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cpoequ( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_cpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
index b8789ec..3b5b4cf 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cpoequb( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_cpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
index 292f2e6..e8867eb 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_cporfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 08bb22d..80c2877 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_cporfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -21;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -10;
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -21;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -13;
     }
 #endif
     /* Allocate memory for working array(s) */
index 4b7b854..bb9a670 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_cposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index 9938357..df0d5b8 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_cposvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 69ed00a..2dbb650 100644 (file)
@@ -52,26 +52,28 @@ lapack_int LAPACKE_cposvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index c5ae7ce..ac1805d 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpotrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cpotrf_work( matrix_layout, uplo, n, a, lda );
index dcda279..b1bf4ba 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpotrf2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cpotrf2_work( matrix_layout, uplo, n, a, lda );
index 24b1a0f..bf80ec5 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpotri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cpotri_work( matrix_layout, uplo, n, a, lda );
index dbe8679..a5f0566 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cpotrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_cpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index c7b7afd..d0ec180 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_cppcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c454032..f0e5465 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_cppequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
index bd6e842..f62c61f 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_cpprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6af2be3..6a182fa 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_cppsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index a552afe..bf428fb 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_cppsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_cpp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_cpp_nancheck( n, afp ) ) {
+                return -7;
+            }
         }
-    }
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -9;
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 426fefb..dad29b6 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cpptrf_work( matrix_layout, uplo, n, ap );
index 5018506..5a80ef3 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_cpptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_cpptri_work( matrix_layout, uplo, n, ap );
index 959d859..6eab29d 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_cpptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index d0c08ee..f4111a2 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_cpstrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a65da58..ebaab3b 100644 (file)
@@ -40,15 +40,17 @@ lapack_int LAPACKE_cptcon( lapack_int n, const float* d,
     lapack_int info = 0;
     float* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6bf8a9e..3bc194f 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_cpteqr( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 60126d0..8e69403 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_cptrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f1d5af0..7de0ea3 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_cptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_cptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
index ad24587..2e51850 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_cptsvx( int matrix_layout, char fact, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_c_nancheck( n-1, ef, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 7c4e052..ad51c85 100644 (file)
 lapack_int LAPACKE_cpttrf( lapack_int n, float* d, lapack_complex_float* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_cpttrf_work( n, d, e );
index 4bb7ee5..bc8abf3 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_cpttrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_cpttrs_work( matrix_layout, uplo, n, nrhs, d, e, b, ldb );
index f9b89dd..19c011e 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_cspcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f0e7c61..1c9b801 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_csprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2844053..c5b1f91 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_cspsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_cspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 6e08c31..18d6163 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_cspsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_csp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_csp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index b0de5e4..d74415e 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_csptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_csptrf_work( matrix_layout, uplo, n, ap, ipiv );
index 44a08a2..3103d52 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_csptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d93a806..bf433b7 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_csptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_csptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 22c4a35..5be3cec 100644 (file)
@@ -51,16 +51,18 @@ lapack_int LAPACKE_cstedc( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 0cd589a..986702e 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cstegr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -51,24 +51,26 @@ lapack_int LAPACKE_cstegr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 5f5cd36..9f7516c 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cstein
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,15 +47,17 @@ lapack_int LAPACKE_cstein( int matrix_layout, lapack_int n, const float* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, w, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n, w, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 96a48f8..9b9b84e 100644 (file)
@@ -52,18 +52,20 @@ lapack_int LAPACKE_cstemr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b48f7f9..1afb12b 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cstemr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -56,7 +56,7 @@ lapack_int LAPACKE_cstemr_work( int matrix_layout, char jobz, char range,
         lapack_int ldz_t = MAX(1,n);
         lapack_complex_float* z_t = NULL;
         /* Check leading dimension(s) */
-        if( ldz < n ) {
+        if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) {
             info = -14;
             LAPACKE_xerbla( "LAPACKE_cstemr_work", info );
             return info;
index 57249e7..7877925 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_csteqr( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 5c5fb57..e6b02d4 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_csycon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6425d61..6d5dcd6 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function csycon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_csycon_3( int matrix_layout, char uplo, lapack_int n,
 {
     lapack_int info = 0;
     lapack_complex_float* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_csycon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ec3a8ae..47323dc 100644 (file)
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function csycon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
 lapack_int LAPACKE_csycon_3_work( int matrix_layout, char uplo, lapack_int n,
                                 const lapack_complex_float* a, lapack_int lda,
-                                const lapack_complex_float* e, 
+                                const lapack_complex_float* e,
                                 const lapack_int* ipiv, float anorm,
                                 float* rcond, lapack_complex_float* work )
 {
index cc1eb84..2eb942e 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_csyconv( int matrix_layout, char uplo, char way, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Call middle-level interface */
index d87dcd1..79921b3 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_csyequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7dbb332..54cebff 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_csyr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, x, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n, x, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_csyr_work( matrix_layout, uplo, n, alpha, x, incx, a,
index 7141ac8..501ba2b 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_csyrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3b43eea..ceaf437 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_csyrfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index 7b68149..11baa9b 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_csysv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 579bfd8..9e012b9 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function csysv_aa
 * Author: Intel Corporation
-* Generated December 2016
+* Generated November 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,12 +47,14 @@ lapack_int LAPACKE_csysv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally csyck input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage.c
new file mode 100644 (file)
index 0000000..c93bb9c
--- /dev/null
@@ -0,0 +1,89 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function csysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                          lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_float* work = NULL;
+    lapack_complex_float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_csysv_aa_2stage_work( matrix_layout, uplo, n, nrhs, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_C2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_float*)
+        LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_csysv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_csysv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..dabe315
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function csysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb,
+                               lapack_complex_float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_csysv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_float* a_t = NULL;
+        lapack_complex_float* tb_t = NULL;
+        lapack_complex_float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_csysv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            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,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_csysv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_csysv_aa_2stage_work", info );
+    }
+    return info;
+}
index 34e95f2..b2950c1 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function csysv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,15 +48,14 @@ lapack_int LAPACKE_csysv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1038efa..a9edbe7 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_csysv_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 60517b2..b64aab9 100644 (file)
@@ -51,17 +51,19 @@ lapack_int LAPACKE_csysvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index 1f44cbe..fffac2b 100644 (file)
@@ -53,26 +53,28 @@ lapack_int LAPACKE_csysvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 78577aa..690ed47 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_csyswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_csyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index 42846cd..ccde4f4 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_csytrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 29d737c..0448a1f 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_csytrf_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally csyck input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally csyck input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..1ccad12
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function csytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_float* a, lapack_int lda,
+                          lapack_complex_float* tb, lapack_int ltb, 
+                          lapack_int* ipiv, lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_float* work = NULL;
+    lapack_complex_float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_csytrf_aa_2stage_work( matrix_layout, uplo, n, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2,
+                               &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_C2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_float*)
+        LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_csytrf_aa_2stage_work( matrix_layout, uplo, n,
+                               a, lda, tb, ltb, ipiv, ipiv2,
+                               work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_csytrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..665291c
--- /dev/null
@@ -0,0 +1,109 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function csytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb,  
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_csytrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        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;
+        lapack_complex_float* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage_work", info );
+            return info;
+        }
+     
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_csytrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            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,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_csytrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_csytrf_aa_2stage_work", info );
+    }
+    return info;
+}
index eac1e6c..52b7d24 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function csytrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,11 @@ lapack_int LAPACKE_csytrf_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a2b0906..a010800 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_csytrf_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9e030ce..309af85 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_csytri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6a95660..cacd6db 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_csytri2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0fdd55a..5c7e0be 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_csytri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 543d408..75ec8f0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function csytri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,17 +41,20 @@ lapack_int LAPACKE_csytri_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int lwork = -1;
     lapack_complex_float* work = NULL;
     lapack_complex_float work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_csytri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9e18008..5b9282f 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_csytrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_csytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 45b20b7..f4a0a43 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 795fb2c..962416c 100644 (file)
@@ -44,15 +44,17 @@ lapack_int LAPACKE_csytrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_csytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
index 83ef44e..ff9ba03 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_csytrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally csyck input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally csyck input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..2edab2f
--- /dev/null
@@ -0,0 +1,66 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function csytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                          lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Call middle-level interface */
+    info = LAPACKE_csytrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb );
+    
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_csytrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..7ef7397
--- /dev/null
@@ -0,0 +1,114 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function csytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_csytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_float* a, lapack_int lda,
+                               lapack_complex_float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_csytrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_float* a_t = NULL;
+        lapack_complex_float* tb_t = NULL;
+        lapack_complex_float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        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;
+        }
+        tb_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_csy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_cge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_csytrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_csy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_csytrs_aa_2stage_work", info );
+    }
+    return info;
+}
index 2841c95..1970bc9 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_csytrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_csytrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 6c223a1..21b86a0 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_ctbcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a32f8b8..e17e623 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ctbrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5b92126..b97f120 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ctbtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_ctbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
index 7f1cf1e..1c97c7b 100644 (file)
@@ -44,18 +44,20 @@ lapack_int LAPACKE_ctfsm( int matrix_layout, char transr, char side, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( IS_C_NONZERO(alpha) ) {
-        if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( IS_C_NONZERO(alpha) ) {
+            if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
-        return -9;
-    }
-    if( IS_C_NONZERO(alpha) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-            return -11;
+        if( LAPACKE_c_nancheck( 1, &alpha, 1 ) ) {
+            return -9;
+        }
+        if( IS_C_NONZERO(alpha) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 8885578..2c20433 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ctftri( int matrix_layout, char transr, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_ctftri_work( matrix_layout, transr, uplo, diag, n, a );
index 83f6019..66c69c7 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctfttp( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctfttp_work( matrix_layout, transr, uplo, n, arf, ap );
index 4bcf51f..0f7b3d7 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctfttr( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
index f5126da..647e238 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_ctgevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, p, ldp ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, s, lds ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, s, lds ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 49e8f7c..0b88ed9 100644 (file)
@@ -46,21 +46,23 @@ lapack_int LAPACKE_ctgexc( int matrix_layout, lapack_logical wantq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
-    }
-    if( wantq ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
+        if( wantq ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -9;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 4d21a0b..e2f38c8 100644 (file)
@@ -56,21 +56,23 @@ lapack_int LAPACKE_ctgsen( int matrix_layout, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( wantq ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -15;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( wantq ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -13;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -15;
+            }
         }
     }
 #endif
index 620cd44..b14f3b4 100644 (file)
@@ -50,32 +50,34 @@ lapack_int LAPACKE_ctgsja( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -14;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, m, m, u, ldu ) ) {
-            return -18;
+        if( LAPACKE_cge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
         }
-    }
-    if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, p, p, v, ldv ) ) {
-            return -20;
+        if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -14;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+                return -18;
+            }
+        }
+        if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+                return -20;
+            }
         }
     }
 #endif
index 0041143..fab7b9f 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_ctgsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 7b95b20..d34080c 100644 (file)
@@ -53,24 +53,26 @@ lapack_int LAPACKE_ctgsyl( int matrix_layout, char trans, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, m, d, ldd ) ) {
-        return -12;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, e, lde ) ) {
-        return -14;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, f, ldf ) ) {
-        return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+            return -12;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, e, lde ) ) {
+            return -14;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+            return -16;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index abfc8c5..15826ec 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ctpcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b38fa03..ee153e2 100644 (file)
@@ -51,29 +51,31 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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, nb, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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, nb, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
     lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) :
-                       ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 ); 
+                       ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 );
     work = (lapack_complex_float*)
         LAPACKE_malloc( sizeof(lapack_complex_float) * lwork );
     if( work == NULL ) {
index 6158f4a..2409702 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ctpqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1bcb613..9ca49a5 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_ctpqrt2( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_ctpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
index f66469a..9d2684e 100644 (file)
@@ -51,30 +51,32 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #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, k, k, t, ldt ) ) {
-        return -12;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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, k, k, t, ldt ) ) {
+            return -12;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     if (side=='l' ||  side=='L') {
index 350ad2d..b869c20 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ctprfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index eb43b3d..720c5da 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ctptri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctptri_work( matrix_layout, uplo, diag, n, ap );
index fabb412..5b6a914 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ctptrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_ctptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
index 7d2e641..793e9ba 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctpttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctpttf_work( matrix_layout, transr, uplo, n, ap, arf );
index 34f728c..679c661 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctpttr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ctpttr_work( matrix_layout, uplo, n, ap, a, lda );
index 863c583..159fb43 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ctrcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bce6c35..8c0b3d1 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_ctrevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 1b7627e..426e848 100644 (file)
@@ -43,14 +43,16 @@ lapack_int LAPACKE_ctrexc( int matrix_layout, char compq, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -6;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -4;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -4;
     }
 #endif
     return LAPACKE_ctrexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
index 1a49ca2..1648453 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ctrrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e377346..0ea1feb 100644 (file)
@@ -49,14 +49,16 @@ lapack_int LAPACKE_ctrsen( int matrix_layout, char job, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
     }
 #endif
     /* Query optimal working array(s) size */
index 1eefaae..3e3b8d8 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_ctrsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_cge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index a8708f7..d17d1ed 100644 (file)
@@ -45,15 +45,17 @@ lapack_int LAPACKE_ctrsyl( int matrix_layout, char trana, char tranb,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_ctrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
index 3e582b0..4fc39ca 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ctrtri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctrtri_work( matrix_layout, uplo, diag, n, a, lda );
index 7b3248d..6669f3f 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ctrtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ctr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_ctrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
index 869aee6..fd0a40c 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctrttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ctrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
index e115872..c4ea703 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ctrttp( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ctrttp_work( matrix_layout, uplo, n, a, lda, ap );
index cbbc3f1..7ec2778 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_ctzrzf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 44f97db..562f253 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cunbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -49,28 +49,31 @@ lapack_int LAPACKE_cunbdb( int matrix_layout, char trans, char signs,
     lapack_int lwork = -1;
     lapack_complex_float* work = NULL;
     lapack_complex_float work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_cunbdb", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -9;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -11;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -13;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -9;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -11;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7f0c47f..8ae40e6 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cunbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,119 +47,35 @@ lapack_int LAPACKE_cunbdb_work( int matrix_layout, char trans, char signs,
                                 lapack_complex_float* work, lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+        LAPACK_cunbdb( &ltrans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
                        x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
                        tauq1, tauq2, work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        lapack_complex_float* x11_t = NULL;
-        lapack_complex_float* x12_t = NULL;
-        lapack_complex_float* x21_t = NULL;
-        lapack_complex_float* x22_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldx11 < q ) {
-            info = -8;
-            LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -10;
-            LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
-                           &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
-                           taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) *
-                            ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
-        }
-        x22_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) *
-                            ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        /* Transpose input matrices */
-        LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
-        /* Call LAPACK function and adjust info */
-        LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
-                       &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
-                       taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        /* Release memory and exit */
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_cunbdb_work", info );
index 76f92b7..4dc5b97 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function cuncsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -54,28 +54,31 @@ lapack_int LAPACKE_cuncsd( int matrix_layout, char jobu1, char jobu2,
     lapack_complex_float* work = NULL;
     float rwork_query;
     lapack_complex_float work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_cuncsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -11;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -13;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -15;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -17;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -11;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -13;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -15;
+        }
+        if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -17;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e6749c1..339ed8d 100644 (file)
@@ -55,17 +55,18 @@ lapack_int LAPACKE_cuncsd2by1( int matrix_layout, char jobu1, char jobu2,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 =  p ;
-    nrows_x21 =  m-p ;
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -8;
-    }
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_x11 = p;
+        nrows_x21 = m-p;
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+            return -8;
+        }
 
-    if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -9;
+        if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+            return -9;
+        }
     }
-
 #endif
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
index 60fbd9a..0ab02e0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function cuncsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -50,224 +50,36 @@ lapack_int LAPACKE_cuncsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int* iwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
-        LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
-                       theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
-                       work, &lwork, rwork, &lrwork, iwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        lapack_complex_float* x11_t = NULL;
-        lapack_complex_float* x12_t = NULL;
-        lapack_complex_float* x21_t = NULL;
-        lapack_complex_float* x22_t = NULL;
-        lapack_complex_float* u1_t = NULL;
-        lapack_complex_float* u2_t = NULL;
-        lapack_complex_float* v1t_t = NULL;
-        lapack_complex_float* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -21;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -23;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -25;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -27;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldx11 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -16;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -18;
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lrwork == -1 || lwork == -1 ) {
-            LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
-                           &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
-                           x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
-                           &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork,
-                           &lrwork, iwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) *
-                            ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
         }
-        x22_t = (lapack_complex_float*)
-            LAPACKE_malloc( sizeof(lapack_complex_float) *
-                            ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_4;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_5;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_6;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (lapack_complex_float*)
-                LAPACKE_malloc( sizeof(lapack_complex_float) *
-                                ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_7;
-            }
-        }
-        /* Transpose input matrices */
-        LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
         /* Call LAPACK function and adjust info */
-        LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
-                       x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
-                       v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork,
-                       &lrwork, iwork, &info );
+        LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
+                       &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
+                       &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
+                       &ldv2t, work, &lwork, rwork, &lrwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-        /* Transpose output matrices */
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_7:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_6:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_5:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_4:
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_cuncsd_work", info );
index ad50591..5bef3cb 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cungbr( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_c_nancheck( MIN(m,k), tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_c_nancheck( MIN(m,k), tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5cce308..4159e86 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cunghr( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 751e6f0..a614694 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cunglq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 41fa1ee..c80f92a 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cungql( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2f9f760..9247dad 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cungqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 026e1a8..82fea68 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cungrq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 536ca5e..ddae703 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_cungtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4fb2780..d80bc52 100644 (file)
@@ -49,17 +49,19 @@ lapack_int LAPACKE_cunmbr( int matrix_layout, char vect, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nq = LAPACKE_lsame( side, 'l' ) ? m : n;
-    r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
-    if( LAPACKE_cge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_c_nancheck( MIN(nq,k), tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+        r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+        if( LAPACKE_cge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_c_nancheck( MIN(nq,k), tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7b307dc..592c6de 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cunmhr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7f2a809..f340c8c 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_cunmlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ab2e069..92c9881 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cunmql( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 21756ca..1ad2afa 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cunmqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2fee55c..ec96052 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_cunmrq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b33ecb6..81d788d 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_cunmrz( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_c_nancheck( k, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5f3d598..1864c41 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cunmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 38a9e20..6c96735 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_cupgtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_cpp_nancheck( n, ap ) ) {
-        return -4;
-    }
-    if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_cpp_nancheck( n, ap ) ) {
+            return -4;
+        }
+        if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c159c64..51f6d82 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_cupmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_cpp_nancheck( r, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -9;
-    }
-    if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_cpp_nancheck( r, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -9;
+        }
+        if( LAPACKE_c_nancheck( m-1, tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index 23cb7cc..960d62d 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,41 +47,44 @@ lapack_int LAPACKE_dbbcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int lwork = -1;
     double* work = NULL;
     double work_query;
-    lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dbbcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-    nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-    nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-    nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-    if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
-        return -10;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_lsame( jobu1, 'y' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
-            return -12;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( jobu2, 'y' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
-            return -14;
+        if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
-            return -16;
+        if( LAPACKE_lsame( jobu1, 'y' ) ) {
+            if( LAPACKE_dge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
+                return -12;
+            }
         }
-    }
-    if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
-            return -18;
+        if( LAPACKE_lsame( jobu2, 'y' ) ) {
+            if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+            if( LAPACKE_dge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
+                return -16;
+            }
+        }
+        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+            if( LAPACKE_dge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
+                return -18;
+            }
         }
     }
 #endif
index c4f072a..6d3b12b 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,152 +45,36 @@ lapack_int LAPACKE_dbbcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 double* work, lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+        LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &m, &p, &q,
                        theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
                        &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e,
                        work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        double* u1_t = NULL;
-        double* u2_t = NULL;
-        double* v1t_t = NULL;
-        double* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -13;
-            LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -15;
-            LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -17;
-            LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -19;
-            LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                           theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
-                           v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
-                           b22d, b22e, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_0;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_1;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_2;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_3;
-            }
-        }
-        /* Transpose input matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_dge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
-                               ldu1_t );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_dge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
-                               ldu2_t );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_dge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
-                               ldv1t_t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_dge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
-                               ldv2t_t );
-        }
-        /* Call LAPACK function and adjust info */
-        LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                       theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
-                       &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
-                       b21e, b22d, b22e, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_3:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_2:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_1:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info );
index a18d507..849b06c 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dbdsdc
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,12 +48,14 @@ lapack_int LAPACKE_dbdsdc( int matrix_layout, char uplo, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index 717038d..3b27f86 100644 (file)
@@ -46,26 +46,28 @@ lapack_int LAPACKE_dbdsqr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( ncc != 0 ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( ncc != 0 ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+                return -13;
+            }
         }
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -8;
-    }
-    if( nru != 0 ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
-            return -11;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( ncvt != 0 ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -8;
+        }
+        if( nru != 0 ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+                return -11;
+            }
+        }
+        if( ncvt != 0 ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+                return -9;
+            }
         }
     }
 #endif
index f61e11c..b32e79b 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n - 1, e, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for work arrays */
@@ -71,8 +73,8 @@ lapack_int LAPACKE_dbdsvdx( int matrix_layout, char uplo, char jobz, char range,
     }
     /* Call middle-level interface */
     info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz,  range,
-                               n, d, e, vl, vu, il, iu, ns, s, z,
-                                ldz, work, iwork);
+                                 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++ ) {
         superb[i] = iwork[i+1];
index a795110..fdee5cb 100644 (file)
 #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,
-                                       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 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 info = 0;
     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;
@@ -64,7 +64,7 @@ lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
         /* Allocate memory for temporary array(s) */
         if( LAPACKE_lsame( jobz, 'v' ) ) {
            z_t = (double*)
-              LAPACKE_malloc( sizeof(double) * ldz_t * MAX(2*n,1) );
+              LAPACKE_malloc( sizeof(double) * ldz_t * MAX(ncols_z,1) );
            if( z_t == NULL ) {
               info = LAPACK_TRANSPOSE_MEMORY_ERROR;
               goto exit_level_0;
@@ -72,8 +72,8 @@ 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,
-                               iwork, &info );
+                        &il, &iu, ns, s, z_t, &ldz_t, work,
+                        iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index b5cb340..e5a8b82 100644 (file)
@@ -37,9 +37,11 @@ lapack_int LAPACKE_ddisna( char job, lapack_int m, lapack_int n,
                            const double* d, double* sep )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ddisna_work( job, m, n, d, sep );
index ff7914c..89be123 100644 (file)
@@ -47,13 +47,15 @@ lapack_int LAPACKE_dgbbrd( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( ncc != 0 ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
-            return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -8;
+        }
+        if( ncc != 0 ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+                return -16;
+            }
         }
     }
 #endif
index 0b54a1e..40e694e 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dgbcon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1f72c74..1711778 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgbequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 230bf0b..da6bf07 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgbequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index d21fe41..2961281 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_dgbrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -9;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -9;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index df0380a..7fceeb6 100644 (file)
@@ -52,33 +52,35 @@ lapack_int LAPACKE_dgbrfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -13;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -14;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -17;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -17;
     }
 #endif
     /* Allocate memory for working array(s) */
index 8cf4243..f2e868c 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_dgbsv( int matrix_layout, lapack_int n, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_dgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
index d4998d7..7cae130 100644 (file)
@@ -50,29 +50,31 @@ lapack_int LAPACKE_dgbsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index 0db2eb2..a991bef 100644 (file)
@@ -52,34 +52,36 @@ lapack_int LAPACKE_dgbsvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -27;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -27;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index 2aac467..a08116f 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dgbtrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
index 34742c7..27e5c18 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_dgbtrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_dgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
index 1cc4d86..9363602 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dgebak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_dgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
index a463400..35eae3e 100644 (file)
@@ -42,11 +42,13 @@ lapack_int LAPACKE_dgebal( int matrix_layout, char job, lapack_int n, double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
-        LAPACKE_lsame( job, 's' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+            LAPACKE_lsame( job, 's' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
     }
 #endif
index c4221f3..5ef6c62 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dgebrd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3b0fdec..4cc6cbc 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dgecon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 24a0163..e96de37 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgeequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 61296fe..a80e2bd 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgeequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 538fc07..f80c41f 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dgees( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ff3868e..2764795 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_dgeesx( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bddde4a..460155d 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_dgeev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 227cb03..97612c1 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_dgeevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 96c2f43..a3de86a 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8541605..444a07b 100644 (file)
@@ -80,11 +80,13 @@ lapack_int LAPACKE_dgejsv( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
-    nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+        nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bd2be2c..016a45f 100644 (file)
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dgelq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
-lapack_int LAPACKE_dgelq_work( int matrix_layout, lapack_int m, lapack_int n,
-                               double* a, lapack_int lda,
-                               double* t, lapack_int tsize )
+lapack_int LAPACKE_dgelq( int matrix_layout, lapack_int m, lapack_int n,
+                          double* a, lapack_int lda,
+                          double* t, lapack_int tsize )
 {
     lapack_int info = 0;
     lapack_int lwork = -1;
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dgelq_work( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2651a1a..ce1690e 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgelq2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 572fff2..e5ce2e6 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgelqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 071e457..1862733 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dgels( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6dd96ab..6750597 100644 (file)
@@ -51,15 +51,17 @@ lapack_int LAPACKE_dgelsd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 12a8b31..ca888f1 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dgelss( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f609168..6d31823 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dgelsy( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index fd62cad..02b08df 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_dgemlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 86566d9..b4be9ea 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_dgemqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3fb17f0..4b8c661 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_dgemqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #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, nb, k, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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, nb, k, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a5902bc..cb2854c 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgeqlf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7a9717f..52f7d07 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dgeqp3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index bb5a8fd..63098b2 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dgeqpf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7f9f9d2..4c26cb7 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dgeqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7356117..ac4b858 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dgeqr2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2a7ae01..1fbccd8 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgeqrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b49fe02..856b6d1 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e17be2a..4d45fd9 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dgeqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dc34cc9..894f470 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
index b1e581e..01a9077 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
index ee64f2b..8034676 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_dgerfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b021f88..57e8bfd 100644 (file)
@@ -51,33 +51,35 @@ lapack_int LAPACKE_dgerfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -11;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -12;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
     }
 #endif
     /* Allocate memory for working array(s) */
index efdcd33..c2a6e79 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgerqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c7b6cc9..61bd91c 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dgesdd( int matrix_layout, char jobz, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index cc3b1f4..57f9208 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
index 25e8a9b..1801e86 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dgesvd( int matrix_layout, char jobu, char jobvt,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ca82202..b17c037 100644 (file)
@@ -52,14 +52,16 @@ lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
     info = LAPACKE_dgesvdx_work( matrix_layout, jobu, jobvt, range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
                                  ldu, vt, ldvt, &work_query, lwork, iwork );
     if( info != 0 ) {
         goto exit_level_0;
@@ -78,8 +80,8 @@ lapack_int LAPACKE_dgesvdx( int matrix_layout, char jobu, char jobvt, char range
     }
     /* Call middle-level interface */
     info = LAPACKE_dgesvdx_work( matrix_layout, jobu, jobvt,  range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
-                                ldu, vt, ldvt, work, lwork, iwork );
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 ldu, vt, ldvt, work, lwork, iwork );
     /* Backup significant data from working array(s) */
     for( i=0; i<12*MIN(m,n)-1; i++ ) {
         superb[i] = iwork[i+1];
index a5a2cb6..b326cca 100644 (file)
 #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, 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 m, lapack_int n, 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 = 0;
     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;
@@ -84,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;
         }
@@ -114,8 +114,8 @@ lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char
         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_t, &lda_t, &vl, &vu,
-                                       &il, &iu, ns, s, u_t, &ldu_t, vt_t,
-                            &ldvt_t, work, &lwork, iwork, &info );
+                        &il, &iu, ns, s, u_t, &ldu_t, vt_t,
+                        &ldvt_t, work, &lwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index 542e52f..c375d25 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_dgesvj( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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;
-    }
-    if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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;
+        }
+        if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 48dcf73..95554b7 100644 (file)
@@ -49,28 +49,30 @@ lapack_int LAPACKE_dgesvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 6022d3b..716ba1f 100644 (file)
@@ -51,33 +51,35 @@ lapack_int LAPACKE_dgesvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 3cf976d..b4e2b16 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dgetf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgetf2_work( matrix_layout, m, n, a, lda, ipiv );
index d5451c6..ef2c0e2 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dgetrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgetrf_work( matrix_layout, m, n, a, lda, ipiv );
index fe1919d..4c808be 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dgetrf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgetrf2_work( matrix_layout, m, n, a, lda, ipiv );
index 900fe30..c8b427e 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dgetri( int matrix_layout, lapack_int n, double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 90d8f16..8af1082 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dgetrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
index 57563f5..9adc61d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dgetsls( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a3f1284..af89056 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_dggbak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_dggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
index 19be89b..00e2397 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_dggbal( int matrix_layout, char job, lapack_int n, double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
-    }
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-            return -6;
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 7aaed6a..5c4a12f 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dgges( int matrix_layout, char jobvsl, char jobvsr, char sort
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9aae144..1d87cac 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dgges3( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 62ee7b1..36addda 100644 (file)
@@ -54,12 +54,14 @@ lapack_int LAPACKE_dggesx( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2ed6c50..4aa2e67 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_dggev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 180b70d..80a115e 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dggev3( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d62e944..ee9e0f5 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_dggevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2be615d..9f2c223 100644 (file)
@@ -46,15 +46,17 @@ lapack_int LAPACKE_dggglm( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 106f937..478a41d 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_dgghd3( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index af019b9..5092ba3 100644 (file)
@@ -44,21 +44,23 @@ lapack_int LAPACKE_dgghrd( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index ecb005b..27e0281 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_dgglse( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( m, c, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( p, d, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( m, c, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( p, d, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9e3c035..292548d 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_dggqrf( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b6fddf4..42f8133 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_dggrqf( int matrix_layout, lapack_int m, lapack_int p,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8647d9a..e7e06c6 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_dggsvd( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ee3bcfc..69dce19 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dggsvd3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     info = LAPACKE_dggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l,
index 9ca3280..86e4b9c 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_dggsvp( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index feb640c..60a679f 100644 (file)
@@ -51,18 +51,20 @@ lapack_int LAPACKE_dggsvp3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal size for working array */
index b8f3296..ff61d9e 100644 (file)
@@ -41,21 +41,23 @@ lapack_int LAPACKE_dgtcon( char norm, lapack_int n, const double* dl,
     lapack_int* iwork = NULL;
     double* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9645276..b7ff5b3 100644 (file)
@@ -49,33 +49,35 @@ lapack_int LAPACKE_dgtrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+            return -11;
+        }
+        if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index fbdea79..b89be46 100644 (file)
@@ -42,18 +42,20 @@ lapack_int LAPACKE_dgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
index c10bb12..add4d8a 100644 (file)
@@ -49,37 +49,39 @@ lapack_int LAPACKE_dgtsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
-            return -11;
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n-1, dlf, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n-1, duf, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 056b8cd..64a7152 100644 (file)
@@ -37,15 +37,17 @@ lapack_int LAPACKE_dgttrf( lapack_int n, double* dl, double* d, double* du,
                            double* du2, lapack_int* ipiv )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dgttrf_work( n, dl, d, du, du2, ipiv );
index 8825e2d..1dd61dc 100644 (file)
@@ -43,21 +43,23 @@ lapack_int LAPACKE_dgttrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n-2, du2, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
index 8c23bdf..d1f355b 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_dhgeqz( int matrix_layout, char job, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -17;
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -17;
+            }
         }
     }
 #endif
index 5f574e1..1823486 100644 (file)
@@ -48,25 +48,27 @@ lapack_int LAPACKE_dhsein( int matrix_layout, char job, char eigsrc, char initv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -13;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_d_nancheck( n, wi, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( n, wr, 1 ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_d_nancheck( n, wi, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( n, wr, 1 ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 59beade..9672dc6 100644 (file)
@@ -47,13 +47,15 @@ lapack_int LAPACKE_dhseqr( int matrix_layout, char job, char compz, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 1ccf0a9..7f58b23 100644 (file)
@@ -37,12 +37,14 @@ lapack_int LAPACKE_dlacn2( lapack_int n, double* v, double* x, lapack_int* isgn,
                            double* est, lapack_int* kase, lapack_int* isave )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, x, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n, x, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dlacn2_work( n, v, x, isgn, est, kase, isave );
index 8839d8c..32b5e4b 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dlacpy( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dlacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
index 6b2b8b3..e9f9aef 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dlag2s( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dlag2s_work( matrix_layout, m, n, a, lda, sa, ldsa );
index 78be9ad..6ca8739 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dlagge( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index da5fe37..1293fc7 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dlagsy( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4d0cea1..0186768 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dlange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ double LAPACKE_dlange( int matrix_layout, char norm, lapack_int m,
                            lapack_int n, const double* a, lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dlange", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d3a478c..43d48c8 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dlange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,37 +38,42 @@ double LAPACKE_dlange_work( int matrix_layout, char norm, lapack_int m,
                                 double* work )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
+    char norm_lapack;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
+        /* Call LAPACK function */
         res = LAPACK_dlange( &norm, &m, &n, a, &lda, work );
-        if( info < 0 ) {
-            info = info - 1;
-        }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int lda_t = MAX(1,m);
-        double* a_t = NULL;
+        double* work_lapack = NULL;
         /* Check leading dimension(s) */
         if( lda < n ) {
             info = -6;
             LAPACKE_xerbla( "LAPACKE_dlange_work", info );
             return info;
         }
-        /* Allocate memory for temporary array(s) */
-        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;
+        if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) {
+            norm_lapack = 'i';
+        } else if( LAPACKE_lsame( norm, 'i' ) ) {
+            norm_lapack = '1';
+        } else {
+            norm_lapack = norm;
+        }
+        /* Allocate memory for work array(s) */
+        if( LAPACKE_lsame( norm_lapack, 'i' ) ) {
+            work_lapack = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+            if( work_lapack == NULL ) {
+                info = LAPACK_WORK_MEMORY_ERROR;
+                goto exit_level_0;
+            }
         }
-        /* Transpose input matrices */
-        LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
-        /* Call LAPACK function and adjust info */
-        res = LAPACK_dlange( &norm, &m, &n, a_t, &lda_t, work );
-        info = 0;  /* LAPACK call is ok! */
+        /* Call LAPACK function */
+        res = LAPACK_dlange( &norm_lapack, &n, &m, a, &lda, work_lapack );
         /* Release memory and exit */
-        LAPACKE_free( a_t );
+        if( work_lapack ) {
+            LAPACKE_free( work_lapack );
+        }
 exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+        if( info == LAPACK_WORK_MEMORY_ERROR ) {
             LAPACKE_xerbla( "LAPACKE_dlange_work", info );
         }
     } else {
index e970fec..931e83f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dlansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ double LAPACKE_dlansy( int matrix_layout, char norm, char uplo, lapack_int n,
                            const double* a, lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dlansy", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6468c91..b3a6872 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dlansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,7 +38,7 @@ double LAPACKE_dlansy_work( int matrix_layout, char norm, char uplo,
                                 double* work )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         res = LAPACK_dlansy( &norm, &uplo, &n, a, &lda, work );
index 480f31d..ce625c7 100644 (file)
@@ -38,16 +38,18 @@ double LAPACKE_dlantr( int matrix_layout, char norm, char uplo, char diag,
                            lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dlantr", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7e837e8..97068bb 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dlapmr( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dlapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 40ab46c..6c381bc 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dlapmt( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dlapmt_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 4d636bb..7e9fe72 100644 (file)
 double LAPACKE_dlapy2( double x, double y )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_dlapy2_work( x, y );
index 45bbaba..005e59e 100644 (file)
 double LAPACKE_dlapy3( double x, double y, double z )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( 1, &z, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( 1, &z, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dlapy3_work( x, y, z );
index b1bc5d4..55c26f4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dlarfb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,7 +40,7 @@ lapack_int LAPACKE_dlarfb( int matrix_layout, char side, char trans, char direct
                            lapack_int ldc )
 {
     lapack_int info = 0;
-    lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+    lapack_int ldwork;
     double* work = NULL;
     lapack_int ncols_v, nrows_v;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -48,57 +48,66 @@ lapack_int LAPACKE_dlarfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
-    nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -13;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
-        if( k > nrows_v ) {
-            LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+        nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -13;
         }
-        if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k,
-            &v[(nrows_v-k)*ldv], ldv ) )
-            return -9;
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( k > ncols_v ) {
-            LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
-            return -8;
+        if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+            if( k > nrows_v ) {
+                LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k,
+                &v[(nrows_v-k)*ldv], ldv ) )
+                return -9;
+            if( LAPACKE_dge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_dtr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( k > ncols_v ) {
+                LAPACKE_xerbla( "LAPACKE_dlarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+                ldv ) )
+                return -9;
+            if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+                return -9;
         }
-        if( LAPACKE_dtr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
-            ldv ) )
-            return -9;
-        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
-            return -9;
     }
 #endif
+    if( LAPACKE_lsame( side, 'l' ) ) {
+        ldwork = n;
+    } else if( LAPACKE_lsame( side, 'r' ) ) {
+        ldwork = m;
+    } else {
+        ldwork = 1;
+    }
     /* Allocate memory for working array(s) */
     work = (double*)LAPACKE_malloc( sizeof(double) * ldwork * MAX(1,k) );
     if( work == NULL ) {
index 33e4b29..0f627b3 100644 (file)
@@ -37,12 +37,14 @@ lapack_int LAPACKE_dlarfg( lapack_int n, double* alpha, double* x,
                            lapack_int incx, double* tau )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, alpha, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, alpha, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dlarfg_work( n, alpha, x, incx, tau );
index 6c3a4e2..82cc727 100644 (file)
@@ -44,16 +44,18 @@ lapack_int LAPACKE_dlarft( int matrix_layout, char direct, char storev,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
-    nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+        nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dlarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
index ee94cc3..ab4a58e 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_dlarfx( int matrix_layout, char side, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &tau, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( m, v, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &tau, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( m, v, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dlarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
index 2613305..63913ba 100644 (file)
@@ -37,12 +37,14 @@ lapack_int LAPACKE_dlartgp( double f, double g, double* cs, double* sn,
                             double* r )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &f, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_d_nancheck( 1, &g, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &f, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_d_nancheck( 1, &g, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_dlartgp_work( f, g, cs, sn, r );
index 2c0c031..de106cb 100644 (file)
@@ -37,15 +37,17 @@ lapack_int LAPACKE_dlartgs( double x, double y, double sigma, double* cs,
                             double* sn )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &sigma, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &sigma, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_d_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_d_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_dlartgs_work( x, y, sigma, cs, sn );
index b35b9b2..5b579a5 100644 (file)
@@ -43,68 +43,70 @@ lapack_int LAPACKE_dlascl( int matrix_layout, char type, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    switch (type) {
-    case 'G':
-        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        switch (type) {
+        case 'G':
+            if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+                return -9;
+            }
+            break;
+        case 'L':
+            // 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 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' - 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' - 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' -  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;
         }
-        break;
-    case 'L':
-        // 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 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' - 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' - 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' -  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
     return LAPACKE_dlascl_work( matrix_layout, type, kl, ku, cfrom, cto, m,  n, a, lda );
index cbd52b2..c286c18 100644 (file)
@@ -49,11 +49,13 @@ lapack_int LAPACKE_dlaset( int matrix_layout, char uplo, lapack_int m,
 *****************************************************************************/
 
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+            return -6;
+        }
     }
 #endif
 
index ba8a244..844343a 100644 (file)
 lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dlasrt_work( id, n, d );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dlassq.c b/lapack-netlib/LAPACKE/src/lapacke_dlassq.c
new file mode 100644 (file)
index 0000000..a564240
--- /dev/null
@@ -0,0 +1,53 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function dlassq
+* Author: Julien langou
+* Generated February 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlassq( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
+        if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( 1, scale, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, sumsq, 1 ) ) {
+            return -5;
+        }
+    }
+#endif
+    return LAPACKE_dlassq_work( n, x, incx, scale, sumsq );
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dlassq_work.c b/lapack-netlib/LAPACKE/src/lapacke_dlassq_work.c
new file mode 100644 (file)
index 0000000..9d04bfc
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function dlassq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dlassq_work( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq )
+{
+    lapack_int info = 0;
+    LAPACK_dlassq( &n, x, &incx, scale, sumsq );
+    return info;
+}
index b988bba..bd07b35 100644 (file)
@@ -42,19 +42,21 @@ lapack_int LAPACKE_dlaswp( int matrix_layout, lapack_int n, double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-/*****************************************************************************
-*      Disable the check as is below, the check below was checking for NaN
-*      from lda to n since there is no (obvious) way to knowing m. This is not
-*      a good idea. We could get a lower bound of m by scanning from ipiv. Or
-*      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
-*      the buggy Nan check.
-*      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
-*****************************************************************************/
-/*  if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) {
-*       return -3;
-*   }
-*/
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+    /*****************************************************************************
+    *      Disable the check as is below, the check below was checking for NaN
+    *      from lda to n since there is no (obvious) way to knowing m. This is not
+    *      a good idea. We could get a lower bound of m by scanning from ipiv. Or
+    *      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
+    *      the buggy Nan check.
+    *      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
+    *****************************************************************************/
+    /*  if( LAPACKE_dge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+    *       return -3;
+    *   }
+    */
+    }
 #endif
     return LAPACKE_dlaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
 }
index 027c25f..b2b9c07 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dlaswp
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index 6b3f83e..a762bd2 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_dlatms( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 89cefa4..d873f04 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dlauum( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dlauum_work( matrix_layout, uplo, n, a, lda );
index d59c4ea..8d5a329 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_dopgtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e0f87b2..93d3d3d 100644 (file)
@@ -47,16 +47,18 @@ lapack_int LAPACKE_dopmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dsp_nancheck( r, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dsp_nancheck( r, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index a32feb5..82dbdeb 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dorbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,28 +45,31 @@ lapack_int LAPACKE_dorbdb( int matrix_layout, char trans, char signs,
     lapack_int lwork = -1;
     double* work = NULL;
     double work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dorbdb", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -9;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -11;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -13;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -9;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -11;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c33cc8f..febe9d9 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dorbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -43,115 +43,35 @@ lapack_int LAPACKE_dorbdb_work( int matrix_layout, char trans, char signs,
                                 lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+        LAPACK_dorbdb( &ltrans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
                        x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
                        tauq1, tauq2, work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        double* x11_t = NULL;
-        double* x12_t = NULL;
-        double* x21_t = NULL;
-        double* x22_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldx11 < q ) {
-            info = -8;
-            LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -10;
-            LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
-                           &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
-                           taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (double*)
-            LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
-        }
-        x22_t = (double*)
-            LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        /* Transpose input matrices */
-        LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
-        /* Call LAPACK function and adjust info */
-        LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
-                       &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
-                       taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        /* Release memory and exit */
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_dorbdb_work", info );
index a240ef1..a103bf0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dorcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,28 +48,31 @@ lapack_int LAPACKE_dorcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int* iwork = NULL;
     double* work = NULL;
     double work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dorcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -11;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -13;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -15;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -17;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -11;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -13;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -15;
+        }
+        if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -17;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 43ca0b6..ec298ce 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dorcsd2by1
 * Author: Intel Corporation
-* Generated December 2016
+* Generated November 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -50,17 +50,18 @@ lapack_int LAPACKE_dorcsd2by1( int matrix_layout, char jobu1, char jobu2,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 =  p ;
-    nrows_x21 =  m-p ;
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_x11 = p;
+        nrows_x21 = m-p;
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+            return -9;
+        }
     }
-
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -9;
-    }
-
 #endif
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
index 44e3c93..d8f9e1a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dorcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,216 +46,36 @@ lapack_int LAPACKE_dorcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int* iwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
-        LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
-                       theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
-                       work, &lwork, iwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        double* x11_t = NULL;
-        double* x12_t = NULL;
-        double* x21_t = NULL;
-        double* x22_t = NULL;
-        double* u1_t = NULL;
-        double* u2_t = NULL;
-        double* v1t_t = NULL;
-        double* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -21;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -23;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -25;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -27;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldx11 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -16;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -18;
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
-                           &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
-                           x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
-                           &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork,
-                           &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (double*)
-            LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
         }
-        x22_t = (double*)
-            LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_4;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_5;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_6;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (double*)
-                LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_7;
-            }
-        }
-        /* Transpose input matrices */
-        LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
         /* Call LAPACK function and adjust info */
-        LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
-                       x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
-                       v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork,
-                       &info );
+        LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
+                       &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
+                       &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
+                       &ldv2t, work, &lwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-        /* Transpose output matrices */
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_7:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_6:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_5:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_4:
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_dorcsd_work", info );
index 9d94172..5547c47 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorgbr( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( MIN(m,k), tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( MIN(m,k), tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4247590..5faaeb1 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorghr( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5e7f182..702f063 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorglq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2263c65..05d4e7f 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorgql( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 82c2210..078062b 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorgqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 09232da..5387672 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dorgrq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d9ab10d..86184b7 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dorgtr( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index bee4b1a..9904ec5 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dormbr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,18 +48,20 @@ lapack_int LAPACKE_dormbr( int matrix_layout, char vect, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nq = LAPACKE_lsame( side, 'l' ) ? m : n;
-    ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
-    ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq;
-    if( LAPACKE_dge_nancheck( matrix_layout, ar, ac, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( MIN(nq,k), tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+        ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+        ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq;
+        if( LAPACKE_dge_nancheck( matrix_layout, ar, ac, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_d_nancheck( MIN(nq,k), tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1b6d34c..de4355a 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_dormhr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e4bf0c1..1e50d18 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dormlq
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,16 +47,18 @@ lapack_int LAPACKE_dormlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, k, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, k, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7b383d0..a326fef 100644 (file)
@@ -51,8 +51,8 @@ lapack_int LAPACKE_dormlq_work( int matrix_layout, char side, char trans,
         lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
         lapack_int lda_t = MAX(1,k);
         lapack_int ldc_t = MAX(1,m);
-       double *a_t = NULL;
-       double *c_t = NULL;
+        double *a_t = NULL;
+        double *c_t = NULL;
         /* Check leading dimension(s) */
         if( lda < r ) {
             info = -8;
index 32f6281..11e9f07 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_dormql( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1c997a7..99d5a85 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_dormqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d784c2f..a1d6598 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dormrq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6e4eed2..d1be944 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dormrz( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_d_nancheck( k, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 92b9e08..05e4c57 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_dormtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( m-1, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0e5a156..382f194 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dpbcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e407c81..8bc8a9f 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dpbequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
index 5acfb5c..71b1655 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_dpbrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ec21739..b0342cb 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpbstf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
index 96ceab9..e77bba8 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dpbsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index e3af322..0baf503 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_dpbsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 05f1e40..256557f 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpbtrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
index c78e43c..f624d29 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dpbtrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index 31fb842..85148ba 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpftrf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpftrf_work( matrix_layout, transr, uplo, n, a );
index 75b93b9..5bcdac6 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpftri( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpftri_work( matrix_layout, transr, uplo, n, a );
index 210b76f..fef567f 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dpftrs( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpf_nancheck( n, a ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpf_nancheck( n, a ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
index 72ed8a8..34ac297 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dpocon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 756dc10..ba7ad1d 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dpoequ( int matrix_layout, lapack_int n, const double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
index 2ffefb3..ce6378b 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dpoequb( int matrix_layout, lapack_int n, const double* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
index b8057ed..a2cf8f0 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_dporfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 81dd86c..d9674d2 100644 (file)
@@ -50,28 +50,30 @@ lapack_int LAPACKE_dporfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -21;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -10;
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -21;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -13;
     }
 #endif
     /* Allocate memory for working array(s) */
index 021ae42..a8602a4 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index 81024df..25ddb42 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_dposvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 54d33e7..27fc3ba 100644 (file)
@@ -50,26 +50,28 @@ lapack_int LAPACKE_dposvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 1d60ebe..e69d399 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpotrf( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dpotrf_work( matrix_layout, uplo, n, a, lda );
index de3a926..06390dc 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpotrf2( int matrix_layout, char uplo, lapack_int n, double*
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dpotrf2_work( matrix_layout, uplo, n, a, lda );
index d4940d2..1bacec9 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpotri( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dpotri_work( matrix_layout, uplo, n, a, lda );
index 3573697..17fa8c8 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dpotrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index be382bb..985a705 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_dppcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 503e18a..f444e7c 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dppequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
index bd04a55..36f1c0c 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_dpprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 57782f3..90d1272 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dppsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index 5b9832e..c427840 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_dppsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dpp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dpp_nancheck( n, afp ) ) {
+                return -7;
+            }
         }
-    }
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -9;
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 1cdc3ac..2b5c7a7 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dpptrf_work( matrix_layout, uplo, n, ap );
index 601a4a1..06d2594 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dpptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dpptri_work( matrix_layout, uplo, n, ap );
index 317e9cc..9336f39 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dpptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index 57a5072..4c2f6ca 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_dpstrf( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7b5def4..48b49c2 100644 (file)
@@ -39,15 +39,17 @@ lapack_int LAPACKE_dptcon( lapack_int n, const double* d, const double* e,
     lapack_int info = 0;
     double* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d1d85cc..9f69724 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_dpteqr( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 97b220b..3c0c967 100644 (file)
@@ -46,24 +46,26 @@ lapack_int LAPACKE_dptrfs( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 60862a8..df309da 100644 (file)
@@ -41,15 +41,17 @@ lapack_int LAPACKE_dptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
index e6964af..6d9c030 100644 (file)
@@ -46,24 +46,26 @@ lapack_int LAPACKE_dptsvx( int matrix_layout, char fact, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n-1, ef, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index d665270..c487553 100644 (file)
 lapack_int LAPACKE_dpttrf( lapack_int n, double* d, double* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dpttrf_work( n, d, e );
index 79a2bed..88a962a 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_dpttrs( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dpttrs_work( matrix_layout, n, nrhs, d, e, b, ldb );
index 8b0bffb..ac2b053 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dsbev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3ad34a6..79cd253 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_dsbev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 96f0fcb..4ecd1b5 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_dsbevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a197c3f..b0ccc0b 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_dsbevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5f8c374..cd84a08 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_dsbevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 7188efc..256bf72 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_dsbevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 017cb18..8100293 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dsbgst( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6206e2e..c313031 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dsbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index cc33f23..36f912e 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_dsbgvd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8e9b3d3..3a28a79 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_dsbgvx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -18;
-    }
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -15;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -18;
+        }
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -15;
+            }
         }
     }
 #endif
index c1c9c03..c7ad8ce 100644 (file)
@@ -44,13 +44,15 @@ lapack_int LAPACKE_dsbtrd( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( vect, 'u' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( vect, 'u' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 2342e92..603e093 100644 (file)
@@ -44,20 +44,22 @@ lapack_int LAPACKE_dsfrk( int matrix_layout, char transr, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
-    na = LAPACKE_lsame( trans, 'n' ) ? n : k;
-    if( LAPACKE_dge_nancheck( matrix_layout, na, ka, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_dpf_nancheck( n, c ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+        na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+        if( LAPACKE_dge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_dpf_nancheck( n, c ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_dsfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
index be1e414..9d6c39d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index cc65fd0..217e5bd 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dspcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d3a07e9..c662cfe 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dspev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dca7464..3b6b25d 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dspevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index aa7e38c..1729763 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_dspevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 1ba890a..20ea58a 100644 (file)
@@ -41,12 +41,14 @@ lapack_int LAPACKE_dspgst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dsp_nancheck( n, bp ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dsp_nancheck( n, bp ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dspgst_work( matrix_layout, itype, uplo, n, ap, bp );
index b7e32af..818f131 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_dspgv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_dsp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9c1861b..8ca478e 100644 (file)
@@ -49,12 +49,14 @@ lapack_int LAPACKE_dspgvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_dsp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index cc2cab7..82a6217 100644 (file)
@@ -48,24 +48,26 @@ lapack_int LAPACKE_dspgvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -13;
-    }
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_dsp_nancheck( n, bp ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -10;
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_dsp_nancheck( n, bp ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 46b062f..68ad48b 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7b3079f..ef0feee 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_dsprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 548000a..48d94c4 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dspsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index afa5907..6e2d9a4 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_dspsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dsp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dsp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 8d01ecd..232f33f 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dsptrd( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dsptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
index 4ba7bd8..9c3a898 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dsptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dsptrf_work( matrix_layout, uplo, n, ap, ipiv );
index b13f7c6..728e0b8 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dsptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 492bf21..1d7f313 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dsptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dsptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index fb1646c..011770b 100644 (file)
@@ -43,24 +43,26 @@ lapack_int LAPACKE_dstebz( char range, char order, lapack_int n, double vl,
     lapack_int* iwork = NULL;
     double* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -5;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -4;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -5;
+            }
         }
     }
 #endif
index a974f45..4f88a04 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_dstedc( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 1d63e12..9191f0a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dstegr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -51,24 +51,26 @@ lapack_int LAPACKE_dstegr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 140a1f5..4447993 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dstein
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,15 +46,17 @@ lapack_int LAPACKE_dstein( int matrix_layout, lapack_int n, const double* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, w, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n, w, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7e72f44..8dc2bd2 100644 (file)
@@ -52,18 +52,20 @@ lapack_int LAPACKE_dstemr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 947e883..6a25fef 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dstemr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -55,7 +55,7 @@ lapack_int LAPACKE_dstemr_work( int matrix_layout, char jobz, char range,
         lapack_int ldz_t = MAX(1,n);
         double* z_t = NULL;
         /* Check leading dimension(s) */
-        if( ldz < n ) {
+        if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) {
             info = -14;
             LAPACKE_xerbla( "LAPACKE_dstemr_work", info );
             return info;
index 81f325e..8984fdf 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_dsteqr( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 29f46cf..3553727 100644 (file)
 lapack_int LAPACKE_dsterf( lapack_int n, double* d, double* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_dsterf_work( n, d, e );
index 6e575b1..6811d57 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dstev
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -43,12 +43,14 @@ lapack_int LAPACKE_dstev( int matrix_layout, char jobz, lapack_int n, double* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index be2f092..e824a16 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dstevd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,12 +48,14 @@ lapack_int LAPACKE_dstevd( int matrix_layout, char jobz, lapack_int n, double* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index db1a99c..fd53e0a 100644 (file)
@@ -51,24 +51,26 @@ lapack_int LAPACKE_dstevr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 45f161d..9c89f94 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dstevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,24 +47,26 @@ lapack_int LAPACKE_dstevx( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 5846005..ba68bf7 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dsycon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 40503d1..f846bb4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsycon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_dsycon_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int info = 0;
     lapack_int* iwork = NULL;
     double* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dsycon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1e3f78e..cca9be4 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dsyconv( int matrix_layout, char uplo, char way, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Call middle-level interface */
index 1daa80d..cfa0452 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dsyequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d3ca129..baac994 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsyev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1bac918..8d16899 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsyev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 36afe2c..870148b 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dsyevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 627605a..a550739 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_dsyevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 62f9444..bae72f6 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_dsyevr( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index ee191d0..dad2020 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_dsyevr_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 74cabe5..f3e3ea6 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dsyevr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -52,8 +52,9 @@ lapack_int LAPACKE_dsyevr_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index ea11abf..13980e1 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_dsyevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 29b6fa5..caaff5a 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_dsyevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 65f6848..f4ded1d 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dsyevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -51,8 +51,9 @@ lapack_int LAPACKE_dsyevx_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 6a87935..800a30b 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dsygst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_dsygst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
index 9d99a87..533b6a4 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsygv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 018e038..974b63e 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsygv_2stage( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 910b3b6..907ad50 100644 (file)
@@ -49,12 +49,14 @@ lapack_int LAPACKE_dsygvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f76e548..02d54d7 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_dsygvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index b5f41c7..b0829c9 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function dsygvx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index 44e4fb9..78fce77 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_dsyrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7525f7b..63d4c68 100644 (file)
@@ -51,28 +51,30 @@ lapack_int LAPACKE_dsyrfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index e721b0a..ca8347f 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsysv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ea8d4f9..114794b 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsysv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage.c
new file mode 100644 (file)
index 0000000..54a3788
--- /dev/null
@@ -0,0 +1,88 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function dsysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, double* a, lapack_int lda,
+                          double* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    double* work = NULL;
+    double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_dsysv_aa_2stage_work( matrix_layout, uplo, n, nrhs, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = (lapack_int)work_query;
+    /* Allocate memory for work arrays */
+    work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_dsysv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_dsysv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..d74e1ce
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function dsysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, double* a, lapack_int lda,
+                               double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, double* b, lapack_int ldb,
+                               double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsysv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        double* a_t = NULL;
+        double* tb_t = NULL;
+        double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_dsysv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        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;
+        }
+        tb_t = (double*)LAPACKE_malloc( sizeof(double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsysv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_dsysv_aa_2stage_work", info );
+    }
+    return info;
+}
index ba9eaa3..df34aba 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsysv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,15 +46,14 @@ lapack_int LAPACKE_dsysv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9c77733..266cc53 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsysv_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 22af16d..e285350 100644 (file)
@@ -50,17 +50,19 @@ lapack_int LAPACKE_dsysvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index 6fb6143..d4edaf4 100644 (file)
@@ -51,26 +51,28 @@ lapack_int LAPACKE_dsysvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index eed600c..02fa6be 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dsyswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index e00da39..40a704c 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsytrd( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 49c7723..d6bcaa6 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsytrf( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1e81f6a..046621d 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsytrf_aa( int matrix_layout, char uplo, lapack_int n, double
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..82e7335
--- /dev/null
@@ -0,0 +1,85 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function dsytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          double* a, lapack_int lda,
+                          double* tb, lapack_int ltb,  
+                          lapack_int* ipiv, lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    double* work = NULL;
+    double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_dsytrf_aa_2stage_work( matrix_layout, uplo, n, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2,
+                               &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = (lapack_int)work_query;
+    /* Allocate memory for work arrays */
+    work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_dsytrf_aa_2stage_work( matrix_layout, uplo, n,
+                               a, lda, tb, ltb, ipiv, ipiv2,
+                               work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_dsytrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..2cc7b9a
--- /dev/null
@@ -0,0 +1,109 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function dsytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               double* a, lapack_int lda,
+                               double* tb, lapack_int ltb,  
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsytrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        double* a_t = NULL;
+        double* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_dsytrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        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;
+        }
+        tb_t = (double*)LAPACKE_malloc( sizeof(double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsytrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_dsytrf_aa_2stage_work", info );
+    }
+    return info;
+}
index 0d9cade..a2d433c 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsytrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,12 +45,11 @@ lapack_int LAPACKE_dsytrf_rk( int matrix_layout, char uplo, lapack_int n, double
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 99aa50a..1971417 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsytrf_rook( int matrix_layout, char uplo, lapack_int n, doub
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b912494..fcda55d 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_dsytri( int matrix_layout, char uplo, lapack_int n, double* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8ab5d82..1c5662c 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dsytri2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3e5766a..bdf6395 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dsytri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b0960da..acf2c55 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsytri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,17 +40,20 @@ lapack_int LAPACKE_dsytri_3( int matrix_layout, char uplo, lapack_int n, double*
     lapack_int lwork = -1;
     double* work = NULL;
     double work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_dsytri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8b7624a..b2a0149 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dsytrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dsytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index e0124ee..46c9019 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 59b83f9..a701b95 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsytrs_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -43,17 +43,19 @@ lapack_int LAPACKE_dsytrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_dsytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
-                                                         e, ipiv, b, ldb );
+                                  e, ipiv, b, ldb );
 }
index 6adb343..2d3c5a3 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function dsytrs_aa
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,14 @@ lapack_int LAPACKE_dsytrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
@@ -60,7 +62,7 @@ lapack_int LAPACKE_dsytrs_aa( int matrix_layout, char uplo, lapack_int n,
     if( info != 0 ) {
         goto exit_level_0;
     }
-       lwork = (lapack_int)work_query;
+    lwork = (lapack_int)work_query;
     /* Allocate memory for work arrays */
     work = (double*)
         LAPACKE_malloc( sizeof(double) * lwork );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..49411d0
--- /dev/null
@@ -0,0 +1,65 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function dsytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, double* a, lapack_int lda,
+                          double* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Call middle-level interface */
+    info = LAPACKE_dsytrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb );
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_dsytrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..9d76d0a
--- /dev/null
@@ -0,0 +1,114 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function dsytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_dsytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, double* a, lapack_int lda,
+                               double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsytrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        double* a_t = NULL;
+        double* tb_t = NULL;
+        double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        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;
+        }
+        tb_t = (double*)LAPACKE_malloc( sizeof(double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (double*)LAPACKE_malloc( sizeof(double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_dge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_dsytrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_dsytrs_aa_2stage_work", info );
+    }
+    return info;
+}
index 85c4e5f..42002a5 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dsytrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dsytrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index f029046..fbcf42b 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dtbcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0776721..719e238 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dtbrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3740be9..f868e18 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_dtbtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_dtbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
index 4600cbf..4c9896b 100644 (file)
@@ -43,18 +43,20 @@ lapack_int LAPACKE_dtfsm( int matrix_layout, char transr, char side, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( IS_D_NONZERO(alpha) ) {
-        if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( IS_D_NONZERO(alpha) ) {
+            if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
-        return -9;
-    }
-    if( IS_D_NONZERO(alpha) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-            return -11;
+        if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+            return -9;
+        }
+        if( IS_D_NONZERO(alpha) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+                return -11;
+            }
         }
     }
 #endif
index b60db92..fbe7a9e 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtftri( int matrix_layout, char transr, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dtftri_work( matrix_layout, transr, uplo, diag, n, a );
index 1c68759..2b88229 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtfttp( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtfttp_work( matrix_layout, transr, uplo, n, arf, ap );
index b6440cd..748b31f 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dtfttr( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
index e796db1..c595831 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_dtgevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, p, ldp ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, s, lds ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, s, lds ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 8878995..b5ceb6d 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_dtgexc( int matrix_layout, lapack_logical wantq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
-    }
-    if( wantq ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
+        if( wantq ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -9;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index b654e2f..2cb7fce 100644 (file)
@@ -53,21 +53,23 @@ lapack_int LAPACKE_dtgsen( int matrix_layout, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( wantq ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -16;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( wantq ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -14;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -16;
+            }
         }
     }
 #endif
index d573619..7cc8cf9 100644 (file)
@@ -49,32 +49,34 @@ lapack_int LAPACKE_dtgsja( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -14;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, m, m, u, ldu ) ) {
-            return -18;
+        if( LAPACKE_dge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
         }
-    }
-    if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, p, p, v, ldv ) ) {
-            return -20;
+        if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -14;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+                return -18;
+            }
+        }
+        if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+                return -20;
+            }
         }
     }
 #endif
index bbcc1fd..1dda79c 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_dtgsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index e8a3b36..feacd3b 100644 (file)
@@ -51,24 +51,26 @@ lapack_int LAPACKE_dtgsyl( int matrix_layout, char trans, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, m, d, ldd ) ) {
-        return -12;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, e, lde ) ) {
-        return -14;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, f, ldf ) ) {
-        return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+            return -12;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, e, lde ) ) {
+            return -14;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+            return -16;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a5c1360..67cedac 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_dtpcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1408904..0b00dcc 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_dtpmqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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, nb, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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, nb, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ea4202a..99b764c 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_dtpqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0e18330..299089e 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_dtpqrt2( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_dtpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
index 7c4ce92..5191f79 100644 (file)
@@ -49,30 +49,32 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #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, k, k, t, ldt ) ) {
-        return -12;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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, k, k, t, ldt ) ) {
+            return -12;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     if (side=='l' ||  side=='L') {
index 6ebb5c8..43a1321 100644 (file)
@@ -46,15 +46,17 @@ lapack_int LAPACKE_dtprfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a643a86..4e84c57 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtptri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtptri_work( matrix_layout, uplo, diag, n, ap );
index ffbd916..2b804b8 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dtptrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_dtptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
index 0e59224..df2ae2c 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtpttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtpttf_work( matrix_layout, transr, uplo, n, ap, arf );
index e9de508..11194df 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtpttr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dtpttr_work( matrix_layout, uplo, n, ap, a, lda );
index 40e4438..421d17d 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dtrcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 29078d6..a76e3b4 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_dtrevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 695c497..4808a75 100644 (file)
@@ -44,14 +44,16 @@ lapack_int LAPACKE_dtrexc( int matrix_layout, char compq, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -6;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -4;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -4;
     }
 #endif
     /* Allocate memory for working array(s) */
index cc464bb..9c651fe 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_dtrrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b671a35..521bc27 100644 (file)
@@ -51,14 +51,16 @@ lapack_int LAPACKE_dtrsen( int matrix_layout, char job, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
     }
 #endif
     /* Query optimal working array(s) size */
index 01a124a..b7e710e 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_dtrsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_dge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 48e9993..3fe0813 100644 (file)
@@ -44,15 +44,17 @@ lapack_int LAPACKE_dtrsyl( int matrix_layout, char trana, char tranb,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_dtrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
index d8fa426..cdb92a6 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtrtri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtrtri_work( matrix_layout, uplo, diag, n, a, lda );
index 8056410..ae75b02 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_dtrtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dtr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_dtrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
index ca2916c..66d1e5a 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_dtrttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_dtrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
index 0386d09..89f01dc 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_dtrttp( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_dtrttp_work( matrix_layout, uplo, n, a, lda, ap );
index b63d662..60ed28e 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_dtzrzf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_nancheck.c b/lapack-netlib/LAPACKE/src/lapacke_nancheck.c
new file mode 100644 (file)
index 0000000..c63e8e8
--- /dev/null
@@ -0,0 +1,60 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native C interface to control NaN checking
+* Author: Intel Corporation
+* Generated July, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+static int nancheck_flag = -1;
+
+void LAPACKE_set_nancheck( int flag )
+{
+    nancheck_flag = ( flag ) ? 1 : 0;
+}
+
+int LAPACKE_get_nancheck( )
+{
+    char* env;
+    if ( nancheck_flag != -1 ) {
+        return nancheck_flag;
+    }
+
+    /* Check environment variable, once and only once */
+    env = getenv( "LAPACKE_NANCHECK" );
+    if ( !env ) {
+        /* By default, NaN checking is enabled */
+        nancheck_flag = 1;
+    } else {
+        nancheck_flag = atoi( env ) ? 1 : 0;
+    }
+
+    return nancheck_flag;
+}
index 05dbea8..54bc045 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,41 +46,44 @@ lapack_int LAPACKE_sbbcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int lwork = -1;
     float* work = NULL;
     float work_query;
-    lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_sbbcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-    nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-    nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-    nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-    if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
-        return -10;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_lsame( jobu1, 'y' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
-            return -12;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( jobu2, 'y' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
-            return -14;
+        if( LAPACKE_s_nancheck( q, theta, 1 ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
-            return -16;
+        if( LAPACKE_lsame( jobu1, 'y' ) ) {
+            if( LAPACKE_sge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
+                return -12;
+            }
         }
-    }
-    if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
-            return -18;
+        if( LAPACKE_lsame( jobu2, 'y' ) ) {
+            if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+            if( LAPACKE_sge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
+                return -16;
+            }
+        }
+        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+            if( LAPACKE_sge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
+                return -18;
+            }
         }
     }
 #endif
index 9d840be..41312b9 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function sbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,151 +45,36 @@ lapack_int LAPACKE_sbbcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 float* work, lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+        LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &m, &p, &q,
                        theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
                        &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e,
                        work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        float* u1_t = NULL;
-        float* u2_t = NULL;
-        float* v1t_t = NULL;
-        float* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -13;
-            LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -15;
-            LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -17;
-            LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -19;
-            LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                           theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
-                           v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
-                           b22d, b22e, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_0;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_1;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_2;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_3;
-            }
-        }
-        /* Transpose input matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_sge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
-                               ldu1_t );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_sge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
-                               ldu2_t );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_sge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
-                               ldv1t_t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_sge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
-                               ldv2t_t );
-        }
-        /* Call LAPACK function and adjust info */
-        LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                       theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
-                       &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
-                       b21e, b22d, b22e, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_3:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_2:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_1:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info );
index 4317680..cd03182 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sbdsdc
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,12 +48,14 @@ lapack_int LAPACKE_sbdsdc( int matrix_layout, char uplo, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index 0219608..8ff181c 100644 (file)
@@ -45,26 +45,28 @@ lapack_int LAPACKE_sbdsqr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( ncc != 0 ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( ncc != 0 ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+                return -13;
+            }
         }
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -8;
-    }
-    if( nru != 0 ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
-            return -11;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( ncvt != 0 ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -8;
+        }
+        if( nru != 0 ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+                return -11;
+            }
+        }
+        if( ncvt != 0 ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 127417f..575c2b1 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n - 1, e, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for work arrays */
@@ -71,8 +73,8 @@ lapack_int LAPACKE_sbdsvdx( int matrix_layout, char uplo, char jobz, char range,
     }
     /* Call middle-level interface */
     info = LAPACKE_sbdsvdx_work( matrix_layout, uplo, jobz,  range,
-                               n, d, e, vl, vu, il, iu, ns, s, z,
-                                ldz, work, iwork);
+                                 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++ ) {
         superb[i] = iwork[i+1];
index f632b3e..69d970b 100644 (file)
 #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,
-                                       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 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 info = 0;
     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;
@@ -64,7 +64,7 @@ lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char r
         /* Allocate memory for temporary array(s) */
         if( LAPACKE_lsame( jobz, 'v' ) ) {
            z_t = (float*)
-               LAPACKE_malloc( sizeof(float) * ldz_t * MAX(2*n,1) );
+               LAPACKE_malloc( sizeof(float) * ldz_t * MAX(ncols_z,1) );
            if( z_t == NULL ) {
               info = LAPACK_TRANSPOSE_MEMORY_ERROR;
               goto exit_level_0;
@@ -72,8 +72,8 @@ 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,
-                               iwork, &info );
+                        &il, &iu, ns, s, z_t, &ldz_t, work,
+                        iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index 07be8c5..84b4914 100644 (file)
@@ -37,9 +37,11 @@ lapack_int LAPACKE_sdisna( char job, lapack_int m, lapack_int n, const float* d,
                            float* sep )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sdisna_work( job, m, n, d, sep );
index 8aaf195..0963c77 100644 (file)
@@ -46,13 +46,15 @@ lapack_int LAPACKE_sgbbrd( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( ncc != 0 ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
-            return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -8;
+        }
+        if( ncc != 0 ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+                return -16;
+            }
         }
     }
 #endif
index 4ed5c08..f5e2510 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sgbcon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 46bd13b..4c02db8 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_sgbequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 8269173..2210e51 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_sgbequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 8af03de..ce35b13 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_sgbrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -9;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -9;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5f76295..02f786b 100644 (file)
@@ -52,33 +52,35 @@ lapack_int LAPACKE_sgbrfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -13;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -14;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -17;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -17;
     }
 #endif
     /* Allocate memory for working array(s) */
index faaa179..c7375ec 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_sgbsv( int matrix_layout, lapack_int n, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_sgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
index 725ea97..6b667d2 100644 (file)
@@ -50,29 +50,31 @@ lapack_int LAPACKE_sgbsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index f8a0a00..3264a1d 100644 (file)
@@ -52,34 +52,36 @@ lapack_int LAPACKE_sgbsvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -27;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -27;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index 2e2aa8d..8752144 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_sgbtrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
index dbd390d..ecaa459 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_sgbtrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_sgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
index 7a1be37..d4c507e 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_sgebak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, scale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_sgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
index d1bc095..10e3ff1 100644 (file)
@@ -42,11 +42,13 @@ lapack_int LAPACKE_sgebal( int matrix_layout, char job, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
-        LAPACKE_lsame( job, 's' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+            LAPACKE_lsame( job, 's' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
     }
 #endif
index 6f2170f..422bb5e 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_sgebrd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c2289e2..78426f9 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_sgecon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 28690e6..75095e9 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_sgeequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 60de696..d98cce3 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_sgeequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 5b88538..f87005a 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_sgees( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 04c08ff..91cfc4f 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_sgeesx( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4158114..fe79121 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_sgeev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5447734..732328f 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_sgeevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7a0fb4f..b073abb 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_sgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2dc5209..aa0eeb7 100644 (file)
@@ -80,11 +80,13 @@ lapack_int LAPACKE_sgejsv( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
-    nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+        nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3fb1d9f..d0c14d4 100644 (file)
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sgelq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
-lapack_int LAPACKE_sgelq_work( int matrix_layout, lapack_int m, lapack_int n,
-                               float* a, lapack_int lda,
-                               float* t, lapack_int tsize )
+lapack_int LAPACKE_sgelq( int matrix_layout, lapack_int m, lapack_int n,
+                          float* a, lapack_int lda,
+                          float* t, lapack_int tsize )
 {
     lapack_int info = 0;
     lapack_int lwork = -1;
@@ -46,9 +46,11 @@ lapack_int LAPACKE_sgelq_work( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index bab4775..90da3a6 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_sgelq2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7590b68..a017001 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgelqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 43a4097..f9cac6c 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sgels( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 08502bb..fc42b1e 100644 (file)
@@ -51,15 +51,17 @@ lapack_int LAPACKE_sgelsd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6fd39c4..8b9eff3 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_sgelss( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 956c649..435b76e 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_sgelsy( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1ed3f04..708b04f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sgemlq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,15 +48,17 @@ lapack_int LAPACKE_sgemlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4619d92..1eb7b75 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_sgemqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1fa1c82..0745bbf 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_sgemqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #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, nb, k, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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, nb, k, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6b1983b..2881981 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgeqlf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9a3f2f6..c35c4b8 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_sgeqp3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1ad6489..65a06a8 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_sgeqpf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 60323f5..5606f3e 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_sgeqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 818a2ae..5c044f5 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_sgeqr2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 69168b2..17929fc 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgeqrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 83b8d4c..39901fd 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a336378..04997cd 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_sgeqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 238f728..a46d0d0 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_sgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
index 26f7621..7722d62 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_sgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
index 39c317b..73c7a02 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_sgerfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3a3df41..bf0bd74 100644 (file)
@@ -51,33 +51,35 @@ lapack_int LAPACKE_sgerfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -11;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -12;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
     }
 #endif
     /* Allocate memory for working array(s) */
index cab074c..c6de006 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgerqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 80dd312..1c55541 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_sgesdd( int matrix_layout, char jobz, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6771407..0ef406e 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_sgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_sgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
index 0ae0057..bf401dd 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_sgesvd( int matrix_layout, char jobu, char jobvt,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6387451..e6d2a7d 100644 (file)
@@ -52,14 +52,16 @@ lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
     info = LAPACKE_sgesvdx_work( matrix_layout, jobu, jobvt, range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
                                  ldu, vt, ldvt, &work_query, lwork, iwork );
     if( info != 0 ) {
         goto exit_level_0;
@@ -78,8 +80,8 @@ lapack_int LAPACKE_sgesvdx( int matrix_layout, char jobu, char jobvt, char range
     }
     /* Call middle-level interface */
     info = LAPACKE_sgesvdx_work( matrix_layout, jobu, jobvt,  range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
-                                ldu, vt, ldvt, work, lwork, iwork );
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 ldu, vt, ldvt, work, lwork, iwork );
     /* Backup significant data from working array(s) */
     for( i=0; i<12*MIN(m,n)-1; i++ ) {
         superb[i] = iwork[i+1];
index f7973f0..8f4739d 100644 (file)
 #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, 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 m, lapack_int n, 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 = 0;
     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;
@@ -84,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;
         }
@@ -114,8 +114,8 @@ lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char
         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_t, &lda_t, &vl, &vu,
-                                       &il, &iu, ns, s, u_t, &ldu_t, vt_t,
-                            &ldvt_t, work, &lwork, iwork, &info );
+                        &il, &iu, ns, s, u_t, &ldu_t, vt_t,
+                        &ldvt_t, work, &lwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
index c49c541..f1b48a0 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_sgesvj( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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;
-    }
-    if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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;
+        }
+        if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 9e198f5..34203df 100644 (file)
@@ -49,28 +49,30 @@ lapack_int LAPACKE_sgesvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index c224535..a064dd9 100644 (file)
@@ -51,33 +51,35 @@ lapack_int LAPACKE_sgesvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_s_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_s_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_s_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_s_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index f7e5660..dbfeb9f 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_sgetf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgetf2_work( matrix_layout, m, n, a, lda, ipiv );
index ef76e4f..4b97ea1 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_sgetrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgetrf_work( matrix_layout, m, n, a, lda, ipiv );
index 3bb6a86..81d487b 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_sgetrf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgetrf2_work( matrix_layout, m, n, a, lda, ipiv );
index 21cef74..d62221d 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_sgetri( int matrix_layout, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 095c5c5..bedd465 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_sgetrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_sgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
index 1a1d8f3..4ee7eee 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sgetsls( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 23a1d6d..b581712 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_sggbak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, lscale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n, rscale, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_sggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
index 628aec8..74cd85c 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_sggbal( int matrix_layout, char job, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
-    }
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-            return -6;
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 16baa67..d2e3240 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_sgges( int matrix_layout, char jobvsl, char jobvsr, char sort
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 00bd01a..e02a302 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_sgges3( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 282d886..f0acb70 100644 (file)
@@ -54,12 +54,14 @@ lapack_int LAPACKE_sggesx( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e2a69ef..aaec6c5 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_sggev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0b32ffa..b6a16d9 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_sggev3( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b52dab3..0e02854 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_sggevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d18f800..418dae1 100644 (file)
@@ -46,15 +46,17 @@ lapack_int LAPACKE_sggglm( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 00a967c..ffc7d9c 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_sgghd3( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index a26461b..e438c01 100644 (file)
@@ -43,21 +43,23 @@ lapack_int LAPACKE_sgghrd( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index f126dce..8c10eda 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_sgglse( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( m, c, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( p, d, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( m, c, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( p, d, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d1dd324..6f1c73f 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sggqrf( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f5bc8d2..9d5799d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sggrqf( int matrix_layout, lapack_int m, lapack_int p,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 35661cb..fed6d3d 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_sggsvd( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5a2703a..7b209e4 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_sggsvd3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Query optimal working array(s) size if requested */
index 7911c39..ad656a0 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_sggsvp( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1cb1d33..16417fb 100644 (file)
@@ -51,18 +51,20 @@ lapack_int LAPACKE_sggsvp3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal size for working array */
index f3818c5..013f8a6 100644 (file)
@@ -41,21 +41,23 @@ lapack_int LAPACKE_sgtcon( char norm, lapack_int n, const float* dl,
     lapack_int* iwork = NULL;
     float* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4741542..9d27c8f 100644 (file)
@@ -49,33 +49,35 @@ lapack_int LAPACKE_sgtrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+            return -11;
+        }
+        if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1b80b46..af692c5 100644 (file)
@@ -42,18 +42,20 @@ lapack_int LAPACKE_sgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
index f6fb151..76239c2 100644 (file)
@@ -49,37 +49,39 @@ lapack_int LAPACKE_sgtsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
-            return -11;
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n-1, dlf, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n-1, duf, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 3d418a5..5814d9d 100644 (file)
@@ -37,15 +37,17 @@ lapack_int LAPACKE_sgttrf( lapack_int n, float* dl, float* d, float* du,
                            float* du2, lapack_int* ipiv )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sgttrf_work( n, dl, d, du, du2, ipiv );
index 3ae674b..de60a20 100644 (file)
@@ -43,21 +43,23 @@ lapack_int LAPACKE_sgttrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( n-2, du2, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_sgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
index 911f944..164af10 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_shgeqz( int matrix_layout, char job, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -17;
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -17;
+            }
         }
     }
 #endif
index c1107f8..f5ea56d 100644 (file)
@@ -47,25 +47,27 @@ lapack_int LAPACKE_shsein( int matrix_layout, char job, char eigsrc, char initv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -13;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_s_nancheck( n, wi, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( n, wr, 1 ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_s_nancheck( n, wi, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( n, wr, 1 ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index e0b5f69..a6ab578 100644 (file)
@@ -47,13 +47,15 @@ lapack_int LAPACKE_shseqr( int matrix_layout, char job, char compz, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 15d06d5..4d1df9e 100644 (file)
@@ -37,12 +37,14 @@ lapack_int LAPACKE_slacn2( lapack_int n, float* v, float* x, lapack_int* isgn,
                            float* est, lapack_int* kase, lapack_int* isave )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, x, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, est, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n, x, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_slacn2_work( n, v, x, isgn, est, kase, isave );
index b7c0796..83ba93b 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_slacpy( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_slacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
index 7f25d3b..76485c1 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_slag2d( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, sa, ldsa ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_slag2d_work( matrix_layout, m, n, sa, ldsa, a, lda );
index 3087952..050f6cb 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_slagge( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( MIN(m,n), d, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6ff1160..d210510 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_slagsy( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8d1e172..f5f8272 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function slange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ float LAPACKE_slange( int matrix_layout, char norm, lapack_int m,
                            lapack_int n, const float* a, lapack_int lda )
 {
     lapack_int info = 0;
-       float res = 0.;
+    float res = 0.;
     float* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_slange", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dc03fdf..6a5dfac 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function slange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,37 +38,42 @@ float LAPACKE_slange_work( int matrix_layout, char norm, lapack_int m,
                                 float* work )
 {
     lapack_int info = 0;
-       float res = 0.;
+    float res = 0.;
+    char norm_lapack;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
+        /* Call LAPACK function */
         res = LAPACK_slange( &norm, &m, &n, a, &lda, work );
-        if( info < 0 ) {
-            info = info - 1;
-        }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int lda_t = MAX(1,m);
-        float* a_t = NULL;
+        float* work_lapack = NULL;
         /* Check leading dimension(s) */
         if( lda < n ) {
             info = -6;
             LAPACKE_xerbla( "LAPACKE_slange_work", info );
             return info;
         }
-        /* Allocate memory for temporary array(s) */
-        a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
-        if( a_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
+        if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) {
+            norm_lapack = 'i';
+        } else if( LAPACKE_lsame( norm, 'i' ) ) {
+            norm_lapack = '1';
+        } else {
+            norm_lapack = norm;
+        }
+        /* Allocate memory for work array(s) */
+        if( LAPACKE_lsame( norm_lapack, 'i' ) ) {
+            work_lapack = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+            if( work_lapack == NULL ) {
+                info = LAPACK_WORK_MEMORY_ERROR;
+                goto exit_level_0;
+            }
         }
-        /* Transpose input matrices */
-        LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
-        /* Call LAPACK function and adjust info */
-        res = LAPACK_slange( &norm, &m, &n, a_t, &lda_t, work );
-        info = 0;  /* LAPACK call is ok! */
+        /* Call LAPACK function */
+        res = LAPACK_slange( &norm_lapack, &n, &m, a, &lda, work_lapack );
         /* Release memory and exit */
-        LAPACKE_free( a_t );
+        if( work_lapack ) {
+            LAPACKE_free( work_lapack );
+        }
 exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+        if( info == LAPACK_WORK_MEMORY_ERROR ) {
             LAPACKE_xerbla( "LAPACKE_slange_work", info );
         }
     } else {
index a2711fa..bbe3688 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function slansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ float LAPACKE_slansy( int matrix_layout, char norm, char uplo, lapack_int n,
                            const float* a, lapack_int lda )
 {
     lapack_int info = 0;
-       float res = 0.;
+    float res = 0.;
     float* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_slansy", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9e14a5f..3c0909a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function slansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,7 +38,7 @@ float LAPACKE_slansy_work( int matrix_layout, char norm, char uplo,
                                 float* work )
 {
     lapack_int info = 0;
-       float res = 0.;
+    float res = 0.;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         res = LAPACK_slansy( &norm, &uplo, &n, a, &lda, work );
index e92dc62..9e67fcc 100644 (file)
@@ -45,9 +45,11 @@ float LAPACKE_slantr( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e020cc4..139703c 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_slapmr( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_slapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 7d9a7ab..55d2f47 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_slapmt( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_slapmt_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 8410862..54e3d3e 100644 (file)
 float LAPACKE_slapy2( float x, float y )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_slapy2_work( x, y );
index c6eea25..4fb4d09 100644 (file)
 float LAPACKE_slapy3( float x, float y, float z )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( 1, &z, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( 1, &z, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_slapy3_work( x, y, z );
index c64fc1f..72fa75e 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function slarfb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,7 +40,7 @@ lapack_int LAPACKE_slarfb( int matrix_layout, char side, char trans, char direct
                            lapack_int ldc )
 {
     lapack_int info = 0;
-    lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+    lapack_int ldwork;
     float* work = NULL;
     lapack_int ncols_v, nrows_v;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -48,57 +48,66 @@ lapack_int LAPACKE_slarfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
-    nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -13;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
-        if( k > nrows_v ) {
-            LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+        nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -13;
         }
-        if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k,
-            &v[(nrows_v-k)*ldv], ldv ) )
-            return -9;
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( k > ncols_v ) {
-            LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
-            return -8;
+        if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+            if( k > nrows_v ) {
+                LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k,
+                &v[(nrows_v-k)*ldv], ldv ) )
+                return -9;
+            if( LAPACKE_sge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_str_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( k > ncols_v ) {
+                LAPACKE_xerbla( "LAPACKE_slarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+                ldv ) )
+                return -9;
+            if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+                return -9;
         }
-        if( LAPACKE_str_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
-            ldv ) )
-            return -9;
-        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
-            return -9;
     }
 #endif
+    if( LAPACKE_lsame( side, 'l' ) ) {
+        ldwork = n;
+    } else if( LAPACKE_lsame( side, 'r' ) ) {
+        ldwork = m;
+    } else {
+        ldwork = 1;
+    }
     /* Allocate memory for working array(s) */
     work = (float*)LAPACKE_malloc( sizeof(float) * ldwork * MAX(1,k) );
     if( work == NULL ) {
index f5a4eb1..2952773 100644 (file)
@@ -37,12 +37,14 @@ lapack_int LAPACKE_slarfg( lapack_int n, float* alpha, float* x,
                            lapack_int incx, float* tau )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, alpha, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, alpha, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_slarfg_work( n, alpha, x, incx, tau );
index 2777526..ae8b3a9 100644 (file)
@@ -44,16 +44,18 @@ lapack_int LAPACKE_slarft( int matrix_layout, char direct, char storev,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
-    nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+        nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_slarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
index f6df46d..4261378 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_slarfx( int matrix_layout, char side, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &tau, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( m, v, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &tau, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( m, v, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_slarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
index 2b48b85..88cda13 100644 (file)
 lapack_int LAPACKE_slartgp( float f, float g, float* cs, float* sn, float* r )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &f, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_s_nancheck( 1, &g, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &f, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_s_nancheck( 1, &g, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_slartgp_work( f, g, cs, sn, r );
index 3da6df1..566f474 100644 (file)
@@ -37,15 +37,17 @@ lapack_int LAPACKE_slartgs( float x, float y, float sigma, float* cs,
                             float* sn )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &sigma, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
-        return -1;
-    }
-    if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &sigma, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_s_nancheck( 1, &x, 1 ) ) {
+            return -1;
+        }
+        if( LAPACKE_s_nancheck( 1, &y, 1 ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_slartgs_work( x, y, sigma, cs, sn );
index b5368e4..25bd962 100644 (file)
@@ -43,68 +43,70 @@ lapack_int LAPACKE_slascl( int matrix_layout, char type, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    switch (type) {
-    case 'G':
-        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        switch (type) {
+        case 'G':
+            if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+                return -9;
+            }
+            break;
+        case 'L':
+            // 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 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' - 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' - 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' -  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;
         }
-        break;
-    case 'L':
-        // 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 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' - 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' - 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' -  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
     return LAPACKE_slascl_work( matrix_layout, type, kl, ku, cfrom, cto, m,  n, a, lda );
index 45044ad..793cb51 100644 (file)
@@ -49,12 +49,14 @@ lapack_int LAPACKE_slaset( int matrix_layout, char uplo, lapack_int m,
 *****************************************************************************/
 
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+            return -6;
+        }
     }
 #endif
 
index d426fb2..5a950d3 100644 (file)
 lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_slasrt_work( id, n, d );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_slassq.c b/lapack-netlib/LAPACKE/src/lapacke_slassq.c
new file mode 100644 (file)
index 0000000..668289e
--- /dev/null
@@ -0,0 +1,53 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function slassq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slassq( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
+        if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( 1, scale, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) {
+            return -5;
+        }
+    }
+#endif
+    return LAPACKE_slassq_work( n, x, incx, scale, sumsq );
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_slassq_work.c b/lapack-netlib/LAPACKE/src/lapacke_slassq_work.c
new file mode 100644 (file)
index 0000000..00688c9
--- /dev/null
@@ -0,0 +1,41 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function slassq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_slassq_work( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq )
+{
+    lapack_int info = 0;
+    LAPACK_slassq( &n, x, &incx, scale, sumsq );
+    return info;
+}
index 4fd4a5e..a46e7ba 100644 (file)
@@ -42,19 +42,21 @@ lapack_int LAPACKE_slaswp( int matrix_layout, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-/*****************************************************************************
-*      Disable the check as is below, the check below was checking for NaN
-*      from lda to n since there is no (obvious) way to knowing m. This is not
-*      a good idea. We could get a lower bound of m by scanning from ipiv. Or
-*      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
-*      the buggy Nan check.
-*      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
-*****************************************************************************/
-/*  if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) {
-*       return -3;
-*   }
-*/
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+    /*****************************************************************************
+    *      Disable the check as is below, the check below was checking for NaN
+    *      from lda to n since there is no (obvious) way to knowing m. This is not
+    *      a good idea. We could get a lower bound of m by scanning from ipiv. Or
+    *      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
+    *      the buggy Nan check.
+    *      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
+    *****************************************************************************/
+    /*  if( LAPACKE_sge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+    *       return -3;
+    *   }
+    */
+    }
 #endif
     return LAPACKE_slaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
 }
index 1faadbb..fa920df 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function slaswp
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index d5ac5d3..ac01ebc 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_slatms( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_s_nancheck( 1, &cond, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( MIN(n,m), d, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &dmax, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f50d14b..d31a9b9 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_slauum( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_slauum_work( matrix_layout, uplo, n, a, lda );
index 68103e4..cf3ae20 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_sopgtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6ed4665..3337898 100644 (file)
@@ -47,16 +47,18 @@ lapack_int LAPACKE_sopmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_ssp_nancheck( r, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_ssp_nancheck( r, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index 1a0ede9..d1fdab0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sorbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,28 +45,31 @@ lapack_int LAPACKE_sorbdb( int matrix_layout, char trans, char signs,
     lapack_int lwork = -1;
     float* work = NULL;
     float work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_sorbdb", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -9;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -11;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -13;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -9;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -11;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5440820..6039057 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function sorbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -43,113 +43,35 @@ lapack_int LAPACKE_sorbdb_work( int matrix_layout, char trans, char signs,
                                 lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+        LAPACK_sorbdb( &ltrans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
                        x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
                        tauq1, tauq2, work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        float* x11_t = NULL;
-        float* x12_t = NULL;
-        float* x21_t = NULL;
-        float* x22_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldx11 < q ) {
-            info = -8;
-            LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -10;
-            LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
-                           &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
-                           taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
-        }
-        x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        /* Transpose input matrices */
-        LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
-        /* Call LAPACK function and adjust info */
-        LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
-                       &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
-                       taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        /* Release memory and exit */
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_sorbdb_work", info );
index b9864ae..06fa61a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sorcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,28 +48,31 @@ lapack_int LAPACKE_sorcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int* iwork = NULL;
     float* work = NULL;
     float work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_sorcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -11;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -13;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -15;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -17;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -11;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -13;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -15;
+        }
+        if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -17;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d022385..1b79ba1 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sorcsd2by1
 * Author: Intel Corporation
-* Generated December 2016
+* Generated November 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -50,17 +50,18 @@ lapack_int LAPACKE_sorcsd2by1( int matrix_layout, char jobu1, char jobu2,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 =  p ;
-    nrows_x21 =  m-p ;
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_x11 = p;
+        nrows_x21 = m-p;
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+            return -9;
+        }
     }
-
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -9;
-    }
-
 #endif
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
index feff8fa..b83bb53 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function sorcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,213 +46,36 @@ lapack_int LAPACKE_sorcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int* iwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
-        LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
-                       theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
-                       work, &lwork, iwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        float* x11_t = NULL;
-        float* x12_t = NULL;
-        float* x21_t = NULL;
-        float* x22_t = NULL;
-        float* u1_t = NULL;
-        float* u2_t = NULL;
-        float* v1t_t = NULL;
-        float* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -21;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -23;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -25;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -27;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldx11 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -16;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -18;
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
-                           &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
-                           x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
-                           &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork,
-                           &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
         }
-        x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_4;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_5;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_6;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (float*)
-                LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_7;
-            }
-        }
-        /* Transpose input matrices */
-        LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
         /* Call LAPACK function and adjust info */
-        LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
-                       x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
-                       v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork,
-                       &info );
+        LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
+                       &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
+                       &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
+                       &ldv2t, work, &lwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-        /* Transpose output matrices */
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_7:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_6:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_5:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_4:
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_sorcsd_work", info );
index 1726d01..eb90d5e 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorgbr( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( MIN(m,k), tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( MIN(m,k), tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 74f6fb4..b34a14c 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorghr( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f48a1e6..eaa1ca8 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorglq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 86d0874..7791f10 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorgql( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3e7930b..99468f3 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorgqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f3335da..7a81cd9 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_sorgrq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index aadb429..90dc435 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_sorgtr( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4df425e..2efbbce 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sormbr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,18 +48,20 @@ lapack_int LAPACKE_sormbr( int matrix_layout, char vect, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nq = LAPACKE_lsame( side, 'l' ) ? m : n;
-    ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
-    ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq;
-    if( LAPACKE_sge_nancheck( matrix_layout, ar, ac, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( MIN(nq,k), tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+        ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+        ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq;
+        if( LAPACKE_sge_nancheck( matrix_layout, ar, ac, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_s_nancheck( MIN(nq,k), tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f88fdbc..a5cca2c 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_sormhr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c05fdb1..4f8947a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sormlq
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,16 +47,18 @@ lapack_int LAPACKE_sormlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, k, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, k, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f2f3785..0897332 100644 (file)
@@ -51,8 +51,8 @@ lapack_int LAPACKE_sormlq_work( int matrix_layout, char side, char trans,
         lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n;
         lapack_int lda_t = MAX(1,k);
         lapack_int ldc_t = MAX(1,m);
-       float *a_t = NULL;
-       float *c_t = NULL;
+        float *a_t = NULL;
+        float *c_t = NULL;
         /* Check leading dimension(s) */
         if( lda < r ) {
             info = -8;
index aa8cbe6..e074cf8 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_sormql( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 7b8678f..92714ea 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_sormqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 83b50d0..c884d81 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_sormrq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f44d7a4..499bc0b 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_sormrz( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_s_nancheck( k, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c20b1b7..5a9d441 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_sormtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_s_nancheck( m-1, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index bd0af09..51610e6 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_spbcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9ed657a..d07d1ae 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_spbequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
index da53779..be7f3ba 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_spbrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 416b410..0d5a9b2 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spbstf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
index f6d550a..ef810c6 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_spbsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_spbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index b19d93f..1ffacd4 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_spbsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 424f213..5612cae 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spbtrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
index e353166..8601cfd 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_spbtrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_spbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index 7846256..ac85d6c 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spftrf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spftrf_work( matrix_layout, transr, uplo, n, a );
index a91cf9f..7a5d1ef 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spftri( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spftri_work( matrix_layout, transr, uplo, n, a );
index 7b9d773..badacf6 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_spftrs( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spf_nancheck( n, a ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spf_nancheck( n, a ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_spftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
index 8a6b32a..fb71555 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_spocon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2a706df..320e208 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spoequ( int matrix_layout, lapack_int n, const float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_spoequ_work( matrix_layout, n, a, lda, s, scond, amax );
index f00ff8e..aecfcee 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_spoequb( int matrix_layout, lapack_int n, const float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_spoequb_work( matrix_layout, n, a, lda, s, scond, amax );
index 0f90c36..01a4e95 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_sporfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 191db44..918333b 100644 (file)
@@ -50,28 +50,30 @@ lapack_int LAPACKE_sporfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -21;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -10;
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -21;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -13;
     }
 #endif
     /* Allocate memory for working array(s) */
index fd4ba96..a06c92f 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_sposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_sposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index 1250b2a..a8fdab5 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_sposvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 2549b95..0e3160c 100644 (file)
@@ -50,26 +50,28 @@ lapack_int LAPACKE_sposvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 5fa0fe7..2da01cc 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spotrf( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_spotrf_work( matrix_layout, uplo, n, a, lda );
index d1fc9d0..1a262a3 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spotrf2( int matrix_layout, char uplo, lapack_int n, float* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_spotrf2_work( matrix_layout, uplo, n, a, lda );
index 1805b76..8eddb7d 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spotri( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_spotri_work( matrix_layout, uplo, n, a, lda );
index fd5a0a1..7cabc16 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_spotrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_spotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index 0c0e8d5..cf4dc26 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_sppcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a695c30..606072a 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_sppequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_sppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
index 69c7379..792c0e4 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_spprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f40bc2d..cdfe486 100644 (file)
@@ -41,12 +41,14 @@ lapack_int LAPACKE_sppsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index c5ea813..1e626e2 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_sppsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_spp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_spp_nancheck( n, afp ) ) {
+                return -7;
+            }
         }
-    }
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -9;
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 375baae..f3297c7 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_spptrf_work( matrix_layout, uplo, n, ap );
index 1b5949b..e1a6b41 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_spptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_spptri_work( matrix_layout, uplo, n, ap );
index 4c72701..9322f3c 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_spptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_spptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index 11a1b35..0c32e8c 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_spstrf( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &tol, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8894593..0eb14b3 100644 (file)
@@ -39,15 +39,17 @@ lapack_int LAPACKE_sptcon( lapack_int n, const float* d, const float* e,
     lapack_int info = 0;
     float* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6c2417a..c0ff15e 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_spteqr( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index efcd12c..44d3763 100644 (file)
@@ -45,24 +45,26 @@ lapack_int LAPACKE_sptrfs( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dfdfe6f..8955ede 100644 (file)
@@ -41,15 +41,17 @@ lapack_int LAPACKE_sptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_sptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
index f5fb4ed..467cc9b 100644 (file)
@@ -46,24 +46,26 @@ lapack_int LAPACKE_sptsvx( int matrix_layout, char fact, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, df, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, df, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n-1, ef, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 3083eff..38c6036 100644 (file)
 lapack_int LAPACKE_spttrf( lapack_int n, float* d, float* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_spttrf_work( n, d, e );
index d2c8737..25f4bca 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_spttrs( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_spttrs_work( matrix_layout, n, nrhs, d, e, b, ldb );
index 7131676..be2021b 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_ssbev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3ef3975..266e1bd 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_ssbev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5b5d3a0..3acdeb9 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_ssbevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a9f95c7..2eda9cd 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_ssbevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d25a5fd..b891d58 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_ssbevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 27102f1..6f1e1c4 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_ssbevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index d289cc0..4066114 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_ssbgst( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5d73923..6c8ca1b 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_ssbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e884ba0..a6c0368 100644 (file)
@@ -50,12 +50,14 @@ lapack_int LAPACKE_ssbgvd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ec42d8c..3d0a0a4 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_ssbgvx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -18;
-    }
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -15;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -18;
+        }
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -15;
+            }
         }
     }
 #endif
index 03a3ac9..453ccf5 100644 (file)
@@ -44,13 +44,15 @@ lapack_int LAPACKE_ssbtrd( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( vect, 'u' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( vect, 'u' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 8709e87..88aa956 100644 (file)
@@ -43,20 +43,22 @@ lapack_int LAPACKE_ssfrk( int matrix_layout, char transr, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
-    na = LAPACKE_lsame( trans, 'n' ) ? n : k;
-    if( LAPACKE_sge_nancheck( matrix_layout, na, ka, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_spf_nancheck( n, c ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+        na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+        if( LAPACKE_sge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &beta, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_spf_nancheck( n, c ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_ssfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
index 8cffd2e..d99ff68 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_sspcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c197489..df867c2 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_sspev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d6681a6..bd06a8b 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_sspevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 63540a5..d9ac9c3 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_sspevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 956aa57..45e4c27 100644 (file)
@@ -41,12 +41,14 @@ lapack_int LAPACKE_sspgst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_ssp_nancheck( n, bp ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_ssp_nancheck( n, bp ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_sspgst_work( matrix_layout, itype, uplo, n, ap, bp );
index 815056a..6b60a8f 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_sspgv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_ssp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 197fb4a..749abb0 100644 (file)
@@ -49,12 +49,14 @@ lapack_int LAPACKE_sspgvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_ssp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 96843c5..4246e89 100644 (file)
@@ -47,24 +47,26 @@ lapack_int LAPACKE_sspgvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -13;
-    }
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_ssp_nancheck( n, bp ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -10;
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_ssp_nancheck( n, bp ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -10;
+            }
         }
     }
 #endif
index f1cfb99..4c652da 100644 (file)
@@ -47,18 +47,20 @@ lapack_int LAPACKE_ssprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8ad8958..e8272e3 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_sspsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_sspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 25bb7ee..fa759e4 100644 (file)
@@ -47,17 +47,19 @@ lapack_int LAPACKE_sspsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_ssp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_ssp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 6d41f6b..ea35b76 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ssptrd( int matrix_layout, char uplo, lapack_int n, float* ap
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ssptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
index a3fe463..e50114d 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ssptrf( int matrix_layout, char uplo, lapack_int n, float* ap
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ssptrf_work( matrix_layout, uplo, n, ap, ipiv );
index 9e60ba4..de9815f 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_ssptri( int matrix_layout, char uplo, lapack_int n, float* ap
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f7a4df7..53d855f 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_ssptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_ssptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 9225729..763a803 100644 (file)
@@ -43,24 +43,26 @@ lapack_int LAPACKE_sstebz( char range, char order, lapack_int n, float vl,
     lapack_int* iwork = NULL;
     float* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -5;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -4;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -5;
+            }
         }
     }
 #endif
index b5b6b49..1578746 100644 (file)
@@ -48,16 +48,18 @@ lapack_int LAPACKE_sstedc( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index a3c5d4d..c6a73b2 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sstegr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -51,24 +51,26 @@ lapack_int LAPACKE_sstegr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index ccad56f..31a0213 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sstein
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,15 +46,17 @@ lapack_int LAPACKE_sstein( int matrix_layout, lapack_int n, const float* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, w, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n, w, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index dd2040a..4229819 100644 (file)
@@ -51,18 +51,20 @@ lapack_int LAPACKE_sstemr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 834014e..d0c8ce4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function sstemr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -55,7 +55,7 @@ lapack_int LAPACKE_sstemr_work( int matrix_layout, char jobz, char range,
         lapack_int ldz_t = MAX(1,n);
         float* z_t = NULL;
         /* Check leading dimension(s) */
-        if( ldz < n ) {
+        if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) {
             info = -14;
             LAPACKE_xerbla( "LAPACKE_sstemr_work", info );
             return info;
index fc7ea29..714ff20 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_ssteqr( int matrix_layout, char compz, lapack_int n, float* d
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index d42384d..61754c8 100644 (file)
 lapack_int LAPACKE_ssterf( lapack_int n, float* d, float* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_ssterf_work( n, d, e );
index 97da731..0227c09 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sstev
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -43,12 +43,14 @@ lapack_int LAPACKE_sstev( int matrix_layout, char jobz, lapack_int n, float* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b2bf5bb..9f9e2e7 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sstevd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,12 +48,14 @@ lapack_int LAPACKE_sstevd( int matrix_layout, char jobz, lapack_int n, float* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e9b0ca2..f45c490 100644 (file)
@@ -51,24 +51,26 @@ lapack_int LAPACKE_sstevr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 1dd833d..cb7fbec 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function sstevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,24 +47,26 @@ lapack_int LAPACKE_sstevx( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_s_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_s_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index b6781ae..2a2e7a9 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_ssycon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ece1482..b8775db 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function ssycon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_ssycon_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int info = 0;
     lapack_int* iwork = NULL;
     float* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_ssycon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c22b1e4..5fd0a78 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ssyconv( int matrix_layout, char uplo, char way, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Call middle-level interface */
index 2412feb..b4dd5b0 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_ssyequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9d240e8..81b65db 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssyev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d031cea..d57a7c2 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssyev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b668e5f..1995e79 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_ssyevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 12db227..6d6785a 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_ssyevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index a60b2d9..d7e0501 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_ssyevr( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 40a93b2..cbc3014 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_ssyevr_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 3e874a9..26e8cd4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function ssyevr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -52,8 +52,9 @@ lapack_int LAPACKE_ssyevr_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 9924669..43be722 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_ssyevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 7527f34..42559e3 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_ssyevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 9ffd925..d4d0b80 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function ssyevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -51,8 +51,9 @@ lapack_int LAPACKE_ssyevx_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 2111c45..7b97f47 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_ssygst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_ssygst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
index 13ca1ec..8ec40d9 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssygv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5ca1bb7..a2eba66 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssygv_2stage( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3bc9d8c..2a1c62a 100644 (file)
@@ -49,12 +49,14 @@ lapack_int LAPACKE_ssygvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 598ece7..1fe4e2c 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_ssygvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 9bc8781..6306bd2 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function ssygvx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index 6d856dc..f65daa9 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_ssyrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2d8eb03..cccc996 100644 (file)
@@ -51,28 +51,30 @@ lapack_int LAPACKE_ssyrfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index 6522197..579d98d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssysv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0f10c82..2777e18 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssysv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage.c
new file mode 100644 (file)
index 0000000..ce50a89
--- /dev/null
@@ -0,0 +1,89 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function ssysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, float* a, lapack_int lda,
+                          float* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    float* work = NULL;
+    float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_ssysv_aa_2stage_work( matrix_layout, uplo, n, nrhs, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = (lapack_int)work_query;
+    /* Allocate memory for work arrays */
+    work = (float*)
+        LAPACKE_malloc( sizeof(float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_ssysv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_ssysv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..d21dbb0
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function ssysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, float* b, lapack_int ldb,
+                               float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssysv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        float* a_t = NULL;
+        float* tb_t = NULL;
+        float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_ssysv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (float*)LAPACKE_malloc( sizeof(float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssysv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_ssysv_aa_2stage_work", info );
+    }
+    return info;
+}
index b352028..afb9869 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function ssysv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,15 +46,14 @@ lapack_int LAPACKE_ssysv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 952bc8a..2c6fee6 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssysv_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 973ac27..9741088 100644 (file)
@@ -50,17 +50,19 @@ lapack_int LAPACKE_ssysvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index 0770a18..860773d 100644 (file)
@@ -51,26 +51,28 @@ lapack_int LAPACKE_ssysvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_s_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_s_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_s_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 43a5a3e..733db5a 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ssyswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ssyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index 7ea659e..4dee607 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssytrd( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1ec5cde..cf25c57 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssytrf( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 31056df..6689e7e 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssytrf_aa( int matrix_layout, char uplo, lapack_int n, float*
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..6285f2d
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function ssytrf_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                            float* a, lapack_int lda,
+                            float* tb, lapack_int ltb, 
+                            lapack_int* ipiv, lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    float* work = NULL;
+    float work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+       if( LAPACKE_sge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_ssytrf_aa_2stage_work( matrix_layout, uplo, n, 
+                                 a, lda, tb, ltb, ipiv, ipiv2,
+                                 &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = (lapack_int)work_query;
+    /* Allocate memory for work arrays */
+    work = (float*)
+        LAPACKE_malloc( sizeof(float) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_ssytrf_aa_2stage_work( matrix_layout, uplo, n,
+                                 a, lda, tb, ltb, ipiv, ipiv2,
+                                 work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_ssytrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..5ffe815
--- /dev/null
@@ -0,0 +1,108 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function ssytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, 
+                               lapack_int* ipiv, lapack_int* ipiv2, 
+                               float* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssytrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        float* a_t = NULL;
+        float* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_ssytrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (float*)LAPACKE_malloc( sizeof(float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssytrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_ssytrf_aa_2stage_work", info );
+    }
+    return info;
+}
index 8066318..993750f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function ssytrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -45,12 +45,11 @@ lapack_int LAPACKE_ssytrf_rk( int matrix_layout, char uplo, lapack_int n, float*
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8fda18a..468dc43 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssytrf_rook( int matrix_layout, char uplo, lapack_int n, floa
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index fe93407..eb68f72 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_ssytri( int matrix_layout, char uplo, lapack_int n, float* a,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index eb348b1..4159115 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ssytri2( int matrix_layout, char uplo, lapack_int n, float* a
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e8695e2..34c989a 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_ssytri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b97ca49..f2a1835 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function ssytri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,17 +40,20 @@ lapack_int LAPACKE_ssytri_3( int matrix_layout, char uplo, lapack_int n, float*
     lapack_int lwork = -1;
     float* work = NULL;
     float work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_ssytri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_s_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_s_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index e374d33..9919d6a 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_ssytrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_ssytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index b143bf9..a95a714 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1bcefd4..44e713b 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_ssytrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_s_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_s_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_ssytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
index 6e38409..9eb20d2 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function ssytrs_aa
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ssytrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
@@ -60,7 +62,7 @@ lapack_int LAPACKE_ssytrs_aa( int matrix_layout, char uplo, lapack_int n,
     if( info != 0 ) {
         goto exit_level_0;
     }
-       lwork = (lapack_int)work_query;
+    lwork = (lapack_int)work_query;
     /* Allocate memory for work arrays */
     work = (float*)
         LAPACKE_malloc( sizeof(float) * lwork );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..c67ad2d
--- /dev/null
@@ -0,0 +1,66 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function ssytrs_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                            lapack_int nrhs, float* a, lapack_int lda,
+                            float* tb, lapack_int ltb, 
+                            lapack_int* ipiv, lapack_int* ipiv2, 
+                            float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+       if( LAPACKE_sge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Call middle-level interface */
+    info = LAPACKE_ssytrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                                 a, lda, tb, ltb, ipiv, ipiv2, b,
+                                 ldb );
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_ssytrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..95def29
--- /dev/null
@@ -0,0 +1,114 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function ssytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_ssytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, float* a, lapack_int lda,
+                               float* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, float* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssytrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        float* a_t = NULL;
+        float* tb_t = NULL;
+        float* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage_work", info );
+            return info;
+        }
+         /* Allocate memory for temporary array(s) */
+        a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (float*)LAPACKE_malloc( sizeof(float) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_sge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_ssytrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_ssytrs_aa_2stage_work", info );
+    }
+    return info;
+}
index 8d428c2..fa82382 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_ssytrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_ssytrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index ff3bd27..9230171 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_stbcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 783f160..6f4de24 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_stbrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 50893e6..a99c37a 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_stbtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_stbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
index 55bebfe..bf04a27 100644 (file)
@@ -43,18 +43,20 @@ lapack_int LAPACKE_stfsm( int matrix_layout, char transr, char side, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( IS_S_NONZERO(alpha) ) {
-        if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( IS_S_NONZERO(alpha) ) {
+            if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
-        return -9;
-    }
-    if( IS_S_NONZERO(alpha) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-            return -11;
+        if( LAPACKE_s_nancheck( 1, &alpha, 1 ) ) {
+            return -9;
+        }
+        if( IS_S_NONZERO(alpha) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+                return -11;
+            }
         }
     }
 #endif
index d2eb977..bd62569 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_stftri( int matrix_layout, char transr, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_stftri_work( matrix_layout, transr, uplo, diag, n, a );
index 7d14d08..b5cf832 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_stfttp( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_stfttp_work( matrix_layout, transr, uplo, n, arf, ap );
index 4d114d4..5099e7e 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_stfttr( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_stfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
index 7984906..e95a37e 100644 (file)
@@ -47,21 +47,23 @@ lapack_int LAPACKE_stgevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, p, ldp ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, s, lds ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, s, lds ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 9238048..7d9e21e 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_stgexc( int matrix_layout, lapack_logical wantq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
-    }
-    if( wantq ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
+        if( wantq ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -9;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index f58be28..5464fd2 100644 (file)
@@ -53,21 +53,23 @@ lapack_int LAPACKE_stgsen( int matrix_layout, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( wantq ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -16;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( wantq ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -14;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -16;
+            }
         }
     }
 #endif
index c922251..2b239c7 100644 (file)
@@ -48,32 +48,34 @@ lapack_int LAPACKE_stgsja( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
-        return -14;
-    }
-    if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, m, m, u, ldu ) ) {
-            return -18;
+        if( LAPACKE_sge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
         }
-    }
-    if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, p, p, v, ldv ) ) {
-            return -20;
+        if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_s_nancheck( 1, &tola, 1 ) ) {
+            return -14;
+        }
+        if( LAPACKE_s_nancheck( 1, &tolb, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+                return -18;
+            }
+        }
+        if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+                return -20;
+            }
         }
     }
 #endif
index 3282695..0744247 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_stgsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index b8d930b..3c6b859 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_stgsyl( int matrix_layout, char trans, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, m, d, ldd ) ) {
-        return -12;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, e, lde ) ) {
-        return -14;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, f, ldf ) ) {
-        return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+            return -12;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, e, lde ) ) {
+            return -14;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+            return -16;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 27d6c4f..661269d 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_stpcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f7d65ac..b863b79 100644 (file)
@@ -49,29 +49,31 @@ lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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_sge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
-        return -13;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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_sge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
+            return -13;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
     lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) :
-                       ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 );
+        ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 );
     work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
     if( work == NULL ) {
         info = LAPACK_WORK_MEMORY_ERROR;
index 1d638dc..1438ea2 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_stpqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1af9fe7..9232586 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_stpqrt2( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_stpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
index 13d0cc7..846d4cc 100644 (file)
@@ -49,30 +49,32 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #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_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -12;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -12;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     if (side=='l' ||  side=='L') {
index 6b4fd7e..299e051 100644 (file)
@@ -46,15 +46,17 @@ lapack_int LAPACKE_stprfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index cdc1221..edd25bd 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_stptri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_stptri_work( matrix_layout, uplo, diag, n, ap );
index 643097c..fc24e5f 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_stptrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_stp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_stptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
index 318f534..5c7746e 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_stpttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_stpttf_work( matrix_layout, transr, uplo, n, ap, arf );
index adccfe2..9e1340c 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_stpttr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_spp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_spp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_stpttr_work( matrix_layout, uplo, n, ap, a, lda );
index ad7260f..39efd55 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_strcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0f00494..2c983f6 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_strevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 9606b8d..b7976b6 100644 (file)
@@ -44,14 +44,16 @@ lapack_int LAPACKE_strexc( int matrix_layout, char compq, lapack_int n, float* t
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -6;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -4;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -4;
     }
 #endif
     /* Allocate memory for working array(s) */
index 62e2b1d..9a1156c 100644 (file)
@@ -47,15 +47,17 @@ lapack_int LAPACKE_strrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3cba0b1..efba91a 100644 (file)
@@ -50,14 +50,16 @@ lapack_int LAPACKE_strsen( int matrix_layout, char job, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
     }
 #endif
     /* Query optimal working array(s) size */
index f2c53a0..9d130ef 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_strsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_sge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index d8833f3..df618cd 100644 (file)
@@ -44,15 +44,17 @@ lapack_int LAPACKE_strsyl( int matrix_layout, char trana, char tranb,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_strsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
index 11503df..2888624 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_strtri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_strtri_work( matrix_layout, uplo, diag, n, a, lda );
index 3000369..b4c0aae 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_strtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_str_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_strtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
index 9286709..fee7ab9 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_strttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_strttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
index ae0eb81..6c4b84a 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_strttp( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_strttp_work( matrix_layout, uplo, n, a, lda, ap );
index 8ca4e66..0243179 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_stzrzf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_sge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b88b9a8..e0d0e22 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,41 +48,44 @@ lapack_int LAPACKE_zbbcsd( int matrix_layout, char jobu1, char jobu2,
     lapack_int lrwork = -1;
     double* rwork = NULL;
     double rwork_query;
-    lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zbbcsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-    nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-    nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-    nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-    if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
-        return -10;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_lsame( jobu1, 'y' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) {
-            return -12;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( jobu2, 'y' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) {
-            return -14;
+        if( LAPACKE_d_nancheck( q, theta, 1 ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) {
-            return -16;
+        if( LAPACKE_lsame( jobu1, 'y' ) ) {
+            if( LAPACKE_zge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) {
+                return -12;
+            }
         }
-    }
-    if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) {
-            return -18;
+        if( LAPACKE_lsame( jobu2, 'y' ) ) {
+            if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
+            if( LAPACKE_zge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) {
+                return -16;
+            }
+        }
+        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
+            if( LAPACKE_zge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) {
+                return -18;
+            }
         }
     }
 #endif
index 34882cc..96b8b97 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zbbcsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,156 +47,36 @@ lapack_int LAPACKE_zbbcsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int lrwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
+        LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &m, &p, &q,
                        theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
                        &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e,
                        rwork, &lrwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_complex_double* u1_t = NULL;
-        lapack_complex_double* u2_t = NULL;
-        lapack_complex_double* v1t_t = NULL;
-        lapack_complex_double* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -13;
-            LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -15;
-            LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -17;
-            LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -19;
-            LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lrwork == -1 ) {
-            LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                           theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t,
-                           v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e,
-                           b22d, b22e, rwork, &lrwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_0;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_1;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_2;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_3;
-            }
-        }
-        /* Transpose input matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_zge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t,
-                               ldu1_t );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_zge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t,
-                               ldu2_t );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_zge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t,
-                               ldv1t_t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_zge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t,
-                               ldv2t_t );
-        }
-        /* Call LAPACK function and adjust info */
-        LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q,
-                       theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t,
-                       &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d,
-                       b21e, b22d, b22e, rwork, &lrwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_3:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_2:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_1:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info );
index 705ff63..c12ef3e 100644 (file)
@@ -47,26 +47,28 @@ lapack_int LAPACKE_zbdsqr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( ncc != 0 ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( ncc != 0 ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, ncc, c, ldc ) ) {
+                return -13;
+            }
         }
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -8;
-    }
-    if( nru != 0 ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
-            return -11;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( ncvt != 0 ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -8;
+        }
+        if( nru != 0 ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, nru, n, u, ldu ) ) {
+                return -11;
+            }
+        }
+        if( ncvt != 0 ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, ncvt, vt, ldvt ) ) {
+                return -9;
+            }
         }
     }
 #endif
index ff40822..f161b18 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zcgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 26b06ce..1c54c39 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zcposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 42b0556..63c9a75 100644 (file)
@@ -49,13 +49,15 @@ lapack_int LAPACKE_zgbbrd( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( ncc != 0 ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
-            return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -8;
+        }
+        if( ncc != 0 ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, m, ncc, c, ldc ) ) {
+                return -16;
+            }
         }
     }
 #endif
index d8e6d0f..6ce309d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zgbcon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8bd5fbc..33781a1 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zgbequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zgbequ_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index d311718..9603827 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zgbequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zgbequb_work( matrix_layout, m, n, kl, ku, ab, ldab, r, c,
index 2f77be1..2bf3fa3 100644 (file)
@@ -50,18 +50,20 @@ lapack_int LAPACKE_zgbrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -9;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -9;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f7be6aa..6d269de 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_zgbrfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb, ldafb ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -13;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -14;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -17;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -17;
     }
 #endif
     /* Allocate memory for working array(s) */
index b3f143c..17aa1d3 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zgbsv( int matrix_layout, lapack_int n, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_zgbsv_work( matrix_layout, n, kl, ku, nrhs, ab, ldab, ipiv, b,
index 9904a71..954245e 100644 (file)
@@ -51,29 +51,31 @@ lapack_int LAPACKE_zgbsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index ed82092..4d5f86b 100644 (file)
@@ -53,34 +53,36 @@ lapack_int LAPACKE_zgbsvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
-            ldafb ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, ku, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -15;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, afb,
+                ldafb ) ) {
+                return -10;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -27;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -16;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -14;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -15;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -27;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -14;
+            }
         }
     }
 #endif
index e01ac4a..34e84f2 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zgbtrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, kl+ku, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zgbtrf_work( matrix_layout, m, n, kl, ku, ab, ldab, ipiv );
index c8036b0..7192fd2 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zgbtrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zgb_nancheck( matrix_layout, n, n, kl, kl+ku, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_zgbtrs_work( matrix_layout, trans, n, kl, ku, nrhs, ab, ldab,
index eb2f497..69e5c50 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zgebak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, scale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_zgebak_work( matrix_layout, job, side, n, ilo, ihi, scale, m,
index ff0b8c2..25e0c01 100644 (file)
@@ -42,11 +42,13 @@ lapack_int LAPACKE_zgebal( int matrix_layout, char job, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
-        LAPACKE_lsame( job, 's' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'p' ) ||
+            LAPACKE_lsame( job, 's' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
     }
 #endif
index d7ae0eb..cb3409a 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_zgebrd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c74d1fc..ee0f9c9 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zgecon( int matrix_layout, char norm, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 058feae..43b5c2f 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zgeequ( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgeequ_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 82dd4c2..a97aa2d 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zgeequb( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgeequb_work( matrix_layout, m, n, a, lda, r, c, rowcnd,
index 8884671..66ba8e3 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_zgees( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 391a21b..f1792a6 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_zgeesx( int matrix_layout, char jobvs, char sort,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 56c00fe..6d4fe93 100644 (file)
@@ -49,9 +49,11 @@ lapack_int LAPACKE_zgeev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 59953e0..e10df52 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_zgeevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d713d34..92263cf 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgehrd( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6eababe..f3b5110 100644 (file)
@@ -41,22 +41,22 @@ lapack_int LAPACKE_zgejsv( int matrix_layout, char joba, char jobu, char jobv,
 {
     lapack_int info = 0;
     lapack_int lwork = (
-                       // 1.1
-       (            LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+                // 1.1
+        (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? 2*n+1 :
 
                 //1.2
-     (   (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+     (   (       LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? n*n+3*n :
 
                 //2.1
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
-              (!( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) )&&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+              !( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) )&&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
 
 
                 //2.2
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
               !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n :
 
@@ -79,10 +79,10 @@ lapack_int LAPACKE_zgejsv( 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' ) ))? 4*n*n:
-                       1) ) ) ) ) ) ) ) );
+                       1) ) ) ) ) ) ) );
     lapack_int lrwork = (
-                       // 1.1
-       (            LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
+                // 1.1
+        (        LAPACKE_lsame( jobu, 'n' ) &&  LAPACKE_lsame( jobv, 'n' ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,n+2*m) :
 
                 //1.2
@@ -90,13 +90,13 @@ lapack_int LAPACKE_zgejsv( int matrix_layout, char joba, char jobu, char jobv,
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,2*n) :
 
                 //2.1
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
-              (!( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) ) &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+              !( LAPACKE_lsame( jobu, 'u') ||  LAPACKE_lsame( jobu, 'f' ) ) &&
                ( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) :
 
 
                 //2.2
-    (  (          ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
+    (   (      ( LAPACKE_lsame( jobv, 'v' ) ||  LAPACKE_lsame( jobv, 'j' ) )  &&
               !( LAPACKE_lsame( jobu, 'u' ) ||  LAPACKE_lsame( jobu, 'f' ) ) &&
               !( LAPACKE_lsame( jobt, 't' ) ||  LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) :
 
@@ -119,7 +119,7 @@ lapack_int LAPACKE_zgejsv( 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) :
-                       7) ) ) ) ) ) ) ) );
+                       7) ) ) ) ) ) ) );
     lapack_int* iwork = NULL;
     double* rwork = NULL;
     lapack_complex_double* cwork = NULL;
@@ -130,11 +130,13 @@ lapack_int LAPACKE_zgejsv( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
-    nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nu = LAPACKE_lsame( jobu, 'n' ) ? 1 : m;
+        nv = LAPACKE_lsame( jobv, 'n' ) ? 1 : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5f12035..e0206b2 100644 (file)
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zgelq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
-lapack_int LAPACKE_zgelq_work( int matrix_layout, lapack_int m, lapack_int n,
-                               lapack_complex_double* a, lapack_int lda,
-                               lapack_complex_double* t, lapack_int tsize )
+lapack_int LAPACKE_zgelq( int matrix_layout, lapack_int m, lapack_int n,
+                          lapack_complex_double* a, lapack_int lda,
+                          lapack_complex_double* t, lapack_int tsize )
 {
     lapack_int info = 0;
     lapack_int lwork = -1;
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgelq_work( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3515b92..772db3c 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zgelq2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c977165..664cb48 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgelqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 4030729..79e275a 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zgels( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 05794e7..6d111c6 100644 (file)
@@ -55,15 +55,17 @@ lapack_int LAPACKE_zgelsd( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 41b6a97..4ef86b3 100644 (file)
@@ -49,15 +49,17 @@ lapack_int LAPACKE_zgelss( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8850ddb..bac6ab6 100644 (file)
@@ -49,15 +49,17 @@ lapack_int LAPACKE_zgelsy( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &rcond, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b47ca26..946e2b5 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zgemlq
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -48,15 +48,17 @@ lapack_int LAPACKE_zgemlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 07e1a7a..f5daf4a 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zgemqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( tsize, t, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( tsize, t, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f1f32bb..222422f 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_zgemqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #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_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -12;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+                             ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -12;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 559393e..b887f1d 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgeqlf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f467704..bd20b8b 100644 (file)
@@ -47,9 +47,11 @@ lapack_int LAPACKE_zgeqp3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4f7b4c5..2b9cecf 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_zgeqpf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2370f4c..3e567f5 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zgeqr
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgeqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 48fb5cb..8c33e0c 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zgeqr2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0c8255a..10db33a 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgeqrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 30342f5..62e5787 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgeqrfp( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 248ed17..5774d4b 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_zgeqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 82ed759..b31237c 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zgeqrt2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgeqrt2_work( matrix_layout, m, n, a, lda, t, ldt );
index e347df4..51f0558 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zgeqrt3( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgeqrt3_work( matrix_layout, m, n, a, lda, t, ldt );
index 98d2128..2ee8f70 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zgerfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 90a9c0e..a993ab8 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_zgerfsx( int matrix_layout, char trans, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -11;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'c' ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -12;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'b' ) || LAPACKE_lsame( equed, 'r' ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
     }
 #endif
     /* Allocate memory for working array(s) */
index d7b23b0..f77de8b 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgerqf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 18a53e4..016ec4f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zgesdd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -52,16 +52,18 @@ lapack_int LAPACKE_zgesdd( int matrix_layout, char jobz, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
     if( LAPACKE_lsame( jobz, 'n' ) ) {
         lrwork = MAX(1,7*MIN(m,n));
     } else {
-        lrwork = (size_t)MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1);
+        lrwork = (size_t)MAX(1,MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1));
     }
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)
index b334aee..23015cc 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zgesv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zgesv_work( matrix_layout, n, nrhs, a, lda, ipiv, b, ldb );
index d1e2a86..3a96c01 100644 (file)
@@ -50,9 +50,11 @@ lapack_int LAPACKE_zgesvd( int matrix_layout, char jobu, char jobvt,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4847dbf..2efe981 100644 (file)
 #include "lapacke_utils.h"
 
 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, 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 )
+                            lapack_int m, lapack_int n, 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,
+                            lapack_int* superb )
 {
     lapack_int info = 0;
     lapack_int lwork = -1;
@@ -54,14 +54,16 @@ lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
     info = LAPACKE_zgesvdx_work( matrix_layout, jobu, jobvt, range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
                                  ldu, vt, ldvt, &work_query, lwork, rwork, iwork );
     if( info != 0 ) {
         goto exit_level_0;
@@ -69,7 +71,7 @@ lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range
     lwork = LAPACK_Z2INT (work_query);
     /* Allocate memory for work arrays */
     work = (lapack_complex_double*)
-       LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+        LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
     if( work == NULL ) {
         info = LAPACK_WORK_MEMORY_ERROR;
         goto exit_level_1;
@@ -86,8 +88,8 @@ lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range
     }
     /* Call middle-level interface */
     info = LAPACKE_zgesvdx_work( matrix_layout, jobu, jobvt,  range,
-                                                        m, n, a, lda, vl, vu, il, iu, ns, s, u,
-                                ldu, vt, ldvt, work, lwork, rwork, iwork );
+                                 m, n, a, lda, vl, vu, il, iu, ns, s, u,
+                                 ldu, vt, ldvt, work, lwork, rwork, iwork );
     /* Backup significant data from working array(s) */
     for( i=0; i<12*MIN(m,n)-1; i++ ) {
         superb[i] = iwork[i+1];
index 3070687..d9e9cb6 100644 (file)
 #include "lapacke_utils.h"
 
 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, 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,
-                                double* rwork, lapack_int* iwork )
+                                 lapack_int m, lapack_int n, 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,
+                                 lapack_complex_double* work, lapack_int lwork,
+                                 double* rwork, lapack_int* iwork )
 {
     lapack_int info = 0;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         LAPACK_zgesvdx( &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;
@@ -85,7 +85,7 @@ lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char
         /* Query optimal working array(s) size if requested */
         if( lwork == -1 ) {
             LAPACK_zgesvdx( &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;
         }
@@ -116,7 +116,7 @@ lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char
         LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
         /* Call LAPACK function and adjust info */
         LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu,
-                                       &il, &iu, ns, s, u_t, &ldu_t, vt_t,
+                            &il, &iu, ns, s, u_t, &ldu_t, vt_t,
                             &ldvt_t, work, &lwork, rwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
index dfa0ca8..77805db 100644 (file)
@@ -51,15 +51,17 @@ lapack_int LAPACKE_zgesvj( int matrix_layout, char joba, char jobu, char jobv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
-            ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_v = LAPACKE_lsame( jobv, 'v' ) ? MAX(0,n) :
+                ( LAPACKE_lsame( jobv, 'a' ) ? MAX(0,mv) : 0);
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, n, v, ldv ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 37e6c1e..1a46cfa 100644 (file)
@@ -76,7 +76,7 @@ lapack_int LAPACKE_zgesvj_work( int matrix_layout, char joba, char jobu,
         }
         if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) {
             v_t = (lapack_complex_double*)
-               LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,n) );
+               LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,n) );
             if( v_t == NULL ) {
                 info = LAPACK_TRANSPOSE_MEMORY_ERROR;
                 goto exit_level_1;
index 886b217..344b577 100644 (file)
@@ -51,28 +51,30 @@ lapack_int LAPACKE_zgesvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 3bc9e25..cf0822b 100644 (file)
@@ -53,33 +53,35 @@ lapack_int LAPACKE_zgesvxx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'c' ) ) ) {
-        if( LAPACKE_d_nancheck( n, c, 1 ) ) {
-            return -13;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -25;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
-        LAPACKE_lsame( *equed, 'r' ) ) ) {
-        if( LAPACKE_d_nancheck( n, r, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'c' ) ) ) {
+            if( LAPACKE_d_nancheck( n, c, 1 ) ) {
+                return -13;
+            }
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -25;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && ( LAPACKE_lsame( *equed, 'b' ) ||
+            LAPACKE_lsame( *equed, 'r' ) ) ) {
+            if( LAPACKE_d_nancheck( n, r, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 8487197..9e05cfe 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zgetf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgetf2_work( matrix_layout, m, n, a, lda, ipiv );
index 9e028b8..f074b9e 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zgetrf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgetrf_work( matrix_layout, m, n, a, lda, ipiv );
index 2e8cd78..44793c9 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zgetrf2( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgetrf2_work( matrix_layout, m, n, a, lda, ipiv );
index 8a63c3a..f624dea 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zgetri( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index dfc3af8..3ce08b7 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zgetrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zgetrs_work( matrix_layout, trans, n, nrhs, a, lda, ipiv, b,
index 6e73657..62fe80b 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zgetsls( int matrix_layout, char trans, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, MAX(m,n), nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index dc0f81b..9acddb9 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_zggbak( int matrix_layout, char job, char side, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, lscale, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n, rscale, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, m, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_zggbak_work( matrix_layout, job, side, n, ilo, ihi, lscale,
index 7197d68..8bbfd28 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_zggbal( int matrix_layout, char job, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-            return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+                return -4;
+            }
         }
-    }
-    if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
-        LAPACKE_lsame( job, 'b' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-            return -6;
+        if( LAPACKE_lsame( job, 'p' ) || LAPACKE_lsame( job, 's' ) ||
+            LAPACKE_lsame( job, 'b' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+                return -6;
+            }
         }
     }
 #endif
index bcfc56e..68478fe 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_zgges( int matrix_layout, char jobvsl, char jobvsr, char sort
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index fc9813c..7d61245 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_zgges3( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e36e794..6b4d270 100644 (file)
@@ -58,12 +58,14 @@ lapack_int LAPACKE_zggesx( int matrix_layout, char jobvsl, char jobvsr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 1b8bf00..953b3c0 100644 (file)
@@ -51,12 +51,14 @@ lapack_int LAPACKE_zggev( int matrix_layout, char jobvl, char jobvr,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bfac8fe..626fe3d 100644 (file)
@@ -52,12 +52,14 @@ lapack_int LAPACKE_zggev3( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b43dcb5..ca39e99 100644 (file)
@@ -59,12 +59,14 @@ lapack_int LAPACKE_zggevx( int matrix_layout, char balanc, char jobvl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index c4bb131..0c9912c 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_zggglm( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c43f1a5..97d1e61 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_zgghd3( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index f931b16..e6b2ddc 100644 (file)
@@ -45,21 +45,23 @@ lapack_int LAPACKE_zgghrd( int matrix_layout, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -13;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -13;
+            }
         }
     }
 #endif
index 2138767..40faf67 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_zgglse( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( m, c, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_z_nancheck( p, d, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( m, c, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_z_nancheck( p, d, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5b80b4c..35c908f 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zggqrf( int matrix_layout, lapack_int n, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, m, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, p, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index fb6acc3..328f8b0 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zggrqf( int matrix_layout, lapack_int m, lapack_int p,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 9aa39df..e6425f4 100644 (file)
@@ -52,12 +52,14 @@ lapack_int LAPACKE_zggsvd( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e274fe0..62dce80 100644 (file)
@@ -54,12 +54,14 @@ lapack_int LAPACKE_zggsvd3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
+        }
     }
 #endif
     /* Query optimal size for working array */
index 01136e8..537bf6c 100644 (file)
@@ -53,18 +53,20 @@ lapack_int LAPACKE_zggsvp( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d853f7d..d549305 100644 (file)
@@ -55,18 +55,20 @@ lapack_int LAPACKE_zggsvp3( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal size for working array */
index bde0c83..50f334f 100644 (file)
@@ -43,21 +43,23 @@ lapack_int LAPACKE_zgtcon( char norm, lapack_int n,
     lapack_int info = 0;
     lapack_complex_double* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b4fea7b..9df5ce9 100644 (file)
@@ -54,33 +54,35 @@ lapack_int LAPACKE_zgtrfs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_z_nancheck( n, df, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -15;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_z_nancheck( n, df, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+            return -11;
+        }
+        if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -15;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e9c8cf5..28c3fb3 100644 (file)
@@ -43,18 +43,20 @@ lapack_int LAPACKE_zgtsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zgtsv_work( matrix_layout, n, nrhs, dl, d, du, b, ldb );
index c151388..c20a850 100644 (file)
@@ -54,37 +54,39 @@ lapack_int LAPACKE_zgtsvx( int matrix_layout, char fact, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -14;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_z_nancheck( n, df, 1 ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
-            return -9;
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_z_nancheck( n, df, 1 ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
-            return -11;
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_z_nancheck( n-1, dlf, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_z_nancheck( n-1, duf, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 2afda6a..8445ea6 100644 (file)
@@ -38,15 +38,17 @@ lapack_int LAPACKE_zgttrf( lapack_int n, lapack_complex_double* dl,
                            lapack_complex_double* du2, lapack_int* ipiv )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zgttrf_work( n, dl, d, du, du2, ipiv );
index d730834..bc8599f 100644 (file)
@@ -46,21 +46,23 @@ lapack_int LAPACKE_zgttrs( int matrix_layout, char trans, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( n, d, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( n, d, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_z_nancheck( n-1, dl, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-1, du, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( n-2, du2, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zgttrs_work( matrix_layout, trans, n, nrhs, dl, d, du, du2,
index 8078487..30ac7fc 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhbev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6bad98d..dad35b8 100644 (file)
@@ -48,9 +48,11 @@ lapack_int LAPACKE_zhbev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 410735f..95c6d3a 100644 (file)
@@ -53,9 +53,11 @@ lapack_int LAPACKE_zhbevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index cf1263d..eca867b 100644 (file)
@@ -53,9 +53,11 @@ lapack_int LAPACKE_zhbevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 6e75bae..6d06917 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_zhbevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 5adf499..126182c 100644 (file)
@@ -53,21 +53,23 @@ lapack_int LAPACKE_zhbevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 86a0207..54deacf 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zhbgst( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2429ab0..7f1e679 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zhbgv( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index bd9c94b..91bfc0a 100644 (file)
@@ -54,12 +54,14 @@ lapack_int LAPACKE_zhbgvd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -7;
+        }
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index f2254fe..d61439a 100644 (file)
@@ -52,24 +52,26 @@ lapack_int LAPACKE_zhbgvx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -18;
-    }
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, ka, ab, ldab ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -15;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -18;
+        }
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -15;
+            }
         }
     }
 #endif
index c3abb6a..0682d0a 100644 (file)
@@ -45,13 +45,15 @@ lapack_int LAPACKE_zhbtrd( int matrix_layout, char vect, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( vect, 'u' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( vect, 'u' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 731796d..f6b9d8c 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zhecon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a08bc8c..94dd047 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zhecon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_zhecon_3( int matrix_layout, char uplo, lapack_int n,
 {
     lapack_int info = 0;
     lapack_complex_double* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zhecon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c0790a0..cbb346e 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zheequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 98c9440..2c40428 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zheev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c7ef18d..4369de2 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zheev_2stage( int matrix_layout, char jobz, char uplo, lapack
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 61e2d25..4b1afb9 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_zheevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b6dd0a2..9016da5 100644 (file)
@@ -51,9 +51,11 @@ lapack_int LAPACKE_zheevd_2stage( int matrix_layout, char jobz, char uplo, lapac
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d20b0f1..52e7a5b 100644 (file)
@@ -55,21 +55,23 @@ lapack_int LAPACKE_zheevr( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 38748e4..faf949a 100644 (file)
@@ -55,21 +55,23 @@ lapack_int LAPACKE_zheevr_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 2ccf9f9..0b8bd5a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zheevr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -54,8 +54,9 @@ lapack_int LAPACKE_zheevr_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index 5fa4f32..f93e987 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_zheevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 1350e17..7840363 100644 (file)
@@ -51,21 +51,23 @@ lapack_int LAPACKE_zheevx_2stage( int matrix_layout, char jobz, char range, char
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -9;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index b7ac0ba..b77200a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zheevx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -53,8 +53,9 @@ lapack_int LAPACKE_zheevx_work( int matrix_layout, char jobz, char range,
             info = info - 1;
         }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) ||
-                             LAPACKE_lsame( range, 'v' ) ) ? n :
+        lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 :
+                             ( LAPACKE_lsame( range, 'a' ) ||
+                               LAPACKE_lsame( range, 'v' ) ) ? n :
                              ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1);
         lapack_int lda_t = MAX(1,n);
         lapack_int ldz_t = MAX(1,n);
index c9835df..aa2d84d 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zhegst_work( matrix_layout, itype, uplo, n, a, lda, b, ldb );
index 49386ad..683fcf4 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zhegv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 31f8eba..0f1b415 100644 (file)
@@ -48,12 +48,14 @@ lapack_int LAPACKE_zhegv_2stage( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 89458d7..81c3d29 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_zhegvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 18e94dd..492bc4d 100644 (file)
@@ -53,24 +53,26 @@ lapack_int LAPACKE_zhegvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -12;
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 4da4f56..bee995f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zhegvx
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index 24bd632..1507ae5 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zherfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d3371c8..c50e0b3 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_zherfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index 807e61a..93baf17 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zhesv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2981846..d8be883 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zhesv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage.c
new file mode 100644 (file)
index 0000000..c09423d
--- /dev/null
@@ -0,0 +1,90 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zhesv_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_double* work = NULL;
+    lapack_complex_double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_zhesv_aa_2stage_work( matrix_layout, uplo, n, nrhs,  
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_Z2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_double*)
+        LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zhesv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                                              a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zhesv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..9906210
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zhesv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhesv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb,
+                               lapack_complex_double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhesv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        lapack_complex_double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_zhesv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhesv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zhesv_aa_2stage_work", info );
+    }
+    return info;
+}
index 777a7b9..469579d 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zhesv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,15 +47,14 @@ lapack_int LAPACKE_zhesv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b3f36c2..71d22a3 100644 (file)
@@ -51,17 +51,19 @@ lapack_int LAPACKE_zhesvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index 29e9b4e..8571ca7 100644 (file)
@@ -53,26 +53,28 @@ lapack_int LAPACKE_zhesvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 61dbb24..070ec09 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zheswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zheswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index ea0199c..35adae4 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhetrd( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0613fce..a160840 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhetrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8649ad0..a2a20f2 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhetrf_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..d009d8e
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zhetrf_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_double* work = NULL;
+    lapack_complex_double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_zhetrf_aa_2stage_work( matrix_layout, uplo, n,  
+                               a, lda, tb, ltb, ipiv, ipiv2,
+                               &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_Z2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_double*)
+        LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zhetrf_aa_2stage_work( matrix_layout, uplo, n,
+                                              a, lda, tb, ltb, ipiv, ipiv2,
+                               work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zhetrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..5b8010d
--- /dev/null
@@ -0,0 +1,109 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zhetrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb,  
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhetrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_zhetrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhetrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zhetrf_aa_2stage_work", info );
+    }
+    return info;
+}
index 19dc423..187de8a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zhetrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,11 @@ lapack_int LAPACKE_zhetrf_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 45d6964..b5c39c9 100644 (file)
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zhetrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
 
 lapack_int LAPACKE_zhetrf_rk_work( int matrix_layout, char uplo, lapack_int n,
                                 lapack_complex_double* a, lapack_int lda,
-                                lapack_complex_double* e, 
+                                lapack_complex_double* e,
                                 lapack_int* ipiv, lapack_complex_double* work,
                                 lapack_int lwork )
 {
index 1a3ed91..16e8f47 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhetrf_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 725b486..892da6e 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zhetri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6df4c4f..54f7b9b 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zhetri2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b991412..a07bc8d 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zhetri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 33790c2..32692e0 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zhetri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,17 +41,20 @@ lapack_int LAPACKE_zhetri_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int lwork = -1;
     lapack_complex_double* work = NULL;
     lapack_complex_double work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zhetri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 410f391..530e3fd 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zhetrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zhetrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 0e72494..be8c241 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zhetrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 016bc79..fb74e9b 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zhetrs_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -44,17 +44,19 @@ lapack_int LAPACKE_zhetrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_zhetrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
-                                                         e, ipiv, b, ldb );
+                                  e, ipiv, b, ldb );
 }
index b15786f..ddcd659 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zhetrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..b083d6f
--- /dev/null
@@ -0,0 +1,66 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zhetrs_aa_2stage
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a,
+                          lapack_int lda, lapack_complex_double* tb,
+                          lapack_int ltb, lapack_int* ipiv, lapack_int* ipiv2,
+                          lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Call middle-level interface */
+    info = LAPACKE_zhetrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                                              a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb);
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zhetrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..6111233
--- /dev/null
@@ -0,0 +1,114 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zhetrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zhetrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhetrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        lapack_complex_double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zhetrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zhetrs_aa_2stage_work", info );
+    }
+    return info;
+}
index 806732b..befeafd 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zhetrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zhetrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 6a42a47..3824692 100644 (file)
@@ -44,20 +44,22 @@ lapack_int LAPACKE_zhfrk( int matrix_layout, char transr, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
-    na = LAPACKE_lsame( trans, 'n' ) ? n : k;
-    if( LAPACKE_zge_nancheck( matrix_layout, na, ka, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
-        return -10;
-    }
-    if( LAPACKE_zpf_nancheck( n, c ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ka = LAPACKE_lsame( trans, 'n' ) ? k : n;
+        na = LAPACKE_lsame( trans, 'n' ) ? n : k;
+        if( LAPACKE_zge_nancheck( matrix_layout, na, ka, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_d_nancheck( 1, &alpha, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &beta, 1 ) ) {
+            return -10;
+        }
+        if( LAPACKE_zpf_nancheck( n, c ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_zhfrk_work( matrix_layout, transr, uplo, trans, n, k, alpha,
index f91988c..fc91242 100644 (file)
@@ -52,21 +52,23 @@ lapack_int LAPACKE_zhgeqz( int matrix_layout, char job, char compq, char compz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -14;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -16;
+        if( LAPACKE_lsame( compq, 'i' ) || LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -14;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -16;
+            }
         }
     }
 #endif
index 2ca04da..b458f63 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zhpcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d442381..72f5850 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_zhpev( int matrix_layout, char jobz, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index ed80266..948bb9c 100644 (file)
@@ -52,9 +52,11 @@ lapack_int LAPACKE_zhpevd( int matrix_layout, char jobz, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 09839ef..86293e9 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_zhpevx( int matrix_layout, char jobz, char range, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index f589855..6099fda 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_zhpgst( int matrix_layout, lapack_int itype, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zhp_nancheck( n, bp ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zhp_nancheck( n, bp ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zhpgst_work( matrix_layout, itype, uplo, n, ap, bp );
index b568812..765bbd4 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zhpgv( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_zhp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_zhp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 5be65b3..be18d33 100644 (file)
@@ -53,12 +53,14 @@ lapack_int LAPACKE_zhpgvd( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_zhp_nancheck( n, bp ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_zhp_nancheck( n, bp ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index c6c378f..3f57223 100644 (file)
@@ -50,24 +50,26 @@ lapack_int LAPACKE_zhpgvx( int matrix_layout, lapack_int itype, char jobz,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -13;
-    }
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_zhp_nancheck( n, bp ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -10;
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_zhp_nancheck( n, bp ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -10;
+            }
         }
     }
 #endif
index 5158148..4a8c715 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zhprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3157ba4..e0be842 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zhpsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zhpsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index f3f41d5..b303529 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_zhpsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zhp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zhp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 5e8d1d3..8af15b6 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zhptrd( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zhptrd_work( matrix_layout, uplo, n, ap, d, e, tau );
index 1b41ed5..f22a708 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zhptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zhptrf_work( matrix_layout, uplo, n, ap, ipiv );
index 76a0a8a..c20c3a5 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zhptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 790e91b..5a62629 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zhptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zhptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index b013f7a..481485c 100644 (file)
@@ -49,22 +49,24 @@ lapack_int LAPACKE_zhsein( int matrix_layout, char job, char eigsrc, char initv,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'l' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'r' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
+        }
+        if( LAPACKE_z_nancheck( n, w, 1 ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_z_nancheck( n, w, 1 ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 33ebf25..6d1f71a 100644 (file)
@@ -48,13 +48,15 @@ lapack_int LAPACKE_zhseqr( int matrix_layout, char job, char compz, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, h, ldh ) ) {
+            return -7;
+        }
+        if( LAPACKE_lsame( compz, 'i' ) || LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -10;
+            }
         }
     }
 #endif
index b2316d6..3b1130b 100644 (file)
@@ -37,9 +37,11 @@ lapack_int LAPACKE_zlacgv( lapack_int n, lapack_complex_double* x,
                            lapack_int incx )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_z_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
-        return -2;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_z_nancheck( 1+(n-1)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
     }
 #endif
     return LAPACKE_zlacgv_work( n, x, incx );
index e64c071..76c6fd9 100644 (file)
@@ -38,12 +38,14 @@ lapack_int LAPACKE_zlacn2( lapack_int n, lapack_complex_double* v,
                            double* est, lapack_int* kase, lapack_int* isave )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n, x, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, est, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n, x, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_zlacn2_work( n, v, x, est, kase, isave );
index d80fbaf..da5a178 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zlacp2( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zlacp2_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
index 5196d7a..87dbc36 100644 (file)
@@ -31,7 +31,6 @@
 * Generated January, 2013
 *****************************************************************************/
 
-#include "lapacke.h"
 #include "lapacke_utils.h"
 
 lapack_int LAPACKE_zlacp2_work( int matrix_layout, char uplo, lapack_int m,
index 8e59e6b..2b9b582 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zlacpy( int matrix_layout, char uplo, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zlacpy_work( matrix_layout, uplo, m, n, a, lda, b, ldb );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlacrm.c b/lapack-netlib/LAPACKE/src/lapacke_zlacrm.c
new file mode 100644 (file)
index 0000000..a6a295d
--- /dev/null
@@ -0,0 +1,76 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zlacrm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacrm(int matrix_layout, lapack_int m,
+                           lapack_int n, const lapack_complex_double* a,
+                           lapack_int lda, const double* b, lapack_int ldb,
+                           lapack_complex_double* c, lapack_int ldc)
+{
+    lapack_int info = 0;
+    double* rwork = NULL;
+
+    if (matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR) {
+        LAPACKE_xerbla("LAPACKE_zlacrm", -1);
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if ( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -6;
+        }
+    }
+#endif
+    /* Allocate memory for work array(s) */
+    rwork = (double*)
+        LAPACKE_malloc(sizeof(double) * MAX(1, 2 * m * n));
+    if (rwork == NULL) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zlacrm_work(matrix_layout, m, n, a, lda, b, ldb,
+                                c, ldc, rwork);
+    /* Release memory and exit */
+    LAPACKE_free(rwork);
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zlacrm", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlacrm_work.c b/lapack-netlib/LAPACKE/src/lapacke_zlacrm_work.c
new file mode 100644 (file)
index 0000000..a2fd362
--- /dev/null
@@ -0,0 +1,110 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zlacrm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlacrm_work(int matrix_layout, lapack_int m, lapack_int n,
+                                const lapack_complex_double* a, lapack_int lda,
+                                const double* b, lapack_int ldb,
+                                lapack_complex_double* c, lapack_int ldc,
+                                double* rwork)
+{
+    lapack_int info = 0;
+    if (matrix_layout == LAPACK_COL_MAJOR) {
+        /* Call LAPACK function */
+        LAPACK_zlacrm(&m, &n, a, &lda, b, &ldb, c, &ldc, rwork);
+    } else if (matrix_layout == LAPACK_ROW_MAJOR) {
+        lapack_int lda_t = MAX(1,m);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_int ldc_t = MAX(1,m);
+        lapack_complex_double* a_t = NULL;
+        double* b_t = NULL;
+        lapack_complex_double* c_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -5;
+            LAPACKE_xerbla( "LAPACKE_zlacrm_work", info );
+            return info;
+        }
+        if( ldb < n ) {
+            info = -7;
+            LAPACKE_xerbla( "LAPACKE_zlacrm_work", info );
+            return info;
+        }
+        if( ldc < n ) {
+            info = -9;
+            LAPACKE_xerbla( "LAPACKE_zlacrm_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)
+            LAPACKE_malloc(sizeof(lapack_complex_double) * lda_t * MAX(1,n));
+        b_t = (double*)
+            LAPACKE_malloc(sizeof(double) * ldb_t * MAX(1,n));
+        c_t = (lapack_complex_double*)
+            LAPACKE_malloc((sizeof(lapack_complex_double) * ldc_t * MAX(1,n)));
+        if (a_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        if (b_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        if (c_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zge_trans(matrix_layout, m, n, a, lda, a_t, lda_t);
+        LAPACKE_dge_trans(matrix_layout, n, n, b, ldb, b_t, ldb_t);
+        /* Call LAPACK function */
+        LAPACK_zlacrm(&m, &n, a_t, &lda_t, b_t, &ldb_t, c_t, &ldc_t, rwork);
+        /* Transpose output matrices */
+        LAPACKE_zge_trans(LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc);
+        /* Release memory and exit */
+        LAPACKE_free(c_t);
+exit_level_2:
+        LAPACKE_free(b_t);
+exit_level_1:
+        LAPACKE_free(a_t);
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zlacrm_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla("LAPACKE_zlacrm_work", -1);
+    }
+    return info;
+}
index 1b3ea91..d1b330e 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zlag2c( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zlag2c_work( matrix_layout, m, n, a, lda, sa, ldsa );
index 68704c8..5710ddd 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_zlagge( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( MIN(m,n), d, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0596774..923b0fa 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zlaghe( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index a47533e..d221497 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zlagsy( int matrix_layout, lapack_int n, lapack_int k,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6ea7319..a87b872 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zlange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,16 +38,18 @@ double LAPACKE_zlange( int matrix_layout, char norm, lapack_int m,
                            lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zlange", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 60d1812..83cbbc3 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zlange
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,38 +38,42 @@ double LAPACKE_zlange_work( int matrix_layout, char norm, lapack_int m,
                                 lapack_int lda, double* work )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
+    char norm_lapack;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
+        /* Call LAPACK function */
         res = LAPACK_zlange( &norm, &m, &n, a, &lda, work );
-        if( info < 0 ) {
-            info = info - 1;
-        }
     } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int lda_t = MAX(1,m);
-        lapack_complex_double* a_t = NULL;
+        double* work_lapack = NULL;
         /* Check leading dimension(s) */
         if( lda < n ) {
             info = -6;
             LAPACKE_xerbla( "LAPACKE_zlange_work", info );
             return info;
         }
-        /* Allocate memory for temporary array(s) */
-        a_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
-        if( a_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
+        if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) {
+            norm_lapack = 'i';
+        } else if( LAPACKE_lsame( norm, 'i' ) ) {
+            norm_lapack = '1';
+        } else {
+            norm_lapack = norm;
+        }
+        /* Allocate memory for work array(s) */
+        if( LAPACKE_lsame( norm_lapack, 'i' ) ) {
+            work_lapack = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+            if( work_lapack == NULL ) {
+                info = LAPACK_WORK_MEMORY_ERROR;
+                goto exit_level_0;
+            }
         }
-        /* Transpose input matrices */
-        LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t );
-        /* Call LAPACK function and adjust info */
-        res = LAPACK_zlange( &norm, &m, &n, a_t, &lda_t, work );
-        info = 0;  /* LAPACK call is ok! */
+        /* Call LAPACK function */
+        res = LAPACK_zlange( &norm_lapack, &n, &m, a, &lda, work_lapack );
         /* Release memory and exit */
-        LAPACKE_free( a_t );
+        if( work_lapack ) {
+            LAPACKE_free( work_lapack );
+        }
 exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+        if( info == LAPACK_WORK_MEMORY_ERROR ) {
             LAPACKE_xerbla( "LAPACKE_zlange_work", info );
         }
     } else {
index 233231a..9b99b29 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zlanhe
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ double LAPACKE_zlanhe( int matrix_layout, char norm, char uplo, lapack_int n,
                            const lapack_complex_double* a, lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zlanhe", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b3e4de5..22127df 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zlanhe
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,7 +38,7 @@ double LAPACKE_zlanhe_work( int matrix_layout, char norm, char uplo,
                                 lapack_int lda, double* work )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         res = LAPACK_zlanhe( &norm, &uplo, &n, a, &lda, work );
index 491a629..d1e9e0d 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zlansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -37,16 +37,18 @@ double LAPACKE_zlansy( int matrix_layout, char norm, char uplo, lapack_int n,
                            const lapack_complex_double* a, lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zlansy", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6088b44..a88390f 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zlansy
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -38,7 +38,7 @@ double LAPACKE_zlansy_work( int matrix_layout, char norm, char uplo,
                                 lapack_int lda, double* work )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     if( matrix_layout == LAPACK_COL_MAJOR ) {
         /* Call LAPACK function and adjust info */
         res = LAPACK_zlansy( &norm, &uplo, &n, a, &lda, work );
index 29f7cf2..e2e0bec 100644 (file)
@@ -38,16 +38,18 @@ double LAPACKE_zlantr( int matrix_layout, char norm, char uplo, char diag,
                            const lapack_complex_double* a, lapack_int lda )
 {
     lapack_int info = 0;
-       double res = 0.;
+    double res = 0.;
     double* work = NULL;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zlantr", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, MIN(m,n), a, lda ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 2ce3ab8..b81976c 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zlapmr( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zlapmr_work( matrix_layout, forwrd, m, n, x, ldx, k );
index 8186560..c83583f 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zlapmt( int matrix_layout, lapack_logical forwrd,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, x, ldx ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, x, ldx ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zlapmt_work( matrix_layout, forwrd, m, n, x, ldx, k );
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlarcm.c b/lapack-netlib/LAPACKE/src/lapacke_zlarcm.c
new file mode 100644 (file)
index 0000000..6421922
--- /dev/null
@@ -0,0 +1,76 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zlarcm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarcm(int matrix_layout, lapack_int m,
+                           lapack_int n, const double* a, lapack_int lda,
+                           const lapack_complex_double* b, lapack_int ldb,
+                           lapack_complex_double* c, lapack_int ldc)
+{
+    lapack_int info = 0;
+    double* rwork = NULL;
+
+    if (matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR) {
+        LAPACKE_xerbla("LAPACKE_zlarcm", -1);
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if ( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_dge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
+    }
+#endif
+    /* Allocate memory for work array(s) */
+    rwork = (double*)
+        LAPACKE_malloc(sizeof(double) * MAX(1, 2 * m * n));
+    if (rwork == NULL) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zlarcm_work(matrix_layout, m, n, a, lda, b, ldb,
+                                c, ldc, rwork);
+    /* Release memory and exit */
+    LAPACKE_free(rwork);
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zlarcm", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlarcm_work.c b/lapack-netlib/LAPACKE/src/lapacke_zlarcm_work.c
new file mode 100644 (file)
index 0000000..183d958
--- /dev/null
@@ -0,0 +1,110 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zlarcm
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlarcm_work(int matrix_layout, lapack_int m, lapack_int n,
+                                const double* a, lapack_int lda,
+                                const lapack_complex_double* b, lapack_int ldb,
+                                lapack_complex_double* c, lapack_int ldc,
+                                double* rwork)
+{
+    lapack_int info = 0;
+    if (matrix_layout == LAPACK_COL_MAJOR) {
+        /* Call LAPACK function */
+        LAPACK_zlarcm(&m, &n, a, &lda, b, &ldb, c, &ldc, rwork);
+    } else if (matrix_layout == LAPACK_ROW_MAJOR) {
+        lapack_int lda_t = MAX(1,m);
+        lapack_int ldb_t = MAX(1,m);
+        lapack_int ldc_t = MAX(1,m);
+        double* a_t = NULL;
+        lapack_complex_double* b_t = NULL;
+        lapack_complex_double* c_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < m ) {
+            info = -5;
+            LAPACKE_xerbla( "LAPACKE_zlarcm_work", info );
+            return info;
+        }
+        if( ldb < n ) {
+            info = -7;
+            LAPACKE_xerbla( "LAPACKE_zlarcm_work", info );
+            return info;
+        }
+        if( ldc < n ) {
+            info = -9;
+            LAPACKE_xerbla( "LAPACKE_zlarcm_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (double*)
+            LAPACKE_malloc(sizeof(double) * lda_t * MAX(1,m));
+        b_t = (lapack_complex_double*)
+            LAPACKE_malloc(sizeof(lapack_complex_double) * ldb_t * MAX(1,n));
+        c_t = (lapack_complex_double*)
+            LAPACKE_malloc((sizeof(lapack_complex_double) * ldc_t * MAX(1,n)));
+        if (a_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        if (b_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        if (c_t == NULL) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_dge_trans(matrix_layout, m, m, a, lda, a_t, lda_t);
+        LAPACKE_zge_trans(matrix_layout, m, n, b, ldb, b_t, ldb_t);
+        /* Call LAPACK function */
+        LAPACK_zlarcm(&m, &n, a_t, &lda_t, b_t, &ldb_t, c_t, &ldc_t, rwork);
+        /* Transpose output matrices */
+        LAPACKE_zge_trans(LAPACK_COL_MAJOR, m, n, c_t, ldc_t, c, ldc);
+        /* Release memory and exit */
+        LAPACKE_free(c_t);
+exit_level_2:
+        LAPACKE_free(b_t);
+exit_level_1:
+        LAPACKE_free(a_t);
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zlarcm_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla("LAPACKE_zlarcm_work", -1);
+    }
+    return info;
+}
index e4f993f..6ea4960 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zlarfb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,7 +41,7 @@ lapack_int LAPACKE_zlarfb( int matrix_layout, char side, char trans, char direct
                            lapack_int ldc )
 {
     lapack_int info = 0;
-    lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1);
+    lapack_int ldwork;
     lapack_complex_double* work = NULL;
     lapack_int ncols_v, nrows_v;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -49,57 +49,66 @@ lapack_int LAPACKE_zlarfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'r' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
-    nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'l' ) ) ? m :
-                         ( ( LAPACKE_lsame( storev, 'c' ) &&
-                         LAPACKE_lsame( side, 'r' ) ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -13;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
-        if( k > nrows_v ) {
-            LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'r' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n : 1) );
+        nrows_v = ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'l' ) ) ? m :
+                             ( ( LAPACKE_lsame( storev, 'c' ) &&
+                             LAPACKE_lsame( side, 'r' ) ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1) );
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -13;
         }
-        if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k,
-            &v[(nrows_v-k)*ldv], ldv ) )
-            return -9;
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
-            return -9;
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
-            ldv ) )
-            return -9;
-    } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
-        if( k > ncols_v ) {
-            LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
-            return -8;
+        if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, &v[k*ldv],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'c' ) && LAPACKE_lsame( direct, 'b' ) ) {
+            if( k > nrows_v ) {
+                LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k,
+                &v[(nrows_v-k)*ldv], ldv ) )
+                return -9;
+            if( LAPACKE_zge_nancheck( matrix_layout, nrows_v-k, ncols_v, v, ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( LAPACKE_ztr_nancheck( matrix_layout, 'u', 'u', k, v, ldv ) )
+                return -9;
+            if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, &v[k],
+                ldv ) )
+                return -9;
+        } else if( LAPACKE_lsame( storev, 'r' ) && LAPACKE_lsame( direct, 'f' ) ) {
+            if( k > ncols_v ) {
+                LAPACKE_xerbla( "LAPACKE_zlarfb", -8 );
+                return -8;
+            }
+            if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
+                ldv ) )
+                return -9;
+            if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
+                return -9;
         }
-        if( LAPACKE_ztr_nancheck( matrix_layout, 'l', 'u', k, &v[ncols_v-k],
-            ldv ) )
-            return -9;
-        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v-k, v, ldv ) )
-            return -9;
     }
 #endif
+    if( LAPACKE_lsame( side, 'l' ) ) {
+        ldwork = n;
+    } else if( LAPACKE_lsame( side, 'r' ) ) {
+        ldwork = m;
+    } else {
+        ldwork = 1;
+    }
     /* Allocate memory for working array(s) */
     work = (lapack_complex_double*)
         LAPACKE_malloc( sizeof(lapack_complex_double) * ldwork * MAX(1,k) );
index ea3a37f..14e587f 100644 (file)
@@ -38,12 +38,14 @@ lapack_int LAPACKE_zlarfg( lapack_int n, lapack_complex_double* alpha,
                            lapack_complex_double* tau )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_z_nancheck( 1, alpha, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_z_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_z_nancheck( 1, alpha, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_z_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_zlarfg_work( n, alpha, x, incx, tau );
index 2cde895..be218df 100644 (file)
@@ -45,16 +45,18 @@ lapack_int LAPACKE_zlarft( int matrix_layout, char direct, char storev,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
-                         ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
-    nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
-                         ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        ncols_v = LAPACKE_lsame( storev, 'c' ) ? k :
+                             ( LAPACKE_lsame( storev, 'r' ) ? n : 1);
+        nrows_v = LAPACKE_lsame( storev, 'c' ) ? n :
+                             ( LAPACKE_lsame( storev, 'r' ) ? k : 1);
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zlarft_work( matrix_layout, direct, storev, n, k, v, ldv, tau,
index b1b1ec5..1dd1f52 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_zlarfx( int matrix_layout, char side, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( 1, &tau, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_z_nancheck( m, v, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( 1, &tau, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_z_nancheck( m, v, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zlarfx_work( matrix_layout, side, m, n, v, tau, c, ldc,
index de4b9c2..7e37d55 100644 (file)
@@ -43,68 +43,70 @@ lapack_int LAPACKE_zlascl( int matrix_layout, char type, lapack_int kl,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    switch (type) {
-    case 'G':
-        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        switch (type) {
+        case 'G':
+            if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+                return -9;
+            }
+            break;
+        case 'L':
+            // TYPE = 'L' - lower triangle of general matrix
+            if( matrix_layout == LAPACK_COL_MAJOR &&
+                LAPACKE_zgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
+                return -9;
+            }
+            if( matrix_layout == LAPACK_ROW_MAJOR &&
+                LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
+                return -9;
+            }
+            break;
+        case 'U':
+            // TYPE = 'U' - upper triangle of general matrix
+            if( matrix_layout == LAPACK_COL_MAJOR &&
+                LAPACKE_zgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
+                return -9;
+            }
+            if( matrix_layout == LAPACK_ROW_MAJOR &&
+                LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
+                return -9;
+            }
+            break;
+        case 'H':
+            // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
+            if( matrix_layout == LAPACK_COL_MAJOR &&
+                LAPACKE_zgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
+                return -9;
+            }
+            if( matrix_layout == LAPACK_ROW_MAJOR &&
+                LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
+                return -9;
+            }
+        case 'B':
+            // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
+            if( LAPACKE_zhb_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_zhb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
+                return -9;
+            }
+            break;
+        case 'Z':
+            // TYPE = 'Z' -  band matrix laid out for ?GBTRF
+            if( matrix_layout == LAPACK_COL_MAJOR &&
+                LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
+                return -9;
+            }
+            if( matrix_layout == LAPACK_ROW_MAJOR &&
+                LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
+                return -9;
+            }
+            break;
         }
-        break;
-    case 'L':
-        // TYPE = 'L' - lower triangle of general matrix
-        if( matrix_layout == LAPACK_COL_MAJOR &&
-            LAPACKE_zgb_nancheck( matrix_layout, m, n, m-1, 0, a, lda+1 ) ) {
-            return -9;
-        }
-        if( matrix_layout == LAPACK_ROW_MAJOR &&
-            LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, 0, m-1, a-m+1, lda+1 ) ) {
-            return -9;
-        }
-        break;
-    case 'U':
-        // TYPE = 'U' - upper triangle of general matrix
-        if( matrix_layout == LAPACK_COL_MAJOR &&
-            LAPACKE_zgb_nancheck( matrix_layout, m, n, 0, n-1, a-n+1, lda+1 ) ) {
-            return -9;
-        }
-        if( matrix_layout == LAPACK_ROW_MAJOR &&
-            LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 0, a, lda+1 ) ) {
-            return -9;
-        }
-        break;
-    case 'H':
-        // TYPE = 'H' - part of upper Hessenberg matrix in general matrix
-        if( matrix_layout == LAPACK_COL_MAJOR &&
-            LAPACKE_zgb_nancheck( matrix_layout, m, n, 1, n-1, a-n+1, lda+1 ) ) {
-            return -9;
-        }
-        if( matrix_layout == LAPACK_ROW_MAJOR &&
-            LAPACKE_zgb_nancheck( LAPACK_COL_MAJOR, n, m, n-1, 1, a-1, lda+1 ) ) {
-            return -9;
-        }
-    case 'B':
-        // TYPE = 'B' - lower part of symmetric band matrix (assume m==n)
-        if( LAPACKE_zhb_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_zhb_nancheck( matrix_layout, 'U', n, ku, a, lda ) ) {
-            return -9;
-        }
-        break;
-    case 'Z':
-        // TYPE = 'Z' -  band matrix laid out for ?GBTRF
-        if( matrix_layout == LAPACK_COL_MAJOR &&
-            LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+kl, lda ) ) {
-            return -9;
-        }
-        if( matrix_layout == LAPACK_ROW_MAJOR &&
-            LAPACKE_zgb_nancheck( matrix_layout, m, n, kl, ku, a+lda*kl, lda ) ) {
-            return -9;
-        }
-        break;
     }
 #endif
     return LAPACKE_zlascl_work( matrix_layout, type, kl, ku, cfrom, cto, m,  n, a, lda );
index 2dc0179..d43a424 100644 (file)
@@ -51,12 +51,14 @@ lapack_int LAPACKE_zlaset( int matrix_layout, char uplo, lapack_int m,
 
 
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( 1, &beta, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( 1, &beta, 1 ) ) {
+            return -6;
+        }
     }
 #endif
 
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlassq.c b/lapack-netlib/LAPACKE/src/lapacke_zlassq.c
new file mode 100644 (file)
index 0000000..a218c9b
--- /dev/null
@@ -0,0 +1,54 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zlassq
+* Author: Julien langou
+* Generated February 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlassq( lapack_int n, lapack_complex_double* x,
+                           lapack_int incx, double* scale, double* sumsq )
+{
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */
+        if( LAPACKE_z_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) {
+            return -2;
+        }
+        if( LAPACKE_d_nancheck( 1, scale, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, sumsq, 1 ) ) {
+            return -5;
+        }
+    }
+#endif
+    return LAPACKE_zlassq_work( n, x, incx, scale, sumsq );
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zlassq_work.c b/lapack-netlib/LAPACKE/src/lapacke_zlassq_work.c
new file mode 100644 (file)
index 0000000..a4920b0
--- /dev/null
@@ -0,0 +1,42 @@
+/*****************************************************************************
+  Copyright (c) 2017, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zlassq
+* Author: Julien Langou
+* Generated February, 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zlassq_work( lapack_int n, lapack_complex_double* x,
+                                lapack_int incx, double* scale, double* sumsq )
+{
+    lapack_int info = 0;
+    LAPACK_zlassq( &n, x, &incx, scale, sumsq );
+    return info;
+}
index 41e002a..c18a3d7 100644 (file)
@@ -43,19 +43,21 @@ lapack_int LAPACKE_zlaswp( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-/*****************************************************************************
-*      Disable the check as is below, the check below was checking for NaN
-*      from lda to n since there is no (obvious) way to knowing m. This is not
-*      a good idea. We could get a lower bound of m by scanning from ipiv. Or
-*      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
-*      the buggy Nan check.
-*      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
-*****************************************************************************/
-/*  if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
-*       return -3;
-*   }
-*/
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+    /*****************************************************************************
+    *      Disable the check as is below, the check below was checking for NaN
+    *      from lda to n since there is no (obvious) way to knowing m. This is not
+    *      a good idea. We could get a lower bound of m by scanning from ipiv. Or
+    *      we could pass on the NaN check to LAPACKE_dlaswp_work. For now disable
+    *      the buggy Nan check.
+    *      See forum: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4827
+    *****************************************************************************/
+    /*  if( LAPACKE_zge_nancheck( matrix_layout, lda, n, a, lda ) ) {
+    *       return -3;
+    *   }
+    */
+    }
 #endif
     return LAPACKE_zlaswp_work( matrix_layout, n, a, lda, k1, k2, ipiv, incx );
 }
index 0ab0aae..eafb9a5 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zlaswp
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
index ca07879..4f131d8 100644 (file)
@@ -46,18 +46,20 @@ lapack_int LAPACKE_zlatms( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_d_nancheck( 1, &cond, 1 ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( MIN(n,m), d, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &dmax, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 3f098d5..fbda5b0 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zlauum( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zlauum_work( matrix_layout, uplo, n, a, lda );
index 1d7dc4c..f1091a2 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zpbcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index c66989b..caedf20 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zpbequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zpbequ_work( matrix_layout, uplo, n, kd, ab, ldab, s, scond,
index ec6dcbd..dd6d624 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zpbrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f0c49e2..0f717bf 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zpbstf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kb, bb, ldbb ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zpbstf_work( matrix_layout, uplo, n, kb, bb, ldbb );
index d41f395..8ec762a 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zpbsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zpbsv_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index de5fe3c..ef0fe46 100644 (file)
@@ -50,21 +50,23 @@ lapack_int LAPACKE_zpbsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -7;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -7;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, afb, ldafb ) ) {
+                return -9;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 9c65143..f0cd1fa 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zpbtrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zpbtrf_work( matrix_layout, uplo, n, kd, ab, ldab );
index a84ae44..1302831 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zpbtrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpb_nancheck( matrix_layout, uplo, n, kd, ab, ldab ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zpbtrs_work( matrix_layout, uplo, n, kd, nrhs, ab, ldab, b,
index 041a1d5..cc18a12 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpftrf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zpftrf_work( matrix_layout, transr, uplo, n, a );
index 0141b83..6ca58ed 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpftri( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpf_nancheck( n, a ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpf_nancheck( n, a ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zpftri_work( matrix_layout, transr, uplo, n, a );
index 8dfd3c3..db35558 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zpftrs( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpf_nancheck( n, a ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpf_nancheck( n, a ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zpftrs_work( matrix_layout, transr, uplo, n, nrhs, a, b,
index a552f26..3d94382 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zpocon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e55c1ad..7bb4fbb 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zpoequ( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_zpoequ_work( matrix_layout, n, a, lda, s, scond, amax );
index 1d9eb7a..3c188c6 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zpoequb( int matrix_layout, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_zpoequb_work( matrix_layout, n, a, lda, s, scond, amax );
index a50d61a..a3e958a 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_zporfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d640f3e..e8ea525 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_zporfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -21;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -10;
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -21;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -13;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -13;
     }
 #endif
     /* Allocate memory for working array(s) */
index a45143d..a2bf874 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zposv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zposv_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index 9eabd72..c5f1b38 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_zposvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 50fbc9e..c507aab 100644 (file)
@@ -52,26 +52,28 @@ lapack_int LAPACKE_zposvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -23;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -23;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 7be5eb5..07ef257 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpotrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zpotrf_work( matrix_layout, uplo, n, a, lda );
index 60ff331..9628425 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpotrf2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zpotrf2_work( matrix_layout, uplo, n, a, lda );
index 1b1938b..68252cd 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpotri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zpotri_work( matrix_layout, uplo, n, a, lda );
index 77ff17b..bd8ca4b 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zpotrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zpotrs_work( matrix_layout, uplo, n, nrhs, a, lda, b, ldb );
index a49d0c8..d2611be 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zppcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b66e2fd..136b00b 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zppequ( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zppequ_work( matrix_layout, uplo, n, ap, s, scond, amax );
index 8457363..b898a1d 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_zpprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 8cb88fc..9cb839e 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_zppsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zppsv_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index 483c171..4adcc02 100644 (file)
@@ -48,21 +48,23 @@ lapack_int LAPACKE_zppsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zpp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zpp_nancheck( n, afp ) ) {
+                return -7;
+            }
         }
-    }
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -9;
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) && LAPACKE_lsame( *equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -9;
+            }
         }
     }
 #endif
index 5698f30..749b822 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zpptrf_work( matrix_layout, uplo, n, ap );
index 69658ca..e5f9be9 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zpptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zpptri_work( matrix_layout, uplo, n, ap );
index 27989b2..25dd5f1 100644 (file)
@@ -42,12 +42,14 @@ lapack_int LAPACKE_zpptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zpptrs_work( matrix_layout, uplo, n, nrhs, ap, b, ldb );
index 52d2098..ffe4bf6 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zpstrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpo_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &tol, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index db9feed..ecc7053 100644 (file)
@@ -40,15 +40,17 @@ lapack_int LAPACKE_zptcon( lapack_int n, const double* d,
     lapack_int info = 0;
     double* work = NULL;
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index d6009f3..522cb6a 100644 (file)
@@ -46,16 +46,18 @@ lapack_int LAPACKE_zpteqr( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index e39c4f8..4232f79 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_zptrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 9c54750..d6b0f8b 100644 (file)
@@ -42,15 +42,17 @@ lapack_int LAPACKE_zptsv( int matrix_layout, lapack_int n, lapack_int nrhs,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zptsv_work( matrix_layout, n, nrhs, d, e, b, ldb );
index 1e90103..6987f85 100644 (file)
@@ -49,24 +49,26 @@ lapack_int LAPACKE_zptsvx( int matrix_layout, char fact, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, df, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, df, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_z_nancheck( n-1, ef, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index d2ffc50..b0d8a4a 100644 (file)
 lapack_int LAPACKE_zpttrf( lapack_int n, double* d, lapack_complex_double* e )
 {
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -2;
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -3;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -2;
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -3;
+        }
     }
 #endif
     return LAPACKE_zpttrf_work( n, d, e );
index 8a18e46..416269d 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_zpttrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_zpttrs_work( matrix_layout, uplo, n, nrhs, d, e, b, ldb );
index 410e350..dae745b 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zspcon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 170a111..c6b2a4e 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zsprfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsp_nancheck( n, afp ) ) {
-        return -6;
-    }
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsp_nancheck( n, afp ) ) {
+            return -6;
+        }
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6ba98de..35288db 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zspsv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zspsv_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 0d3b85b..f571933 100644 (file)
@@ -48,17 +48,19 @@ lapack_int LAPACKE_zspsvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zsp_nancheck( n, afp ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zsp_nancheck( n, afp ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
         }
-    }
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
     }
 #endif
     /* Allocate memory for working array(s) */
index 49af07e..08a4e31 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_zsptrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zsptrf_work( matrix_layout, uplo, n, ap, ipiv );
index c68ebac..4e0481e 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zsptri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index db3a421..7a0f8d0 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zsptrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsp_nancheck( n, ap ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsp_nancheck( n, ap ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -7;
+        }
     }
 #endif
     return LAPACKE_zsptrs_work( matrix_layout, uplo, n, nrhs, ap, ipiv, b, ldb );
index 4e194f1..1bd7274 100644 (file)
@@ -52,16 +52,18 @@ lapack_int LAPACKE_zstedc( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 189e6be..2a65dcc 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zstegr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -52,24 +52,26 @@ lapack_int LAPACKE_zstegr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
-        return -11;
-    }
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-            return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_lsame( range, 'v' ) ) {
-        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-            return -8;
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+                return -7;
+            }
+        }
+        if( LAPACKE_lsame( range, 'v' ) ) {
+            if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+                return -8;
+            }
         }
     }
 #endif
index 1d1b2ef..d54f3bb 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zstein
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,15 +47,17 @@ lapack_int LAPACKE_zstein( int matrix_layout, lapack_int n, const double* d,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -3;
-    }
-    if( LAPACKE_d_nancheck( n, e, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n, w, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -3;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n, w, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 82379bb..c114448 100644 (file)
@@ -52,18 +52,20 @@ lapack_int LAPACKE_zstemr( int matrix_layout, char jobz, char range,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_d_nancheck( 1, &vu, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5b7231d..02d459a 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zstemr
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -56,7 +56,7 @@ lapack_int LAPACKE_zstemr_work( int matrix_layout, char jobz, char range,
         lapack_int ldz_t = MAX(1,n);
         lapack_complex_double* z_t = NULL;
         /* Check leading dimension(s) */
-        if( ldz < n ) {
+        if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) {
             info = -14;
             LAPACKE_xerbla( "LAPACKE_zstemr_work", info );
             return info;
index c25b99f..3b27f53 100644 (file)
@@ -46,16 +46,18 @@ lapack_int LAPACKE_zsteqr( int matrix_layout, char compz, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_d_nancheck( n, d, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
-        return -5;
-    }
-    if( LAPACKE_lsame( compz, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_d_nancheck( n, d, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( n-1, e, 1 ) ) {
+            return -5;
+        }
+        if( LAPACKE_lsame( compz, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -6;
+            }
         }
     }
 #endif
index 31717e4..b4f726b 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_zsycon( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 03900b6..1a3b3dd 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zsycon_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -40,20 +40,23 @@ lapack_int LAPACKE_zsycon_3( int matrix_layout, char uplo, lapack_int n,
 {
     lapack_int info = 0;
     lapack_complex_double* work = NULL;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zsycon_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
-    }
-    if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
+        if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e0b9166..2826efa 100644 (file)
@@ -43,9 +43,11 @@ lapack_int LAPACKE_zsyconv( int matrix_layout, char uplo, char way, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     /* Call middle-level interface */
index 7cbfa3c..669c3dd 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zsyequb( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index b6dfa44..097f079 100644 (file)
@@ -43,15 +43,17 @@ lapack_int LAPACKE_zsyr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, x, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n, x, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_zsyr_work( matrix_layout, uplo, n, alpha, x, incx, a,
index dfaa420..a0246ba 100644 (file)
@@ -49,18 +49,20 @@ lapack_int LAPACKE_zsyrfs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6d2fad6..a7401ac 100644 (file)
@@ -52,28 +52,30 @@ lapack_int LAPACKE_zsyrfsx( int matrix_layout, char uplo, char equed,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -12;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( equed, 'y' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -11;
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -12;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_lsame( equed, 'y' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -11;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -14;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -14;
     }
 #endif
     /* Allocate memory for working array(s) */
index 5ba1a6f..1cb7d46 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zsysv( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index d858a0b..c2bf5c3 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zsysv_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage.c
new file mode 100644 (file)
index 0000000..c30a381
--- /dev/null
@@ -0,0 +1,89 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zsysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                          lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_double* work = NULL;
+    lapack_complex_double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_zsysv_aa_2stage_work( matrix_layout, uplo, n, nrhs, 
+                                                  a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_Z2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_double*)
+        LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zsysv_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb, work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zsysv_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..8b46257
--- /dev/null
@@ -0,0 +1,124 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zsysv_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsysv_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb,
+                               lapack_complex_double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsysv_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        lapack_complex_double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_zsysv_aa_2stage( &uplo, &n, &nrhs, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, b, &ldb_t, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsysv_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zsysv_aa_2stage_work", info );
+    }
+    return info;
+}
index a338511..4dc5615 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zsysv_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,15 +47,14 @@ lapack_int LAPACKE_zsysv_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index b97ef2e..1e81b56 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zsysv_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index cd689b1..d358355 100644 (file)
@@ -51,17 +51,19 @@ lapack_int LAPACKE_zsysvx( int matrix_layout, char fact, char uplo, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -11;
     }
 #endif
     /* Allocate memory for working array(s) */
index e903c5e..d753940 100644 (file)
@@ -53,26 +53,28 @@ lapack_int LAPACKE_zsysvxx( int matrix_layout, char fact, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -13;
-    }
-    if( nparams>0 ) {
-        if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
-            return -24;
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, af, ldaf ) ) {
+                return -8;
+            }
         }
-    }
-    if( LAPACKE_lsame( fact, 'f' ) ) {
-        if( LAPACKE_d_nancheck( n, s, 1 ) ) {
-            return -12;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -13;
+        }
+        if( nparams>0 ) {
+            if( LAPACKE_d_nancheck( nparams, params, 1 ) ) {
+                return -24;
+            }
+        }
+        if( LAPACKE_lsame( fact, 'f' ) ) {
+            if( LAPACKE_d_nancheck( n, s, 1 ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 9a08cf7..17d580e 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_zsyswapr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_zsyswapr_work( matrix_layout, uplo, n, a, lda, i1, i2 );
index f91ff53..56868b9 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zsytrf( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 97b1f1d..74a81f4 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zsytrf_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage.c
new file mode 100644 (file)
index 0000000..e629c85
--- /dev/null
@@ -0,0 +1,86 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zsytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_complex_double* a, lapack_int lda,
+                          lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2 )
+{
+    lapack_int info = 0;
+    lapack_int lwork = -1;
+    lapack_complex_double* work = NULL;
+    lapack_complex_double work_query;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+    }
+#endif
+    /* Query optimal working array(s) size */
+    info = LAPACKE_zsytrf_aa_2stage_work( matrix_layout, uplo, n,
+                                                  a, lda, tb, ltb, ipiv, ipiv2,
+                               &work_query, lwork );
+    if( info != 0 ) {
+        goto exit_level_0;
+    }
+    lwork = LAPACK_Z2INT( work_query );
+    /* Allocate memory for work arrays */
+    work = (lapack_complex_double*)
+        LAPACKE_malloc( sizeof(lapack_complex_double) * lwork );
+    if( work == NULL ) {
+        info = LAPACK_WORK_MEMORY_ERROR;
+        goto exit_level_0;
+    }
+    /* Call middle-level interface */
+    info = LAPACKE_zsytrf_aa_2stage_work( matrix_layout, uplo, n,
+                               a, lda, tb, ltb, ipiv, ipiv2,
+                               work, lwork );
+    /* Release memory and exit */
+    LAPACKE_free( work );
+exit_level_0:
+    if( info == LAPACK_WORK_MEMORY_ERROR ) {
+        LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage", info );
+    }
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zsytrf_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..f91c422
--- /dev/null
@@ -0,0 +1,109 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zsytrf_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrf_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb, 
+                               lapack_int* ipiv, lapack_int* ipiv2,
+                               lapack_complex_double* work, lapack_int lwork )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsytrf_aa_2stage( &uplo, &n, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, work, &lwork,
+                         &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage_work", info );
+            return info;
+        }
+        /* Query optimal working array(s) size if requested */
+        if( lwork == -1 ) {
+            LAPACK_zsytrf_aa_2stage( &uplo, &n, a, &lda_t,
+                                tb, &ltb, ipiv, ipiv2, work,
+                          &lwork, &info );
+            return (info < 0) ? (info - 1) : info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsytrf_aa_2stage( &uplo, &n, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, work,
+                      &lwork, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        /* Release memory and exit */
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zsytrf_aa_2stage_work", info );
+    }
+    return info;
+}
index c4ead32..f1722f4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zsytrf_rk
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -46,12 +46,11 @@ lapack_int LAPACKE_zsytrf_rk( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 91129c7..58411d0 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zsytrf_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 72c1517..a1c6db1 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zsytri( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 50b9e83..434fbe1 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_zsytri2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 38dddf6..770e8a4 100644 (file)
@@ -44,9 +44,11 @@ lapack_int LAPACKE_zsytri2x( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 0902c57..bd56775 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zsytri_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -41,17 +41,20 @@ lapack_int LAPACKE_zsytri_3( int matrix_layout, char uplo, lapack_int n,
     lapack_int lwork = -1;
     lapack_complex_double* work = NULL;
     lapack_complex_double work_query;
+    lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zsytri_3", -1 );
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n, e, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) {
+            return -6;
+        }
     }
 #endif
      /* Query optimal working array(s) size */
index 8819b3f..9b8e064 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zsytrs( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zsytrs_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 741f9fd..3c85f97 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 47b3c36..fdfe059 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zsytrs_3
 * Author: Intel Corporation
-* Generated December 2016
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -44,17 +44,19 @@ lapack_int LAPACKE_zsytrs_3( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n, e ,1 ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n, e ,1 ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_zsytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda,
-                                                         e, ipiv, b, ldb );
+                                  e, ipiv, b, ldb );
 }
index d306b0f..a015677 100644 (file)
@@ -47,12 +47,14 @@ lapack_int LAPACKE_zsytrs_aa( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage.c b/lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage.c
new file mode 100644 (file)
index 0000000..8713aba
--- /dev/null
@@ -0,0 +1,65 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native high-level C interface to LAPACK function zsytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs_aa_2stage( int matrix_layout, char uplo, lapack_int n,
+                          lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                          lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                          lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
+        LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage", -1 );
+        return -1;
+    }
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, 4*n, 1, tb, ltb ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -11;
+        }
+    }
+#endif
+    /* Call middle-level interface */
+    info = LAPACKE_zsytrs_aa_2stage_work( matrix_layout, uplo, n, nrhs,
+                               a, lda, tb, ltb, ipiv, ipiv2, b,
+                               ldb );
+    return info;
+}
diff --git a/lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage_work.c b/lapack-netlib/LAPACKE/src/lapacke_zsytrs_aa_2stage_work.c
new file mode 100644 (file)
index 0000000..76c5139
--- /dev/null
@@ -0,0 +1,114 @@
+/*****************************************************************************
+  Copyright (c) 2014, Intel Corp.
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of Intel Corporation nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+  THE POSSIBILITY OF SUCH DAMAGE.
+*****************************************************************************
+* Contents: Native middle-level C interface to LAPACK function zsytrs_aa
+* Author: Intel Corporation
+* Generated November 2017
+*****************************************************************************/
+
+#include "lapacke_utils.h"
+
+lapack_int LAPACKE_zsytrs_aa_2stage_work( int matrix_layout, char uplo, lapack_int n,
+                               lapack_int nrhs, lapack_complex_double* a, lapack_int lda,
+                               lapack_complex_double* tb, lapack_int ltb, lapack_int* ipiv, 
+                               lapack_int* ipiv2, lapack_complex_double* b, lapack_int ldb )
+{
+    lapack_int info = 0;
+    if( matrix_layout == LAPACK_COL_MAJOR ) {
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsytrs_aa_2stage( &uplo, &n, &nrhs, a, &lda, tb, 
+                                        &ltb, ipiv, ipiv2, b, &ldb, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
+        lapack_int lda_t = MAX(1,n);
+        lapack_int ldb_t = MAX(1,n);
+        lapack_complex_double* a_t = NULL;
+        lapack_complex_double* tb_t = NULL;
+        lapack_complex_double* b_t = NULL;
+        /* Check leading dimension(s) */
+        if( lda < n ) {
+            info = -6;
+            LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ltb < 4*n ) {
+            info = -8;
+            LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage_work", info );
+            return info;
+        }
+        if( ldb < nrhs ) {
+            info = -12;
+            LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage_work", info );
+            return info;
+        }
+        /* Allocate memory for temporary array(s) */
+        a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
+        if( a_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_0;
+        }
+        tb_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ltb );
+        if( tb_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_1;
+        }
+        b_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * ldb_t * MAX(1,nrhs) );
+        if( b_t == NULL ) {
+            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+            goto exit_level_2;
+        }
+        /* Transpose input matrices */
+        LAPACKE_zsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
+        LAPACKE_zge_trans( matrix_layout, n, nrhs, b, ldb, b_t, ldb_t );
+        /* Call LAPACK function and adjust info */
+        LAPACK_zsytrs_aa_2stage( &uplo, &n, &nrhs, a_t, &lda_t, 
+                                 tb_t, &ltb, ipiv, ipiv2, b_t, &ldb_t, &info );
+        if( info < 0 ) {
+            info = info - 1;
+        }
+        /* Transpose output matrices */
+        LAPACKE_zsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
+        LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb );
+        /* Release memory and exit */
+        LAPACKE_free( b_t );
+exit_level_2:
+        LAPACKE_free( tb_t );
+exit_level_1:
+        LAPACKE_free( a_t );
+exit_level_0:
+        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
+            LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage_work", info );
+        }
+    } else {
+        info = -1;
+        LAPACKE_xerbla( "LAPACKE_zsytrs_aa_2stage_work", info );
+    }
+    return info;
+}
index d62bebc..052c171 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_zsytrs_rook( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_zsytrs_rook_work( matrix_layout, uplo, n, nrhs, a, lda, ipiv, b,
index 62e5472..0bbe1e9 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_ztbcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -7;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index fb505ed..aa2a936 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ztbrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -12;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -12;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 05bfbb6..4c4e188 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ztbtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztb_nancheck( matrix_layout, uplo, diag, n, kd, ab, ldab ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -10;
+        }
     }
 #endif
     return LAPACKE_ztbtrs_work( matrix_layout, uplo, trans, diag, n, kd, nrhs,
index fb1db86..79ca29a 100644 (file)
@@ -44,18 +44,20 @@ lapack_int LAPACKE_ztfsm( int matrix_layout, char transr, char side, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( IS_Z_NONZERO(alpha) ) {
-        if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( IS_Z_NONZERO(alpha) ) {
+            if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+                return -10;
+            }
         }
-    }
-    if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
-        return -9;
-    }
-    if( IS_Z_NONZERO(alpha) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-            return -11;
+        if( LAPACKE_z_nancheck( 1, &alpha, 1 ) ) {
+            return -9;
+        }
+        if( IS_Z_NONZERO(alpha) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 016b395..4842796 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ztftri( int matrix_layout, char transr, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztf_nancheck( matrix_layout, transr, uplo, diag, n, a ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_ztftri_work( matrix_layout, transr, uplo, diag, n, a );
index f1e1add..8b98538 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztfttp( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztfttp_work( matrix_layout, transr, uplo, n, arf, ap );
index f53037d..f367a59 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztfttr( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpf_nancheck( n, arf ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpf_nancheck( n, arf ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztfttr_work( matrix_layout, transr, uplo, n, arf, a, lda );
index cfcf575..a195c8c 100644 (file)
@@ -49,21 +49,23 @@ lapack_int LAPACKE_ztgevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, p, ldp ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, s, lds ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, p, ldp ) ) {
+            return -8;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, s, lds ) ) {
+            return -6;
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 4c43428..b01c100 100644 (file)
@@ -46,21 +46,23 @@ lapack_int LAPACKE_ztgexc( int matrix_layout, lapack_logical wantq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -7;
-    }
-    if( wantq ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -11;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -7;
+        }
+        if( wantq ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -9;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -11;
+            }
         }
     }
 #endif
index 946ea7c..60f48ba 100644 (file)
@@ -56,21 +56,23 @@ lapack_int LAPACKE_ztgsen( int matrix_layout, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( wantq ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -13;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -7;
         }
-    }
-    if( wantz ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
-            return -15;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( wantq ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -13;
+            }
+        }
+        if( wantz ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, z, ldz ) ) {
+                return -15;
+            }
         }
     }
 #endif
index aae4e24..485a62a 100644 (file)
@@ -51,32 +51,34 @@ lapack_int LAPACKE_ztgsja( int matrix_layout, char jobu, char jobv, char jobq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
-        return -12;
-    }
-    if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -22;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -10;
         }
-    }
-    if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
-        return -14;
-    }
-    if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
-        return -15;
-    }
-    if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, m, m, u, ldu ) ) {
-            return -18;
+        if( LAPACKE_zge_nancheck( matrix_layout, p, n, b, ldb ) ) {
+            return -12;
         }
-    }
-    if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, p, p, v, ldv ) ) {
-            return -20;
+        if( LAPACKE_lsame( jobq, 'i' ) || LAPACKE_lsame( jobq, 'q' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -22;
+            }
+        }
+        if( LAPACKE_d_nancheck( 1, &tola, 1 ) ) {
+            return -14;
+        }
+        if( LAPACKE_d_nancheck( 1, &tolb, 1 ) ) {
+            return -15;
+        }
+        if( LAPACKE_lsame( jobu, 'i' ) || LAPACKE_lsame( jobu, 'u' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, m, m, u, ldu ) ) {
+                return -18;
+            }
+        }
+        if( LAPACKE_lsame( jobv, 'i' ) || LAPACKE_lsame( jobv, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, p, p, v, ldv ) ) {
+                return -20;
+            }
         }
     }
 #endif
index 3150031..0e2599e 100644 (file)
@@ -52,21 +52,23 @@ lapack_int LAPACKE_ztgsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -12;
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -10;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -12;
+            }
         }
     }
 #endif
index 29ca798..a0b303b 100644 (file)
@@ -53,24 +53,26 @@ lapack_int LAPACKE_ztgsyl( int matrix_layout, char trans, lapack_int ijob,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, m, d, ldd ) ) {
-        return -12;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, e, lde ) ) {
-        return -14;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, f, ldf ) ) {
-        return -16;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, m, d, ldd ) ) {
+            return -12;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, e, lde ) ) {
+            return -14;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, f, ldf ) ) {
+            return -16;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 69bf280..dd556af 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ztpcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e3bd95a..bae34b1 100644 (file)
@@ -51,24 +51,26 @@ lapack_int LAPACKE_ztpmqrt( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    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_zge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
-        return -13;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -15;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
-        return -11;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        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_zge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
+            return -13;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -15;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
+            return -11;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
+            return -9;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 7ddf5c6..f9eb95d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_ztpqrt( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4cefa01..a6707ed 100644 (file)
@@ -44,12 +44,14 @@ lapack_int LAPACKE_ztpqrt2( int matrix_layout,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -6;
+        }
     }
 #endif
     return LAPACKE_ztpqrt2_work( matrix_layout, m, n, l, a, lda, b, ldb, t, ldt );
index b6894e8..fce8017 100644 (file)
@@ -51,30 +51,32 @@ lapack_int LAPACKE_ztprfb( int matrix_layout, char side, char trans, char direct
         return -1;
     }
 #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_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -14;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
-        return -16;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
-        return -12;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* 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_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -14;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
+            return -16;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
+            return -12;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
+            return -10;
+        }
     }
 #endif
     if (side=='l' ||  side=='L') {
index 0cfb310..51b8cbf 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ztprfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -10;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index e28fd46..15c8b42 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ztptri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztptri_work( matrix_layout, uplo, diag, n, ap );
index 5026c72..6f7bb40 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ztptrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztp_nancheck( matrix_layout, uplo, diag, n, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -8;
+        }
     }
 #endif
     return LAPACKE_ztptrs_work( matrix_layout, uplo, trans, diag, n, nrhs, ap, b,
index 28d8304..44ad3c7 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztpttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztpttf_work( matrix_layout, transr, uplo, n, ap, arf );
index bf3a152..30274aa 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztpttr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ztpttr_work( matrix_layout, uplo, n, ap, a, lda );
index 726b7d5..ef921a4 100644 (file)
@@ -45,9 +45,11 @@ lapack_int LAPACKE_ztrcon( int matrix_layout, char norm, char uplo, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -6;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 71fca15..ff7c105 100644 (file)
@@ -48,18 +48,20 @@ lapack_int LAPACKE_ztrevc( int matrix_layout, char side, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'l' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( side, 'b' ) || LAPACKE_lsame( side, 'r' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index e3e1658..28a1a72 100644 (file)
@@ -43,14 +43,16 @@ lapack_int LAPACKE_ztrexc( int matrix_layout, char compq, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -6;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -4;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -4;
     }
 #endif
     return LAPACKE_ztrexc_work( matrix_layout, compq, n, t, ldt, q, ldq, ifst,
index bba3724..1e89e32 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_ztrrfs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, x, ldx ) ) {
+            return -11;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 6d04414..f65d914 100644 (file)
@@ -49,14 +49,16 @@ lapack_int LAPACKE_ztrsen( int matrix_layout, char job, char compq,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_lsame( compq, 'v' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_lsame( compq, 'v' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, n, q, ldq ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
     }
 #endif
     /* Query optimal working array(s) size */
index ae52ce0..0fd9ae1 100644 (file)
@@ -50,18 +50,20 @@ lapack_int LAPACKE_ztrsna( int matrix_layout, char job, char howmny,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
-        return -6;
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
-            return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, t, ldt ) ) {
+            return -6;
         }
-    }
-    if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
-        if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
-            return -10;
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vl, ldvl ) ) {
+                return -8;
+            }
+        }
+        if( LAPACKE_lsame( job, 'b' ) || LAPACKE_lsame( job, 'e' ) ) {
+            if( LAPACKE_zge_nancheck( matrix_layout, n, mm, vr, ldvr ) ) {
+                return -10;
+            }
         }
     }
 #endif
index eefbe04..98f9cda 100644 (file)
@@ -45,15 +45,17 @@ lapack_int LAPACKE_ztrsyl( int matrix_layout, char trana, char tranb,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
-        return -9;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+            return -9;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
     }
 #endif
     return LAPACKE_ztrsyl_work( matrix_layout, trana, tranb, isgn, m, n, a, lda,
index 6b088fd..2f1c639 100644 (file)
@@ -41,9 +41,11 @@ lapack_int LAPACKE_ztrtri( int matrix_layout, char uplo, char diag, lapack_int n
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztrtri_work( matrix_layout, uplo, diag, n, a, lda );
index 851e0c1..3482fcd 100644 (file)
@@ -43,12 +43,14 @@ lapack_int LAPACKE_ztrtrs( int matrix_layout, char uplo, char trans, char diag,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_ztr_nancheck( matrix_layout, uplo, diag, n, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) {
+            return -9;
+        }
     }
 #endif
     return LAPACKE_ztrtrs_work( matrix_layout, uplo, trans, diag, n, nrhs, a,
index 6912d22..8a5dfc2 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztrttf( int matrix_layout, char transr, char uplo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
     }
 #endif
     return LAPACKE_ztrttf_work( matrix_layout, transr, uplo, n, a, lda, arf );
index 9cc4dbd..5dcf633 100644 (file)
@@ -42,9 +42,11 @@ lapack_int LAPACKE_ztrttp( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     return LAPACKE_ztrttp_work( matrix_layout, uplo, n, a, lda, ap );
index 88770eb..e4e7d44 100644 (file)
@@ -46,9 +46,11 @@ lapack_int LAPACKE_ztzrzf( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -4;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -4;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 1aad69f..91ab2c4 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zunbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -49,28 +49,31 @@ lapack_int LAPACKE_zunbdb( int matrix_layout, char trans, char signs,
     lapack_int lwork = -1;
     lapack_complex_double* work = NULL;
     lapack_complex_double work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zunbdb", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -9;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -11;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -13;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -9;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -11;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -13;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 689434a..7a4cb97 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zunbdb
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -47,121 +47,35 @@ lapack_int LAPACKE_zunbdb_work( int matrix_layout, char trans, char signs,
                                 lapack_complex_double* work, lapack_int lwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
+        }
         /* Call LAPACK function and adjust info */
-        LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
+        LAPACK_zunbdb( &ltrans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12,
                        x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2,
                        tauq1, tauq2, work, &lwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        lapack_complex_double* x11_t = NULL;
-        lapack_complex_double* x12_t = NULL;
-        lapack_complex_double* x21_t = NULL;
-        lapack_complex_double* x22_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldx11 < q ) {
-            info = -8;
-            LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -10;
-            LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lwork == -1 ) {
-            LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12,
-                           &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi,
-                           taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
-        }
-        x22_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        /* Transpose input matrices */
-        LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
-        /* Call LAPACK function and adjust info */
-        LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t,
-                       &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi,
-                       taup1, taup2, tauq1, tauq2, work, &lwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-        /* Transpose output matrices */
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        /* Release memory and exit */
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_zunbdb_work", info );
index 384b3e0..1960898 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native high-level C interface to LAPACK function zuncsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -54,28 +54,31 @@ lapack_int LAPACKE_zuncsd( int matrix_layout, char jobu1, char jobu2,
     lapack_complex_double* work = NULL;
     double rwork_query;
     lapack_complex_double work_query;
-    lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22;
+    int lapack_layout;
     if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
         LAPACKE_xerbla( "LAPACKE_zuncsd", -1 );
         return -1;
     }
-#ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-    nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-    nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-    nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -11;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) {
-        return -13;
+    if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+        lapack_layout = LAPACK_COL_MAJOR;
+    } else {
+        lapack_layout = LAPACK_ROW_MAJOR;
     }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -15;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) {
-        return -17;
+#ifndef LAPACK_DISABLE_NAN_CHECK
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) {
+            return -11;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) {
+            return -13;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) {
+            return -15;
+        }
+        if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) {
+            return -17;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index f5dbd55..61ac9c0 100644 (file)
@@ -55,17 +55,18 @@ lapack_int LAPACKE_zuncsd2by1( int matrix_layout, char jobu1, char jobu2,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nrows_x11 =  p ;
-    nrows_x21 =  m-p ;
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nrows_x11 = p;
+        nrows_x21 = m-p;
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
+            return -9;
+        }
     }
-
-    if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) {
-        return -9;
-    }
-
 #endif
     /* Allocate memory for working array(s) */
     iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,m-MIN(MIN(p,m-p),MIN(q,m-q))) );
index 7c3b395..4d474a7 100644 (file)
@@ -28,7 +28,7 @@
 *****************************************************************************
 * Contents: Native middle-level C interface to LAPACK function zuncsd
 * Author: Intel Corporation
-* Generated November 2015
+* Generated June 2017
 *****************************************************************************/
 
 #include "lapacke_utils.h"
@@ -50,226 +50,36 @@ lapack_int LAPACKE_zuncsd_work( int matrix_layout, char jobu1, char jobu2,
                                 lapack_int* iwork )
 {
     lapack_int info = 0;
-    if( matrix_layout == LAPACK_COL_MAJOR ) {
-        /* Call LAPACK function and adjust info */
-        LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22,
-                       theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t,
-                       work, &lwork, rwork, &lrwork, iwork, &info );
-        if( info < 0 ) {
-            info = info - 1;
-        }
-    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
-        lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q);
-        lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q);
-        lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q);
-        lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q);
-        lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1);
-        lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1);
-        lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1);
-        lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1);
-        lapack_int ldu1_t = MAX(1,nrows_u1);
-        lapack_int ldu2_t = MAX(1,nrows_u2);
-        lapack_int ldv1t_t = MAX(1,nrows_v1t);
-        lapack_int ldv2t_t = MAX(1,nrows_v2t);
-        lapack_int ldx11_t = MAX(1,nrows_x11);
-        lapack_int ldx12_t = MAX(1,nrows_x12);
-        lapack_int ldx21_t = MAX(1,nrows_x21);
-        lapack_int ldx22_t = MAX(1,nrows_x22);
-        lapack_complex_double* x11_t = NULL;
-        lapack_complex_double* x12_t = NULL;
-        lapack_complex_double* x21_t = NULL;
-        lapack_complex_double* x22_t = NULL;
-        lapack_complex_double* u1_t = NULL;
-        lapack_complex_double* u2_t = NULL;
-        lapack_complex_double* v1t_t = NULL;
-        lapack_complex_double* v2t_t = NULL;
-        /* Check leading dimension(s) */
-        if( ldu1 < p ) {
-            info = -21;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldu2 < m-p ) {
-            info = -23;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldv1t < q ) {
-            info = -25;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldv2t < m-q ) {
-            info = -27;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldx11 < q ) {
-            info = -12;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldx12 < m-q ) {
-            info = -14;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldx21 < q ) {
-            info = -16;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        if( ldx22 < m-q ) {
-            info = -18;
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-            return info;
-        }
-        /* Query optimal working array(s) size if requested */
-        if( lrwork == -1 || lwork == -1 ) {
-            LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m,
-                           &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t,
-                           x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t,
-                           &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork,
-                           &lrwork, iwork, &info );
-            return (info < 0) ? (info - 1) : info;
-        }
-        /* Allocate memory for temporary array(s) */
-        x11_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx11_t * MAX(1,q) );
-        if( x11_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_0;
-        }
-        x12_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx12_t * MAX(1,m-q) );
-        if( x12_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_1;
-        }
-        x21_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx21_t * MAX(1,q) );
-        if( x21_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_2;
+    /* LAPACK function works with matrices in both layouts. It is supported
+     * through TRANS parameter. So all conversion between layouts can be
+     * completed in LAPACK function. See the table below which describes how
+     * every LAPACKE call is forwarded to corresponding LAPACK call.
+     *
+     *   matrix_layout    | trans_LAPACKE | -> trans_LAPACK
+     *                    |   (trans)     |       (ltrans)
+     *   -----------------+---------------+----------------
+     *   LAPACK_COL_MAJOR |     'N'       | ->     'N'
+     *   LAPACK_COL_MAJOR |     'T'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'N'       | ->     'T'
+     *   LAPACK_ROW_MAJOR |     'T'       | ->     'T'
+     *       (note that for row major layout trans parameter is ignored)
+     */
+    if( matrix_layout == LAPACK_COL_MAJOR ||
+        matrix_layout == LAPACK_ROW_MAJOR ) {
+        char ltrans;
+        if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) {
+            ltrans = 'n';
+        } else {
+            ltrans = 't';
         }
-        x22_t = (lapack_complex_double*)
-            LAPACKE_malloc( sizeof(lapack_complex_double) *
-                            ldx22_t * MAX(1,m-q) );
-        if( x22_t == NULL ) {
-            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-            goto exit_level_3;
-        }
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            u1_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldu1_t * MAX(1,p) );
-            if( u1_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_4;
-            }
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            u2_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldu2_t * MAX(1,m-p) );
-            if( u2_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_5;
-            }
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            v1t_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldv1t_t * MAX(1,q) );
-            if( v1t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_6;
-            }
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            v2t_t = (lapack_complex_double*)
-                LAPACKE_malloc( sizeof(lapack_complex_double) *
-                                ldv2t_t * MAX(1,m-q) );
-            if( v2t_t == NULL ) {
-                info = LAPACK_TRANSPOSE_MEMORY_ERROR;
-                goto exit_level_7;
-            }
-        }
-        /* Transpose input matrices */
-        LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t,
-                           ldx11_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t,
-                           ldx12_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t,
-                           ldx21_t );
-        LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t,
-                           ldx22_t );
         /* Call LAPACK function and adjust info */
-        LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p,
-                       &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t,
-                       x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t,
-                       v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork,
-                       &lrwork, iwork, &info );
+        LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &ltrans, &signs, &m,
+                       &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22,
+                       &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t,
+                       &ldv2t, work, &lwork, rwork, &lrwork, iwork, &info );
         if( info < 0 ) {
             info = info - 1;
         }
-        /* Transpose output matrices */
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11,
-                           ldx11 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t,
-                           x12, ldx12 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21,
-                           ldx21 );
-        LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t,
-                           x22, ldx22 );
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1,
-                               ldu1 );
-        }
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t,
-                               u2, ldu2 );
-        }
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t,
-                               v1t, ldv1t );
-        }
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t,
-                               v2t, ldv2t );
-        }
-        /* Release memory and exit */
-        if( LAPACKE_lsame( jobv2t, 'y' ) ) {
-            LAPACKE_free( v2t_t );
-        }
-exit_level_7:
-        if( LAPACKE_lsame( jobv1t, 'y' ) ) {
-            LAPACKE_free( v1t_t );
-        }
-exit_level_6:
-        if( LAPACKE_lsame( jobu2, 'y' ) ) {
-            LAPACKE_free( u2_t );
-        }
-exit_level_5:
-        if( LAPACKE_lsame( jobu1, 'y' ) ) {
-            LAPACKE_free( u1_t );
-        }
-exit_level_4:
-        LAPACKE_free( x22_t );
-exit_level_3:
-        LAPACKE_free( x21_t );
-exit_level_2:
-        LAPACKE_free( x12_t );
-exit_level_1:
-        LAPACKE_free( x11_t );
-exit_level_0:
-        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
-            LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
-        }
     } else {
         info = -1;
         LAPACKE_xerbla( "LAPACKE_zuncsd_work", info );
index 3c0f244..9a91fc4 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zungbr( int matrix_layout, char vect, lapack_int m,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -6;
-    }
-    if( LAPACKE_z_nancheck( MIN(m,k), tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -6;
+        }
+        if( LAPACKE_z_nancheck( MIN(m,k), tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 88f6150..9d681de 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zunghr( int matrix_layout, lapack_int n, lapack_int ilo,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 56dc42e..21af17d 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zunglq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 5f99b74..a4204b6 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zungql( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 8354e42..b15d0c9 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zungqr( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 3a3083d..6c6378b 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zungrq( int matrix_layout, lapack_int m, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
-        return -5;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -7;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, a, lda ) ) {
+            return -5;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -7;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 46c947b..5178534 100644 (file)
@@ -46,12 +46,14 @@ lapack_int LAPACKE_zungtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
-        return -6;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+            return -6;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 87a5b18..2449d85 100644 (file)
@@ -49,17 +49,19 @@ lapack_int LAPACKE_zunmbr( int matrix_layout, char vect, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    nq = LAPACKE_lsame( side, 'l' ) ? m : n;
-    r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
-    if( LAPACKE_zge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_z_nancheck( MIN(nq,k), tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        nq = LAPACKE_lsame( side, 'l' ) ? m : n;
+        r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k);
+        if( LAPACKE_zge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_z_nancheck( MIN(nq,k), tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 82dbfd8..357d711 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zunmhr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 73a9f42..c306bbc 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_zunmlq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 41fb941..3c06a1a 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zunmql( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 29510d6..7a43ebc 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zunmqr( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, r, k, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 54a9e14..d3ffb39 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_zunmrq( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index ea6eae4..a8f1ce0 100644 (file)
@@ -48,15 +48,17 @@ lapack_int LAPACKE_zunmrz( int matrix_layout, char side, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
-        return -8;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -11;
-    }
-    if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
-        return -10;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
+            return -8;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -11;
+        }
+        if( LAPACKE_z_nancheck( k, tau, 1 ) ) {
+            return -10;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 0410dd7..f8936cd 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zunmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -10;
-    }
-    if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
-        return -9;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zge_nancheck( matrix_layout, r, r, a, lda ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -10;
+        }
+        if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+            return -9;
+        }
     }
 #endif
     /* Query optimal working array(s) size */
index 2fc6190..8b4b7ec 100644 (file)
@@ -45,12 +45,14 @@ lapack_int LAPACKE_zupgtr( int matrix_layout, char uplo, lapack_int n,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    if( LAPACKE_zpp_nancheck( n, ap ) ) {
-        return -4;
-    }
-    if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
-        return -5;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        if( LAPACKE_zpp_nancheck( n, ap ) ) {
+            return -4;
+        }
+        if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {
+            return -5;
+        }
     }
 #endif
     /* Allocate memory for working array(s) */
index 4a567b9..d735c55 100644 (file)
@@ -49,16 +49,18 @@ lapack_int LAPACKE_zupmtr( int matrix_layout, char side, char uplo, char trans,
         return -1;
     }
 #ifndef LAPACK_DISABLE_NAN_CHECK
-    /* Optionally check input matrices for NaNs */
-    r = LAPACKE_lsame( side, 'l' ) ? m : n;
-    if( LAPACKE_zpp_nancheck( r, ap ) ) {
-        return -7;
-    }
-    if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
-        return -9;
-    }
-    if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
-        return -8;
+    if( LAPACKE_get_nancheck() ) {
+        /* Optionally check input matrices for NaNs */
+        r = LAPACKE_lsame( side, 'l' ) ? m : n;
+        if( LAPACKE_zpp_nancheck( r, ap ) ) {
+            return -7;
+        }
+        if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) {
+            return -9;
+        }
+        if( LAPACKE_z_nancheck( m-1, tau, 1 ) ) {
+            return -8;
+        }
     }
 #endif
     /* Additional scalars initializations for work arrays */
index c8b8511..dd36ee3 100644 (file)
@@ -1,4 +1,4 @@
-set(UTILS_OBJ
+set(UTILS
 lapacke_c_nancheck.c            lapacke_ctr_trans.c             lapacke_make_complex_float.c    lapacke_zgb_nancheck.c
 lapacke_cgb_nancheck.c          lapacke_d_nancheck.c            lapacke_s_nancheck.c            lapacke_zgb_trans.c
 lapacke_cgb_trans.c             lapacke_dgb_nancheck.c          lapacke_sgb_nancheck.c          lapacke_zge_nancheck.c
index 57b8f0d..1f639c6 100644 (file)
@@ -186,11 +186,12 @@ OBJ = lapacke_cgb_nancheck.o \
 all: lib
 
 lib: $(OBJ)
-       $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(OBJ)
+       $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $^
        $(RANLIB) ../../$(LAPACKELIB)
 
+clean: cleanobj
+cleanobj:
+       rm -f *.o
+
 .c.o:
        $(CC) $(CFLAGS) -I../include -c -o $@ $<
-
-clean:
-       rm -f *.o
index 2c51ddd..6678e1a 100644 (file)
@@ -69,7 +69,7 @@ void LAPACKE_ctp_trans( int matrix_layout, char uplo, char diag,
      * and col_major lower and row_major upper are equals too -
      * using one code for equal cases. XOR( colmaj, upper )
      */
-    if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+    if( !( colmaj || upper ) || ( colmaj && upper ) ) {
         for( j = st; j < n; j++ ) {
             for( i = 0; i < j+1-st; i++ ) {
                 out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
index 483af39..7d7455d 100644 (file)
@@ -69,7 +69,7 @@ void LAPACKE_dtp_trans( int matrix_layout, char uplo, char diag,
      * and col_major lower and row_major upper are equals too -
      * using one code for equal cases. XOR( colmaj, upper )
      */
-    if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+    if( !( colmaj || upper ) || ( colmaj && upper ) ) {
         for( j = st; j < n; j++ ) {
             for( i = 0; i < j+1-st; i++ ) {
                 out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
index 2370842..7e67600 100644 (file)
@@ -69,7 +69,7 @@ void LAPACKE_stp_trans( int matrix_layout, char uplo, char diag,
      * and col_major lower and row_major upper are equals too -
      * using one code for equal cases. XOR( colmaj, upper )
      */
-    if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+    if( !( colmaj || upper ) || ( colmaj && upper ) ) {
         for( j = st; j < n; j++ ) {
             for( i = 0; i < j+1-st; i++ ) {
                 out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
index b3654e5..e7369ba 100644 (file)
@@ -69,7 +69,7 @@ void LAPACKE_ztp_trans( int matrix_layout, char uplo, char diag,
      * and col_major lower and row_major upper are equals too -
      * using one code for equal cases. XOR( colmaj, upper )
      */
-    if( ( colmaj || upper ) && !( colmaj && upper ) ) {
+    if( !( colmaj || upper ) || ( colmaj && upper ) ) {
         for( j = st; j < n; j++ ) {
             for( i = 0; i < j+1-st; i++ ) {
                 out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ];
index eefcbda..94cdb0f 100644 (file)
@@ -1,9 +1,9 @@
-Copyright (c) 1992-2016 The University of Tennessee and The University
+Copyright (c) 1992-2017 The University of Tennessee and The University
                         of Tennessee Research Foundation.  All rights
                         reserved.
-Copyright (c) 2000-2016 The University of California Berkeley. All
+Copyright (c) 2000-2017 The University of California Berkeley. All
                         rights reserved.
-Copyright (c) 2006-2016 The University of Colorado Denver.  All rights
+Copyright (c) 2006-2017 The University of Colorado Denver.  All rights
                         reserved.
 
 $COPYRIGHT$
index edde5ff..1d7e82c 100644 (file)
 
 include make.inc
 
-all: lapack_install lib blas_testing lapack_testing 
+all: lapack_install lib blas_testing lapack_testing
 
 lib: lapacklib tmglib
 #lib: blaslib variants lapacklib tmglib
 
-clean: cleanlib cleantesting cleanblas_testing cleancblas_testing
-
-lapack_install:
-       ( cd INSTALL; $(MAKE) )
-#        ./testlsame; ./testslamch; ./testdlamch; \
-#      ./testsecond; ./testdsecnd; ./testieee; ./testversion )
-
 blaslib:
-       ( cd BLAS/SRC; $(MAKE) )
+       $(MAKE) -C BLAS
 
 cblaslib:
-       ( cd CBLAS; $(MAKE) )
+       $(MAKE) -C CBLAS
 
-lapacklib:     lapack_install
-       ( cd SRC; $(MAKE) )
+lapacklib:
+       $(MAKE) -C SRC
 
-lapackelib: lapacklib
-       ( cd LAPACKE; $(MAKE) )
-
-cblas_example: cblaslib blaslib
-       ( cd CBLAS/examples; $(MAKE) )
+lapackelib:
+       $(MAKE) -C LAPACKE
 
-lapacke_example: lapackelib
-       ( cd LAPACKE/example; $(MAKE) )
+tmglib:
+       $(MAKE) -C TESTING/MATGEN
 
 variants:
-       ( cd SRC/VARIANTS ; $(MAKE))
+       $(MAKE) -C SRC/VARIANTS
 
-tmglib:
-       ( cd TESTING/MATGEN; $(MAKE) )
+lapack_install:
+       $(MAKE) -C INSTALL run
+
+blas_testing: blaslib
+       $(MAKE) -C BLAS blas_testing
 
-lapack_testing:        lib
-       ( cd TESTING ; $(MAKE) )
+cblas_testing: cblaslib blaslib
+       $(MAKE) -C CBLAS cblas_testing
+
+lapack_testing: tmglib lapacklib blaslib
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING
        ./lapack_testing.py
 
-variants_testing: lib variants
-       ( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/cholrl.a' ; \
-       mv stest.out stest_cholrl.out ; mv dtest.out dtest_cholrl.out ; mv ctest.out ctest_cholrl.out ; mv ztest.out ztest_cholrl.out )
-       ( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/choltop.a' ; \
-       mv stest.out stest_choltop.out ; mv dtest.out dtest_choltop.out ; mv ctest.out ctest_choltop.out ; mv ztest.out ztest_choltop.out )
-       ( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lucr.a' ; \
-       mv stest.out stest_lucr.out ; mv dtest.out dtest_lucr.out ; mv ctest.out ctest_lucr.out ; mv ztest.out ztest_lucr.out )
-       ( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lull.a' ; \
-       mv stest.out stest_lull.out ; mv dtest.out dtest_lull.out ; mv ctest.out ctest_lull.out ; mv ztest.out ztest_lull.out )
-       ( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/lurec.a' ; \
-       mv stest.out stest_lurec.out ; mv dtest.out dtest_lurec.out ; mv ctest.out ctest_lurec.out ; mv ztest.out ztest_lurec.out )
-       ( cd TESTING ;  rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/qrll.a' ; \
-       mv stest.out stest_qrll.out ; mv dtest.out dtest_qrll.out ; mv ctest.out ctest_qrll.out ; mv ztest.out ztest_qrll.out )
-       
-blas_testing:
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 )
-       ( cd BLAS; ./xblat1s > sblat1.out    ; \
-                  ./xblat1d > dblat1.out    ; \
-                  ./xblat1c > cblat1.out    ; \
-                  ./xblat1z > zblat1.out    ) 
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 )
-       ( cd BLAS; ./xblat2s < sblat2.in     ; \
-                  ./xblat2d < dblat2.in     ; \
-                  ./xblat2c < cblat2.in     ; \
-                  ./xblat2z < zblat2.in     )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 )
-       ( cd BLAS; ./xblat3s < sblat3.in     ; \
-                  ./xblat3d < dblat3.in     ; \
-                  ./xblat3c < cblat3.in     ; \
-                  ./xblat3z < zblat3.in     ) 
-
-cblas_testing: blaslib
-       ( cd CBLAS ; $(MAKE) cblas_testing)
-       ( cd CBLAS ; $(MAKE) runtst)
+variants_testing: tmglib variants lapacklib blaslib
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/cholrl.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_cholrl.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_cholrl.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_cholrl.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_cholrl.out
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/choltop.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_choltop.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_choltop.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_choltop.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_choltop.out
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lucr.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lucr.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lucr.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lucr.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lucr.out
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lull.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lull.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lull.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lull.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lull.out
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lurec.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lurec.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lurec.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lurec.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lurec.out
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/qrll.a'
+       $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_qrll.out
+       $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_qrll.out
+       $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_qrll.out
+       $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_qrll.out
 
+cblas_example: cblaslib blaslib
+       $(MAKE) -C CBLAS cblas_example
 
+lapacke_example: lapackelib lapacklib blaslib
+       $(MAKE) -C LAPACKE lapacke_example
 
 html:
-       @echo "LAPACK HTML PAGES GENRATION with Doxygen"
+       @echo "LAPACK HTML PAGES GENERATION with Doxygen"
        doxygen DOCS/Doxyfile
-       @echo "=================="      
-       @echo "LAPACK HTML PAGES GENRATED in DOCS/explore-html"
+       @echo "=================="
+       @echo "LAPACK HTML PAGES GENERATED in DOCS/explore-html"
        @echo "Usage: open DOCS/explore-html/index.html"
        @echo "Online version available at http://www.netlib.org/lapack/explore-html/"
        @echo "=================="
 
 man:
-       @echo "LAPACK MAN PAGES GENRATION with Doxygen"
+       @echo "LAPACK MAN PAGES GENERATION with Doxygen"
        doxygen DOCS/Doxyfile_man
        @echo "=================="
-       @echo "LAPACK MAN PAGES GENRATED in DOCS/MAN"
+       @echo "LAPACK MAN PAGES GENERATED in DOCS/MAN"
        @echo "Set your MANPATH env variable accordingly"
        @echo "Usage: man dgetrf.f"
        @echo "=================="
 
+clean:
+       $(MAKE) -C INSTALL clean
+       $(MAKE) -C BLAS clean
+       $(MAKE) -C CBLAS clean
+       $(MAKE) -C SRC clean
+       $(MAKE) -C SRC/VARIANTS clean
+       $(MAKE) -C TESTING clean
+       $(MAKE) -C TESTING/MATGEN clean
+       $(MAKE) -C TESTING/LIN clean
+       $(MAKE) -C TESTING/EIG clean
+       $(MAKE) -C LAPACKE clean
+       rm -f *.a
+cleanobj:
+       $(MAKE) -C INSTALL cleanobj
+       $(MAKE) -C BLAS cleanobj
+       $(MAKE) -C CBLAS cleanobj
+       $(MAKE) -C SRC cleanobj
+       $(MAKE) -C SRC/VARIANTS cleanobj
+       $(MAKE) -C TESTING/MATGEN cleanobj
+       $(MAKE) -C TESTING/LIN cleanobj
+       $(MAKE) -C TESTING/EIG cleanobj
+       $(MAKE) -C LAPACKE cleanobj
 cleanlib:
-       ( cd INSTALL; $(MAKE) clean )
-       ( cd BLAS/SRC; $(MAKE) clean )
-       ( cd CBLAS; $(MAKE) clean )
-       ( cd SRC; $(MAKE) clean )
-       ( cd SRC/VARIANTS; $(MAKE) clean )
-       ( cd TESTING/MATGEN; $(MAKE) clean )
-       ( cd LAPACKE; $(MAKE) clean )
-
-
-cleanblas_testing:     
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 clean )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 clean )
-       ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean )
-       ( cd BLAS; rm -f xblat* )
-
-cleancblas_testing:
-       ( cd CBLAS/testing; $(MAKE) clean )
-
-cleantesting:
-       ( cd TESTING/LIN; $(MAKE) clean )
-       ( cd TESTING/EIG; $(MAKE) clean )
-       ( cd TESTING; rm -f xlin* xeig* )
-
-cleanall: cleanlib cleanblas_testing cleancblas_testing cleantesting 
-       rm -f *.a TESTING/*.out INSTALL/test*  BLAS/*.out
-
+       $(MAKE) -C BLAS cleanlib
+       $(MAKE) -C CBLAS cleanlib
+       $(MAKE) -C SRC cleanlib
+       $(MAKE) -C SRC/VARIANTS cleanlib
+       $(MAKE) -C TESTING/MATGEN cleanlib
+       $(MAKE) -C LAPACKE cleanlib
+       rm -f *.a
+cleanexe:
+       $(MAKE) -C INSTALL cleanexe
+       $(MAKE) -C BLAS cleanexe
+       $(MAKE) -C CBLAS cleanexe
+       $(MAKE) -C TESTING/LIN cleanexe
+       $(MAKE) -C TESTING/EIG cleanexe
+       $(MAKE) -C LAPACKE cleanexe
+cleantest:
+       $(MAKE) -C INSTALL cleantest
+       $(MAKE) -C BLAS cleantest
+       $(MAKE) -C CBLAS cleantest
+       $(MAKE) -C TESTING cleantest
index 0864929..e5ac2d9 100644 (file)
@@ -1,6 +1,9 @@
 # LAPACK
 
 [![Build Status](https://travis-ci.org/Reference-LAPACK/lapack.svg?branch=master)](https://travis-ci.org/Reference-LAPACK/lapack)
+[![Appveyor](https://ci.appveyor.com/api/projects/status/bh38iin398msrbtr?svg=true)](https://ci.appveyor.com/project/langou/lapack/)
+[![codecov](https://codecov.io/gh/Reference-LAPACK/lapack/branch/master/graph/badge.svg)](https://codecov.io/gh/Reference-LAPACK/lapack)
+
 
 * VERSION 1.0   :  February 29, 1992
 * VERSION 1.0a  :  June 30, 1992
 * VERSION 3.6.0 : November 2015
 * VERSION 3.6.1 : June 2016
 * VERSION 3.7.0 : December 2016
+* VERSION 3.7.1 : June 2017
+* VERSION 3.8.0 : November 2017
+
+LAPACK is a library of Fortran subroutines for solving the most commonly
+occurring problems in numerical linear algebra.
+
+LAPACK is a freely-available software package. It can be included in commercial
+software packages (and has been). We only ask that that proper credit be given
+to the authors, for example by citing the LAPACK Users' Guide. The license used
+for the software is the modified BSD license, see:
+https://github.com/Reference-LAPACK/lapack/blob/master/LICENSE
 
-LAPACK is a library of Fortran 90 with subroutines for solving
-the most commonly occurring problems in numerical linear algebra.
-It is freely-available software, and is copyrighted.
+Like all software, it is copyrighted. It is not trademarked, but we do ask the
+following: if you modify the source for these routines we ask that you change
+the name of the routine and comment the changes made to the original.
 
-LAPACK is available on netlib and can be obtained via the World Wide
-Web and anonymous ftp.
+We will gladly answer any questions regarding the software. If a modification
+is done, however, it is the responsibility of the person who modified the
+routine to provide support.
 
-   http://www.netlib.org/lapack/
+LAPACK is available from github at:
+https://github.com/reference-lapack/lapack
 
-The distribution tar file contains the Fortran source for LAPACK and the
-testing programs.  It also contains the Fortran77
-reference implementation of the Basic Linear Algebra Subprograms
-(the Level 1, 2, and 3 BLAS) needed by LAPACK.  However this code is
-intended for use only if there is no other implementation of the BLAS
-already available on your machine; the efficiency of LAPACK depends
-very much on the efficiency of the BLAS.
+LAPACK releases are also available on netlib at:
+http://www.netlib.org/lapack/
+
+The distribution contains (1) the Fortran source for LAPACK, and (2) its
+testing programs.  It also contains (3) the Fortran reference implementation of
+the Basic Linear Algebra Subprograms (the Level 1, 2, and 3 BLAS) needed by
+LAPACK.  However this code is intended for use only if there is no other
+implementation of the BLAS already available on your machine; the efficiency of
+LAPACK depends very much on the efficiency of the BLAS.  It also contains (4)
+CBLAS, a C interface to the BLAS, and (5) LAPACKE, a C interface to LAPACK.
 
 ## Installation
 
- - LAPACK can be installed with `make`. Configuration have to be set in the
+ - LAPACK can be installed with `make`. The configuration have to be set in the
    `make.inc` file. A `make.inc.example` for a Linux machine running GNU compilers
    is given in the main directory. Some specific `make.inc` are also available in
    the `INSTALL` directory.
  - LAPACK includes also the CMake build. You will need to have CMake installed
    on your machine (CMake is available at http://www.cmake.org/). CMake will
    allow an easy installation on a Windows Machine.
- - Specific information to run LAPACK under Windows are available at
+ - Specific information to run LAPACK under Windows is available at
    http://icl.cs.utk.edu/lapack-for-windows/lapack/.
 
- For further information on LAPACK please read our FAQ at
- http://www.netlib.org/lapack/#_faq
- A User forum is also available to help you with the LAPACK library at
- http://icl.cs.utk.edu/lapack-forum/
-
 
 ## User Support
 
-LAPACK has been thoroughly tested, on many different
-types of computers.  The LAPACK project supports the package in the
-sense that reports of errors or poor performance will gain immediate
-attention from the developers. Such reports, descriptions
-of interesting applications, and other comments should be sent by
-electronic mail to lapack@cs.utk.edu.
+LAPACK has been thoroughly tested, on many different types of computers. The
+LAPACK project supports the package in the sense that reports of errors or poor
+performance will gain immediate attention from the developers. Such reports,
+descriptions of interesting applications, and other comments should be sent by
+electronic mail to lapack@icl.utk.edu.
+
+For further information on LAPACK please read our FAQ at
+http://www.netlib.org/lapack/#_faq.
 
 A list of known problems, bugs, and compiler errors for LAPACK is
-maintained on netlib.
- * http://www.netlib.org/lapack/release_notes.html
+maintained on netlib
+http://www.netlib.org/lapack/release_notes.html.
+Please see as well
+https://github.com/Reference-LAPACK/lapack/issues.
 
 A User forum is also available to help you with the LAPACK library at
- http://icl.cs.utk.edu/lapack-forum/.
-You can also contact directly the LAPACK team at lapack@cs.utk.edu.
+http://icl.cs.utk.edu/lapack-forum/.
+You can also contact directly the LAPACK team at lapack@icl.utk.edu.
 
 
 ## Testing
 
-The complete package, including test code in four
-different Fortran data types (real, complex, double precision, double
-complex), contains some 805,000 lines of Fortran source and comments.
-You will need approximately 33 Mbytes to read the complete tape.
-We recommend that you run the testing.  The total
-space requirements for the testing for all four data
-types, including the object files, is approximately 80 Mbytes.
-
-A README file containing the information in this letter is located
-in the LAPACK directory. Postscript and LaTeX versions of the Quick
-Installation Guide are in the `LAPACK/INSTALL` directory, in the files
-`lawn81.tex`, `psfig.tex`, `lawn81.ps`, and `org2.ps`.  Consult the Installation
-Guide for further details on installing the package and on what is contained
-in each subdirectory.  For complete information on the LAPACK Testing
-please consult LAPACK Working Note 41 "Installation
-Guide for LAPACK".
+LAPACK includes a thorough test suite. We recommend that, after compilation,
+you run the test suite. 
 
+For complete information on the LAPACK Testing please consult LAPACK Working
+Note 41 "Installation Guide for LAPACK".
 
 ## User Guide
 
-It is highly recommended that you obtain a copy of the Third Edition of
-the LAPACK Users' Guide published by SIAM in Winter, 1999.  This Users'
-Guide gives a detailed description of the philosophy behind LAPACK as well
-as an explanation of its usage.  The LAPACK Users' Guide can be purchased from:
-SIAM; Customer Service; P. O. Box 7260; Philadelphia, PA 19104;
-215-382-9800, FAX 215-386-7999.  It will also be available from booksellers.
-
-To order by email, send email to service@siam.org.  The book is also
-available via SIAM's World Wide Web URL at http://www.siam.org.  The
-ISBN number is 0-89871-447-8, and SIAM order code is SE09.  The list
-price for SIAM members is $31.20; the cost for nonmembers is $39.00.
-
 To view an HTML version of the Users' Guide please refer to the URL
-
   http://www.netlib.org/lapack/lug/lapack_lug.html.
 
 ## LAPACKE
-LAPACK now includes the LAPACKE package
-LAPACKE is a Standard C language APIs for LAPACK
-http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack
-collaboration LAPACK and INTEL Math Kernel Library
-
-Documentation available in the DOCS folder
-
-## Related Projects
-
-The Fortran95 interface to LAPACK is available, as well as an f2c'ed
-version of LAPACK, and a C++ version of a subset of LAPACK routines.
-Refer to the following URLs on netlib for further information:
-
- * http://www.netlib.org/lapack95/
- * http://www.netlib.org/clapack/
- * http://www.netlib.org/lapack++/
- * http://www.cs.utk.edu/java/f2j/
-
-Or, for more information on the distributed-memory version of LAPACK,
-consult the ScaLAPACK index on netlib:
-
-  http://www.netlib.org/scalapack/
-
-
-## Working Notes
 
-A number of technical reports were written during the development of
-LAPACK and published as LAPACK Working Notes, initially by Argonne
-National Laboratory and later by the University of Tennessee.  Many of
-these reports later appeared as journal articles.  Most of these working
-notes are available in pdf and postscript form from netlib.
-  * http://www.netlib.org/lapack/lawns/
-  * http://www.netlib.org/lapack/lawnspdf/
-Otherwise, requests for copies of these working notes can be sent to
-the following address.
+LAPACK now includes the LAPACKE package.  LAPACKE is a Standard C language API
+for LAPACK This was born from a collaboration of the LAPACK and INTEL Math
+Kernel Library teams. See:
+http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack.
 
-LAPACK Project, c/o J.J. Dongarra, Computer Science Department, University of Tennessee, Knoxville, Tennessee 37996-1301, USA, Email: lapack@cs.utk.edu.
index 4d7081c..944401b 100644 (file)
@@ -1,10 +1,10 @@
 #######################################################################
 #  This is the makefile to create a library for LAPACK.
 #  The files are organized as follows:
+
 #       ALLAUX  -- Auxiliary routines called from all precisions
-#
-#       SCLAUX  -- Auxiliary routines called from both REAL and COMPLEX.
-#       DZLAUX  -- Auxiliary routines called from both DOUBLE and COMPLEX*16.
+#       SCLAUX  -- Auxiliary routines called from single precision
+#       DZLAUX  -- Auxiliary routines called from double precision
 #
 #       DSLASRC -- Double-single mixed precision real routines called from
 #                  single, single-extra and double precision real LAPACK
 #
 #    DEPRECATED -- Deprecated routines in all precisions
 #
-#  The library can be set up to include routines for any combination
-#  of the four precisions.  To create or add to the library, enter make
-#  followed by one or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates a library of all four precisions.
-#  The library is called
-#       lapack.a
-#  and is created at the next higher directory level.
-#
-#  To remove the object files after the library is created, enter
-#       make clean
-#  On some systems, you can force the source files to be recompiled by
-#  entering (for example)
-#       make single FRC=FRC
-#
 #  ***Note***
 #  The functions lsame, second, dsecnd, slamch, and dlamch may have
 #  to be installed before compiling the library.  Refer to the
@@ -54,7 +35,7 @@
 #
 #######################################################################
 
-set(ALLAUX ilaenv.f ieeeck.f lsamen.f iparmq.f iparam2stage.F
+set(ALLAUX ilaenv.f ilaenv2stage.f ieeeck.f lsamen.f iparmq.f iparam2stage.F
    ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f
    ../INSTALL/ilaver.f ../INSTALL/lsame.f xerbla.f xerbla_array.f
    ../INSTALL/slamch.f)
@@ -103,8 +84,8 @@ set(SLASRC
    sgels.f  sgelsd.f sgelss.f sgelsy.f sgeql2.f sgeqlf.f
    sgeqp3.f sgeqr2.f sgeqr2p.f sgeqrf.f sgeqrfp.f sgerfs.f sgerq2.f sgerqf.f
    sgesc2.f sgesdd.f sgesv.f  sgesvd.f sgesvdx.f sgesvx.f sgetc2.f sgetf2.f
-   sgetrf.f sgetrf2.f sgetri.f
-   sgetrs.f sggbak.f sggbal.f
+   sgetrf2.f sgetri.f
+   sggbak.f sggbal.f
    sgges.f  sgges3.f sggesx.f sggev.f  sggev3.f sggevx.f
    sggglm.f sgghrd.f sgghd3.f sgglse.f sggqrf.f
    sggrqf.f sggsvd3.f sggsvp3.f sgtcon.f sgtrfs.f sgtsv.f
@@ -130,7 +111,7 @@ set(SLASRC
    sormr3.f sormrq.f sormrz.f sormtr.f spbcon.f spbequ.f spbrfs.f
    spbstf.f spbsv.f  spbsvx.f
    spbtf2.f spbtrf.f spbtrs.f spocon.f spoequ.f sporfs.f sposv.f
-   sposvx.f spotf2.f spotrf.f spotrf2.f spotri.f spotrs.f spstrf.f spstf2.f
+   sposvx.f spotf2.f spotrf2.f spotri.f spstrf.f spstf2.f
    sppcon.f sppequ.f
    spprfs.f sppsv.f  sppsvx.f spptrf.f spptri.f spptrs.f sptcon.f
    spteqr.f sptrfs.f sptsv.f  sptsvx.f spttrs.f sptts2.f srscl.f
@@ -143,12 +124,12 @@ set(SLASRC
    ssytd2.f ssytf2.f ssytrd.f ssytrf.f ssytri.f ssytri2.f ssytri2x.f
    ssyswapr.f ssytrs.f ssytrs2.f
    ssyconv.f ssyconvf.f ssyconvf_rook.f
-   ssysv_aa.f ssytrf_aa.f ssytrs_aa.f
    ssytf2_rook.f ssytrf_rook.f ssytrs_rook.f
    ssytri_rook.f ssycon_rook.f ssysv_rook.f
    ssytf2_rk.f ssytrf_rk.f ssytrs_3.f
    ssytri_3.f ssytri_3x.f ssycon_3.f ssysv_rk.f
    ssysv_aa.f ssytrf_aa.f ssytrs_aa.f
+   ssysv_aa_2stage.f ssytrf_aa_2stage.f ssytrs_aa_2stage.f
    stbcon.f
    stbrfs.f stbtrs.f stgevc.f stgex2.f stgexc.f stgsen.f
    stgsja.f stgsna.f stgsy2.f stgsyl.f stpcon.f stprfs.f stptri.f
@@ -190,8 +171,8 @@ set(CLASRC
    cgeqr2.f cgeqr2p.f cgeqrf.f cgeqrfp.f cgerfs.f cgerq2.f cgerqf.f
    cgesc2.f cgesdd.f cgesv.f  cgesvd.f cgesvdx.f
    cgesvj.f cgejsv.f cgsvj0.f cgsvj1.f
-   cgesvx.f cgetc2.f cgetf2.f cgetrf.f cgetrf2.f
-   cgetri.f cgetrs.f
+   cgesvx.f cgetc2.f cgetf2.f cgetrf2.f
+   cgetri.f
    cggbak.f cggbal.f
    cgges.f  cgges3.f cggesx.f cggev.f  cggev3.f cggevx.f
    cggglm.f cgghrd.f cgghd3.f cgglse.f cggqrf.f cggrqf.f
@@ -208,6 +189,7 @@ set(CLASRC
    chetf2_rk.f chetrf_rk.f chetri_3.f chetri_3x.f
    chetrs_3.f checon_3.f chesv_rk.f
    chesv_aa.f chetrf_aa.f chetrs_aa.f
+   chesv_aa_2stage.f chetrf_aa_2stage.f chetrs_aa_2stage.f
    chgeqz.f chpcon.f chpev.f  chpevd.f
    chpevx.f chpgst.f chpgv.f  chpgvd.f chpgvx.f chprfs.f chpsv.f
    chpsvx.f
@@ -230,7 +212,7 @@ set(CLASRC
    clatbs.f clatdf.f clatps.f clatrd.f clatrs.f clatrz.f
    clauu2.f clauum.f cpbcon.f cpbequ.f cpbrfs.f cpbstf.f cpbsv.f
    cpbsvx.f cpbtf2.f cpbtrf.f cpbtrs.f cpocon.f cpoequ.f cporfs.f
-   cposv.f  cposvx.f cpotf2.f cpotrf.f cpotrf2.f cpotri.f cpotrs.f cpstrf.f cpstf2.f
+   cposv.f  cposvx.f cpotf2.f cpotrf2.f cpotri.f cpstrf.f cpstf2.f
    cppcon.f cppequ.f cpprfs.f cppsv.f  cppsvx.f cpptrf.f cpptri.f cpptrs.f
    cptcon.f cpteqr.f cptrfs.f cptsv.f  cptsvx.f cpttrf.f cpttrs.f cptts2.f
    crot.f   cspcon.f cspmv.f  cspr.f   csprfs.f cspsv.f
@@ -244,6 +226,7 @@ set(CLASRC
    csytri_rook.f csycon_rook.f csysv_rook.f
    csytf2_rk.f csytrf_rk.f csytrf_aa.f csytrs_3.f csytrs_aa.f
    csytri_3.f csytri_3x.f csycon_3.f csysv_rk.f csysv_aa.f
+   csysv_aa_2stage.f csytrf_aa_2stage.f csytrs_aa_2stage.f
    ctbcon.f ctbrfs.f ctbtrs.f ctgevc.f ctgex2.f
    ctgexc.f ctgsen.f ctgsja.f ctgsna.f ctgsy2.f ctgsyl.f ctpcon.f
    ctprfs.f ctptri.f
@@ -336,6 +319,7 @@ set(DLASRC
    dsytf2_rk.f dsytrf_rk.f dsytrs_3.f
    dsytri_3.f dsytri_3x.f dsycon_3.f dsysv_rk.f
    dsysv_aa.f dsytrf_aa.f dsytrs_aa.f
+   dsysv_aa_2stage.f dsytrf_aa_2stage.f dsytrs_aa_2stage.f
    dtbcon.f
    dtbrfs.f dtbtrs.f dtgevc.f dtgex2.f dtgexc.f dtgsen.f
    dtgsja.f dtgsna.f dtgsy2.f dtgsyl.f dtpcon.f dtprfs.f dtptri.f
@@ -394,6 +378,7 @@ set(ZLASRC
    zhetf2_rk.f zhetrf_rk.f zhetri_3.f zhetri_3x.f
    zhetrs_3.f zhecon_3.f zhesv_rk.f
    zhesv_aa.f zhetrf_aa.f zhetrs_aa.f
+   zhesv_aa_2stage.f zhetrf_aa_2stage.f zhetrs_aa_2stage.f
    zhgeqz.f zhpcon.f zhpev.f  zhpevd.f
    zhpevx.f zhpgst.f zhpgv.f  zhpgvd.f zhpgvx.f zhprfs.f zhpsv.f
    zhpsvx.f
@@ -431,6 +416,7 @@ set(ZLASRC
    zsytf2_rook.f zsytrf_rook.f zsytrs_rook.f zsytrs_aa.f
    zsytri_rook.f zsycon_rook.f zsysv_rook.f
    zsytf2_rk.f zsytrf_rk.f zsytrf_aa.f zsytrs_3.f
+   zsysv_aa_2stage.f zsytrf_aa_2stage.f zsytrs_aa_2stage.f
    zsytri_3.f zsytri_3x.f zsycon_3.f zsysv_rk.f zsysv_aa.f
    ztbcon.f ztbrfs.f ztbtrs.f ztgevc.f ztgex2.f
    ztgexc.f ztgsen.f ztgsja.f ztgsna.f ztgsy2.f ztgsyl.f ztpcon.f
@@ -468,11 +454,6 @@ set(ZXLASRC zgesvxx.f zgerfsx.f zla_gerfsx_extended.f zla_geamv.f
    zla_heamv.f zla_hercond_c.f zla_hercond_x.f zla_herpvgrw.f
    zla_lin_berr.f zlarscl2.f zlascl2.f zla_wwaddw.f)
 
-
-if(USE_XBLAS)
-  set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC})
-endif()
-
 if(BUILD_DEPRECATED)
   list(APPEND SLASRC DEPRECATED/sgegs.f DEPRECATED/sgegv.f
     DEPRECATED/sgeqpf.f DEPRECATED/sgelsx.f DEPRECATED/sggsvd.f
@@ -486,40 +467,46 @@ if(BUILD_DEPRECATED)
   list(APPEND ZLASRC DEPRECATED/zgegs.f DEPRECATED/zgegv.f
     DEPRECATED/zgeqpf.f DEPRECATED/zgelsx.f DEPRECATED/zggsvd.f
     DEPRECATED/zggsvp.f DEPRECATED/zlahrd.f DEPRECATED/zlatzm.f DEPRECATED/ztzrqf.f)
-  message(STATUS "Building deprecated routines")
 endif()
 
+if(USE_XBLAS)
+  list(APPEND SLASRC ${SXLASRC})
+  list(APPEND DLASRC ${DXLASRC})
+  list(APPEND CLASRC ${CXLASRC})
+  list(APPEND ZLASRC ${ZXLASRC})
+endif()
+
+
+set(SOURCES)
 if(BUILD_SINGLE)
-  set(ALLOBJ ${SLASRC} ${ALLAUX} ${SCLAUX})
-  message(STATUS "Building Single Precision")
+  list(APPEND SOURCES ${SLASRC} ${DSLASRC} ${SCLAUX} ${ALLAUX})
 endif()
 if(BUILD_DOUBLE)
-  set(ALLOBJ ${ALLOBJ} ${DLASRC} ${ALLAUX} ${DZLAUX} ${DSLASRC})
-  message(STATUS "Building Double Precision")
+  list(APPEND SOURCES ${DLASRC} ${DSLASRC} ${DZLAUX} ${ALLAUX})
 endif()
 if(BUILD_COMPLEX)
-  set(ALLOBJ ${ALLOBJ} ${CLASRC} ${ALLAUX} ${SCLAUX})
-  message(STATUS "Building Complex Precision")
+  list(APPEND SOURCES ${CLASRC} ${ZCLASRC} ${SCLAUX} ${ALLAUX})
 endif()
 if(BUILD_COMPLEX16)
-  set(ALLOBJ ${ALLOBJ} ${ZLASRC} ${ALLAUX} ${DZLAUX} ${ZCLASRC})
-  message(STATUS "Building Double Complex Precision")
-endif()
-
-if(NOT ALLOBJ)
-  message(FATAL_ERROR "-->LAPACK SRC BUILD: NOTHING TO BUILD, NO PRECISION SELECTED:
-     PLEASE ENABLE AT LEAST ONE OF THOSE: BUILD_SINGLE, BUILD_COMPLEX, BUILD_DOUBLE, BUILD_COMPLEX16.")
+  list(APPEND SOURCES ${ZLASRC} ${ZCLASRC} ${DZLAUX} ${ALLAUX})
 endif()
+list(REMOVE_DUPLICATES SOURCES)
 
-list(REMOVE_DUPLICATES ALLOBJ)
-
-add_library(lapack ${ALLOBJ} ${ALLXOBJ})
-target_link_libraries(lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
-
+add_library(lapack ${SOURCES})
 set_target_properties(
   lapack PROPERTIES
   VERSION ${LAPACK_VERSION}
   SOVERSION ${LAPACK_MAJOR_VERSION}
   )
 
+if(USE_XBLAS)
+  target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY})
+endif()
+target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES})
+
+if (${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
+  target_link_libraries(lapack PRIVATE gcov)
+  add_coverage(lapack)
+endif()
+
 lapack_install_library(lapack)
index d327359..9cc2ea5 100644 (file)
@@ -3,10 +3,10 @@ include ../make.inc
 #######################################################################
 #  This is the makefile to create a library for LAPACK.
 #  The files are organized as follows:
-#       ALLAUX  -- Auxiliary routines called from all precisions
 #
-#       SCLAUX  -- Auxiliary routines called from both REAL and COMPLEX.
-#       DZLAUX  -- Auxiliary routines called from both DOUBLE and COMPLEX*16.
+#       ALLAUX  -- Auxiliary routines called from all precisions
+#       SCLAUX  -- Auxiliary routines called from single precision
+#       DZLAUX  -- Auxiliary routines called from double precision
 #
 #       DSLASRC -- Double-single mixed precision real routines called from
 #                  single, single-extra and double precision real LAPACK
@@ -56,7 +56,8 @@ include ../make.inc
 #
 #######################################################################
 
-ALLAUX_O = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o iparam2stage.o\
+ALLAUX_O = ilaenv.o ilaenv2stage.o ieeeck.o lsamen.o xerbla.o xerbla_array.o \
+   iparmq.o iparam2stage.o \
    ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \
    ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o
 
@@ -144,12 +145,14 @@ SLASRC_O = \
    ssycon.o ssyev.o  ssyevd.o ssyevr.o ssyevx.o ssygs2.o \
    ssygst.o ssygv.o  ssygvd.o ssygvx.o ssyrfs.o ssysv.o  ssysvx.o \
    ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytri2.o ssytri2x.o \
-   ssyswapr.o ssytrs.o ssytrs2.o ssyconv.o ssyconvf_rook.o \
+   ssyswapr.o ssytrs.o ssytrs2.o \
+   ssyconv.o ssyconvf.o ssyconvf_rook.o \
    ssytf2_rook.o ssytrf_rook.o ssytrs_rook.o \
    ssytri_rook.o ssycon_rook.o ssysv_rook.o \
    ssytf2_rk.o ssytrf_rk.o ssytrs_3.o \
    ssytri_3.o ssytri_3x.o ssycon_3.o ssysv_rk.o \
    slasyf_aa.o ssysv_aa.o ssytrf_aa.o ssytrs_aa.o \
+   ssysv_aa_2stage.o ssytrf_aa_2stage.o ssytrs_aa_2stage.o \
    stbcon.o \
    stbrfs.o stbtrs.o stgevc.o stgex2.o stgexc.o stgsen.o \
    stgsja.o stgsna.o stgsy2.o stgsyl.o stpcon.o stprfs.o stptri.o \
@@ -210,7 +213,8 @@ CLASRC_O = \
    chetrs_rook.o checon_rook.o chesv_rook.o \
    chetf2_rk.o chetrf_rk.o chetri_3.o chetri_3x.o \
    chetrs_3.o checon_3.o chesv_rk.o \
-   chesv_aa.o chetrf_aa.o chetrs_aa.o clahef_aa.o\
+   chesv_aa.o chetrf_aa.o chetrs_aa.o clahef_aa.o \
+   chesv_aa_2stage.o chetrf_aa_2stage.o chetrs_aa_2stage.o \
    chgeqz.o chpcon.o chpev.o  chpevd.o \
    chpevx.o chpgst.o chpgv.o  chpgvd.o chpgvx.o chprfs.o chpsv.o \
    chpsvx.o \
@@ -247,6 +251,7 @@ CLASRC_O = \
    csytri_rook.o csycon_rook.o csysv_rook.o \
    csytf2_rk.o csytrf_rk.o csytrf_aa.o csytrs_3.o csytrs_aa.o \
    csytri_3.o csytri_3x.o csycon_3.o csysv_rk.o csysv_aa.o \
+   csysv_aa_2stage.o csytrf_aa_2stage.o csytrs_aa_2stage.o \
    ctbcon.o ctbrfs.o ctbtrs.o ctgevc.o ctgex2.o \
    ctgexc.o ctgsen.o ctgsja.o ctgsna.o ctgsy2.o ctgsyl.o ctpcon.o \
    ctprfs.o ctptri.o \
@@ -344,6 +349,7 @@ DLASRC_O = \
    dsytf2_rk.o dsytrf_rk.o dsytrs_3.o \
    dsytri_3.o dsytri_3x.o dsycon_3.o dsysv_rk.o \
    dlasyf_aa.o dsysv_aa.o dsytrf_aa.o dsytrs_aa.o \
+   dsysv_aa_2stage.o dsytrf_aa_2stage.o dsytrs_aa_2stage.o \
    dtbcon.o dtbrfs.o dtbtrs.o dtgevc.o dtgex2.o dtgexc.o dtgsen.o \
    dtgsja.o dtgsna.o dtgsy2.o dtgsyl.o dtpcon.o dtprfs.o dtptri.o \
    dtptrs.o \
@@ -404,6 +410,7 @@ ZLASRC_O = \
    zhetf2_rk.o zhetrf_rk.o zhetri_3.o zhetri_3x.o \
    zhetrs_3.o zhecon_3.o zhesv_rk.o \
    zhesv_aa.o zhetrf_aa.o zhetrs_aa.o zlahef_aa.o \
+   zhesv_aa_2stage.o zhetrf_aa_2stage.o zhetrs_aa_2stage.o \
    zhgeqz.o zhpcon.o zhpev.o  zhpevd.o \
    zhpevx.o zhpgst.o zhpgv.o  zhpgvd.o zhpgvx.o zhprfs.o zhpsv.o \
    zhpsvx.o \
@@ -440,6 +447,7 @@ ZLASRC_O = \
    zsyconv.o zsyconvf.o zsyconvf_rook.o \
    zsytf2_rook.o zsytrf_rook.o zsytrs_rook.o zsytrs_aa.o \
    zsytri_rook.o zsycon_rook.o zsysv_rook.o \
+   zsysv_aa_2stage.o zsytrf_aa_2stage.o zsytrs_aa_2stage.o \
    zsytf2_rk.o zsytrf_rk.o zsytrf_aa.o zsytrs_3.o \
    zsytri_3.o zsytri_3x.o zsycon_3.o zsysv_rk.o zsysv_aa.o \
    ztbcon.o ztbrfs.o ztbtrs.o ztgevc.o ztgex2.o \
index 6db97e9..9f14107 100644 (file)
@@ -17,8 +17,6 @@ include ../../make.inc
 #  1065-1081. http://dx.doi.org/10.1137/S0895479896297744
 #######################################################################
 
-VARIANTSDIR = LIB
-
 CHOLRL = cholesky/RL/cpotrf.o cholesky/RL/dpotrf.o cholesky/RL/spotrf.o cholesky/RL/zpotrf.o
 
 CHOLTOP = cholesky/TOP/cpotrf.o cholesky/TOP/dpotrf.o cholesky/TOP/spotrf.o cholesky/TOP/zpotrf.o
@@ -32,36 +30,37 @@ LUREC = lu/REC/cgetrf.o lu/REC/dgetrf.o lu/REC/sgetrf.o lu/REC/zgetrf.o
 QRLL = qr/LL/cgeqrf.o qr/LL/dgeqrf.o qr/LL/sgeqrf.o qr/LL/zgeqrf.o qr/LL/sceil.o
 
 
-all: cholrl choltop lucr lull lurec qrll
+all: cholrl.a choltop.a lucr.a lull.a lurec.a qrll.a
 
-cholrl: $(CHOLRL)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/cholrl.a $(CHOLRL)
-       $(RANLIB) $(VARIANTSDIR)/cholrl.a
+cholrl.a: $(CHOLRL)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
-choltop: $(CHOLTOP)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/choltop.a $(CHOLTOP)
-       $(RANLIB) $(VARIANTSDIR)/choltop.a
+choltop.a: $(CHOLTOP)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
-lucr: $(LUCR)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lucr.a $(LUCR)
-       $(RANLIB) $(VARIANTSDIR)/lucr.a
+lucr.a: $(LUCR)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
-lull: $(LULL)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lull.a $(LULL)
-       $(RANLIB) $(VARIANTSDIR)/lull.a
+lull.a: $(LULL)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
-lurec: $(LUREC)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lurec.a $(LUREC)
-       $(RANLIB) $(VARIANTSDIR)/lurec.a
+lurec.a: $(LUREC)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
-qrll: $(QRLL)
-       $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/qrll.a $(QRLL)
-       $(RANLIB) $(VARIANTSDIR)/qrll.a
+qrll.a: $(QRLL)
+       $(ARCH) $(ARCHFLAGS) $@ $^
+       $(RANLIB) $@
 
+clean: cleanobj cleanlib
+cleanobj:
+       rm -f $(CHOLRL) $(CHOLTOP) $(LUCR) $(LULL) $(LUREC) $(QRLL)
+cleanlib:
+       rm -f *.a
 
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
-
-clean:
-       rm -f $(CHOLRL) $(CHOLTOP) $(LUCR) $(LULL) $(LUREC) $(QRLL) \
-             $(VARIANTSDIR)/*.a
index c206215..4d301cc 100644 (file)
@@ -1,5 +1,5 @@
-                  ===============
-                  = README File =
+                  ===============
+                  = README File =
                   ===============
 
 This README File is for the LAPACK driver variants.
@@ -34,10 +34,10 @@ References:For a more detailed description please refer to
 =========
 
 These variants are compiled by default in the build process but they are not tested by default.
-The build process creates one new library per variants in the four arithmetics (singel/double/comple/double complex).
-The libraries are in the SRC/VARIANTS/LIB directory.
+The build process creates one new library per variants in the four arithmetics (single real/double real/single complex/double complex).
+The libraries are in the SRC/VARIANTS directory.
 
-Corresponding libraries created in SRC/VARIANTS/LIB:
+Corresponding libraries created in SRC/VARIANTS:
        - LU Crout : lucr.a
        - LU Left Looking : lull.a
        - LU Sivan Toledo's recursive : lurec.a
@@ -73,7 +73,7 @@ Default using LU Right Looking version:
 
 Using LU Left Looking version:
  $(FORTRAN) -c myprog.f
- $(FORTRAN) -o myexe myprog.o $(PATH TO LAPACK/SRC/VARIANTS/LIB)/lull.a $(LAPACKLIB) $(BLASLIB)
+ $(FORTRAN) -o myexe myprog.o $(PATH TO LAPACK/SRC/VARIANTS)/lull.a $(LAPACKLIB) $(BLASLIB)
 
 ===========
 = SUPPORT =
index d417567..b5a18d5 100644 (file)
 *>
 *> \param[in,out] V2T
 *> \verbatim
-*>          V2T is COMPLEX array, dimenison (LDV2T,M-Q)
+*>          V2T is COMPLEX array, dimension (LDV2T,M-Q)
 *>          On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is
 *>          premultiplied by the conjugate transpose of the right
 *>          singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
      $                   V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
      $                   B22D, B22E, RWORK, LRWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index e874120..a234f36 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX array dimension (min(M,N))
+*>          TAUQ is COMPLEX array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEcomputational
 * @precisions normal c -> s d z
 *  =====================================================================
       SUBROUTINE CGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
index d01e228..eebd26f 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX array dimension (min(M,N))
+*>          TAUQ is COMPLEX array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexGEcomputational
 *
       SUBROUTINE CGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
 *     .. Local Scalars ..
       LOGICAL            LQUERY
       INTEGER            I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
-     $                   NBMIN, NX
-      REAL               WS
+     $                   NBMIN, NX, WS
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           CGEBD2, CGEMM, CLABRD, XERBLA
index 2a7a5f2..b1ff3cc 100644 (file)
 *       .. Scalar Arguments ..
 *       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
 *       INTEGER            IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
-*       REAL   ABNRM
+*       REAL               ABNRM
 *       ..
 *       .. Array Arguments ..
-*       REAL   RCONDE( * ), RCONDV( * ), RWORK( * ),
+*       REAL               RCONDE( * ), RCONDV( * ), RWORK( * ),
 *      $                   SCALE( * )
-*       COMPLEX         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+*       COMPLEX            A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   W( * ), WORK( * )
 *       ..
 *
      $                   RCONDV, WORK, LWORK, RWORK, INFO )
       implicit none
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Scalar Arguments ..
       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
       INTEGER            IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
-      REAL   ABNRM
+      REAL               ABNRM
 *     ..
 *     .. Array Arguments ..
-      REAL   RCONDE( * ), RCONDV( * ), RWORK( * ),
+      REAL               RCONDE( * ), RCONDV( * ), RWORK( * ),
      $                   SCALE( * )
-      COMPLEX         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+      COMPLEX            A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
      $                   W( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      REAL   ZERO, ONE
+      REAL               ZERO, ONE
       PARAMETER          ( ZERO = 0.0E0, ONE = 1.0E0 )
 *     ..
 *     .. Local Scalars ..
       CHARACTER          JOB, SIDE
       INTEGER            HSWORK, I, ICOND, IERR, ITAU, IWRK, K,
      $                   LWORK_TREVC, MAXWRK, MINWRK, NOUT
-      REAL   ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM
-      COMPLEX         TMP
+      REAL               ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM
+      COMPLEX            TMP
 *     ..
 *     .. Local Arrays ..
       LOGICAL            SELECT( 1 )
index 28804e7..8eb43cf 100644 (file)
-*> \brief \b CGEJSV\r
-*\r
-*  =========== DOCUMENTATION ===========\r
-*\r
-* Online html documentation available at\r
-*            http://www.netlib.org/lapack/explore-html/\r
-*\r
-*> \htmlonly\r
-*> Download CGEJSV + dependencies\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cgejsv.f">\r
-*> [TGZ]</a>\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cgejsv.f">\r
-*> [ZIP]</a>\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cgejsv.f">\r
-*> [TXT]</a>\r
-*> \endhtmlonly\r
-*\r
-*  Definition:\r
-*  ===========\r
-*\r
-*     SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,\r
-*                         M, N, A, LDA, SVA, U, LDU, V, LDV,\r
-*                         CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )\r
-*\r
-*     .. Scalar Arguments ..\r
-*     IMPLICIT    NONE\r
-*     INTEGER     INFO, LDA, LDU, LDV, LWORK, M, N\r
-*     ..\r
-*     .. Array Arguments ..\r
-*     COMPLEX     A( LDA, * ),  U( LDU, * ), V( LDV, * ), CWORK( LWORK )\r
-*     REAL        SVA( N ), RWORK( LRWORK )\r
-*     INTEGER     IWORK( * )\r
-*     CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV\r
-*       ..\r
-*\r
-*\r
-*> \par Purpose:\r
-*  =============\r
-*>\r
-*> \verbatim\r
-*>\r
-*> CGEJSV computes the singular value decomposition (SVD) of a complex M-by-N\r
-*> matrix [A], where M >= N. The SVD of [A] is written as\r
-*>\r
-*>              [A] = [U] * [SIGMA] * [V]^*,\r
-*>\r
-*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N\r
-*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and\r
-*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are\r
-*> the singular values of [A]. The columns of [U] and [V] are the left and\r
-*> the right singular vectors of [A], respectively. The matrices [U] and [V]\r
-*> are computed and stored in the arrays U and V, respectively. The diagonal\r
-*> of [SIGMA] is computed and stored in the array SVA.\r
-*> \endverbatim\r
-*>\r
-*>  Arguments:\r
-*>  ==========\r
-*>\r
-*> \param[in] JOBA\r
-*> \verbatim\r
-*>          JOBA is CHARACTER*1\r
-*>         Specifies the level of accuracy:\r
-*>       = 'C': This option works well (high relative accuracy) if A = B * D,\r
-*>              with well-conditioned B and arbitrary diagonal matrix D.\r
-*>              The accuracy cannot be spoiled by COLUMN scaling. The\r
-*>              accuracy of the computed output depends on the condition of\r
-*>              B, and the procedure aims at the best theoretical accuracy.\r
-*>              The relative error max_{i=1:N}|d sigma_i| / sigma_i is\r
-*>              bounded by f(M,N)*epsilon* cond(B), independent of D.\r
-*>              The input matrix is preprocessed with the QRF with column\r
-*>              pivoting. This initial preprocessing and preconditioning by\r
-*>              a rank revealing QR factorization is common for all values of\r
-*>              JOBA. Additional actions are specified as follows:\r
-*>       = 'E': Computation as with 'C' with an additional estimate of the\r
-*>              condition number of B. It provides a realistic error bound.\r
-*>       = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings\r
-*>              D1, D2, and well-conditioned matrix C, this option gives\r
-*>              higher accuracy than the 'C' option. If the structure of the\r
-*>              input matrix is not known, and relative accuracy is\r
-*>              desirable, then this option is advisable. The input matrix A\r
-*>              is preprocessed with QR factorization with FULL (row and\r
-*>              column) pivoting.\r
-*>       = 'G'  Computation as with 'F' with an additional estimate of the\r
-*>              condition number of B, where A=B*D. If A has heavily weighted\r
-*>              rows, then using this condition number gives too pessimistic\r
-*>              error bound.\r
-*>       = 'A': Small singular values are not well determined by the data \r
-*>              and are considered as noisy; the matrix is treated as\r
-*>              numerically rank defficient. The error in the computed\r
-*>              singular values is bounded by f(m,n)*epsilon*||A||.\r
-*>              The computed SVD A = U * S * V^* restores A up to\r
-*>              f(m,n)*epsilon*||A||.\r
-*>              This gives the procedure the licence to discard (set to zero)\r
-*>              all singular values below N*epsilon*||A||.\r
-*>       = 'R': Similar as in 'A'. Rank revealing property of the initial\r
-*>              QR factorization is used do reveal (using triangular factor)\r
-*>              a gap sigma_{r+1} < epsilon * sigma_r in which case the\r
-*>              numerical RANK is declared to be r. The SVD is computed with\r
-*>              absolute error bounds, but more accurately than with 'A'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBU\r
-*> \verbatim\r
-*>          JOBU is CHARACTER*1\r
-*>         Specifies whether to compute the columns of U:\r
-*>       = 'U': N columns of U are returned in the array U.\r
-*>       = 'F': full set of M left sing. vectors is returned in the array U.\r
-*>       = 'W': U may be used as workspace of length M*N. See the description\r
-*>              of U.\r
-*>       = 'N': U is not computed.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBV\r
-*> \verbatim\r
-*>          JOBV is CHARACTER*1\r
-*>         Specifies whether to compute the matrix V:\r
-*>       = 'V': N columns of V are returned in the array V; Jacobi rotations\r
-*>              are not explicitly accumulated.\r
-*>       = 'J': N columns of V are returned in the array V, but they are\r
-*>              computed as the product of Jacobi rotations, if JOBT .EQ. 'N'.\r
-*>       = 'W': V may be used as workspace of length N*N. See the description\r
-*>              of V.\r
-*>       = 'N': V is not computed.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBR\r
-*> \verbatim\r
-*>          JOBR is CHARACTER*1\r
-*>         Specifies the RANGE for the singular values. Issues the licence to\r
-*>         set to zero small positive singular values if they are outside\r
-*>         specified range. If A .NE. 0 is scaled so that the largest singular\r
-*>         value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues\r
-*>         the licence to kill columns of A whose norm in c*A is less than\r
-*>         SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,\r
-*>         where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').\r
-*>       = 'N': Do not kill small columns of c*A. This option assumes that\r
-*>              BLAS and QR factorizations and triangular solvers are\r
-*>              implemented to work in that range. If the condition of A\r
-*>              is greater than BIG, use CGESVJ.\r
-*>       = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]\r
-*>              (roughly, as described above). This option is recommended.\r
-*>                                             ===========================\r
-*>         For computing the singular values in the FULL range [SFMIN,BIG]\r
-*>         use CGESVJ.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBT\r
-*> \verbatim\r
-*>          JOBT is CHARACTER*1\r
-*>         If the matrix is square then the procedure may determine to use\r
-*>         transposed A if A^* seems to be better with respect to convergence.\r
-*>         If the matrix is not square, JOBT is ignored.\r
-*>         The decision is based on two values of entropy over the adjoint\r
-*>         orbit of A^* * A. See the descriptions of WORK(6) and WORK(7).\r
-*>       = 'T': transpose if entropy test indicates possibly faster\r
-*>         convergence of Jacobi process if A^* is taken as input. If A is\r
-*>         replaced with A^*, then the row pivoting is included automatically.\r
-*>       = 'N': do not speculate.\r
-*>         The option 'T' can be used to compute only the singular values, or\r
-*>         the full SVD (U, SIGMA and V). For only one set of singular vectors\r
-*>         (U or V), the caller should provide both U and V, as one of the\r
-*>         matrices is used as workspace if the matrix A is transposed.\r
-*>         The implementer can easily remove this constraint and make the\r
-*>         code more complicated. See the descriptions of U and V.\r
-*>         In general, this option is considered experimental, and 'N'; should\r
-*>         be preferred. This is subject to changes in the future.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBP\r
-*> \verbatim\r
-*>          JOBP is CHARACTER*1\r
-*>         Issues the licence to introduce structured perturbations to drown\r
-*>         denormalized numbers. This licence should be active if the\r
-*>         denormals are poorly implemented, causing slow computation,\r
-*>         especially in cases of fast convergence (!). For details see [1,2].\r
-*>         For the sake of simplicity, this perturbations are included only\r
-*>         when the full SVD or only the singular values are requested. The\r
-*>         implementer/user can easily add the perturbation for the cases of\r
-*>         computing one set of singular vectors.\r
-*>       = 'P': introduce perturbation\r
-*>       = 'N': do not perturb\r
-*> \endverbatim\r
-*>\r
-*> \param[in] M\r
-*> \verbatim\r
-*>          M is INTEGER\r
-*>         The number of rows of the input matrix A.  M >= 0.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] N\r
-*> \verbatim\r
-*>          N is INTEGER\r
-*>         The number of columns of the input matrix A. M >= N >= 0.\r
-*> \endverbatim\r
-*>\r
-*> \param[in,out] A\r
-*> \verbatim\r
-*>          A is COMPLEX array, dimension (LDA,N)\r
-*>          On entry, the M-by-N matrix A.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDA\r
-*> \verbatim\r
-*>          LDA is INTEGER\r
-*>          The leading dimension of the array A.  LDA >= max(1,M).\r
-*> \endverbatim\r
-*>\r
-*> \param[out] SVA\r
-*> \verbatim\r
-*>          SVA is REAL array, dimension (N)\r
-*>          On exit,\r
-*>          - For WORK(1)/WORK(2) = ONE: The singular values of A. During the\r
-*>            computation SVA contains Euclidean column norms of the\r
-*>            iterated matrices in the array A.\r
-*>          - For WORK(1) .NE. WORK(2): The singular values of A are\r
-*>            (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if\r
-*>            sigma_max(A) overflows or if small singular values have been\r
-*>            saved from underflow by scaling the input matrix A.\r
-*>          - If JOBR='R' then some of the singular values may be returned\r
-*>            as exact zeros obtained by "set to zero" because they are\r
-*>            below the numerical rank threshold or are denormalized numbers.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] U\r
-*> \verbatim\r
-*>          U is COMPLEX array, dimension ( LDU, N ) or ( LDU, M )\r
-*>          If JOBU = 'U', then U contains on exit the M-by-N matrix of\r
-*>                         the left singular vectors.\r
-*>          If JOBU = 'F', then U contains on exit the M-by-M matrix of\r
-*>                         the left singular vectors, including an ONB\r
-*>                         of the orthogonal complement of the Range(A).\r
-*>          If JOBU = 'W'  .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),\r
-*>                         then U is used as workspace if the procedure\r
-*>                         replaces A with A^*. In that case, [V] is computed\r
-*>                         in U as left singular vectors of A^* and then\r
-*>                         copied back to the V array. This 'W' option is just\r
-*>                         a reminder to the caller that in this case U is\r
-*>                         reserved as workspace of length N*N.\r
-*>          If JOBU = 'N'  U is not referenced, unless JOBT='T'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDU\r
-*> \verbatim\r
-*>          LDU is INTEGER\r
-*>          The leading dimension of the array U,  LDU >= 1.\r
-*>          IF  JOBU = 'U' or 'F' or 'W',  then LDU >= M.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] V\r
-*> \verbatim\r
-*>          V is COMPLEX array, dimension ( LDV, N )\r
-*>          If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of\r
-*>                         the right singular vectors;\r
-*>          If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),\r
-*>                         then V is used as workspace if the pprocedure\r
-*>                         replaces A with A^*. In that case, [U] is computed\r
-*>                         in V as right singular vectors of A^* and then\r
-*>                         copied back to the U array. This 'W' option is just\r
-*>                         a reminder to the caller that in this case V is\r
-*>                         reserved as workspace of length N*N.\r
-*>          If JOBV = 'N'  V is not referenced, unless JOBT='T'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDV\r
-*> \verbatim\r
-*>          LDV is INTEGER\r
-*>          The leading dimension of the array V,  LDV >= 1.\r
-*>          If JOBV = 'V' or 'J' or 'W', then LDV >= N.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] CWORK\r
-*> \verbatim\r
-*>          CWORK is COMPLEX array, dimension (MAX(2,LWORK))\r
-*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit CWORK(1) contains the required length of \r
-*>          CWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LWORK\r
-*> \verbatim\r
-*>          LWORK is INTEGER\r
-*>          Length of CWORK to confirm proper allocation of workspace.\r
-*>          LWORK depends on the job:\r
-*>\r
-*>          1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and\r
-*>            1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):\r
-*>               LWORK >= 2*N+1. This is the minimal requirement.\r
-*>               ->> For optimal performance (blocked code) the optimal value\r
-*>               is LWORK >= N + (N+1)*NB. Here NB is the optimal\r
-*>               block size for CGEQP3 and CGEQRF.\r
-*>               In general, optimal LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ)).        \r
-*>            1.2. .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G'). In this case, LWORK the minimal\r
-*>               requirement is LWORK >= N*N + 2*N.\r
-*>               ->> For optimal performance (blocked code) the optimal value\r
-*>               is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ),\r
-*>                            N*N+LWORK(CPOCON)).\r
-*>          2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),\r
-*>             (JOBU.EQ.'N')\r
-*>            2.1   .. no scaled condition estimate requested (JOBE.EQ.'N'):    \r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance, \r
-*>               LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ,\r
-*>               CUNMLQ. In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3), N+LWORK(CGESVJ),\r
-*>                       N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).\r
-*>            2.2 .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G').\r
-*>            -> the minimal requirement is LWORK >= 3*N.      \r
-*>            -> For optimal performance, \r
-*>               LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ,\r
-*>               CUNMLQ. In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3), LWORK(CPOCON), N+LWORK(CGESVJ),\r
-*>                       N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).   \r
-*>          3. If SIGMA and the left singular vectors are needed\r
-*>            3.1  .. no scaled condition estimate requested (JOBE.EQ.'N'):\r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance:\r
-*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3), 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). \r
-*>            3.2  .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G').\r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance:\r
-*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CPOCON),\r
-*>                        2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)).\r
-*>\r
-*>          4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and\r
-*>            4.1. if JOBV.EQ.'V'\r
-*>               the minimal requirement is LWORK >= 5*N+2*N*N.\r
-*>            4.2. if JOBV.EQ.'J' the minimal requirement is\r
-*>               LWORK >= 4*N+N*N.\r
-*>            In both cases, the allocated CWORK can accommodate blocked runs\r
-*>            of CGEQP3, CGEQRF, CGELQF, CUNMQR, CUNMLQ.\r
-*> \r
-*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the\r
-*>          minimal length of CWORK for the job parameters used in the call.        \r
-*> \endverbatim\r
-*>\r
-*> \param[out] RWORK\r
-*> \verbatim\r
-*>          RWORK is REAL array, dimension (MAX(7,LWORK))\r
-*>          On exit,\r
-*>          RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)\r
-*>                    such that SCALE*SVA(1:N) are the computed singular values\r
-*>                    of A. (See the description of SVA().)\r
-*>          RWORK(2) = See the description of RWORK(1).\r
-*>          RWORK(3) = SCONDA is an estimate for the condition number of\r
-*>                    column equilibrated A. (If JOBA .EQ. 'E' or 'G')\r
-*>                    SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).\r
-*>                    It is computed using SPOCON. It holds\r
-*>                    N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA\r
-*>                    where R is the triangular factor from the QRF of A.\r
-*>                    However, if R is truncated and the numerical rank is\r
-*>                    determined to be strictly smaller than N, SCONDA is\r
-*>                    returned as -1, thus indicating that the smallest\r
-*>                    singular values might be lost.\r
-*>\r
-*>          If full SVD is needed, the following two condition numbers are\r
-*>          useful for the analysis of the algorithm. They are provied for\r
-*>          a developer/implementer who is familiar with the details of\r
-*>          the method.\r
-*>\r
-*>          RWORK(4) = an estimate of the scaled condition number of the\r
-*>                    triangular factor in the first QR factorization.\r
-*>          RWORK(5) = an estimate of the scaled condition number of the\r
-*>                    triangular factor in the second QR factorization.\r
-*>          The following two parameters are computed if JOBT .EQ. 'T'.\r
-*>          They are provided for a developer/implementer who is familiar\r
-*>          with the details of the method.\r
-*>          RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy\r
-*>                    of diag(A^* * A) / Trace(A^* * A) taken as point in the\r
-*>                    probability simplex.\r
-*>          RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)\r
-*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit RWORK(1) contains the required length of\r
-*>          RWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LRWORK\r
-*> \verbatim\r
-*>          LRWORK is INTEGER\r
-*>          Length of RWORK to confirm proper allocation of workspace.\r
-*>          LRWORK depends on the job:\r
-*>\r
-*>       1. If only the singular values are requested i.e. if\r
-*>          LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')\r
-*>          then:\r
-*>          1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>               then: LRWORK = max( 7, 2 * M ).\r
-*>          1.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       2. If singular values with the right singular vectors are requested\r
-*>          i.e. if\r
-*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.\r
-*>          .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))\r
-*>          then:\r
-*>          2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          2.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       3. If singular values with the left singular vectors are requested, i.e. if\r
-*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.\r
-*>          .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))\r
-*>          then:\r
-*>          3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          3.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       4. If singular values with both the left and the right singular vectors\r
-*>          are requested, i.e. if\r
-*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.\r
-*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))\r
-*>          then:\r
-*>          4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          4.2. Otherwise, LRWORK  = max( 7, N ).\r
-*> \r
-*>          If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and \r
-*>          the length of RWORK is returned in RWORK(1). \r
-*> \endverbatim\r
-*>\r
-*> \param[out] IWORK\r
-*> \verbatim\r
-*>          IWORK is INTEGER array, of dimension at least 4, that further depends\r
-*>          on the job:\r
-*> \r
-*>          1. If only the singular values are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N.\r
-*>          2. If the singular values and the right singular vectors are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>          3. If the singular values and the left singular vectors are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>          4. If the singular values with both the left and the right singular vectors\r
-*>             are requested, then:      \r
-*>             4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:\r
-*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>                  then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>             4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:\r
-*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>                  then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.\r
-*>        \r
-*>          On exit,\r
-*>          IWORK(1) = the numerical rank determined after the initial\r
-*>                     QR factorization with pivoting. See the descriptions\r
-*>                     of JOBA and JOBR.\r
-*>          IWORK(2) = the number of the computed nonzero singular values\r
-*>          IWORK(3) = if nonzero, a warning message:\r
-*>                     If IWORK(3).EQ.1 then some of the column norms of A\r
-*>                     were denormalized floats. The requested high accuracy\r
-*>                     is not warranted by the data.\r
-*>          IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to\r
-*>                     do the job as specified by the JOB parameters.\r
-*>          If the call to CGEJSV is a workspace query (indicated by LWORK .EQ. -1 and \r
-*>          LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of \r
-*>          IWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] INFO\r
-*> \verbatim\r
-*>          INFO is INTEGER\r
-*>           < 0  : if INFO = -i, then the i-th argument had an illegal value.\r
-*>           = 0 :  successful exit;\r
-*>           > 0 :  CGEJSV  did not converge in the maximal allowed number\r
-*>                  of sweeps. The computed values may be inaccurate.\r
-*> \endverbatim\r
-*\r
-*  Authors:\r
-*  ========\r
-*\r
-*> \author Univ. of Tennessee\r
-*> \author Univ. of California Berkeley\r
-*> \author Univ. of Colorado Denver\r
-*> \author NAG Ltd.\r
-*\r
-*> \date June 2016\r
-*\r
-*> \ingroup complexGEsing\r
-*\r
-*> \par Further Details:\r
-*  =====================\r
-*>\r
-*> \verbatim\r
-*>  CGEJSV implements a preconditioned Jacobi SVD algorithm. It uses CGEQP3,\r
-*>  CGEQRF, and CGELQF as preprocessors and preconditioners. Optionally, an\r
-*>  additional row pivoting can be used as a preprocessor, which in some\r
-*>  cases results in much higher accuracy. An example is matrix A with the\r
-*>  structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned\r
-*>  diagonal matrices and C is well-conditioned matrix. In that case, complete\r
-*>  pivoting in the first QR factorizations provides accuracy dependent on the\r
-*>  condition number of C, and independent of D1, D2. Such higher accuracy is\r
-*>  not completely understood theoretically, but it works well in practice.\r
-*>  Further, if A can be written as A = B*D, with well-conditioned B and some\r
-*>  diagonal D, then the high accuracy is guaranteed, both theoretically and\r
-*>  in software, independent of D. For more details see [1], [2].\r
-*>     The computational range for the singular values can be the full range\r
-*>  ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS\r
-*>  & LAPACK routines called by CGEJSV are implemented to work in that range.\r
-*>  If that is not the case, then the restriction for safe computation with\r
-*>  the singular values in the range of normalized IEEE numbers is that the\r
-*>  spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not\r
-*>  overflow. This code (CGEJSV) is best used in this restricted range,\r
-*>  meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are\r
-*>  returned as zeros. See JOBR for details on this.\r
-*>     Further, this implementation is somewhat slower than the one described\r
-*>  in [1,2] due to replacement of some non-LAPACK components, and because\r
-*>  the choice of some tuning parameters in the iterative part (CGESVJ) is\r
-*>  left to the implementer on a particular machine.\r
-*>     The rank revealing QR factorization (in this code: CGEQP3) should be\r
-*>  implemented as in [3]. We have a new version of CGEQP3 under development\r
-*>  that is more robust than the current one in LAPACK, with a cleaner cut in\r
-*>  rank deficient cases. It will be available in the SIGMA library [4].\r
-*>  If M is much larger than N, it is obvious that the initial QRF with\r
-*>  column pivoting can be preprocessed by the QRF without pivoting. That\r
-*>  well known trick is not used in CGEJSV because in some cases heavy row\r
-*>  weighting can be treated with complete pivoting. The overhead in cases\r
-*>  M much larger than N is then only due to pivoting, but the benefits in\r
-*>  terms of accuracy have prevailed. The implementer/user can incorporate\r
-*>  this extra QRF step easily. The implementer can also improve data movement\r
-*>  (matrix transpose, matrix copy, matrix transposed copy) - this\r
-*>  implementation of CGEJSV uses only the simplest, naive data movement.\r
-*> \endverbatim\r
-*\r
-*> \par Contributor:\r
-*  ==================\r
-*>\r
-*>  Zlatko Drmac (Zagreb, Croatia)\r
-*\r
-*> \par References:\r
-*  ================\r
-*>\r
-*> \verbatim\r
-*>\r
-*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.\r
-*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.\r
-*>     LAPACK Working note 169.\r
-*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.\r
-*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.\r
-*>     LAPACK Working note 170.\r
-*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR\r
-*>     factorization software - a case study.\r
-*>     ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.\r
-*>     LAPACK Working note 176.\r
-*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,\r
-*>     QSVD, (H,K)-SVD computations.\r
-*>     Department of Mathematics, University of Zagreb, 2008, 2016.\r
-*> \endverbatim\r
-*\r
-*>  \par Bugs, examples and comments:\r
-*   =================================\r
-*>\r
-*>  Please report all bugs and send interesting examples and/or comments to\r
-*>  drmac@math.hr. Thank you.\r
-*>\r
-*  =====================================================================\r
-      SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,\r
-     $                   M, N, A, LDA, SVA, U, LDU, V, LDV,\r
-     $                   CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )\r
-*\r
-*  -- LAPACK computational routine (version 3.7.0) --\r
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\r
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\r
-*     December 2016\r
-*\r
-*     .. Scalar Arguments ..\r
-      IMPLICIT    NONE\r
-      INTEGER     INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N\r
-*     ..\r
-*     .. Array Arguments ..\r
-      COMPLEX     A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK )\r
-      REAL        SVA( N ), RWORK( LRWORK )\r
-      INTEGER     IWORK( * )\r
-      CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV\r
-*     ..\r
-*\r
-*  ===========================================================================\r
-*\r
-*     .. Local Parameters ..\r
-      REAL        ZERO,         ONE\r
-      PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )\r
-      COMPLEX     CZERO,                    CONE\r
-      PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ), CONE = ( 1.0E0, 0.0E0 ) )\r
-*     ..\r
-*     .. Local Scalars ..\r
-      COMPLEX CTEMP\r
-      REAL    AAPP,   AAQQ,   AATMAX, AATMIN, BIG,    BIG1,   COND_OK,\r
-     $        CONDR1, CONDR2, ENTRA,  ENTRAT, EPSLN,  MAXPRJ, SCALEM,\r
-     $        SCONDA, SFMIN,  SMALL,  TEMP1,  USCAL1, USCAL2, XSC\r
-      INTEGER IERR,   N1,     NR,     NUMRANK,        p, q,   WARNING\r
-      LOGICAL ALMORT, DEFR,   ERREST, GOSCAL,  JRACC,  KILL,   LQUERY,\r
-     $        LSVEC,  L2ABER, L2KILL, L2PERT,  L2RANK, L2TRAN, NOSCAL,\r
-     $        ROWPIV, RSVEC,  TRANSP\r
-*\r
-      INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK\r
-      INTEGER LWCON,  LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,\r
-     $        LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF\r
-      INTEGER LWRK_CGELQF, LWRK_CGEQP3,  LWRK_CGEQP3N, LWRK_CGEQRF,  \r
-     $        LWRK_CGESVJ, LWRK_CGESVJV, LWRK_CGESVJU, LWRK_CUNMLQ, \r
-     $        LWRK_CUNMQR, LWRK_CUNMQRM    \r
-*     ..\r
-*     .. Local Arrays\r
-      COMPLEX CDUMMY(1)\r
-      REAL    RDUMMY(1)\r
-*\r
-*     .. Intrinsic Functions ..\r
-      INTRINSIC ABS, CMPLX, CONJG, ALOG, MAX, MIN, REAL, NINT, SQRT\r
-*     ..\r
-*     .. External Functions ..\r
-      REAL      SLAMCH, SCNRM2\r
-      INTEGER   ISAMAX, ICAMAX\r
-      LOGICAL   LSAME\r
-      EXTERNAL  ISAMAX, ICAMAX, LSAME, SLAMCH, SCNRM2\r
-*     ..\r
-*     .. External Subroutines ..\r
-      EXTERNAL  SLASSQ, CCOPY,  CGELQF, CGEQP3, CGEQRF, CLACPY, CLAPMR,\r
-     $          CLASCL, SLASCL, CLASET, CLASSQ, CLASWP, CUNGQR, CUNMLQ,\r
-     $          CUNMQR, CPOCON, SSCAL,  CSSCAL, CSWAP,  CTRSM,  CLACGV,\r
-     $          XERBLA\r
-*\r
-      EXTERNAL  CGESVJ\r
-*     ..\r
-*\r
-*     Test the input arguments\r
-*\r
-      LSVEC  = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )\r
-      JRACC  = LSAME( JOBV, 'J' )\r
-      RSVEC  = LSAME( JOBV, 'V' ) .OR. JRACC\r
-      ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )\r
-      L2RANK = LSAME( JOBA, 'R' )\r
-      L2ABER = LSAME( JOBA, 'A' )\r
-      ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )\r
-      L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )\r
-      L2KILL = LSAME( JOBR, 'R' )\r
-      DEFR   = LSAME( JOBR, 'N' )\r
-      L2PERT = LSAME( JOBP, 'P' )\r
-*\r
-      LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )\r
-*\r
-      IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.\r
-     $     ERREST .OR. LSAME( JOBA, 'C' ) )) THEN\r
-         INFO = - 1\r
-      ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.\r
-     $   ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN\r
-         INFO = - 2\r
-      ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.\r
-     $   ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN\r
-         INFO = - 3\r
-      ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) )    THEN\r
-         INFO = - 4\r
-      ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN\r
-         INFO = - 5\r
-      ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN\r
-         INFO = - 6\r
-      ELSE IF ( M .LT. 0 ) THEN\r
-         INFO = - 7\r
-      ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN\r
-         INFO = - 8\r
-      ELSE IF ( LDA .LT. M ) THEN\r
-         INFO = - 10\r
-      ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN\r
-         INFO = - 13\r
-      ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN\r
-         INFO = - 15\r
-      ELSE\r
-*        #:)\r
-         INFO = 0\r
-      END IF\r
-*\r
-      IF ( INFO .EQ. 0 ) THEN \r
-*         .. compute the minimal and the optimal workspace lengths \r
-*         [[The expressions for computing the minimal and the optimal\r
-*         values of LCWORK, LRWORK are written with a lot of redundancy and\r
-*         can be simplified. However, this verbose form is useful for\r
-*         maintenance and modifications of the code.]]\r
-*\r
-*        .. minimal workspace length for CGEQP3 of an M x N matrix,\r
-*         CGEQRF of an N x N matrix, CGELQF of an N x N matrix,\r
-*         CUNMLQ for computing N x N matrix, CUNMQR for computing N x N\r
-*         matrix, CUNMQR for computing M x N matrix, respectively.\r
-          LWQP3 = N+1   \r
-          LWQRF = MAX( 1, N )\r
-          LWLQF = MAX( 1, N )\r
-          LWUNMLQ  = MAX( 1, N )\r
-          LWUNMQR  = MAX( 1, N )\r
-          LWUNMQRM = MAX( 1, M )\r
-*        .. minimal workspace length for CPOCON of an N x N matrix\r
-          LWCON = 2 * N \r
-*        .. minimal workspace length for CGESVJ of an N x N matrix,\r
-*         without and with explicit accumulation of Jacobi rotations\r
-          LWSVDJ  = MAX( 2 * N, 1 )         \r
-          LWSVDJV = MAX( 2 * N, 1 )\r
-*         .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ\r
-          LRWQP3  = N \r
-          LRWCON  = N \r
-          LRWSVDJ = N \r
-          IF ( LQUERY ) THEN \r
-              CALL CGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, \r
-     $             RDUMMY, IERR )\r
-              LWRK_CGEQP3 = CDUMMY(1)\r
-              CALL CGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )\r
-              LWRK_CGEQRF = CDUMMY(1)\r
-              CALL CGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )\r
-              LWRK_CGELQF = CDUMMY(1)             \r
-          END IF\r
-          MINWRK  = 2\r
-          OPTWRK  = 2\r
-          MINIWRK = N \r
-          IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN\r
-*             .. minimal and optimal sizes of the complex workspace if\r
-*             only the singular values are requested\r
-              IF ( ERREST ) THEN \r
-                  MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )\r
-              ELSE\r
-                  MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )\r
-              END IF\r
-              IF ( LQUERY ) THEN \r
-                  CALL CGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, \r
-     $                 LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                  LWRK_CGESVJ = CDUMMY(1)\r
-                  IF ( ERREST ) THEN \r
-                      OPTWRK = MAX( N+LWRK_CGEQP3, N**2+LWCON, \r
-     $                              N+LWRK_CGEQRF, LWRK_CGESVJ )\r
-                  ELSE\r
-                      OPTWRK = MAX( N+LWRK_CGEQP3, N+LWRK_CGEQRF, \r
-     $                              LWRK_CGESVJ )\r
-                  END IF\r
-              END IF\r
-              IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWCON, LRWSVDJ )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )\r
-                  END IF                 \r
-              ELSE\r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )\r
-                  END IF\r
-              END IF   \r
-              IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M \r
-          ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN\r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            singular values and the right singular vectors are requested\r
-             IF ( ERREST ) THEN \r
-                 MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,  \r
-     $                         2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )\r
-             ELSE\r
-                 MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, \r
-     $                         N+LWSVDJ, N+LWUNMLQ )\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,\r
-     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                 LWRK_CGESVJ = CDUMMY(1)\r
-                 CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,\r
-     $                V, LDV, CDUMMY, -1, IERR )\r
-                 LWRK_CUNMLQ = CDUMMY(1)                \r
-                 IF ( ERREST ) THEN \r
-                 OPTWRK = MAX( N+LWRK_CGEQP3, LWCON, LWRK_CGESVJ, \r
-     $                         N+LWRK_CGELQF, 2*N+LWRK_CGEQRF,\r
-     $                         N+LWRK_CGESVJ,  N+LWRK_CUNMLQ )\r
-                 ELSE\r
-                 OPTWRK = MAX( N+LWRK_CGEQP3, LWRK_CGESVJ,N+LWRK_CGELQF,\r
-     $                         2*N+LWRK_CGEQRF, N+LWRK_CGESVJ, \r
-     $                         N+LWRK_CUNMLQ )\r
-                 END IF\r
-             END IF\r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ ) \r
-                  END IF                  \r
-             ELSE\r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) \r
-                  END IF                 \r
-             END IF\r
-             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-          ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN  \r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            singular values and the left singular vectors are requested\r
-             IF ( ERREST ) THEN\r
-                 MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )\r
-             ELSE\r
-                 MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,\r
-     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                 LWRK_CGESVJ = CDUMMY(1)\r
-                 CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $               LDU, CDUMMY, -1, IERR )\r
-                 LWRK_CUNMQRM = CDUMMY(1)\r
-                 IF ( ERREST ) THEN\r
-                 OPTWRK = N + MAX( LWRK_CGEQP3, LWCON, N+LWRK_CGEQRF,\r
-     $                             LWRK_CGESVJ, LWRK_CUNMQRM )\r
-                 ELSE\r
-                 OPTWRK = N + MAX( LWRK_CGEQP3, N+LWRK_CGEQRF,\r
-     $                             LWRK_CGESVJ, LWRK_CUNMQRM )\r
-                 END IF\r
-             END IF\r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                 IF ( ERREST ) THEN \r
-                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-                 ELSE\r
-                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )\r
-                 END IF                 \r
-             ELSE\r
-                 IF ( ERREST ) THEN \r
-                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-                 ELSE\r
-                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )\r
-                 END IF                \r
-             END IF \r
-             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-          ELSE\r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            full SVD is requested\r
-             IF ( .NOT. JRACC ) THEN                \r
-                 IF ( ERREST ) THEN \r
-                    MINWRK = MAX( N+LWQP3, N+LWCON,  2*N+N**2+LWCON, \r
-     $                         2*N+LWQRF,         2*N+LWQP3, \r
-     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,\r
-     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, \r
-     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, \r
-     $                         N+N**2+LWSVDJ,   N+LWUNMQRM )\r
-                 ELSE\r
-                    MINWRK = MAX( N+LWQP3,        2*N+N**2+LWCON, \r
-     $                         2*N+LWQRF,         2*N+LWQP3, \r
-     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,\r
-     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,\r
-     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,\r
-     $                         N+N**2+LWSVDJ,      N+LWUNMQRM ) \r
-                 END IF \r
-                 MINIWRK = MINIWRK + N \r
-                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-             ELSE\r
-                 IF ( ERREST ) THEN \r
-                    MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, \r
-     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, \r
-     $                         N+LWUNMQRM )\r
-                 ELSE\r
-                    MINWRK = MAX( N+LWQP3, 2*N+LWQRF, \r
-     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, \r
-     $                         N+LWUNMQRM ) \r
-                 END IF   \r
-                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $                LDU, CDUMMY, -1, IERR )\r
-                 LWRK_CUNMQRM = CDUMMY(1)\r
-                 CALL CUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,\r
-     $                LDU, CDUMMY, -1, IERR )\r
-                 LWRK_CUNMQR = CDUMMY(1)\r
-                 IF ( .NOT. JRACC ) THEN\r
-                     CALL CGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,\r
-     $                    RDUMMY, IERR )\r
-                     LWRK_CGEQP3N = CDUMMY(1)\r
-                     CALL CGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_CGESVJ = CDUMMY(1)\r
-                     CALL CGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_CGESVJU = CDUMMY(1)\r
-                     CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_CGESVJV = CDUMMY(1)\r
-                     CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,\r
-     $                    V, LDV, CDUMMY, -1, IERR )\r
-                     LWRK_CUNMLQ = CDUMMY(1)\r
-                     IF ( ERREST ) THEN \r
-                       OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, \r
-     $                          2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, \r
-     $                          2*N+LWRK_CGEQP3N, \r
-     $                          2*N+N**2+N+LWRK_CGELQF,  \r
-     $                          2*N+N**2+N+N**2+LWCON,\r
-     $                          2*N+N**2+N+LWRK_CGESVJ, \r
-     $                          2*N+N**2+N+LWRK_CGESVJV,               \r
-     $                          2*N+N**2+N+LWRK_CUNMQR,\r
-     $                          2*N+N**2+N+LWRK_CUNMLQ, \r
-     $                          N+N**2+LWRK_CGESVJU,                  \r
-     $                          N+LWRK_CUNMQRM )\r
-                     ELSE\r
-                       OPTWRK = MAX( N+LWRK_CGEQP3,  \r
-     $                          2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, \r
-     $                          2*N+LWRK_CGEQP3N, \r
-     $                          2*N+N**2+N+LWRK_CGELQF,  \r
-     $                          2*N+N**2+N+N**2+LWCON,\r
-     $                          2*N+N**2+N+LWRK_CGESVJ,               \r
-     $                          2*N+N**2+N+LWRK_CGESVJV, \r
-     $                          2*N+N**2+N+LWRK_CUNMQR,\r
-     $                          2*N+N**2+N+LWRK_CUNMLQ, \r
-     $                          N+N**2+LWRK_CGESVJU,\r
-     $                          N+LWRK_CUNMQRM )\r
-                     END IF                    \r
-                 ELSE\r
-                     CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_CGESVJV = CDUMMY(1)\r
-                     CALL CUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,\r
-     $                    V, LDV, CDUMMY, -1, IERR )\r
-                     LWRK_CUNMQR = CDUMMY(1)\r
-                     CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $                    LDU, CDUMMY, -1, IERR )\r
-                     LWRK_CUNMQRM = CDUMMY(1)   \r
-                     IF ( ERREST ) THEN \r
-                        OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON,   \r
-     $                           2*N+LWRK_CGEQRF, 2*N+N**2,  \r
-     $                           2*N+N**2+LWRK_CGESVJV,  \r
-     $                           2*N+N**2+N+LWRK_CUNMQR,N+LWRK_CUNMQRM )\r
-                     ELSE\r
-                        OPTWRK = MAX( N+LWRK_CGEQP3, 2*N+LWRK_CGEQRF,  \r
-     $                           2*N+N**2, 2*N+N**2+LWRK_CGESVJV, \r
-     $                           2*N+N**2+N+LWRK_CUNMQR, \r
-     $                           N+LWRK_CUNMQRM )   \r
-                     END IF                  \r
-                 END IF               \r
-             END IF \r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                 MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-             ELSE\r
-                 MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-             END IF \r
-          END IF\r
-          MINWRK = MAX( 2, MINWRK )\r
-          OPTWRK = MAX( 2, OPTWRK )\r
-          IF ( LWORK  .LT. MINWRK  .AND. (.NOT.LQUERY) ) INFO = - 17\r
-          IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19   \r
-      END IF\r
-*      \r
-      IF ( INFO .NE. 0 ) THEN\r
-*       #:(\r
-         CALL XERBLA( 'CGEJSV', - INFO )\r
-         RETURN\r
-      ELSE IF ( LQUERY ) THEN\r
-          CWORK(1) = OPTWRK\r
-          CWORK(2) = MINWRK\r
-          RWORK(1) = MINRWRK\r
-          IWORK(1) = MAX( 4, MINIWRK )\r
-          RETURN   \r
-      END IF\r
-*\r
-*     Quick return for void matrix (Y3K safe)\r
-* #:)\r
-      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN\r
-         IWORK(1:4) = 0\r
-         RWORK(1:7) = 0\r
-         RETURN\r
-      ENDIF\r
-*\r
-*     Determine whether the matrix U should be M x N or M x M\r
-*\r
-      IF ( LSVEC ) THEN\r
-         N1 = N\r
-         IF ( LSAME( JOBU, 'F' ) ) N1 = M\r
-      END IF\r
-*\r
-*     Set numerical parameters\r
-*\r
-*!    NOTE: Make sure SLAMCH() does not fail on the target architecture.\r
-*\r
-      EPSLN = SLAMCH('Epsilon')\r
-      SFMIN = SLAMCH('SafeMinimum')\r
-      SMALL = SFMIN / EPSLN\r
-      BIG   = SLAMCH('O')\r
-*     BIG   = ONE / SFMIN\r
-*\r
-*     Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N\r
-*\r
-*(!)  If necessary, scale SVA() to protect the largest norm from\r
-*     overflow. It is possible that this scaling pushes the smallest\r
-*     column norm left from the underflow threshold (extreme case).\r
-*\r
-      SCALEM  = ONE / SQRT(REAL(M)*REAL(N))\r
-      NOSCAL  = .TRUE.\r
-      GOSCAL  = .TRUE.\r
-      DO 1874 p = 1, N\r
-         AAPP = ZERO\r
-         AAQQ = ONE\r
-         CALL CLASSQ( M, A(1,p), 1, AAPP, AAQQ )\r
-         IF ( AAPP .GT. BIG ) THEN\r
-            INFO = - 9\r
-            CALL XERBLA( 'CGEJSV', -INFO )\r
-            RETURN\r
-         END IF\r
-         AAQQ = SQRT(AAQQ)\r
-         IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL  ) THEN\r
-            SVA(p)  = AAPP * AAQQ\r
-         ELSE\r
-            NOSCAL  = .FALSE.\r
-            SVA(p)  = AAPP * ( AAQQ * SCALEM )\r
-            IF ( GOSCAL ) THEN\r
-               GOSCAL = .FALSE.\r
-               CALL SSCAL( p-1, SCALEM, SVA, 1 )\r
-            END IF\r
-         END IF\r
- 1874 CONTINUE\r
-*\r
-      IF ( NOSCAL ) SCALEM = ONE\r
-*\r
-      AAPP = ZERO\r
-      AAQQ = BIG\r
-      DO 4781 p = 1, N\r
-         AAPP = MAX( AAPP, SVA(p) )\r
-         IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )\r
- 4781 CONTINUE\r
-*\r
-*     Quick return for zero M x N matrix\r
-* #:)\r
-      IF ( AAPP .EQ. ZERO ) THEN\r
-         IF ( LSVEC ) CALL CLASET( 'G', M, N1, CZERO, CONE, U, LDU )\r
-         IF ( RSVEC ) CALL CLASET( 'G', N, N,  CZERO, CONE, V, LDV )\r
-         RWORK(1) = ONE\r
-         RWORK(2) = ONE\r
-         IF ( ERREST ) RWORK(3) = ONE\r
-         IF ( LSVEC .AND. RSVEC ) THEN\r
-            RWORK(4) = ONE\r
-            RWORK(5) = ONE\r
-         END IF\r
-         IF ( L2TRAN ) THEN\r
-            RWORK(6) = ZERO\r
-            RWORK(7) = ZERO\r
-         END IF\r
-         IWORK(1) = 0\r
-         IWORK(2) = 0\r
-         IWORK(3) = 0\r
-         IWORK(4) = -1\r
-         RETURN\r
-      END IF\r
-*\r
-*     Issue warning if denormalized column norms detected. Override the\r
-*     high relative accuracy request. Issue licence to kill nonzero columns\r
-*     (set them to zero) whose norm is less than sigma_max / BIG (roughly).\r
-* #:(\r
-      WARNING = 0\r
-      IF ( AAQQ .LE. SFMIN ) THEN\r
-         L2RANK = .TRUE.\r
-         L2KILL = .TRUE.\r
-         WARNING = 1\r
-      END IF\r
-*\r
-*     Quick return for one-column matrix\r
-* #:)\r
-      IF ( N .EQ. 1 ) THEN\r
-*\r
-         IF ( LSVEC ) THEN\r
-            CALL CLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )\r
-            CALL CLACPY( 'A', M, 1, A, LDA, U, LDU )\r
-*           computing all M left singular vectors of the M x 1 matrix\r
-            IF ( N1 .NE. N  ) THEN\r
-              CALL CGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )\r
-              CALL CUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )\r
-              CALL CCOPY( M, A(1,1), 1, U(1,1), 1 )\r
-            END IF\r
-         END IF\r
-         IF ( RSVEC ) THEN\r
-             V(1,1) = CONE\r
-         END IF\r
-         IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN\r
-            SVA(1)  = SVA(1) / SCALEM\r
-            SCALEM  = ONE\r
-         END IF\r
-         RWORK(1) = ONE / SCALEM\r
-         RWORK(2) = ONE\r
-         IF ( SVA(1) .NE. ZERO ) THEN\r
-            IWORK(1) = 1\r
-            IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN\r
-               IWORK(2) = 1\r
-            ELSE\r
-               IWORK(2) = 0\r
-            END IF\r
-         ELSE\r
-            IWORK(1) = 0\r
-            IWORK(2) = 0\r
-         END IF\r
-         IWORK(3) = 0\r
-         IWORK(4) = -1\r
-         IF ( ERREST ) RWORK(3) = ONE\r
-         IF ( LSVEC .AND. RSVEC ) THEN\r
-            RWORK(4) = ONE\r
-            RWORK(5) = ONE\r
-         END IF\r
-         IF ( L2TRAN ) THEN\r
-            RWORK(6) = ZERO\r
-            RWORK(7) = ZERO\r
-         END IF\r
-         RETURN\r
-*\r
-      END IF\r
-*\r
-      TRANSP = .FALSE.\r
-*\r
-      AATMAX = -ONE\r
-      AATMIN =  BIG\r
-      IF ( ROWPIV .OR. L2TRAN ) THEN\r
-*\r
-*     Compute the row norms, needed to determine row pivoting sequence\r
-*     (in the case of heavily row weighted A, row pivoting is strongly\r
-*     advised) and to collect information needed to compare the\r
-*     structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).\r
-*\r
-         IF ( L2TRAN ) THEN\r
-            DO 1950 p = 1, M\r
-               XSC   = ZERO\r
-               TEMP1 = ONE\r
-               CALL CLASSQ( N, A(p,1), LDA, XSC, TEMP1 )\r
-*              CLASSQ gets both the ell_2 and the ell_infinity norm\r
-*              in one pass through the vector\r
-               RWORK(M+p)  = XSC * SCALEM\r
-               RWORK(p)    = XSC * (SCALEM*SQRT(TEMP1))\r
-               AATMAX = MAX( AATMAX, RWORK(p) )\r
-               IF (RWORK(p) .NE. ZERO) \r
-     $            AATMIN = MIN(AATMIN,RWORK(p))\r
- 1950       CONTINUE\r
-         ELSE\r
-            DO 1904 p = 1, M\r
-               RWORK(M+p) = SCALEM*ABS( A(p,ICAMAX(N,A(p,1),LDA)) )\r
-               AATMAX = MAX( AATMAX, RWORK(M+p) )\r
-               AATMIN = MIN( AATMIN, RWORK(M+p) )\r
- 1904       CONTINUE\r
-         END IF\r
-*\r
-      END IF\r
-*\r
-*     For square matrix A try to determine whether A^*  would be better\r
-*     input for the preconditioned Jacobi SVD, with faster convergence.\r
-*     The decision is based on an O(N) function of the vector of column\r
-*     and row norms of A, based on the Shannon entropy. This should give\r
-*     the right choice in most cases when the difference actually matters.\r
-*     It may fail and pick the slower converging side.\r
-*\r
-      ENTRA  = ZERO\r
-      ENTRAT = ZERO\r
-      IF ( L2TRAN ) THEN\r
-*\r
-         XSC   = ZERO\r
-         TEMP1 = ONE\r
-         CALL SLASSQ( N, SVA, 1, XSC, TEMP1 )\r
-         TEMP1 = ONE / TEMP1\r
-*\r
-         ENTRA = ZERO\r
-         DO 1113 p = 1, N\r
-            BIG1  = ( ( SVA(p) / XSC )**2 ) * TEMP1\r
-            IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * ALOG(BIG1)\r
- 1113    CONTINUE\r
-         ENTRA = - ENTRA / ALOG(REAL(N))\r
-*\r
-*        Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.\r
-*        It is derived from the diagonal of  A^* * A.  Do the same with the\r
-*        diagonal of A * A^*, compute the entropy of the corresponding\r
-*        probability distribution. Note that A * A^* and A^* * A have the\r
-*        same trace.\r
-*\r
-         ENTRAT = ZERO\r
-         DO 1114 p = 1, M\r
-            BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1\r
-            IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * ALOG(BIG1)\r
- 1114    CONTINUE\r
-         ENTRAT = - ENTRAT / ALOG(REAL(M))\r
-*\r
-*        Analyze the entropies and decide A or A^*. Smaller entropy\r
-*        usually means better input for the algorithm.\r
-*\r
-         TRANSP = ( ENTRAT .LT. ENTRA )\r
-* \r
-*        If A^* is better than A, take the adjoint of A. This is allowed\r
-*        only for square matrices, M=N.  \r
-         IF ( TRANSP ) THEN\r
-*           In an optimal implementation, this trivial transpose\r
-*           should be replaced with faster transpose.\r
-            DO 1115 p = 1, N - 1\r
-               A(p,p) = CONJG(A(p,p))\r
-               DO 1116 q = p + 1, N\r
-                   CTEMP = CONJG(A(q,p))\r
-                  A(q,p) = CONJG(A(p,q))\r
-                  A(p,q) = CTEMP\r
- 1116          CONTINUE\r
- 1115       CONTINUE\r
-            A(N,N) = CONJG(A(N,N))\r
-            DO 1117 p = 1, N\r
-               RWORK(M+p) = SVA(p)\r
-               SVA(p) = RWORK(p)\r
-*              previously computed row 2-norms are now column 2-norms\r
-*              of the transposed matrix\r
- 1117       CONTINUE\r
-            TEMP1  = AAPP\r
-            AAPP   = AATMAX\r
-            AATMAX = TEMP1\r
-            TEMP1  = AAQQ\r
-            AAQQ   = AATMIN\r
-            AATMIN = TEMP1\r
-            KILL   = LSVEC\r
-            LSVEC  = RSVEC\r
-            RSVEC  = KILL\r
-            IF ( LSVEC ) N1 = N\r
-*\r
-            ROWPIV = .TRUE.\r
-         END IF\r
-*\r
-      END IF\r
-*     END IF L2TRAN\r
-*\r
-*     Scale the matrix so that its maximal singular value remains less\r
-*     than SQRT(BIG) -- the matrix is scaled so that its maximal column\r
-*     has Euclidean norm equal to SQRT(BIG/N). The only reason to keep\r
-*     SQRT(BIG) instead of BIG is the fact that CGEJSV uses LAPACK and\r
-*     BLAS routines that, in some implementations, are not capable of\r
-*     working in the full interval [SFMIN,BIG] and that they may provoke\r
-*     overflows in the intermediate results. If the singular values spread\r
-*     from SFMIN to BIG, then CGESVJ will compute them. So, in that case,\r
-*     one should use CGESVJ instead of CGEJSV.\r
-      BIG1   = SQRT( BIG )\r
-      TEMP1  = SQRT( BIG / REAL(N) )\r
-*     >> for future updates: allow bigger range, i.e. the largest column\r
-*     will be allowed up to BIG/N and CGESVJ will do the rest. However, for\r
-*     this all other (LAPACK) components must allow such a range.      \r
-*     TEMP1  = BIG/REAL(N)\r
-*     TEMP1  = BIG * EPSLN  this should 'almost' work with current LAPACK components\r
-      CALL SLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )\r
-      IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN\r
-          AAQQ = ( AAQQ / AAPP ) * TEMP1\r
-      ELSE\r
-          AAQQ = ( AAQQ * TEMP1 ) / AAPP\r
-      END IF\r
-      TEMP1 = TEMP1 * SCALEM\r
-      CALL CLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )\r
-*\r
-*     To undo scaling at the end of this procedure, multiply the\r
-*     computed singular values with USCAL2 / USCAL1.\r
-*\r
-      USCAL1 = TEMP1\r
-      USCAL2 = AAPP\r
-*\r
-      IF ( L2KILL ) THEN\r
-*        L2KILL enforces computation of nonzero singular values in\r
-*        the restricted range of condition number of the initial A,\r
-*        sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).\r
-         XSC = SQRT( SFMIN )\r
-      ELSE\r
-         XSC = SMALL\r
-*\r
-*        Now, if the condition number of A is too big,\r
-*        sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,\r
-*        as a precaution measure, the full SVD is computed using CGESVJ\r
-*        with accumulated Jacobi rotations. This provides numerically\r
-*        more robust computation, at the cost of slightly increased run\r
-*        time. Depending on the concrete implementation of BLAS and LAPACK\r
-*        (i.e. how they behave in presence of extreme ill-conditioning) the\r
-*        implementor may decide to remove this switch.\r
-         IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN\r
-            JRACC = .TRUE.\r
-         END IF\r
-*\r
-      END IF\r
-      IF ( AAQQ .LT. XSC ) THEN\r
-         DO 700 p = 1, N\r
-            IF ( SVA(p) .LT. XSC ) THEN\r
-               CALL CLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )\r
-               SVA(p) = ZERO\r
-            END IF\r
- 700     CONTINUE\r
-      END IF\r
-*\r
-*     Preconditioning using QR factorization with pivoting\r
-*\r
-      IF ( ROWPIV ) THEN\r
-*        Optional row permutation (Bjoerck row pivoting):\r
-*        A result by Cox and Higham shows that the Bjoerck's\r
-*        row pivoting combined with standard column pivoting\r
-*        has similar effect as Powell-Reid complete pivoting.\r
-*        The ell-infinity norms of A are made nonincreasing.\r
-         IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN \r
-              IWOFF = 2*N\r
-         ELSE\r
-              IWOFF = N\r
-         END IF\r
-         DO 1952 p = 1, M - 1\r
-            q = ISAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1\r
-            IWORK(IWOFF+p) = q\r
-            IF ( p .NE. q ) THEN\r
-               TEMP1      = RWORK(M+p)\r
-               RWORK(M+p) = RWORK(M+q)\r
-               RWORK(M+q) = TEMP1\r
-            END IF\r
- 1952    CONTINUE\r
-         CALL CLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )\r
-      END IF\r
-*\r
-*     End of the preparation phase (scaling, optional sorting and\r
-*     transposing, optional flushing of small columns).\r
-*\r
-*     Preconditioning\r
-*\r
-*     If the full SVD is needed, the right singular vectors are computed\r
-*     from a matrix equation, and for that we need theoretical analysis\r
-*     of the Businger-Golub pivoting. So we use CGEQP3 as the first RR QRF.\r
-*     In all other cases the first RR QRF can be chosen by other criteria\r
-*     (eg speed by replacing global with restricted window pivoting, such\r
-*     as in xGEQPX from TOMS # 782). Good results will be obtained using\r
-*     xGEQPX with properly (!) chosen numerical parameters.\r
-*     Any improvement of CGEQP3 improves overal performance of CGEJSV.\r
-*\r
-*     A * P1 = Q1 * [ R1^* 0]^*:\r
-      DO 1963 p = 1, N\r
-*        .. all columns are free columns\r
-         IWORK(p) = 0\r
- 1963 CONTINUE\r
-      CALL CGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,\r
-     $             RWORK, IERR )\r
-*\r
-*     The upper triangular matrix R1 from the first QRF is inspected for\r
-*     rank deficiency and possibilities for deflation, or possible\r
-*     ill-conditioning. Depending on the user specified flag L2RANK,\r
-*     the procedure explores possibilities to reduce the numerical\r
-*     rank by inspecting the computed upper triangular factor. If\r
-*     L2RANK or L2ABER are up, then CGEJSV will compute the SVD of\r
-*     A + dA, where ||dA|| <= f(M,N)*EPSLN.\r
-*\r
-      NR = 1\r
-      IF ( L2ABER ) THEN\r
-*        Standard absolute error bound suffices. All sigma_i with\r
-*        sigma_i < N*EPSLN*||A|| are flushed to zero. This is an\r
-*        agressive enforcement of lower numerical rank by introducing a\r
-*        backward error of the order of N*EPSLN*||A||.\r
-         TEMP1 = SQRT(REAL(N))*EPSLN\r
-         DO 3001 p = 2, N\r
-            IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN\r
-               NR = NR + 1\r
-            ELSE\r
-               GO TO 3002\r
-            END IF\r
- 3001    CONTINUE\r
- 3002    CONTINUE\r
-      ELSE IF ( L2RANK ) THEN\r
-*        .. similarly as above, only slightly more gentle (less agressive).\r
-*        Sudden drop on the diagonal of R1 is used as the criterion for\r
-*        close-to-rank-defficient.\r
-         TEMP1 = SQRT(SFMIN)\r
-         DO 3401 p = 2, N\r
-            IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.\r
-     $           ( ABS(A(p,p)) .LT. SMALL ) .OR.\r
-     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402\r
-            NR = NR + 1\r
- 3401    CONTINUE\r
- 3402    CONTINUE\r
-*\r
-      ELSE\r
-*        The goal is high relative accuracy. However, if the matrix\r
-*        has high scaled condition number the relative accuracy is in\r
-*        general not feasible. Later on, a condition number estimator\r
-*        will be deployed to estimate the scaled condition number.\r
-*        Here we just remove the underflowed part of the triangular\r
-*        factor. This prevents the situation in which the code is\r
-*        working hard to get the accuracy not warranted by the data.\r
-         TEMP1  = SQRT(SFMIN)\r
-         DO 3301 p = 2, N\r
-            IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.\r
-     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302\r
-            NR = NR + 1\r
- 3301    CONTINUE\r
- 3302    CONTINUE\r
-*\r
-      END IF\r
-*\r
-      ALMORT = .FALSE.\r
-      IF ( NR .EQ. N ) THEN\r
-         MAXPRJ = ONE\r
-         DO 3051 p = 2, N\r
-            TEMP1  = ABS(A(p,p)) / SVA(IWORK(p))\r
-            MAXPRJ = MIN( MAXPRJ, TEMP1 )\r
- 3051    CONTINUE\r
-         IF ( MAXPRJ**2 .GE. ONE - REAL(N)*EPSLN ) ALMORT = .TRUE.\r
-      END IF\r
-*\r
-*\r
-      SCONDA = - ONE\r
-      CONDR1 = - ONE\r
-      CONDR2 = - ONE\r
-*\r
-      IF ( ERREST ) THEN\r
-         IF ( N .EQ. NR ) THEN\r
-            IF ( RSVEC ) THEN\r
-*              .. V is available as workspace\r
-               CALL CLACPY( 'U', N, N, A, LDA, V, LDV )\r
-               DO 3053 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-                  CALL CSSCAL( p, ONE/TEMP1, V(1,p), 1 )\r
- 3053          CONTINUE\r
-               IF ( LSVEC )THEN\r
-                   CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,\r
-     $                  CWORK(N+1), RWORK, IERR )\r
-               ELSE\r
-                   CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,\r
-     $                  CWORK, RWORK, IERR )\r
-               END IF               \r
-*          \r
-            ELSE IF ( LSVEC ) THEN\r
-*              .. U is available as workspace\r
-               CALL CLACPY( 'U', N, N, A, LDA, U, LDU )\r
-               DO 3054 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-                  CALL CSSCAL( p, ONE/TEMP1, U(1,p), 1 )\r
- 3054          CONTINUE\r
-               CALL CPOCON( 'U', N, U, LDU, ONE, TEMP1,\r
-     $              CWORK(N+1), RWORK, IERR )\r
-            ELSE\r
-               CALL CLACPY( 'U', N, N, A, LDA, CWORK, N )\r
-*[]            CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )\r
-*              Change: here index shifted by N to the left, CWORK(1:N) \r
-*              not needed for SIGMA only computation\r
-               DO 3052 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-*[]               CALL CSSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )\r
-                  CALL CSSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )\r
- 3052          CONTINUE\r
-*           .. the columns of R are scaled to have unit Euclidean lengths.\r
-*[]               CALL CPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,\r
-*[]     $              CWORK(N+N*N+1), RWORK, IERR )\r
-               CALL CPOCON( 'U', N, CWORK, N, ONE, TEMP1,\r
-     $              CWORK(N*N+1), RWORK, IERR )               \r
-*              \r
-            END IF\r
-            IF ( TEMP1 .NE. ZERO ) THEN \r
-               SCONDA = ONE / SQRT(TEMP1)\r
-            ELSE\r
-               SCONDA = - ONE\r
-            END IF\r
-*           SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).\r
-*           N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA\r
-         ELSE\r
-            SCONDA = - ONE\r
-         END IF\r
-      END IF\r
-*\r
-      L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )\r
-*     If there is no violent scaling, artificial perturbation is not needed.\r
-*\r
-*     Phase 3:\r
-*\r
-      IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN\r
-*\r
-*         Singular Values only\r
-*\r
-*         .. transpose A(1:NR,1:N)\r
-         DO 1946 p = 1, MIN( N-1, NR )\r
-            CALL CCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )\r
-            CALL CLACGV( N-p+1, A(p,p), 1 )\r
- 1946    CONTINUE\r
-         IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))\r
-*\r
-*        The following two DO-loops introduce small relative perturbation\r
-*        into the strict upper triangle of the lower triangular matrix.\r
-*        Small entries below the main diagonal are also changed.\r
-*        This modification is useful if the computing environment does not\r
-*        provide/allow FLUSH TO ZERO underflow, for it prevents many\r
-*        annoying denormalized numbers in case of strongly scaled matrices.\r
-*        The perturbation is structured so that it does not introduce any\r
-*        new perturbation of the singular values, and it does not destroy\r
-*        the job done by the preconditioner.\r
-*        The licence for this perturbation is in the variable L2PERT, which\r
-*        should be .FALSE. if FLUSH TO ZERO underflow is active.\r
-*\r
-         IF ( .NOT. ALMORT ) THEN\r
-*\r
-            IF ( L2PERT ) THEN\r
-*              XSC = SQRT(SMALL)\r
-               XSC = EPSLN / REAL(N)\r
-               DO 4947 q = 1, NR\r
-                  CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)\r
-                  DO 4949 p = 1, N\r
-                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )\r
-     $                    .OR. ( p .LT. q ) )\r
-*     $                     A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )\r
-     $                     A(p,q) = CTEMP\r
- 4949             CONTINUE\r
- 4947          CONTINUE\r
-            ELSE\r
-               CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )\r
-            END IF\r
-*\r
-*            .. second preconditioning using the QR factorization\r
-*\r
-            CALL CGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )\r
-*\r
-*           .. and transpose upper to lower triangular\r
-            DO 1948 p = 1, NR - 1\r
-               CALL CCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )\r
-               CALL CLACGV( NR-p+1, A(p,p), 1 )\r
- 1948       CONTINUE\r
-*\r
-         END IF\r
-*\r
-*           Row-cyclic Jacobi SVD algorithm with column pivoting\r
-*\r
-*           .. again some perturbation (a "background noise") is added\r
-*           to drown denormals\r
-            IF ( L2PERT ) THEN\r
-*              XSC = SQRT(SMALL)\r
-               XSC = EPSLN / REAL(N)\r
-               DO 1947 q = 1, NR\r
-                  CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)\r
-                  DO 1949 p = 1, NR\r
-                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )\r
-     $                       .OR. ( p .LT. q ) )\r
-*     $                   A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )\r
-     $                   A(p,q) = CTEMP\r
- 1949             CONTINUE\r
- 1947          CONTINUE\r
-            ELSE\r
-               CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )\r
-            END IF\r
-*\r
-*           .. and one-sided Jacobi rotations are started on a lower\r
-*           triangular matrix (plus perturbation which is ignored in\r
-*           the part which destroys triangular form (confusing?!))\r
-*\r
-            CALL CGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,\r
-     $                N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )\r
-*\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-*\r
-*\r
-      ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) \r
-     $       .OR. \r
-     $   ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN\r
-*\r
-*        -> Singular Values and Right Singular Vectors <-\r
-*\r
-         IF ( ALMORT ) THEN\r
-*\r
-*           .. in this case NR equals N\r
-            DO 1998 p = 1, NR\r
-               CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-               CALL CLACGV( N-p+1, V(p,p), 1 )\r
- 1998       CONTINUE\r
-            CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )\r
-*\r
-            CALL CGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,\r
-     $                  CWORK, LWORK, RWORK, LRWORK, INFO )\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-\r
-         ELSE\r
-*\r
-*        .. two more QR factorizations ( one QRF is not enough, two require\r
-*        accumulated product of Jacobi rotations, three are perfect )\r
-*\r
-            CALL CLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )\r
-            CALL CGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)\r
-            CALL CLACPY( 'L', NR, NR, A, LDA, V, LDV )\r
-            CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )\r
-            CALL CGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $                   LWORK-2*N, IERR )\r
-            DO 8998 p = 1, NR\r
-               CALL CCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )\r
-               CALL CLACGV( NR-p+1, V(p,p), 1 )\r
- 8998       CONTINUE\r
-            CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)\r
-*\r
-            CALL CGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,\r
-     $                  LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-            IF ( NR .LT. N ) THEN\r
-               CALL CLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1),  LDV )\r
-               CALL CLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1),  LDV )\r
-               CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )\r
-            END IF\r
-*\r
-         CALL CUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,\r
-     $               V, LDV, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-         END IF\r
-*         .. permute the rows of V\r
-*         DO 8991 p = 1, N\r
-*            CALL CCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )\r
-* 8991    CONTINUE\r
-*         CALL CLACPY( 'All', N, N, A, LDA, V, LDV )\r
-         CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )\r
-*\r
-          IF ( TRANSP ) THEN\r
-            CALL CLACPY( 'A', N, N, V, LDV, U, LDU )\r
-          END IF\r
-*\r
-      ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN \r
-*          \r
-         CALL CLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )\r
-*\r
-         CALL CGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,\r
-     $               CWORK, LWORK, RWORK, LRWORK, INFO )\r
-          SCALEM  = RWORK(1)\r
-          NUMRANK = NINT(RWORK(2))\r
-          CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )\r
-*\r
-      ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN\r
-*\r
-*        .. Singular Values and Left Singular Vectors                 ..\r
-*\r
-*        .. second preconditioning step to avoid need to accumulate\r
-*        Jacobi rotations in the Jacobi iterations.\r
-         DO 1965 p = 1, NR\r
-            CALL CCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )\r
-            CALL CLACGV( N-p+1, U(p,p), 1 )\r
- 1965    CONTINUE\r
-         CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-*\r
-         CALL CGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),\r
-     $              LWORK-2*N, IERR )\r
-*\r
-         DO 1967 p = 1, NR - 1\r
-            CALL CCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )\r
-            CALL CLACGV( N-p+1, U(p,p), 1 )\r
- 1967    CONTINUE\r
-         CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-*\r
-         CALL CGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,\r
-     $        LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )\r
-         SCALEM  = RWORK(1)\r
-         NUMRANK = NINT(RWORK(2))\r
-*\r
-         IF ( NR .LT. M ) THEN\r
-            CALL CLASET( 'A',  M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )\r
-            IF ( NR .LT. N1 ) THEN\r
-               CALL CLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )\r
-               CALL CLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )\r
-            END IF\r
-         END IF\r
-*\r
-         CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $               LDU, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-         IF ( ROWPIV )\r
-     $       CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         DO 1974 p = 1, N1\r
-            XSC = ONE / SCNRM2( M, U(1,p), 1 )\r
-            CALL CSSCAL( M, XSC, U(1,p), 1 )\r
- 1974    CONTINUE\r
-*\r
-         IF ( TRANSP ) THEN\r
-            CALL CLACPY( 'A', N, N, U, LDU, V, LDV )\r
-         END IF\r
-*\r
-      ELSE\r
-*\r
-*        .. Full SVD ..\r
-*\r
-         IF ( .NOT. JRACC ) THEN\r
-*\r
-         IF ( .NOT. ALMORT ) THEN\r
-*\r
-*           Second Preconditioning Step (QRF [with pivoting])\r
-*           Note that the composition of TRANSPOSE, QRF and TRANSPOSE is\r
-*           equivalent to an LQF CALL. Since in many libraries the QRF\r
-*           seems to be better optimized than the LQF, we do explicit\r
-*           transpose and use the QRF. This is subject to changes in an\r
-*           optimized implementation of CGEJSV.\r
-*\r
-            DO 1968 p = 1, NR\r
-               CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-               CALL CLACGV( N-p+1, V(p,p), 1 )\r
- 1968       CONTINUE\r
-*\r
-*           .. the following two loops perturb small entries to avoid\r
-*           denormals in the second QR factorization, where they are\r
-*           as good as zeros. This is done to avoid painfully slow\r
-*           computation with denormals. The relative size of the perturbation\r
-*           is a parameter that can be changed by the implementer.\r
-*           This perturbation device will be obsolete on machines with\r
-*           properly implemented arithmetic.\r
-*           To switch it off, set L2PERT=.FALSE. To remove it from  the\r
-*           code, remove the action under L2PERT=.TRUE., leave the ELSE part.\r
-*           The following two loops should be blocked and fused with the\r
-*           transposed copy above.\r
-*\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 2969 q = 1, NR\r
-                  CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)\r
-                  DO 2968 p = 1, N\r
-                     IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )\r
-     $                   .OR. ( p .LT. q ) )\r
-*     $                   V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )\r
-     $                   V(p,q) = CTEMP\r
-                     IF ( p .LT. q ) V(p,q) = - V(p,q)\r
- 2968             CONTINUE\r
- 2969          CONTINUE\r
-            ELSE\r
-               CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )\r
-            END IF\r
-*\r
-*           Estimate the row scaled condition number of R1\r
-*           (If R1 is rectangular, N > NR, then the condition number\r
-*           of the leading NR x NR submatrix is estimated.)\r
-*\r
-            CALL CLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )\r
-            DO 3950 p = 1, NR\r
-               TEMP1 = SCNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)\r
-               CALL CSSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)\r
- 3950       CONTINUE\r
-            CALL CPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,\r
-     $                   CWORK(2*N+NR*NR+1),RWORK,IERR)\r
-            CONDR1 = ONE / SQRT(TEMP1)\r
-*           .. here need a second oppinion on the condition number\r
-*           .. then assume worst case scenario\r
-*           R1 is OK for inverse <=> CONDR1 .LT. REAL(N)\r
-*           more conservative    <=> CONDR1 .LT. SQRT(REAL(N))\r
-*\r
-            COND_OK = SQRT(SQRT(REAL(NR)))\r
-*[TP]       COND_OK is a tuning parameter.\r
-*\r
-            IF ( CONDR1 .LT. COND_OK ) THEN\r
-*              .. the second QRF without pivoting. Note: in an optimized\r
-*              implementation, this QRF should be implemented as the QRF\r
-*              of a lower triangular matrix.\r
-*              R1^* = Q2 * R2\r
-               CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $              LWORK-2*N, IERR )\r
-*\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)/EPSLN\r
-                  DO 3959 p = 2, NR\r
-                     DO 3958 q = 1, p - 1\r
-                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                              ZERO)\r
-                        IF ( ABS(V(q,p)) .LE. TEMP1 )\r
-*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )\r
-     $                     V(q,p) = CTEMP\r
- 3958                CONTINUE\r
- 3959             CONTINUE\r
-               END IF\r
-*\r
-               IF ( NR .NE. N )\r
-     $         CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*              .. save ...\r
-*\r
-*           .. this transposed copy should be better than naive\r
-               DO 1969 p = 1, NR - 1\r
-                  CALL CCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )\r
-                  CALL CLACGV(NR-p+1, V(p,p), 1 )\r
- 1969          CONTINUE\r
-               V(NR,NR)=CONJG(V(NR,NR))\r
-*\r
-               CONDR2 = CONDR1\r
-*\r
-            ELSE\r
-*\r
-*              .. ill-conditioned case: second QRF with pivoting\r
-*              Note that windowed pivoting would be equaly good\r
-*              numerically, and more run-time efficient. So, in\r
-*              an optimal implementation, the next call to CGEQP3\r
-*              should be replaced with eg. CALL CGEQPX (ACM TOMS #782)\r
-*              with properly (carefully) chosen parameters.\r
-*\r
-*              R1^* * P2 = Q2 * R2\r
-               DO 3003 p = 1, NR\r
-                  IWORK(N+p) = 0\r
- 3003          CONTINUE\r
-               CALL CGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),\r
-     $                  CWORK(2*N+1), LWORK-2*N, RWORK, IERR )\r
-**               CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-**     $              LWORK-2*N, IERR )\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)\r
-                  DO 3969 p = 2, NR\r
-                     DO 3968 q = 1, p - 1\r
-                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                                ZERO)\r
-                        IF ( ABS(V(q,p)) .LE. TEMP1 )\r
-*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )\r
-     $                     V(q,p) = CTEMP\r
- 3968                CONTINUE\r
- 3969             CONTINUE\r
-               END IF\r
-*\r
-               CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)\r
-                  DO 8970 p = 2, NR\r
-                     DO 8971 q = 1, p - 1\r
-                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                               ZERO)\r
-*                        V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )\r
-                        V(p,q) = - CTEMP\r
- 8971                CONTINUE\r
- 8970             CONTINUE\r
-               ELSE\r
-                  CALL CLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )\r
-               END IF\r
-*              Now, compute R2 = L3 * Q3, the LQ factorization.\r
-               CALL CGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),\r
-     $               CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )\r
-*              .. and estimate the condition number\r
-               CALL CLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )\r
-               DO 4950 p = 1, NR\r
-                  TEMP1 = SCNRM2( p, CWORK(2*N+N*NR+NR+p), NR )\r
-                  CALL CSSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )\r
- 4950          CONTINUE\r
-               CALL CPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,\r
-     $              CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )\r
-               CONDR2 = ONE / SQRT(TEMP1)\r
-*\r
-*\r
-               IF ( CONDR2 .GE. COND_OK ) THEN\r
-*                 .. save the Householder vectors used for Q3\r
-*                 (this overwrittes the copy of R2, as it will not be\r
-*                 needed in this branch, but it does not overwritte the\r
-*                 Huseholder vectors of Q2.).\r
-                  CALL CLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )\r
-*                 .. and the rest of the information on Q3 is in\r
-*                 WORK(2*N+N*NR+1:2*N+N*NR+N)\r
-               END IF\r
-*\r
-            END IF\r
-*\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 4968 q = 2, NR\r
-                  CTEMP = XSC * V(q,q)\r
-                  DO 4969 p = 1, q - 1\r
-*                     V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )\r
-                     V(p,q) = - CTEMP\r
- 4969             CONTINUE\r
- 4968          CONTINUE\r
-            ELSE\r
-               CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )\r
-            END IF\r
-*\r
-*        Second preconditioning finished; continue with Jacobi SVD\r
-*        The input matrix is lower trinagular.\r
-*\r
-*        Recover the right singular vectors as solution of a well\r
-*        conditioned triangular matrix equation.\r
-*\r
-            IF ( CONDR1 .LT. COND_OK ) THEN\r
-*\r
-               CALL CGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,\r
-     $              CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,\r
-     $              LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               DO 3970 p = 1, NR\r
-                  CALL CCOPY(  NR, V(1,p), 1, U(1,p), 1 )\r
-                  CALL CSSCAL( NR, SVA(p),    V(1,p), 1 )\r
- 3970          CONTINUE\r
-\r
-*        .. pick the right matrix equation and solve it\r
-*\r
-               IF ( NR .EQ. N ) THEN\r
-* :))             .. best case, R1 is inverted. The solution of this matrix\r
-*                 equation is Q2*V2 = the product of the Jacobi rotations\r
-*                 used in CGESVJ, premultiplied with the orthogonal matrix\r
-*                 from the second QR factorization.\r
-                  CALL CTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)\r
-               ELSE\r
-*                 .. R1 is well conditioned, but non-square. Adjoint of R2\r
-*                 is inverted to get the product of the Jacobi rotations\r
-*                 used in CGESVJ. The Q-factor from the second QR\r
-*                 factorization is then built in explicitly.\r
-                  CALL CTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),\r
-     $                 N,V,LDV)\r
-                  IF ( NR .LT. N ) THEN\r
-                  CALL CLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)\r
-                  CALL CLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)\r
-                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-                  END IF\r
-                  CALL CUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $                V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)\r
-               END IF\r
-*\r
-            ELSE IF ( CONDR2 .LT. COND_OK ) THEN\r
-*\r
-*              The matrix R2 is inverted. The solution of the matrix equation\r
-*              is Q3^* * V3 = the product of the Jacobi rotations (appplied to\r
-*              the lower triangular L3 from the LQ factorization of\r
-*              R2=L3*Q3), pre-multiplied with the transposed Q3.\r
-               CALL CGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,\r
-     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,\r
-     $              RWORK, LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               DO 3870 p = 1, NR\r
-                  CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 )\r
-                  CALL CSSCAL( NR, SVA(p),    U(1,p), 1 )\r
- 3870          CONTINUE\r
-               CALL CTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,\r
-     $                    U,LDU)\r
-*              .. apply the permutation from the second QR factorization\r
-               DO 873 q = 1, NR\r
-                  DO 872 p = 1, NR\r
-                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)\r
- 872              CONTINUE\r
-                  DO 874 p = 1, NR\r
-                     U(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 874              CONTINUE\r
- 873           CONTINUE\r
-               IF ( NR .LT. N ) THEN\r
-                  CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-                  CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-               END IF\r
-               CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-            ELSE\r
-*              Last line of defense.\r
-* #:(          This is a rather pathological case: no scaled condition\r
-*              improvement after two pivoted QR factorizations. Other\r
-*              possibility is that the rank revealing QR factorization\r
-*              or the condition estimator has failed, or the COND_OK\r
-*              is set very close to ONE (which is unnecessary). Normally,\r
-*              this branch should never be executed, but in rare cases of\r
-*              failure of the RRQR or condition estimator, the last line of\r
-*              defense ensures that CGEJSV completes the task.\r
-*              Compute the full SVD of L3 using CGESVJ with explicit\r
-*              accumulation of Jacobi rotations.\r
-               CALL CGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,\r
-     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,\r
-     $                         RWORK, LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               IF ( NR .LT. N ) THEN\r
-                  CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-                  CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-               END IF\r
-               CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-*\r
-               CALL CUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,\r
-     $              CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),\r
-     $              LWORK-2*N-N*NR-NR, IERR )\r
-               DO 773 q = 1, NR\r
-                  DO 772 p = 1, NR\r
-                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)\r
- 772              CONTINUE\r
-                  DO 774 p = 1, NR\r
-                     U(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 774              CONTINUE\r
- 773           CONTINUE\r
-*\r
-            END IF\r
-*\r
-*           Permute the rows of V using the (column) permutation from the\r
-*           first QRF. Also, scale the columns to make them unit in\r
-*           Euclidean norm. This applies to all cases.\r
-*\r
-            TEMP1 = SQRT(REAL(N)) * EPSLN\r
-            DO 1972 q = 1, N\r
-               DO 972 p = 1, N\r
-                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)\r
-  972          CONTINUE\r
-               DO 973 p = 1, N\r
-                  V(p,q) = CWORK(2*N+N*NR+NR+p)\r
-  973          CONTINUE\r
-               XSC = ONE / SCNRM2( N, V(1,q), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $           CALL CSSCAL( N, XSC, V(1,q), 1 )\r
- 1972       CONTINUE\r
-*           At this moment, V contains the right singular vectors of A.\r
-*           Next, assemble the left singular vector matrix U (M x N).\r
-            IF ( NR .LT. M ) THEN\r
-               CALL CLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)\r
-               IF ( NR .LT. N1 ) THEN\r
-                  CALL CLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)\r
-                  CALL CLASET('A',M-NR,N1-NR,CZERO,CONE,\r
-     $                        U(NR+1,NR+1),LDU)\r
-               END IF\r
-            END IF\r
-*\r
-*           The Q matrix from the first QRF is built into the left singular\r
-*           matrix U. This applies to all cases.\r
-*\r
-            CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $           LDU, CWORK(N+1), LWORK-N, IERR )\r
-\r
-*           The columns of U are normalized. The cost is O(M*N) flops.\r
-            TEMP1 = SQRT(REAL(M)) * EPSLN\r
-            DO 1973 p = 1, NR\r
-               XSC = ONE / SCNRM2( M, U(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $          CALL CSSCAL( M, XSC, U(1,p), 1 )\r
- 1973       CONTINUE\r
-*\r
-*           If the initial QRF is computed with row pivoting, the left\r
-*           singular vectors must be adjusted.\r
-*\r
-            IF ( ROWPIV )\r
-     $          CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         ELSE\r
-*\r
-*        .. the initial matrix A has almost orthogonal columns and\r
-*        the second QRF is not needed\r
-*\r
-            CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 5970 p = 2, N\r
-                  CTEMP = XSC * CWORK( N + (p-1)*N + p )\r
-                  DO 5971 q = 1, p - 1\r
-*                     CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /\r
-*     $                                        ABS(CWORK(N+(p-1)*N+q)) )\r
-                     CWORK(N+(q-1)*N+p)=-CTEMP\r
- 5971             CONTINUE\r
- 5970          CONTINUE\r
-            ELSE\r
-               CALL CLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )\r
-            END IF\r
-*\r
-            CALL CGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,\r
-     $           N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,\r
-     $       INFO )\r
-*\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-            DO 6970 p = 1, N\r
-               CALL CCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )\r
-               CALL CSSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )\r
- 6970       CONTINUE\r
-*\r
-            CALL CTRSM( 'L', 'U', 'N', 'N', N, N,\r
-     $           CONE, A, LDA, CWORK(N+1), N )\r
-            DO 6972 p = 1, N\r
-               CALL CCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )\r
- 6972       CONTINUE\r
-            TEMP1 = SQRT(REAL(N))*EPSLN\r
-            DO 6971 p = 1, N\r
-               XSC = ONE / SCNRM2( N, V(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $            CALL CSSCAL( N, XSC, V(1,p), 1 )\r
- 6971       CONTINUE\r
-*\r
-*           Assemble the left singular vector matrix U (M x N).\r
-*\r
-            IF ( N .LT. M ) THEN\r
-               CALL CLASET( 'A',  M-N, N, CZERO, CZERO, U(N+1,1), LDU )\r
-               IF ( N .LT. N1 ) THEN\r
-                  CALL CLASET('A',N,  N1-N, CZERO, CZERO,  U(1,N+1),LDU)\r
-                  CALL CLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)\r
-               END IF\r
-            END IF\r
-            CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $           LDU, CWORK(N+1), LWORK-N, IERR )\r
-            TEMP1 = SQRT(REAL(M))*EPSLN\r
-            DO 6973 p = 1, N1\r
-               XSC = ONE / SCNRM2( M, U(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $            CALL CSSCAL( M, XSC, U(1,p), 1 )\r
- 6973       CONTINUE\r
-*\r
-            IF ( ROWPIV )\r
-     $         CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         END IF\r
-*\r
-*        end of the  >> almost orthogonal case <<  in the full SVD\r
-*\r
-         ELSE\r
-*\r
-*        This branch deploys a preconditioned Jacobi SVD with explicitly\r
-*        accumulated rotations. It is included as optional, mainly for\r
-*        experimental purposes. It does perfom well, and can also be used.\r
-*        In this implementation, this branch will be automatically activated\r
-*        if the  condition number sigma_max(A) / sigma_min(A) is predicted\r
-*        to be greater than the overflow threshold. This is because the\r
-*        a posteriori computation of the singular vectors assumes robust\r
-*        implementation of BLAS and some LAPACK procedures, capable of working\r
-*        in presence of extreme values, e.g. when the singular values spread from\r
-*        the underflow to the overflow threshold. \r
-*\r
-         DO 7968 p = 1, NR\r
-            CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-            CALL CLACGV( N-p+1, V(p,p), 1 )\r
- 7968    CONTINUE\r
-*\r
-         IF ( L2PERT ) THEN\r
-            XSC = SQRT(SMALL/EPSLN)\r
-            DO 5969 q = 1, NR\r
-               CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)\r
-               DO 5968 p = 1, N\r
-                  IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )\r
-     $                .OR. ( p .LT. q ) )\r
-*     $                V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )\r
-     $                V(p,q) = CTEMP\r
-                  IF ( p .LT. q ) V(p,q) = - V(p,q)\r
- 5968          CONTINUE\r
- 5969       CONTINUE\r
-         ELSE\r
-            CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )\r
-         END IF\r
-\r
-         CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $        LWORK-2*N, IERR )\r
-         CALL CLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*\r
-         DO 7969 p = 1, NR\r
-            CALL CCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )\r
-            CALL CLACGV( NR-p+1, U(p,p), 1 )\r
- 7969    CONTINUE\r
-\r
-         IF ( L2PERT ) THEN\r
-            XSC = SQRT(SMALL/EPSLN)\r
-            DO 9970 q = 2, NR\r
-               DO 9971 p = 1, q - 1\r
-                  CTEMP = CMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),\r
-     $                           ZERO)\r
-*                  U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )\r
-                  U(p,q) = - CTEMP\r
- 9971          CONTINUE\r
- 9970       CONTINUE\r
-         ELSE\r
-            CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-         END IF\r
-\r
-         CALL CGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,\r
-     $        N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,\r
-     $         RWORK, LRWORK, INFO )\r
-         SCALEM  = RWORK(1)\r
-         NUMRANK = NINT(RWORK(2))\r
-\r
-         IF ( NR .LT. N ) THEN\r
-            CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-            CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-            CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )\r
-         END IF\r
-\r
-         CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $        V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-*\r
-*           Permute the rows of V using the (column) permutation from the\r
-*           first QRF. Also, scale the columns to make them unit in\r
-*           Euclidean norm. This applies to all cases.\r
-*\r
-            TEMP1 = SQRT(REAL(N)) * EPSLN\r
-            DO 7972 q = 1, N\r
-               DO 8972 p = 1, N\r
-                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)\r
- 8972          CONTINUE\r
-               DO 8973 p = 1, N\r
-                  V(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 8973          CONTINUE\r
-               XSC = ONE / SCNRM2( N, V(1,q), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $           CALL CSSCAL( N, XSC, V(1,q), 1 )\r
- 7972       CONTINUE\r
-*\r
-*           At this moment, V contains the right singular vectors of A.\r
-*           Next, assemble the left singular vector matrix U (M x N).\r
-*\r
-         IF ( NR .LT. M ) THEN\r
-            CALL CLASET( 'A',  M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )\r
-            IF ( NR .LT. N1 ) THEN\r
-               CALL CLASET('A',NR,  N1-NR, CZERO, CZERO,  U(1,NR+1),LDU)\r
-               CALL CLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)\r
-            END IF\r
-         END IF\r
-*\r
-         CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $        LDU, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-            IF ( ROWPIV )\r
-     $         CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-*\r
-         END IF\r
-         IF ( TRANSP ) THEN\r
-*           .. swap U and V because the procedure worked on A^*\r
-            DO 6974 p = 1, N\r
-               CALL CSWAP( N, U(1,p), 1, V(1,p), 1 )\r
- 6974       CONTINUE\r
-         END IF\r
-*\r
-      END IF\r
-*     end of the full SVD\r
-*\r
-*     Undo scaling, if necessary (and possible)\r
-*\r
-      IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN\r
-         CALL SLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )\r
-         USCAL1 = ONE\r
-         USCAL2 = ONE\r
-      END IF\r
-*\r
-      IF ( NR .LT. N ) THEN\r
-         DO 3004 p = NR+1, N\r
-            SVA(p) = ZERO\r
- 3004    CONTINUE\r
-      END IF\r
-*\r
-      RWORK(1) = USCAL2 * SCALEM\r
-      RWORK(2) = USCAL1\r
-      IF ( ERREST ) RWORK(3) = SCONDA\r
-      IF ( LSVEC .AND. RSVEC ) THEN\r
-         RWORK(4) = CONDR1\r
-         RWORK(5) = CONDR2\r
-      END IF\r
-      IF ( L2TRAN ) THEN\r
-         RWORK(6) = ENTRA\r
-         RWORK(7) = ENTRAT\r
-      END IF\r
-*\r
-      IWORK(1) = NR\r
-      IWORK(2) = NUMRANK\r
-      IWORK(3) = WARNING\r
-      IF ( TRANSP ) THEN\r
-          IWORK(4) =  1 \r
-      ELSE\r
-          IWORK(4) = -1\r
-      END IF \r
-      \r
-*\r
-      RETURN\r
-*     ..\r
-*     .. END OF CGEJSV\r
-*     ..\r
-      END\r
-*\r
+*> \brief \b CGEJSV
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CGEJSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cgejsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cgejsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cgejsv.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*     SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+*                         M, N, A, LDA, SVA, U, LDU, V, LDV,
+*                         CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
+*
+*     .. Scalar Arguments ..
+*     IMPLICIT    NONE
+*     INTEGER     INFO, LDA, LDU, LDV, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+*     COMPLEX     A( LDA, * ),  U( LDU, * ), V( LDV, * ), CWORK( LWORK )
+*     REAL        SVA( N ), RWORK( LRWORK )
+*     INTEGER     IWORK( * )
+*     CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CGEJSV computes the singular value decomposition (SVD) of a complex M-by-N
+*> matrix [A], where M >= N. The SVD of [A] is written as
+*>
+*>              [A] = [U] * [SIGMA] * [V]^*,
+*>
+*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
+*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and
+*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are
+*> the singular values of [A]. The columns of [U] and [V] are the left and
+*> the right singular vectors of [A], respectively. The matrices [U] and [V]
+*> are computed and stored in the arrays U and V, respectively. The diagonal
+*> of [SIGMA] is computed and stored in the array SVA.
+*> \endverbatim
+*>
+*>  Arguments:
+*>  ==========
+*>
+*> \param[in] JOBA
+*> \verbatim
+*>          JOBA is CHARACTER*1
+*>         Specifies the level of accuracy:
+*>       = 'C': This option works well (high relative accuracy) if A = B * D,
+*>              with well-conditioned B and arbitrary diagonal matrix D.
+*>              The accuracy cannot be spoiled by COLUMN scaling. The
+*>              accuracy of the computed output depends on the condition of
+*>              B, and the procedure aims at the best theoretical accuracy.
+*>              The relative error max_{i=1:N}|d sigma_i| / sigma_i is
+*>              bounded by f(M,N)*epsilon* cond(B), independent of D.
+*>              The input matrix is preprocessed with the QRF with column
+*>              pivoting. This initial preprocessing and preconditioning by
+*>              a rank revealing QR factorization is common for all values of
+*>              JOBA. Additional actions are specified as follows:
+*>       = 'E': Computation as with 'C' with an additional estimate of the
+*>              condition number of B. It provides a realistic error bound.
+*>       = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
+*>              D1, D2, and well-conditioned matrix C, this option gives
+*>              higher accuracy than the 'C' option. If the structure of the
+*>              input matrix is not known, and relative accuracy is
+*>              desirable, then this option is advisable. The input matrix A
+*>              is preprocessed with QR factorization with FULL (row and
+*>              column) pivoting.
+*>       = 'G'  Computation as with 'F' with an additional estimate of the
+*>              condition number of B, where A=B*D. If A has heavily weighted
+*>              rows, then using this condition number gives too pessimistic
+*>              error bound.
+*>       = 'A': Small singular values are not well determined by the data 
+*>              and are considered as noisy; the matrix is treated as
+*>              numerically rank defficient. The error in the computed
+*>              singular values is bounded by f(m,n)*epsilon*||A||.
+*>              The computed SVD A = U * S * V^* restores A up to
+*>              f(m,n)*epsilon*||A||.
+*>              This gives the procedure the licence to discard (set to zero)
+*>              all singular values below N*epsilon*||A||.
+*>       = 'R': Similar as in 'A'. Rank revealing property of the initial
+*>              QR factorization is used do reveal (using triangular factor)
+*>              a gap sigma_{r+1} < epsilon * sigma_r in which case the
+*>              numerical RANK is declared to be r. The SVD is computed with
+*>              absolute error bounds, but more accurately than with 'A'.
+*> \endverbatim
+*>
+*> \param[in] JOBU
+*> \verbatim
+*>          JOBU is CHARACTER*1
+*>         Specifies whether to compute the columns of U:
+*>       = 'U': N columns of U are returned in the array U.
+*>       = 'F': full set of M left sing. vectors is returned in the array U.
+*>       = 'W': U may be used as workspace of length M*N. See the description
+*>              of U.
+*>       = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*>          JOBV is CHARACTER*1
+*>         Specifies whether to compute the matrix V:
+*>       = 'V': N columns of V are returned in the array V; Jacobi rotations
+*>              are not explicitly accumulated.
+*>       = 'J': N columns of V are returned in the array V, but they are
+*>              computed as the product of Jacobi rotations, if JOBT .EQ. 'N'.
+*>       = 'W': V may be used as workspace of length N*N. See the description
+*>              of V.
+*>       = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBR
+*> \verbatim
+*>          JOBR is CHARACTER*1
+*>         Specifies the RANGE for the singular values. Issues the licence to
+*>         set to zero small positive singular values if they are outside
+*>         specified range. If A .NE. 0 is scaled so that the largest singular
+*>         value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
+*>         the licence to kill columns of A whose norm in c*A is less than
+*>         SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
+*>         where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
+*>       = 'N': Do not kill small columns of c*A. This option assumes that
+*>              BLAS and QR factorizations and triangular solvers are
+*>              implemented to work in that range. If the condition of A
+*>              is greater than BIG, use CGESVJ.
+*>       = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
+*>              (roughly, as described above). This option is recommended.
+*>                                             ===========================
+*>         For computing the singular values in the FULL range [SFMIN,BIG]
+*>         use CGESVJ.
+*> \endverbatim
+*>
+*> \param[in] JOBT
+*> \verbatim
+*>          JOBT is CHARACTER*1
+*>         If the matrix is square then the procedure may determine to use
+*>         transposed A if A^* seems to be better with respect to convergence.
+*>         If the matrix is not square, JOBT is ignored.
+*>         The decision is based on two values of entropy over the adjoint
+*>         orbit of A^* * A. See the descriptions of WORK(6) and WORK(7).
+*>       = 'T': transpose if entropy test indicates possibly faster
+*>         convergence of Jacobi process if A^* is taken as input. If A is
+*>         replaced with A^*, then the row pivoting is included automatically.
+*>       = 'N': do not speculate.
+*>         The option 'T' can be used to compute only the singular values, or
+*>         the full SVD (U, SIGMA and V). For only one set of singular vectors
+*>         (U or V), the caller should provide both U and V, as one of the
+*>         matrices is used as workspace if the matrix A is transposed.
+*>         The implementer can easily remove this constraint and make the
+*>         code more complicated. See the descriptions of U and V.
+*>         In general, this option is considered experimental, and 'N'; should
+*>         be preferred. This is subject to changes in the future.
+*> \endverbatim
+*>
+*> \param[in] JOBP
+*> \verbatim
+*>          JOBP is CHARACTER*1
+*>         Issues the licence to introduce structured perturbations to drown
+*>         denormalized numbers. This licence should be active if the
+*>         denormals are poorly implemented, causing slow computation,
+*>         especially in cases of fast convergence (!). For details see [1,2].
+*>         For the sake of simplicity, this perturbations are included only
+*>         when the full SVD or only the singular values are requested. The
+*>         implementer/user can easily add the perturbation for the cases of
+*>         computing one set of singular vectors.
+*>       = 'P': introduce perturbation
+*>       = 'N': do not perturb
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>         The number of rows of the input matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         The number of columns of the input matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*>          SVA is REAL array, dimension (N)
+*>          On exit,
+*>          - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
+*>            computation SVA contains Euclidean column norms of the
+*>            iterated matrices in the array A.
+*>          - For WORK(1) .NE. WORK(2): The singular values of A are
+*>            (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
+*>            sigma_max(A) overflows or if small singular values have been
+*>            saved from underflow by scaling the input matrix A.
+*>          - If JOBR='R' then some of the singular values may be returned
+*>            as exact zeros obtained by "set to zero" because they are
+*>            below the numerical rank threshold or are denormalized numbers.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*>          U is COMPLEX array, dimension ( LDU, N ) or ( LDU, M )
+*>          If JOBU = 'U', then U contains on exit the M-by-N matrix of
+*>                         the left singular vectors.
+*>          If JOBU = 'F', then U contains on exit the M-by-M matrix of
+*>                         the left singular vectors, including an ONB
+*>                         of the orthogonal complement of the Range(A).
+*>          If JOBU = 'W'  .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
+*>                         then U is used as workspace if the procedure
+*>                         replaces A with A^*. In that case, [V] is computed
+*>                         in U as left singular vectors of A^* and then
+*>                         copied back to the V array. This 'W' option is just
+*>                         a reminder to the caller that in this case U is
+*>                         reserved as workspace of length N*N.
+*>          If JOBU = 'N'  U is not referenced, unless JOBT='T'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*>          LDU is INTEGER
+*>          The leading dimension of the array U,  LDU >= 1.
+*>          IF  JOBU = 'U' or 'F' or 'W',  then LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX array, dimension ( LDV, N )
+*>          If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
+*>                         the right singular vectors;
+*>          If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
+*>                         then V is used as workspace if the pprocedure
+*>                         replaces A with A^*. In that case, [U] is computed
+*>                         in V as right singular vectors of A^* and then
+*>                         copied back to the U array. This 'W' option is just
+*>                         a reminder to the caller that in this case V is
+*>                         reserved as workspace of length N*N.
+*>          If JOBV = 'N'  V is not referenced, unless JOBT='T'.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*>          LDV is INTEGER
+*>          The leading dimension of the array V,  LDV >= 1.
+*>          If JOBV = 'V' or 'J' or 'W', then LDV >= N.
+*> \endverbatim
+*>
+*> \param[out] CWORK
+*> \verbatim
+*>          CWORK is COMPLEX array, dimension (MAX(2,LWORK))
+*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit CWORK(1) contains the required length of 
+*>          CWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          Length of CWORK to confirm proper allocation of workspace.
+*>          LWORK depends on the job:
+*>
+*>          1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
+*>            1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):
+*>               LWORK >= 2*N+1. This is the minimal requirement.
+*>               ->> For optimal performance (blocked code) the optimal value
+*>               is LWORK >= N + (N+1)*NB. Here NB is the optimal
+*>               block size for CGEQP3 and CGEQRF.
+*>               In general, optimal LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ)).        
+*>            1.2. .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G'). In this case, LWORK the minimal
+*>               requirement is LWORK >= N*N + 2*N.
+*>               ->> For optimal performance (blocked code) the optimal value
+*>               is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ),
+*>                            N*N+LWORK(CPOCON)).
+*>          2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
+*>             (JOBU.EQ.'N')
+*>            2.1   .. no scaled condition estimate requested (JOBE.EQ.'N'):    
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance, 
+*>               LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ,
+*>               CUNMLQ. In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3), N+LWORK(CGESVJ),
+*>                       N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).
+*>            2.2 .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G').
+*>            -> the minimal requirement is LWORK >= 3*N.      
+*>            -> For optimal performance, 
+*>               LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ,
+*>               CUNMLQ. In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3), LWORK(CPOCON), N+LWORK(CGESVJ),
+*>                       N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)).   
+*>          3. If SIGMA and the left singular vectors are needed
+*>            3.1  .. no scaled condition estimate requested (JOBE.EQ.'N'):
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance:
+*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3), 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). 
+*>            3.2  .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G').
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance:
+*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CPOCON),
+*>                        2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)).
+*>
+*>          4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
+*>            4.1. if JOBV.EQ.'V'
+*>               the minimal requirement is LWORK >= 5*N+2*N*N.
+*>            4.2. if JOBV.EQ.'J' the minimal requirement is
+*>               LWORK >= 4*N+N*N.
+*>            In both cases, the allocated CWORK can accommodate blocked runs
+*>            of CGEQP3, CGEQRF, CGELQF, CUNMQR, CUNMLQ.
+*> 
+*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the
+*>          minimal length of CWORK for the job parameters used in the call.        
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is REAL array, dimension (MAX(7,LWORK))
+*>          On exit,
+*>          RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)
+*>                    such that SCALE*SVA(1:N) are the computed singular values
+*>                    of A. (See the description of SVA().)
+*>          RWORK(2) = See the description of RWORK(1).
+*>          RWORK(3) = SCONDA is an estimate for the condition number of
+*>                    column equilibrated A. (If JOBA .EQ. 'E' or 'G')
+*>                    SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
+*>                    It is computed using SPOCON. It holds
+*>                    N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+*>                    where R is the triangular factor from the QRF of A.
+*>                    However, if R is truncated and the numerical rank is
+*>                    determined to be strictly smaller than N, SCONDA is
+*>                    returned as -1, thus indicating that the smallest
+*>                    singular values might be lost.
+*>
+*>          If full SVD is needed, the following two condition numbers are
+*>          useful for the analysis of the algorithm. They are provied for
+*>          a developer/implementer who is familiar with the details of
+*>          the method.
+*>
+*>          RWORK(4) = an estimate of the scaled condition number of the
+*>                    triangular factor in the first QR factorization.
+*>          RWORK(5) = an estimate of the scaled condition number of the
+*>                    triangular factor in the second QR factorization.
+*>          The following two parameters are computed if JOBT .EQ. 'T'.
+*>          They are provided for a developer/implementer who is familiar
+*>          with the details of the method.
+*>          RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy
+*>                    of diag(A^* * A) / Trace(A^* * A) taken as point in the
+*>                    probability simplex.
+*>          RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)
+*>          If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit RWORK(1) contains the required length of
+*>          RWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*>          LRWORK is INTEGER
+*>          Length of RWORK to confirm proper allocation of workspace.
+*>          LRWORK depends on the job:
+*>
+*>       1. If only the singular values are requested i.e. if
+*>          LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')
+*>          then:
+*>          1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>               then: LRWORK = max( 7, 2 * M ).
+*>          1.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       2. If singular values with the right singular vectors are requested
+*>          i.e. if
+*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.
+*>          .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))
+*>          then:
+*>          2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          2.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       3. If singular values with the left singular vectors are requested, i.e. if
+*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
+*>          .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
+*>          then:
+*>          3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          3.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       4. If singular values with both the left and the right singular vectors
+*>          are requested, i.e. if
+*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
+*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
+*>          then:
+*>          4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          4.2. Otherwise, LRWORK  = max( 7, N ).
+*> 
+*>          If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and 
+*>          the length of RWORK is returned in RWORK(1). 
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, of dimension at least 4, that further depends
+*>          on the job:
+*> 
+*>          1. If only the singular values are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N.
+*>          2. If the singular values and the right singular vectors are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>          3. If the singular values and the left singular vectors are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>          4. If the singular values with both the left and the right singular vectors
+*>             are requested, then:      
+*>             4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:
+*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>                  then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>             4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:
+*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>                  then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.
+*>        
+*>          On exit,
+*>          IWORK(1) = the numerical rank determined after the initial
+*>                     QR factorization with pivoting. See the descriptions
+*>                     of JOBA and JOBR.
+*>          IWORK(2) = the number of the computed nonzero singular values
+*>          IWORK(3) = if nonzero, a warning message:
+*>                     If IWORK(3).EQ.1 then some of the column norms of A
+*>                     were denormalized floats. The requested high accuracy
+*>                     is not warranted by the data.
+*>          IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to
+*>                     do the job as specified by the JOB parameters.
+*>          If the call to CGEJSV is a workspace query (indicated by LWORK .EQ. -1 and 
+*>          LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of 
+*>          IWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>           < 0  : if INFO = -i, then the i-th argument had an illegal value.
+*>           = 0 :  successful exit;
+*>           > 0 :  CGEJSV  did not converge in the maximal allowed number
+*>                  of sweeps. The computed values may be inaccurate.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup complexGEsing
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>  CGEJSV implements a preconditioned Jacobi SVD algorithm. It uses CGEQP3,
+*>  CGEQRF, and CGELQF as preprocessors and preconditioners. Optionally, an
+*>  additional row pivoting can be used as a preprocessor, which in some
+*>  cases results in much higher accuracy. An example is matrix A with the
+*>  structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
+*>  diagonal matrices and C is well-conditioned matrix. In that case, complete
+*>  pivoting in the first QR factorizations provides accuracy dependent on the
+*>  condition number of C, and independent of D1, D2. Such higher accuracy is
+*>  not completely understood theoretically, but it works well in practice.
+*>  Further, if A can be written as A = B*D, with well-conditioned B and some
+*>  diagonal D, then the high accuracy is guaranteed, both theoretically and
+*>  in software, independent of D. For more details see [1], [2].
+*>     The computational range for the singular values can be the full range
+*>  ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
+*>  & LAPACK routines called by CGEJSV are implemented to work in that range.
+*>  If that is not the case, then the restriction for safe computation with
+*>  the singular values in the range of normalized IEEE numbers is that the
+*>  spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
+*>  overflow. This code (CGEJSV) is best used in this restricted range,
+*>  meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are
+*>  returned as zeros. See JOBR for details on this.
+*>     Further, this implementation is somewhat slower than the one described
+*>  in [1,2] due to replacement of some non-LAPACK components, and because
+*>  the choice of some tuning parameters in the iterative part (CGESVJ) is
+*>  left to the implementer on a particular machine.
+*>     The rank revealing QR factorization (in this code: CGEQP3) should be
+*>  implemented as in [3]. We have a new version of CGEQP3 under development
+*>  that is more robust than the current one in LAPACK, with a cleaner cut in
+*>  rank deficient cases. It will be available in the SIGMA library [4].
+*>  If M is much larger than N, it is obvious that the initial QRF with
+*>  column pivoting can be preprocessed by the QRF without pivoting. That
+*>  well known trick is not used in CGEJSV because in some cases heavy row
+*>  weighting can be treated with complete pivoting. The overhead in cases
+*>  M much larger than N is then only due to pivoting, but the benefits in
+*>  terms of accuracy have prevailed. The implementer/user can incorporate
+*>  this extra QRF step easily. The implementer can also improve data movement
+*>  (matrix transpose, matrix copy, matrix transposed copy) - this
+*>  implementation of CGEJSV uses only the simplest, naive data movement.
+*> \endverbatim
+*
+*> \par Contributor:
+*  ==================
+*>
+*>  Zlatko Drmac (Zagreb, Croatia)
+*
+*> \par References:
+*  ================
+*>
+*> \verbatim
+*>
+*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*>     LAPACK Working note 169.
+*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*>     LAPACK Working note 170.
+*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
+*>     factorization software - a case study.
+*>     ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
+*>     LAPACK Working note 176.
+*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*>     QSVD, (H,K)-SVD computations.
+*>     Department of Mathematics, University of Zagreb, 2008, 2016.
+*> \endverbatim
+*
+*>  \par Bugs, examples and comments:
+*   =================================
+*>
+*>  Please report all bugs and send interesting examples and/or comments to
+*>  drmac@math.hr. Thank you.
+*>
+*  =====================================================================
+      SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+     $                   M, N, A, LDA, SVA, U, LDU, V, LDV,
+     $                   CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.1) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2017
+*
+*     .. Scalar Arguments ..
+      IMPLICIT    NONE
+      INTEGER     INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX     A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK )
+      REAL        SVA( N ), RWORK( LRWORK )
+      INTEGER     IWORK( * )
+      CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+*     ..
+*
+*  ===========================================================================
+*
+*     .. Local Parameters ..
+      REAL        ZERO,         ONE
+      PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
+      COMPLEX     CZERO,                    CONE
+      PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ), CONE = ( 1.0E0, 0.0E0 ) )
+*     ..
+*     .. Local Scalars ..
+      COMPLEX CTEMP
+      REAL    AAPP,   AAQQ,   AATMAX, AATMIN, BIG,    BIG1,   COND_OK,
+     $        CONDR1, CONDR2, ENTRA,  ENTRAT, EPSLN,  MAXPRJ, SCALEM,
+     $        SCONDA, SFMIN,  SMALL,  TEMP1,  USCAL1, USCAL2, XSC
+      INTEGER IERR,   N1,     NR,     NUMRANK,        p, q,   WARNING
+      LOGICAL ALMORT, DEFR,   ERREST, GOSCAL,  JRACC,  KILL,   LQUERY,
+     $        LSVEC,  L2ABER, L2KILL, L2PERT,  L2RANK, L2TRAN, NOSCAL,
+     $        ROWPIV, RSVEC,  TRANSP
+*
+      INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK
+      INTEGER LWCON,  LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,
+     $        LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF
+      INTEGER LWRK_CGELQF, LWRK_CGEQP3,  LWRK_CGEQP3N, LWRK_CGEQRF,  
+     $        LWRK_CGESVJ, LWRK_CGESVJV, LWRK_CGESVJU, LWRK_CUNMLQ, 
+     $        LWRK_CUNMQR, LWRK_CUNMQRM    
+*     ..
+*     .. Local Arrays
+      COMPLEX CDUMMY(1)
+      REAL    RDUMMY(1)
+*
+*     .. Intrinsic Functions ..
+      INTRINSIC ABS, CMPLX, CONJG, ALOG, MAX, MIN, REAL, NINT, SQRT
+*     ..
+*     .. External Functions ..
+      REAL      SLAMCH, SCNRM2
+      INTEGER   ISAMAX, ICAMAX
+      LOGICAL   LSAME
+      EXTERNAL  ISAMAX, ICAMAX, LSAME, SLAMCH, SCNRM2
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL  SLASSQ, CCOPY,  CGELQF, CGEQP3, CGEQRF, CLACPY, CLAPMR,
+     $          CLASCL, SLASCL, CLASET, CLASSQ, CLASWP, CUNGQR, CUNMLQ,
+     $          CUNMQR, CPOCON, SSCAL,  CSSCAL, CSWAP,  CTRSM,  CLACGV,
+     $          XERBLA
+*
+      EXTERNAL  CGESVJ
+*     ..
+*
+*     Test the input arguments
+*
+      LSVEC  = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )
+      JRACC  = LSAME( JOBV, 'J' )
+      RSVEC  = LSAME( JOBV, 'V' ) .OR. JRACC
+      ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )
+      L2RANK = LSAME( JOBA, 'R' )
+      L2ABER = LSAME( JOBA, 'A' )
+      ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )
+      L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )
+      L2KILL = LSAME( JOBR, 'R' )
+      DEFR   = LSAME( JOBR, 'N' )
+      L2PERT = LSAME( JOBP, 'P' )
+*
+      LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )
+*
+      IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.
+     $     ERREST .OR. LSAME( JOBA, 'C' ) )) THEN
+         INFO = - 1
+      ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.
+     $   ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN
+         INFO = - 2
+      ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.
+     $   ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN
+         INFO = - 3
+      ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) )    THEN
+         INFO = - 4
+      ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN
+         INFO = - 5
+      ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN
+         INFO = - 6
+      ELSE IF ( M .LT. 0 ) THEN
+         INFO = - 7
+      ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN
+         INFO = - 8
+      ELSE IF ( LDA .LT. M ) THEN
+         INFO = - 10
+      ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
+         INFO = - 13
+      ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
+         INFO = - 15
+      ELSE
+*        #:)
+         INFO = 0
+      END IF
+*
+      IF ( INFO .EQ. 0 ) THEN 
+*         .. compute the minimal and the optimal workspace lengths 
+*         [[The expressions for computing the minimal and the optimal
+*         values of LCWORK, LRWORK are written with a lot of redundancy and
+*         can be simplified. However, this verbose form is useful for
+*         maintenance and modifications of the code.]]
+*
+*        .. minimal workspace length for CGEQP3 of an M x N matrix,
+*         CGEQRF of an N x N matrix, CGELQF of an N x N matrix,
+*         CUNMLQ for computing N x N matrix, CUNMQR for computing N x N
+*         matrix, CUNMQR for computing M x N matrix, respectively.
+          LWQP3 = N+1   
+          LWQRF = MAX( 1, N )
+          LWLQF = MAX( 1, N )
+          LWUNMLQ  = MAX( 1, N )
+          LWUNMQR  = MAX( 1, N )
+          LWUNMQRM = MAX( 1, M )
+*        .. minimal workspace length for CPOCON of an N x N matrix
+          LWCON = 2 * N 
+*        .. minimal workspace length for CGESVJ of an N x N matrix,
+*         without and with explicit accumulation of Jacobi rotations
+          LWSVDJ  = MAX( 2 * N, 1 )         
+          LWSVDJV = MAX( 2 * N, 1 )
+*         .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ
+          LRWQP3  = N 
+          LRWCON  = N 
+          LRWSVDJ = N 
+          IF ( LQUERY ) THEN 
+              CALL CGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, 
+     $             RDUMMY, IERR )
+              LWRK_CGEQP3 = CDUMMY(1)
+              CALL CGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
+              LWRK_CGEQRF = CDUMMY(1)
+              CALL CGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
+              LWRK_CGELQF = CDUMMY(1)             
+          END IF
+          MINWRK  = 2
+          OPTWRK  = 2
+          MINIWRK = N 
+          IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN
+*             .. minimal and optimal sizes of the complex workspace if
+*             only the singular values are requested
+              IF ( ERREST ) THEN 
+                  MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )
+              ELSE
+                  MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )
+              END IF
+              IF ( LQUERY ) THEN 
+                  CALL CGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, 
+     $                 LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                  LWRK_CGESVJ = CDUMMY(1)
+                  IF ( ERREST ) THEN 
+                      OPTWRK = MAX( N+LWRK_CGEQP3, N**2+LWCON, 
+     $                              N+LWRK_CGEQRF, LWRK_CGESVJ )
+                  ELSE
+                      OPTWRK = MAX( N+LWRK_CGEQP3, N+LWRK_CGEQRF, 
+     $                              LWRK_CGESVJ )
+                  END IF
+              END IF
+              IF ( L2TRAN .OR. ROWPIV ) THEN 
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWCON, LRWSVDJ )
+                  ELSE
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )
+                  END IF                 
+              ELSE
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )
+                  ELSE
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
+                  END IF
+              END IF   
+              IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M 
+          ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN
+*            .. minimal and optimal sizes of the complex workspace if the
+*            singular values and the right singular vectors are requested
+             IF ( ERREST ) THEN 
+                 MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,  
+     $                         2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )
+             ELSE
+                 MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, 
+     $                         N+LWSVDJ, N+LWUNMLQ )
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
+     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )
+                 LWRK_CGESVJ = CDUMMY(1)
+                 CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
+     $                V, LDV, CDUMMY, -1, IERR )
+                 LWRK_CUNMLQ = CDUMMY(1)                
+                 IF ( ERREST ) THEN 
+                 OPTWRK = MAX( N+LWRK_CGEQP3, LWCON, LWRK_CGESVJ, 
+     $                         N+LWRK_CGELQF, 2*N+LWRK_CGEQRF,
+     $                         N+LWRK_CGESVJ,  N+LWRK_CUNMLQ )
+                 ELSE
+                 OPTWRK = MAX( N+LWRK_CGEQP3, LWRK_CGESVJ,N+LWRK_CGELQF,
+     $                         2*N+LWRK_CGEQRF, N+LWRK_CGESVJ, 
+     $                         N+LWRK_CUNMLQ )
+                 END IF
+             END IF
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+                  ELSE
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ ) 
+                  END IF                  
+             ELSE
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+                  ELSE
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) 
+                  END IF                 
+             END IF
+             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+          ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN  
+*            .. minimal and optimal sizes of the complex workspace if the
+*            singular values and the left singular vectors are requested
+             IF ( ERREST ) THEN
+                 MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )
+             ELSE
+                 MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
+     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )
+                 LWRK_CGESVJ = CDUMMY(1)
+                 CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $               LDU, CDUMMY, -1, IERR )
+                 LWRK_CUNMQRM = CDUMMY(1)
+                 IF ( ERREST ) THEN
+                 OPTWRK = N + MAX( LWRK_CGEQP3, LWCON, N+LWRK_CGEQRF,
+     $                             LWRK_CGESVJ, LWRK_CUNMQRM )
+                 ELSE
+                 OPTWRK = N + MAX( LWRK_CGEQP3, N+LWRK_CGEQRF,
+     $                             LWRK_CGESVJ, LWRK_CUNMQRM )
+                 END IF
+             END IF
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                 IF ( ERREST ) THEN 
+                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+                 ELSE
+                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )
+                 END IF                 
+             ELSE
+                 IF ( ERREST ) THEN 
+                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+                 ELSE
+                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
+                 END IF                
+             END IF 
+             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+          ELSE
+*            .. minimal and optimal sizes of the complex workspace if the
+*            full SVD is requested
+             IF ( .NOT. JRACC ) THEN                
+                 IF ( ERREST ) THEN 
+                    MINWRK = MAX( N+LWQP3, N+LWCON,  2*N+N**2+LWCON, 
+     $                         2*N+LWQRF,         2*N+LWQP3, 
+     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,
+     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, 
+     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, 
+     $                         N+N**2+LWSVDJ,   N+LWUNMQRM )
+                 ELSE
+                    MINWRK = MAX( N+LWQP3,        2*N+N**2+LWCON, 
+     $                         2*N+LWQRF,         2*N+LWQP3, 
+     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,
+     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
+     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
+     $                         N+N**2+LWSVDJ,      N+LWUNMQRM ) 
+                 END IF 
+                 MINIWRK = MINIWRK + N 
+                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+             ELSE
+                 IF ( ERREST ) THEN 
+                    MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, 
+     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, 
+     $                         N+LWUNMQRM )
+                 ELSE
+                    MINWRK = MAX( N+LWQP3, 2*N+LWQRF, 
+     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, 
+     $                         N+LWUNMQRM ) 
+                 END IF   
+                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $                LDU, CDUMMY, -1, IERR )
+                 LWRK_CUNMQRM = CDUMMY(1)
+                 CALL CUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,
+     $                LDU, CDUMMY, -1, IERR )
+                 LWRK_CUNMQR = CDUMMY(1)
+                 IF ( .NOT. JRACC ) THEN
+                     CALL CGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,
+     $                    RDUMMY, IERR )
+                     LWRK_CGEQP3N = CDUMMY(1)
+                     CALL CGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_CGESVJ = CDUMMY(1)
+                     CALL CGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_CGESVJU = CDUMMY(1)
+                     CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_CGESVJV = CDUMMY(1)
+                     CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
+     $                    V, LDV, CDUMMY, -1, IERR )
+                     LWRK_CUNMLQ = CDUMMY(1)
+                     IF ( ERREST ) THEN 
+                       OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, 
+     $                          2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, 
+     $                          2*N+LWRK_CGEQP3N, 
+     $                          2*N+N**2+N+LWRK_CGELQF,  
+     $                          2*N+N**2+N+N**2+LWCON,
+     $                          2*N+N**2+N+LWRK_CGESVJ, 
+     $                          2*N+N**2+N+LWRK_CGESVJV,               
+     $                          2*N+N**2+N+LWRK_CUNMQR,
+     $                          2*N+N**2+N+LWRK_CUNMLQ, 
+     $                          N+N**2+LWRK_CGESVJU,                  
+     $                          N+LWRK_CUNMQRM )
+                     ELSE
+                       OPTWRK = MAX( N+LWRK_CGEQP3,  
+     $                          2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, 
+     $                          2*N+LWRK_CGEQP3N, 
+     $                          2*N+N**2+N+LWRK_CGELQF,  
+     $                          2*N+N**2+N+N**2+LWCON,
+     $                          2*N+N**2+N+LWRK_CGESVJ,               
+     $                          2*N+N**2+N+LWRK_CGESVJV, 
+     $                          2*N+N**2+N+LWRK_CUNMQR,
+     $                          2*N+N**2+N+LWRK_CUNMLQ, 
+     $                          N+N**2+LWRK_CGESVJU,
+     $                          N+LWRK_CUNMQRM )
+                     END IF                    
+                 ELSE
+                     CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_CGESVJV = CDUMMY(1)
+                     CALL CUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,
+     $                    V, LDV, CDUMMY, -1, IERR )
+                     LWRK_CUNMQR = CDUMMY(1)
+                     CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $                    LDU, CDUMMY, -1, IERR )
+                     LWRK_CUNMQRM = CDUMMY(1)   
+                     IF ( ERREST ) THEN 
+                        OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON,   
+     $                           2*N+LWRK_CGEQRF, 2*N+N**2,  
+     $                           2*N+N**2+LWRK_CGESVJV,  
+     $                           2*N+N**2+N+LWRK_CUNMQR,N+LWRK_CUNMQRM )
+                     ELSE
+                        OPTWRK = MAX( N+LWRK_CGEQP3, 2*N+LWRK_CGEQRF,  
+     $                           2*N+N**2, 2*N+N**2+LWRK_CGESVJV, 
+     $                           2*N+N**2+N+LWRK_CUNMQR, 
+     $                           N+LWRK_CUNMQRM )   
+                     END IF                  
+                 END IF               
+             END IF 
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                 MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+             ELSE
+                 MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+             END IF 
+          END IF
+          MINWRK = MAX( 2, MINWRK )
+          OPTWRK = MAX( 2, OPTWRK )
+          IF ( LWORK  .LT. MINWRK  .AND. (.NOT.LQUERY) ) INFO = - 17
+          IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19   
+      END IF
+*      
+      IF ( INFO .NE. 0 ) THEN
+*       #:(
+         CALL XERBLA( 'CGEJSV', - INFO )
+         RETURN
+      ELSE IF ( LQUERY ) THEN
+          CWORK(1) = OPTWRK
+          CWORK(2) = MINWRK
+          RWORK(1) = MINRWRK
+          IWORK(1) = MAX( 4, MINIWRK )
+          RETURN   
+      END IF
+*
+*     Quick return for void matrix (Y3K safe)
+* #:)
+      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
+         IWORK(1:4) = 0
+         RWORK(1:7) = 0
+         RETURN
+      ENDIF
+*
+*     Determine whether the matrix U should be M x N or M x M
+*
+      IF ( LSVEC ) THEN
+         N1 = N
+         IF ( LSAME( JOBU, 'F' ) ) N1 = M
+      END IF
+*
+*     Set numerical parameters
+*
+*!    NOTE: Make sure SLAMCH() does not fail on the target architecture.
+*
+      EPSLN = SLAMCH('Epsilon')
+      SFMIN = SLAMCH('SafeMinimum')
+      SMALL = SFMIN / EPSLN
+      BIG   = SLAMCH('O')
+*     BIG   = ONE / SFMIN
+*
+*     Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N
+*
+*(!)  If necessary, scale SVA() to protect the largest norm from
+*     overflow. It is possible that this scaling pushes the smallest
+*     column norm left from the underflow threshold (extreme case).
+*
+      SCALEM  = ONE / SQRT(REAL(M)*REAL(N))
+      NOSCAL  = .TRUE.
+      GOSCAL  = .TRUE.
+      DO 1874 p = 1, N
+         AAPP = ZERO
+         AAQQ = ONE
+         CALL CLASSQ( M, A(1,p), 1, AAPP, AAQQ )
+         IF ( AAPP .GT. BIG ) THEN
+            INFO = - 9
+            CALL XERBLA( 'CGEJSV', -INFO )
+            RETURN
+         END IF
+         AAQQ = SQRT(AAQQ)
+         IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL  ) THEN
+            SVA(p)  = AAPP * AAQQ
+         ELSE
+            NOSCAL  = .FALSE.
+            SVA(p)  = AAPP * ( AAQQ * SCALEM )
+            IF ( GOSCAL ) THEN
+               GOSCAL = .FALSE.
+               CALL SSCAL( p-1, SCALEM, SVA, 1 )
+            END IF
+         END IF
+ 1874 CONTINUE
+*
+      IF ( NOSCAL ) SCALEM = ONE
+*
+      AAPP = ZERO
+      AAQQ = BIG
+      DO 4781 p = 1, N
+         AAPP = MAX( AAPP, SVA(p) )
+         IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
+ 4781 CONTINUE
+*
+*     Quick return for zero M x N matrix
+* #:)
+      IF ( AAPP .EQ. ZERO ) THEN
+         IF ( LSVEC ) CALL CLASET( 'G', M, N1, CZERO, CONE, U, LDU )
+         IF ( RSVEC ) CALL CLASET( 'G', N, N,  CZERO, CONE, V, LDV )
+         RWORK(1) = ONE
+         RWORK(2) = ONE
+         IF ( ERREST ) RWORK(3) = ONE
+         IF ( LSVEC .AND. RSVEC ) THEN
+            RWORK(4) = ONE
+            RWORK(5) = ONE
+         END IF
+         IF ( L2TRAN ) THEN
+            RWORK(6) = ZERO
+            RWORK(7) = ZERO
+         END IF
+         IWORK(1) = 0
+         IWORK(2) = 0
+         IWORK(3) = 0
+         IWORK(4) = -1
+         RETURN
+      END IF
+*
+*     Issue warning if denormalized column norms detected. Override the
+*     high relative accuracy request. Issue licence to kill nonzero columns
+*     (set them to zero) whose norm is less than sigma_max / BIG (roughly).
+* #:(
+      WARNING = 0
+      IF ( AAQQ .LE. SFMIN ) THEN
+         L2RANK = .TRUE.
+         L2KILL = .TRUE.
+         WARNING = 1
+      END IF
+*
+*     Quick return for one-column matrix
+* #:)
+      IF ( N .EQ. 1 ) THEN
+*
+         IF ( LSVEC ) THEN
+            CALL CLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )
+            CALL CLACPY( 'A', M, 1, A, LDA, U, LDU )
+*           computing all M left singular vectors of the M x 1 matrix
+            IF ( N1 .NE. N  ) THEN
+              CALL CGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )
+              CALL CUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )
+              CALL CCOPY( M, A(1,1), 1, U(1,1), 1 )
+            END IF
+         END IF
+         IF ( RSVEC ) THEN
+             V(1,1) = CONE
+         END IF
+         IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN
+            SVA(1)  = SVA(1) / SCALEM
+            SCALEM  = ONE
+         END IF
+         RWORK(1) = ONE / SCALEM
+         RWORK(2) = ONE
+         IF ( SVA(1) .NE. ZERO ) THEN
+            IWORK(1) = 1
+            IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN
+               IWORK(2) = 1
+            ELSE
+               IWORK(2) = 0
+            END IF
+         ELSE
+            IWORK(1) = 0
+            IWORK(2) = 0
+         END IF
+         IWORK(3) = 0
+         IWORK(4) = -1
+         IF ( ERREST ) RWORK(3) = ONE
+         IF ( LSVEC .AND. RSVEC ) THEN
+            RWORK(4) = ONE
+            RWORK(5) = ONE
+         END IF
+         IF ( L2TRAN ) THEN
+            RWORK(6) = ZERO
+            RWORK(7) = ZERO
+         END IF
+         RETURN
+*
+      END IF
+*
+      TRANSP = .FALSE.
+*
+      AATMAX = -ONE
+      AATMIN =  BIG
+      IF ( ROWPIV .OR. L2TRAN ) THEN
+*
+*     Compute the row norms, needed to determine row pivoting sequence
+*     (in the case of heavily row weighted A, row pivoting is strongly
+*     advised) and to collect information needed to compare the
+*     structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).
+*
+         IF ( L2TRAN ) THEN
+            DO 1950 p = 1, M
+               XSC   = ZERO
+               TEMP1 = ONE
+               CALL CLASSQ( N, A(p,1), LDA, XSC, TEMP1 )
+*              CLASSQ gets both the ell_2 and the ell_infinity norm
+*              in one pass through the vector
+               RWORK(M+p)  = XSC * SCALEM
+               RWORK(p)    = XSC * (SCALEM*SQRT(TEMP1))
+               AATMAX = MAX( AATMAX, RWORK(p) )
+               IF (RWORK(p) .NE. ZERO) 
+     $            AATMIN = MIN(AATMIN,RWORK(p))
+ 1950       CONTINUE
+         ELSE
+            DO 1904 p = 1, M
+               RWORK(M+p) = SCALEM*ABS( A(p,ICAMAX(N,A(p,1),LDA)) )
+               AATMAX = MAX( AATMAX, RWORK(M+p) )
+               AATMIN = MIN( AATMIN, RWORK(M+p) )
+ 1904       CONTINUE
+         END IF
+*
+      END IF
+*
+*     For square matrix A try to determine whether A^*  would be better
+*     input for the preconditioned Jacobi SVD, with faster convergence.
+*     The decision is based on an O(N) function of the vector of column
+*     and row norms of A, based on the Shannon entropy. This should give
+*     the right choice in most cases when the difference actually matters.
+*     It may fail and pick the slower converging side.
+*
+      ENTRA  = ZERO
+      ENTRAT = ZERO
+      IF ( L2TRAN ) THEN
+*
+         XSC   = ZERO
+         TEMP1 = ONE
+         CALL SLASSQ( N, SVA, 1, XSC, TEMP1 )
+         TEMP1 = ONE / TEMP1
+*
+         ENTRA = ZERO
+         DO 1113 p = 1, N
+            BIG1  = ( ( SVA(p) / XSC )**2 ) * TEMP1
+            IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * ALOG(BIG1)
+ 1113    CONTINUE
+         ENTRA = - ENTRA / ALOG(REAL(N))
+*
+*        Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.
+*        It is derived from the diagonal of  A^* * A.  Do the same with the
+*        diagonal of A * A^*, compute the entropy of the corresponding
+*        probability distribution. Note that A * A^* and A^* * A have the
+*        same trace.
+*
+         ENTRAT = ZERO
+         DO 1114 p = 1, M
+            BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1
+            IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * ALOG(BIG1)
+ 1114    CONTINUE
+         ENTRAT = - ENTRAT / ALOG(REAL(M))
+*
+*        Analyze the entropies and decide A or A^*. Smaller entropy
+*        usually means better input for the algorithm.
+*
+         TRANSP = ( ENTRAT .LT. ENTRA )
+* 
+*        If A^* is better than A, take the adjoint of A. This is allowed
+*        only for square matrices, M=N.  
+         IF ( TRANSP ) THEN
+*           In an optimal implementation, this trivial transpose
+*           should be replaced with faster transpose.
+            DO 1115 p = 1, N - 1
+               A(p,p) = CONJG(A(p,p))
+               DO 1116 q = p + 1, N
+                   CTEMP = CONJG(A(q,p))
+                  A(q,p) = CONJG(A(p,q))
+                  A(p,q) = CTEMP
+ 1116          CONTINUE
+ 1115       CONTINUE
+            A(N,N) = CONJG(A(N,N))
+            DO 1117 p = 1, N
+               RWORK(M+p) = SVA(p)
+               SVA(p) = RWORK(p)
+*              previously computed row 2-norms are now column 2-norms
+*              of the transposed matrix
+ 1117       CONTINUE
+            TEMP1  = AAPP
+            AAPP   = AATMAX
+            AATMAX = TEMP1
+            TEMP1  = AAQQ
+            AAQQ   = AATMIN
+            AATMIN = TEMP1
+            KILL   = LSVEC
+            LSVEC  = RSVEC
+            RSVEC  = KILL
+            IF ( LSVEC ) N1 = N
+*
+            ROWPIV = .TRUE.
+         END IF
+*
+      END IF
+*     END IF L2TRAN
+*
+*     Scale the matrix so that its maximal singular value remains less
+*     than SQRT(BIG) -- the matrix is scaled so that its maximal column
+*     has Euclidean norm equal to SQRT(BIG/N). The only reason to keep
+*     SQRT(BIG) instead of BIG is the fact that CGEJSV uses LAPACK and
+*     BLAS routines that, in some implementations, are not capable of
+*     working in the full interval [SFMIN,BIG] and that they may provoke
+*     overflows in the intermediate results. If the singular values spread
+*     from SFMIN to BIG, then CGESVJ will compute them. So, in that case,
+*     one should use CGESVJ instead of CGEJSV.
+      BIG1   = SQRT( BIG )
+      TEMP1  = SQRT( BIG / REAL(N) )
+*     >> for future updates: allow bigger range, i.e. the largest column
+*     will be allowed up to BIG/N and CGESVJ will do the rest. However, for
+*     this all other (LAPACK) components must allow such a range.      
+*     TEMP1  = BIG/REAL(N)
+*     TEMP1  = BIG * EPSLN  this should 'almost' work with current LAPACK components
+      CALL SLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )
+      IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN
+          AAQQ = ( AAQQ / AAPP ) * TEMP1
+      ELSE
+          AAQQ = ( AAQQ * TEMP1 ) / AAPP
+      END IF
+      TEMP1 = TEMP1 * SCALEM
+      CALL CLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )
+*
+*     To undo scaling at the end of this procedure, multiply the
+*     computed singular values with USCAL2 / USCAL1.
+*
+      USCAL1 = TEMP1
+      USCAL2 = AAPP
+*
+      IF ( L2KILL ) THEN
+*        L2KILL enforces computation of nonzero singular values in
+*        the restricted range of condition number of the initial A,
+*        sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).
+         XSC = SQRT( SFMIN )
+      ELSE
+         XSC = SMALL
+*
+*        Now, if the condition number of A is too big,
+*        sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,
+*        as a precaution measure, the full SVD is computed using CGESVJ
+*        with accumulated Jacobi rotations. This provides numerically
+*        more robust computation, at the cost of slightly increased run
+*        time. Depending on the concrete implementation of BLAS and LAPACK
+*        (i.e. how they behave in presence of extreme ill-conditioning) the
+*        implementor may decide to remove this switch.
+         IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN
+            JRACC = .TRUE.
+         END IF
+*
+      END IF
+      IF ( AAQQ .LT. XSC ) THEN
+         DO 700 p = 1, N
+            IF ( SVA(p) .LT. XSC ) THEN
+               CALL CLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )
+               SVA(p) = ZERO
+            END IF
+ 700     CONTINUE
+      END IF
+*
+*     Preconditioning using QR factorization with pivoting
+*
+      IF ( ROWPIV ) THEN
+*        Optional row permutation (Bjoerck row pivoting):
+*        A result by Cox and Higham shows that the Bjoerck's
+*        row pivoting combined with standard column pivoting
+*        has similar effect as Powell-Reid complete pivoting.
+*        The ell-infinity norms of A are made nonincreasing.
+         IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN 
+              IWOFF = 2*N
+         ELSE
+              IWOFF = N
+         END IF
+         DO 1952 p = 1, M - 1
+            q = ISAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1
+            IWORK(IWOFF+p) = q
+            IF ( p .NE. q ) THEN
+               TEMP1      = RWORK(M+p)
+               RWORK(M+p) = RWORK(M+q)
+               RWORK(M+q) = TEMP1
+            END IF
+ 1952    CONTINUE
+         CALL CLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )
+      END IF
+*
+*     End of the preparation phase (scaling, optional sorting and
+*     transposing, optional flushing of small columns).
+*
+*     Preconditioning
+*
+*     If the full SVD is needed, the right singular vectors are computed
+*     from a matrix equation, and for that we need theoretical analysis
+*     of the Businger-Golub pivoting. So we use CGEQP3 as the first RR QRF.
+*     In all other cases the first RR QRF can be chosen by other criteria
+*     (eg speed by replacing global with restricted window pivoting, such
+*     as in xGEQPX from TOMS # 782). Good results will be obtained using
+*     xGEQPX with properly (!) chosen numerical parameters.
+*     Any improvement of CGEQP3 improves overal performance of CGEJSV.
+*
+*     A * P1 = Q1 * [ R1^* 0]^*:
+      DO 1963 p = 1, N
+*        .. all columns are free columns
+         IWORK(p) = 0
+ 1963 CONTINUE
+      CALL CGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,
+     $             RWORK, IERR )
+*
+*     The upper triangular matrix R1 from the first QRF is inspected for
+*     rank deficiency and possibilities for deflation, or possible
+*     ill-conditioning. Depending on the user specified flag L2RANK,
+*     the procedure explores possibilities to reduce the numerical
+*     rank by inspecting the computed upper triangular factor. If
+*     L2RANK or L2ABER are up, then CGEJSV will compute the SVD of
+*     A + dA, where ||dA|| <= f(M,N)*EPSLN.
+*
+      NR = 1
+      IF ( L2ABER ) THEN
+*        Standard absolute error bound suffices. All sigma_i with
+*        sigma_i < N*EPSLN*||A|| are flushed to zero. This is an
+*        agressive enforcement of lower numerical rank by introducing a
+*        backward error of the order of N*EPSLN*||A||.
+         TEMP1 = SQRT(REAL(N))*EPSLN
+         DO 3001 p = 2, N
+            IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN
+               NR = NR + 1
+            ELSE
+               GO TO 3002
+            END IF
+ 3001    CONTINUE
+ 3002    CONTINUE
+      ELSE IF ( L2RANK ) THEN
+*        .. similarly as above, only slightly more gentle (less agressive).
+*        Sudden drop on the diagonal of R1 is used as the criterion for
+*        close-to-rank-defficient.
+         TEMP1 = SQRT(SFMIN)
+         DO 3401 p = 2, N
+            IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.
+     $           ( ABS(A(p,p)) .LT. SMALL ) .OR.
+     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402
+            NR = NR + 1
+ 3401    CONTINUE
+ 3402    CONTINUE
+*
+      ELSE
+*        The goal is high relative accuracy. However, if the matrix
+*        has high scaled condition number the relative accuracy is in
+*        general not feasible. Later on, a condition number estimator
+*        will be deployed to estimate the scaled condition number.
+*        Here we just remove the underflowed part of the triangular
+*        factor. This prevents the situation in which the code is
+*        working hard to get the accuracy not warranted by the data.
+         TEMP1  = SQRT(SFMIN)
+         DO 3301 p = 2, N
+            IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.
+     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302
+            NR = NR + 1
+ 3301    CONTINUE
+ 3302    CONTINUE
+*
+      END IF
+*
+      ALMORT = .FALSE.
+      IF ( NR .EQ. N ) THEN
+         MAXPRJ = ONE
+         DO 3051 p = 2, N
+            TEMP1  = ABS(A(p,p)) / SVA(IWORK(p))
+            MAXPRJ = MIN( MAXPRJ, TEMP1 )
+ 3051    CONTINUE
+         IF ( MAXPRJ**2 .GE. ONE - REAL(N)*EPSLN ) ALMORT = .TRUE.
+      END IF
+*
+*
+      SCONDA = - ONE
+      CONDR1 = - ONE
+      CONDR2 = - ONE
+*
+      IF ( ERREST ) THEN
+         IF ( N .EQ. NR ) THEN
+            IF ( RSVEC ) THEN
+*              .. V is available as workspace
+               CALL CLACPY( 'U', N, N, A, LDA, V, LDV )
+               DO 3053 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+                  CALL CSSCAL( p, ONE/TEMP1, V(1,p), 1 )
+ 3053          CONTINUE
+               IF ( LSVEC )THEN
+                   CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,
+     $                  CWORK(N+1), RWORK, IERR )
+               ELSE
+                   CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1,
+     $                  CWORK, RWORK, IERR )
+               END IF               
+*          
+            ELSE IF ( LSVEC ) THEN
+*              .. U is available as workspace
+               CALL CLACPY( 'U', N, N, A, LDA, U, LDU )
+               DO 3054 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+                  CALL CSSCAL( p, ONE/TEMP1, U(1,p), 1 )
+ 3054          CONTINUE
+               CALL CPOCON( 'U', N, U, LDU, ONE, TEMP1,
+     $              CWORK(N+1), RWORK, IERR )
+            ELSE
+               CALL CLACPY( 'U', N, N, A, LDA, CWORK, N )
+*[]            CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
+*              Change: here index shifted by N to the left, CWORK(1:N) 
+*              not needed for SIGMA only computation
+               DO 3052 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+*[]               CALL CSSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )
+                  CALL CSSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )
+ 3052          CONTINUE
+*           .. the columns of R are scaled to have unit Euclidean lengths.
+*[]               CALL CPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,
+*[]     $              CWORK(N+N*N+1), RWORK, IERR )
+               CALL CPOCON( 'U', N, CWORK, N, ONE, TEMP1,
+     $              CWORK(N*N+1), RWORK, IERR )               
+*              
+            END IF
+            IF ( TEMP1 .NE. ZERO ) THEN 
+               SCONDA = ONE / SQRT(TEMP1)
+            ELSE
+               SCONDA = - ONE
+            END IF
+*           SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
+*           N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+         ELSE
+            SCONDA = - ONE
+         END IF
+      END IF
+*
+      L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )
+*     If there is no violent scaling, artificial perturbation is not needed.
+*
+*     Phase 3:
+*
+      IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN
+*
+*         Singular Values only
+*
+*         .. transpose A(1:NR,1:N)
+         DO 1946 p = 1, MIN( N-1, NR )
+            CALL CCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
+            CALL CLACGV( N-p+1, A(p,p), 1 )
+ 1946    CONTINUE
+         IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))
+*
+*        The following two DO-loops introduce small relative perturbation
+*        into the strict upper triangle of the lower triangular matrix.
+*        Small entries below the main diagonal are also changed.
+*        This modification is useful if the computing environment does not
+*        provide/allow FLUSH TO ZERO underflow, for it prevents many
+*        annoying denormalized numbers in case of strongly scaled matrices.
+*        The perturbation is structured so that it does not introduce any
+*        new perturbation of the singular values, and it does not destroy
+*        the job done by the preconditioner.
+*        The licence for this perturbation is in the variable L2PERT, which
+*        should be .FALSE. if FLUSH TO ZERO underflow is active.
+*
+         IF ( .NOT. ALMORT ) THEN
+*
+            IF ( L2PERT ) THEN
+*              XSC = SQRT(SMALL)
+               XSC = EPSLN / REAL(N)
+               DO 4947 q = 1, NR
+                  CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)
+                  DO 4949 p = 1, N
+                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
+     $                    .OR. ( p .LT. q ) )
+*     $                     A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
+     $                     A(p,q) = CTEMP
+ 4949             CONTINUE
+ 4947          CONTINUE
+            ELSE
+               CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )
+            END IF
+*
+*            .. second preconditioning using the QR factorization
+*
+            CALL CGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )
+*
+*           .. and transpose upper to lower triangular
+            DO 1948 p = 1, NR - 1
+               CALL CCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )
+               CALL CLACGV( NR-p+1, A(p,p), 1 )
+ 1948       CONTINUE
+*
+         END IF
+*
+*           Row-cyclic Jacobi SVD algorithm with column pivoting
+*
+*           .. again some perturbation (a "background noise") is added
+*           to drown denormals
+            IF ( L2PERT ) THEN
+*              XSC = SQRT(SMALL)
+               XSC = EPSLN / REAL(N)
+               DO 1947 q = 1, NR
+                  CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO)
+                  DO 1949 p = 1, NR
+                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
+     $                       .OR. ( p .LT. q ) )
+*     $                   A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
+     $                   A(p,q) = CTEMP
+ 1949             CONTINUE
+ 1947          CONTINUE
+            ELSE
+               CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )
+            END IF
+*
+*           .. and one-sided Jacobi rotations are started on a lower
+*           triangular matrix (plus perturbation which is ignored in
+*           the part which destroys triangular form (confusing?!))
+*
+            CALL CGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,
+     $                N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
+*
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+*
+*
+      ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) 
+     $       .OR. 
+     $   ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN
+*
+*        -> Singular Values and Right Singular Vectors <-
+*
+         IF ( ALMORT ) THEN
+*
+*           .. in this case NR equals N
+            DO 1998 p = 1, NR
+               CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+               CALL CLACGV( N-p+1, V(p,p), 1 )
+ 1998       CONTINUE
+            CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
+*
+            CALL CGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,
+     $                  CWORK, LWORK, RWORK, LRWORK, INFO )
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+
+         ELSE
+*
+*        .. two more QR factorizations ( one QRF is not enough, two require
+*        accumulated product of Jacobi rotations, three are perfect )
+*
+            CALL CLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )
+            CALL CGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)
+            CALL CLACPY( 'L', NR, NR, A, LDA, V, LDV )
+            CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
+            CALL CGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $                   LWORK-2*N, IERR )
+            DO 8998 p = 1, NR
+               CALL CCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )
+               CALL CLACGV( NR-p+1, V(p,p), 1 )
+ 8998       CONTINUE
+            CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)
+*
+            CALL CGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,
+     $                  LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+            IF ( NR .LT. N ) THEN
+               CALL CLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1),  LDV )
+               CALL CLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1),  LDV )
+               CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )
+            END IF
+*
+         CALL CUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,
+     $               V, LDV, CWORK(N+1), LWORK-N, IERR )
+*
+         END IF
+*         .. permute the rows of V
+*         DO 8991 p = 1, N
+*            CALL CCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )
+* 8991    CONTINUE
+*         CALL CLACPY( 'All', N, N, A, LDA, V, LDV )
+         CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )
+*
+          IF ( TRANSP ) THEN
+            CALL CLACPY( 'A', N, N, V, LDV, U, LDU )
+          END IF
+*
+      ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN 
+*          
+         CALL CLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )
+*
+         CALL CGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,
+     $               CWORK, LWORK, RWORK, LRWORK, INFO )
+          SCALEM  = RWORK(1)
+          NUMRANK = NINT(RWORK(2))
+          CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK )
+*
+      ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN
+*
+*        .. Singular Values and Left Singular Vectors                 ..
+*
+*        .. second preconditioning step to avoid need to accumulate
+*        Jacobi rotations in the Jacobi iterations.
+         DO 1965 p = 1, NR
+            CALL CCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )
+            CALL CLACGV( N-p+1, U(p,p), 1 )
+ 1965    CONTINUE
+         CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+*
+         CALL CGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),
+     $              LWORK-2*N, IERR )
+*
+         DO 1967 p = 1, NR - 1
+            CALL CCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )
+            CALL CLACGV( N-p+1, U(p,p), 1 )
+ 1967    CONTINUE
+         CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+*
+         CALL CGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,
+     $        LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
+         SCALEM  = RWORK(1)
+         NUMRANK = NINT(RWORK(2))
+*
+         IF ( NR .LT. M ) THEN
+            CALL CLASET( 'A',  M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )
+            IF ( NR .LT. N1 ) THEN
+               CALL CLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )
+               CALL CLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )
+            END IF
+         END IF
+*
+         CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $               LDU, CWORK(N+1), LWORK-N, IERR )
+*
+         IF ( ROWPIV )
+     $       CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         DO 1974 p = 1, N1
+            XSC = ONE / SCNRM2( M, U(1,p), 1 )
+            CALL CSSCAL( M, XSC, U(1,p), 1 )
+ 1974    CONTINUE
+*
+         IF ( TRANSP ) THEN
+            CALL CLACPY( 'A', N, N, U, LDU, V, LDV )
+         END IF
+*
+      ELSE
+*
+*        .. Full SVD ..
+*
+         IF ( .NOT. JRACC ) THEN
+*
+         IF ( .NOT. ALMORT ) THEN
+*
+*           Second Preconditioning Step (QRF [with pivoting])
+*           Note that the composition of TRANSPOSE, QRF and TRANSPOSE is
+*           equivalent to an LQF CALL. Since in many libraries the QRF
+*           seems to be better optimized than the LQF, we do explicit
+*           transpose and use the QRF. This is subject to changes in an
+*           optimized implementation of CGEJSV.
+*
+            DO 1968 p = 1, NR
+               CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+               CALL CLACGV( N-p+1, V(p,p), 1 )
+ 1968       CONTINUE
+*
+*           .. the following two loops perturb small entries to avoid
+*           denormals in the second QR factorization, where they are
+*           as good as zeros. This is done to avoid painfully slow
+*           computation with denormals. The relative size of the perturbation
+*           is a parameter that can be changed by the implementer.
+*           This perturbation device will be obsolete on machines with
+*           properly implemented arithmetic.
+*           To switch it off, set L2PERT=.FALSE. To remove it from  the
+*           code, remove the action under L2PERT=.TRUE., leave the ELSE part.
+*           The following two loops should be blocked and fused with the
+*           transposed copy above.
+*
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 2969 q = 1, NR
+                  CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)
+                  DO 2968 p = 1, N
+                     IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
+     $                   .OR. ( p .LT. q ) )
+*     $                   V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
+     $                   V(p,q) = CTEMP
+                     IF ( p .LT. q ) V(p,q) = - V(p,q)
+ 2968             CONTINUE
+ 2969          CONTINUE
+            ELSE
+               CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
+            END IF
+*
+*           Estimate the row scaled condition number of R1
+*           (If R1 is rectangular, N > NR, then the condition number
+*           of the leading NR x NR submatrix is estimated.)
+*
+            CALL CLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )
+            DO 3950 p = 1, NR
+               TEMP1 = SCNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)
+               CALL CSSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)
+ 3950       CONTINUE
+            CALL CPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,
+     $                   CWORK(2*N+NR*NR+1),RWORK,IERR)
+            CONDR1 = ONE / SQRT(TEMP1)
+*           .. here need a second oppinion on the condition number
+*           .. then assume worst case scenario
+*           R1 is OK for inverse <=> CONDR1 .LT. REAL(N)
+*           more conservative    <=> CONDR1 .LT. SQRT(REAL(N))
+*
+            COND_OK = SQRT(SQRT(REAL(NR)))
+*[TP]       COND_OK is a tuning parameter.
+*
+            IF ( CONDR1 .LT. COND_OK ) THEN
+*              .. the second QRF without pivoting. Note: in an optimized
+*              implementation, this QRF should be implemented as the QRF
+*              of a lower triangular matrix.
+*              R1^* = Q2 * R2
+               CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $              LWORK-2*N, IERR )
+*
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)/EPSLN
+                  DO 3959 p = 2, NR
+                     DO 3958 q = 1, p - 1
+                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                              ZERO)
+                        IF ( ABS(V(q,p)) .LE. TEMP1 )
+*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
+     $                     V(q,p) = CTEMP
+ 3958                CONTINUE
+ 3959             CONTINUE
+               END IF
+*
+               IF ( NR .NE. N )
+     $         CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
+*              .. save ...
+*
+*           .. this transposed copy should be better than naive
+               DO 1969 p = 1, NR - 1
+                  CALL CCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )
+                  CALL CLACGV(NR-p+1, V(p,p), 1 )
+ 1969          CONTINUE
+               V(NR,NR)=CONJG(V(NR,NR))
+*
+               CONDR2 = CONDR1
+*
+            ELSE
+*
+*              .. ill-conditioned case: second QRF with pivoting
+*              Note that windowed pivoting would be equaly good
+*              numerically, and more run-time efficient. So, in
+*              an optimal implementation, the next call to CGEQP3
+*              should be replaced with eg. CALL CGEQPX (ACM TOMS #782)
+*              with properly (carefully) chosen parameters.
+*
+*              R1^* * P2 = Q2 * R2
+               DO 3003 p = 1, NR
+                  IWORK(N+p) = 0
+ 3003          CONTINUE
+               CALL CGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),
+     $                  CWORK(2*N+1), LWORK-2*N, RWORK, IERR )
+**               CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+**     $              LWORK-2*N, IERR )
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)
+                  DO 3969 p = 2, NR
+                     DO 3968 q = 1, p - 1
+                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                                ZERO)
+                        IF ( ABS(V(q,p)) .LE. TEMP1 )
+*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
+     $                     V(q,p) = CTEMP
+ 3968                CONTINUE
+ 3969             CONTINUE
+               END IF
+*
+               CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
+*
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)
+                  DO 8970 p = 2, NR
+                     DO 8971 q = 1, p - 1
+                        CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                               ZERO)
+*                        V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )
+                        V(p,q) = - CTEMP
+ 8971                CONTINUE
+ 8970             CONTINUE
+               ELSE
+                  CALL CLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )
+               END IF
+*              Now, compute R2 = L3 * Q3, the LQ factorization.
+               CALL CGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),
+     $               CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )
+*              .. and estimate the condition number
+               CALL CLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )
+               DO 4950 p = 1, NR
+                  TEMP1 = SCNRM2( p, CWORK(2*N+N*NR+NR+p), NR )
+                  CALL CSSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )
+ 4950          CONTINUE
+               CALL CPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,
+     $              CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )
+               CONDR2 = ONE / SQRT(TEMP1)
+*
+*
+               IF ( CONDR2 .GE. COND_OK ) THEN
+*                 .. save the Householder vectors used for Q3
+*                 (this overwrittes the copy of R2, as it will not be
+*                 needed in this branch, but it does not overwritte the
+*                 Huseholder vectors of Q2.).
+                  CALL CLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )
+*                 .. and the rest of the information on Q3 is in
+*                 WORK(2*N+N*NR+1:2*N+N*NR+N)
+               END IF
+*
+            END IF
+*
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 4968 q = 2, NR
+                  CTEMP = XSC * V(q,q)
+                  DO 4969 p = 1, q - 1
+*                     V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )
+                     V(p,q) = - CTEMP
+ 4969             CONTINUE
+ 4968          CONTINUE
+            ELSE
+               CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )
+            END IF
+*
+*        Second preconditioning finished; continue with Jacobi SVD
+*        The input matrix is lower trinagular.
+*
+*        Recover the right singular vectors as solution of a well
+*        conditioned triangular matrix equation.
+*
+            IF ( CONDR1 .LT. COND_OK ) THEN
+*
+               CALL CGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,
+     $              CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,
+     $              LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               DO 3970 p = 1, NR
+                  CALL CCOPY(  NR, V(1,p), 1, U(1,p), 1 )
+                  CALL CSSCAL( NR, SVA(p),    V(1,p), 1 )
+ 3970          CONTINUE
+
+*        .. pick the right matrix equation and solve it
+*
+               IF ( NR .EQ. N ) THEN
+* :))             .. best case, R1 is inverted. The solution of this matrix
+*                 equation is Q2*V2 = the product of the Jacobi rotations
+*                 used in CGESVJ, premultiplied with the orthogonal matrix
+*                 from the second QR factorization.
+                  CALL CTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)
+               ELSE
+*                 .. R1 is well conditioned, but non-square. Adjoint of R2
+*                 is inverted to get the product of the Jacobi rotations
+*                 used in CGESVJ. The Q-factor from the second QR
+*                 factorization is then built in explicitly.
+                  CALL CTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),
+     $                 N,V,LDV)
+                  IF ( NR .LT. N ) THEN
+                  CALL CLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)
+                  CALL CLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)
+                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+                  END IF
+                  CALL CUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $                V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)
+               END IF
+*
+            ELSE IF ( CONDR2 .LT. COND_OK ) THEN
+*
+*              The matrix R2 is inverted. The solution of the matrix equation
+*              is Q3^* * V3 = the product of the Jacobi rotations (appplied to
+*              the lower triangular L3 from the LQ factorization of
+*              R2=L3*Q3), pre-multiplied with the transposed Q3.
+               CALL CGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,
+     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
+     $              RWORK, LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               DO 3870 p = 1, NR
+                  CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 )
+                  CALL CSSCAL( NR, SVA(p),    U(1,p), 1 )
+ 3870          CONTINUE
+               CALL CTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,
+     $                    U,LDU)
+*              .. apply the permutation from the second QR factorization
+               DO 873 q = 1, NR
+                  DO 872 p = 1, NR
+                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
+ 872              CONTINUE
+                  DO 874 p = 1, NR
+                     U(p,q) = CWORK(2*N+N*NR+NR+p)
+ 874              CONTINUE
+ 873           CONTINUE
+               IF ( NR .LT. N ) THEN
+                  CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+                  CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+               END IF
+               CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+            ELSE
+*              Last line of defense.
+* #:(          This is a rather pathological case: no scaled condition
+*              improvement after two pivoted QR factorizations. Other
+*              possibility is that the rank revealing QR factorization
+*              or the condition estimator has failed, or the COND_OK
+*              is set very close to ONE (which is unnecessary). Normally,
+*              this branch should never be executed, but in rare cases of
+*              failure of the RRQR or condition estimator, the last line of
+*              defense ensures that CGEJSV completes the task.
+*              Compute the full SVD of L3 using CGESVJ with explicit
+*              accumulation of Jacobi rotations.
+               CALL CGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,
+     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
+     $                         RWORK, LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               IF ( NR .LT. N ) THEN
+                  CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+                  CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+                  CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+               END IF
+               CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+*
+               CALL CUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,
+     $              CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),
+     $              LWORK-2*N-N*NR-NR, IERR )
+               DO 773 q = 1, NR
+                  DO 772 p = 1, NR
+                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
+ 772              CONTINUE
+                  DO 774 p = 1, NR
+                     U(p,q) = CWORK(2*N+N*NR+NR+p)
+ 774              CONTINUE
+ 773           CONTINUE
+*
+            END IF
+*
+*           Permute the rows of V using the (column) permutation from the
+*           first QRF. Also, scale the columns to make them unit in
+*           Euclidean norm. This applies to all cases.
+*
+            TEMP1 = SQRT(REAL(N)) * EPSLN
+            DO 1972 q = 1, N
+               DO 972 p = 1, N
+                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
+  972          CONTINUE
+               DO 973 p = 1, N
+                  V(p,q) = CWORK(2*N+N*NR+NR+p)
+  973          CONTINUE
+               XSC = ONE / SCNRM2( N, V(1,q), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $           CALL CSSCAL( N, XSC, V(1,q), 1 )
+ 1972       CONTINUE
+*           At this moment, V contains the right singular vectors of A.
+*           Next, assemble the left singular vector matrix U (M x N).
+            IF ( NR .LT. M ) THEN
+               CALL CLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)
+               IF ( NR .LT. N1 ) THEN
+                  CALL CLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)
+                  CALL CLASET('A',M-NR,N1-NR,CZERO,CONE,
+     $                        U(NR+1,NR+1),LDU)
+               END IF
+            END IF
+*
+*           The Q matrix from the first QRF is built into the left singular
+*           matrix U. This applies to all cases.
+*
+            CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $           LDU, CWORK(N+1), LWORK-N, IERR )
+
+*           The columns of U are normalized. The cost is O(M*N) flops.
+            TEMP1 = SQRT(REAL(M)) * EPSLN
+            DO 1973 p = 1, NR
+               XSC = ONE / SCNRM2( M, U(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $          CALL CSSCAL( M, XSC, U(1,p), 1 )
+ 1973       CONTINUE
+*
+*           If the initial QRF is computed with row pivoting, the left
+*           singular vectors must be adjusted.
+*
+            IF ( ROWPIV )
+     $          CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         ELSE
+*
+*        .. the initial matrix A has almost orthogonal columns and
+*        the second QRF is not needed
+*
+            CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 5970 p = 2, N
+                  CTEMP = XSC * CWORK( N + (p-1)*N + p )
+                  DO 5971 q = 1, p - 1
+*                     CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /
+*     $                                        ABS(CWORK(N+(p-1)*N+q)) )
+                     CWORK(N+(q-1)*N+p)=-CTEMP
+ 5971             CONTINUE
+ 5970          CONTINUE
+            ELSE
+               CALL CLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )
+            END IF
+*
+            CALL CGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,
+     $           N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,
+     $       INFO )
+*
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+            DO 6970 p = 1, N
+               CALL CCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )
+               CALL CSSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )
+ 6970       CONTINUE
+*
+            CALL CTRSM( 'L', 'U', 'N', 'N', N, N,
+     $           CONE, A, LDA, CWORK(N+1), N )
+            DO 6972 p = 1, N
+               CALL CCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )
+ 6972       CONTINUE
+            TEMP1 = SQRT(REAL(N))*EPSLN
+            DO 6971 p = 1, N
+               XSC = ONE / SCNRM2( N, V(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $            CALL CSSCAL( N, XSC, V(1,p), 1 )
+ 6971       CONTINUE
+*
+*           Assemble the left singular vector matrix U (M x N).
+*
+            IF ( N .LT. M ) THEN
+               CALL CLASET( 'A',  M-N, N, CZERO, CZERO, U(N+1,1), LDU )
+               IF ( N .LT. N1 ) THEN
+                  CALL CLASET('A',N,  N1-N, CZERO, CZERO,  U(1,N+1),LDU)
+                  CALL CLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)
+               END IF
+            END IF
+            CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $           LDU, CWORK(N+1), LWORK-N, IERR )
+            TEMP1 = SQRT(REAL(M))*EPSLN
+            DO 6973 p = 1, N1
+               XSC = ONE / SCNRM2( M, U(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $            CALL CSSCAL( M, XSC, U(1,p), 1 )
+ 6973       CONTINUE
+*
+            IF ( ROWPIV )
+     $         CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         END IF
+*
+*        end of the  >> almost orthogonal case <<  in the full SVD
+*
+         ELSE
+*
+*        This branch deploys a preconditioned Jacobi SVD with explicitly
+*        accumulated rotations. It is included as optional, mainly for
+*        experimental purposes. It does perfom well, and can also be used.
+*        In this implementation, this branch will be automatically activated
+*        if the  condition number sigma_max(A) / sigma_min(A) is predicted
+*        to be greater than the overflow threshold. This is because the
+*        a posteriori computation of the singular vectors assumes robust
+*        implementation of BLAS and some LAPACK procedures, capable of working
+*        in presence of extreme values, e.g. when the singular values spread from
+*        the underflow to the overflow threshold. 
+*
+         DO 7968 p = 1, NR
+            CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+            CALL CLACGV( N-p+1, V(p,p), 1 )
+ 7968    CONTINUE
+*
+         IF ( L2PERT ) THEN
+            XSC = SQRT(SMALL/EPSLN)
+            DO 5969 q = 1, NR
+               CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO)
+               DO 5968 p = 1, N
+                  IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
+     $                .OR. ( p .LT. q ) )
+*     $                V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
+     $                V(p,q) = CTEMP
+                  IF ( p .LT. q ) V(p,q) = - V(p,q)
+ 5968          CONTINUE
+ 5969       CONTINUE
+         ELSE
+            CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
+         END IF
+
+         CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $        LWORK-2*N, IERR )
+         CALL CLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )
+*
+         DO 7969 p = 1, NR
+            CALL CCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )
+            CALL CLACGV( NR-p+1, U(p,p), 1 )
+ 7969    CONTINUE
+
+         IF ( L2PERT ) THEN
+            XSC = SQRT(SMALL/EPSLN)
+            DO 9970 q = 2, NR
+               DO 9971 p = 1, q - 1
+                  CTEMP = CMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),
+     $                           ZERO)
+*                  U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )
+                  U(p,q) = - CTEMP
+ 9971          CONTINUE
+ 9970       CONTINUE
+         ELSE
+            CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+         END IF
+
+         CALL CGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,
+     $        N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,
+     $         RWORK, LRWORK, INFO )
+         SCALEM  = RWORK(1)
+         NUMRANK = NINT(RWORK(2))
+
+         IF ( NR .LT. N ) THEN
+            CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+            CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+            CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )
+         END IF
+
+         CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $        V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+*
+*           Permute the rows of V using the (column) permutation from the
+*           first QRF. Also, scale the columns to make them unit in
+*           Euclidean norm. This applies to all cases.
+*
+            TEMP1 = SQRT(REAL(N)) * EPSLN
+            DO 7972 q = 1, N
+               DO 8972 p = 1, N
+                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
+ 8972          CONTINUE
+               DO 8973 p = 1, N
+                  V(p,q) = CWORK(2*N+N*NR+NR+p)
+ 8973          CONTINUE
+               XSC = ONE / SCNRM2( N, V(1,q), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $           CALL CSSCAL( N, XSC, V(1,q), 1 )
+ 7972       CONTINUE
+*
+*           At this moment, V contains the right singular vectors of A.
+*           Next, assemble the left singular vector matrix U (M x N).
+*
+         IF ( NR .LT. M ) THEN
+            CALL CLASET( 'A',  M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )
+            IF ( NR .LT. N1 ) THEN
+               CALL CLASET('A',NR,  N1-NR, CZERO, CZERO,  U(1,NR+1),LDU)
+               CALL CLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)
+            END IF
+         END IF
+*
+         CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $        LDU, CWORK(N+1), LWORK-N, IERR )
+*
+            IF ( ROWPIV )
+     $         CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+*
+         END IF
+         IF ( TRANSP ) THEN
+*           .. swap U and V because the procedure worked on A^*
+            DO 6974 p = 1, N
+               CALL CSWAP( N, U(1,p), 1, V(1,p), 1 )
+ 6974       CONTINUE
+         END IF
+*
+      END IF
+*     end of the full SVD
+*
+*     Undo scaling, if necessary (and possible)
+*
+      IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN
+         CALL SLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )
+         USCAL1 = ONE
+         USCAL2 = ONE
+      END IF
+*
+      IF ( NR .LT. N ) THEN
+         DO 3004 p = NR+1, N
+            SVA(p) = ZERO
+ 3004    CONTINUE
+      END IF
+*
+      RWORK(1) = USCAL2 * SCALEM
+      RWORK(2) = USCAL1
+      IF ( ERREST ) RWORK(3) = SCONDA
+      IF ( LSVEC .AND. RSVEC ) THEN
+         RWORK(4) = CONDR1
+         RWORK(5) = CONDR2
+      END IF
+      IF ( L2TRAN ) THEN
+         RWORK(6) = ENTRA
+         RWORK(7) = ENTRAT
+      END IF
+*
+      IWORK(1) = NR
+      IWORK(2) = NUMRANK
+      IWORK(3) = WARNING
+      IF ( TRANSP ) THEN
+          IWORK(4) =  1 
+      ELSE
+          IWORK(4) = -1
+      END IF 
+      
+*
+      RETURN
+*     ..
+*     .. END OF CGEJSV
+*     ..
+      END
+*
index 5bead53..e151f10 100644 (file)
@@ -92,7 +92,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *>
 *>  where the vi's represent the vectors which define H(i), which are returned
 *>  in the matrix A.  The 1's along the diagonal of V are not stored in A.
-*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/NB), where each
-*>  block is of order NB except for the last block, which is of order
-*>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/MB), where each
+*>  block is of order MB except for the last block, which is of order
+*>  IB = K - (B-1)*MB.  For each of the B blocks, a upper triangular block
+*>  reflector factor is computed: T1, T2, ..., TB.  The MB-by-MB (and IB-by-IB
+*>  for the last block) T's are stored in the MB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE CGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, MB
index 751cb61..f643797 100644 (file)
@@ -83,7 +83,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
@@ -92,8 +92,8 @@
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *  =====================================================================
       RECURSIVE SUBROUTINE CGELQT3( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, M, N, LDT
       PARAMETER ( ZERO = (0.0E+00,0.0E+00))
 *     ..
 *     .. Local Scalars ..
-      INTEGER   I, I1, J, J1, M1, M2, N1, N2, IINFO
+      INTEGER   I, I1, J, J1, M1, M2, IINFO
 *     ..
 *     .. External Subroutines ..
       EXTERNAL  CLARFG, CTRMM, CGEMM, XERBLA
index e4c991a..e35e421 100644 (file)
 *>
 *> \verbatim
 *>
-*> CGEMQRT overwrites the general real M-by-N matrix C with
+*> CGEMLQT overwrites the general real M-by-N matrix C with
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q C            C Q
-*> TRANS = 'C':   Q**C C            C Q**C
+*> TRANS = 'C':   Q**H C            C Q**H
 *>
 *> where Q is a complex orthogonal matrix defined as the product of K
 *> elementary reflectors:
 *>
-*>       Q = H(1) H(2) . . . H(K) = I - V C V**C
+*>       Q = H(1) H(2) . . . H(K) = I - V T V**H
 *>
 *> generated using the compact WY representation as returned by CGELQT.
 *>
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**C from the Left;
-*>          = 'R': apply Q or Q**C from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Transpose, apply Q**C.
+*>          = 'C':  Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
@@ -82,7 +82,9 @@
 *>
 *> \param[in] V
 *> \verbatim
-*>          V is COMPLEX array, dimension (LDV,K)
+*>          V is COMPLEX array, dimension
+*>                               (LDV,M) if SIDE = 'L',
+*>                               (LDV,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
 *>          DGELQT in the first K rows of its array argument A.
 *> \param[in] LDV
 *> \verbatim
 *>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
+*>          The leading dimension of the array V. LDV >= max(1,K).
 *> \endverbatim
 *>
 *> \param[in] T
 *> \verbatim
 *>          T is COMPLEX array, dimension (LDT,K)
 *>          The upper triangular factors of the block reflectors
-*>          as returned by DGELQT, stored as a MB-by-M matrix.
+*>          as returned by DGELQT, stored as a MB-by-K matrix.
 *> \endverbatim
 *>
 *> \param[in] LDT
 *> \verbatim
 *>          C is COMPLEX array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q C, Q**C C, C Q**C or C Q.
+*>          On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE CGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT,
      $                   C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, RIGHT, TRAN, NOTRAN
-      INTEGER            I, IB, LDWORK, KF, Q
+      INTEGER            I, IB, LDWORK, KF
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 2b8bb69..ef9c1c3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEcomputational
 *
 *>  block is of order NB except for the last block, which is of order
 *>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
 *>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  for the last block) T's are stored in the NB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE CGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, NB
index 7837e0f..2b0fb21 100644 (file)
@@ -1,4 +1,4 @@
-*> \brief <b> CGESV computes the solution to system of linear equations A * X = B for GE matrices</b> (simple driver) </b>
+*> \brief <b> CGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) </b>
 *
 *  =========== DOCUMENTATION ===========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEsolve
 *
 *  =====================================================================
       SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, N, NRHS
index fdfb973..5b08d57 100644 (file)
      $                    IL, IU, NS, S, U, LDU, VT, LDVT, WORK,
      $                    LWORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           CGEBRD, CGELQF, CGEQRF, CLASCL, CLASET,
-     $                   SLASCL, XERBLA
+     $                   CUNMBR, CUNMQR, CUNMLQ, CLACPY, 
+     $                   SBDSVDX, SLASCL, XERBLA
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 8dc6280..2a5ced2 100644 (file)
@@ -52,7 +52,7 @@
 *
 *> \param[in] JOBA
 *> \verbatim
-*>          JOBA is CHARACTER* 1
+*>          JOBA is CHARACTER*1
 *>          Specifies the structure of A.
 *>          = 'L': The input matrix A is lower triangular;
 *>          = 'U': The input matrix A is upper triangular;
 *>
 *> \param[in,out] CWORK
 *> \verbatim
-*>          CWORK is COMPLEX array, dimension max(1,LWORK).
+*>          CWORK is COMPLEX array, dimension (max(1,LWORK))
 *>          Used as workspace.
 *>          If on entry LWORK .EQ. -1, then a workspace query is assumed and
 *>          no computation is done; CWORK(1) is set to the minial (and optimal)
 *>
 *> \param[in,out] RWORK
 *> \verbatim
-*>          RWORK is REAL array, dimension max(6,LRWORK).
+*>          RWORK is REAL array, dimension (max(6,LRWORK))
 *>          On entry,
 *>          If JOBU .EQ. 'C' :
 *>          RWORK(1) = CTOL, where CTOL defines the threshold for convergence.
 *> \par References:
 *  ================
 *>
+*> \verbatim
+*>
 *> [1] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
 *>    singular value decomposition on a vector computer.
 *>    SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
       SUBROUTINE CGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
      $                   LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
 *     ..
 *     from BLAS
-      EXTERNAL           CCOPY, CROT, CSSCAL, CSWAP
+      EXTERNAL           CCOPY, CROT, CSSCAL, CSWAP, CAXPY
 *     from LAPACK
       EXTERNAL           CLASCL, CLASET, CLASSQ, SLASCL, XERBLA
       EXTERNAL           CGSVJ0, CGSVJ1
index 56fb806..e7c5d81 100644 (file)
@@ -53,7 +53,7 @@
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N': the linear system involves A;
-*>          = 'C': the linear system involves A**C.
+*>          = 'C': the linear system involves A**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEsolve
 *
       SUBROUTINE CGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB,
      $                    WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       INTEGER            I, IASCL, IBSCL, J, MINMN, MAXMN, BROW,
      $                   SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2,
      $                   WSIZEO, WSIZEM, INFO2
-      REAL               ANRM, BIGNUM, BNRM, SMLNUM
-      COMPLEX            TQ( 5 ), WORKQ
+      REAL               ANRM, BIGNUM, BNRM, SMLNUM, DUM( 1 )
+      COMPLEX            TQ( 5 ), WORKQ( 1 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
        IF( M.GE.N ) THEN
          CALL CGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL CGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL CGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL CGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZM, B, LDB, WORKQ, -1, INFO2 )
-         LWM = MAX( LWM, INT( WORKQ ) )
+         LWM = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        ELSE
          CALL CGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL CGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL CGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL CGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWM  = MAX( LWM, INT( WORKQ ) )
+         LWM  = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        END IF
 *
 *     Scale A, B if max element outside range [SMLNUM,BIGNUM]
 *
-      ANRM = CLANGE( 'M', M, N, A, LDA, WORK )
+      ANRM = CLANGE( 'M', M, N, A, LDA, DUM )
       IASCL = 0
       IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
 *
       IF ( TRAN ) THEN
         BROW = N
       END IF
-      BNRM = CLANGE( 'M', BROW, NRHS, B, LDB, WORK )
+      BNRM = CLANGE( 'M', BROW, NRHS, B, LDB, DUM )
       IBSCL = 0
       IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
 *
index 4d49647..74169ff 100644 (file)
 *>
 *> \param[in] SELCTG
 *> \verbatim
-*>          SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX arguments
+*>          SELCTG is a LOGICAL FUNCTION of two COMPLEX arguments
 *>          SELCTG must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'N', SELCTG is not referenced.
 *>          If SORT = 'S', SELCTG is used to select eigenvalues to sort
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEeigen
 *
      $                   LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
      $                   IWORK, LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
index a9468a2..b86c9dc 100644 (file)
       SUBROUTINE CGGHD3( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
      $                   LDQ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.1) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CGGHRD, CLARTG, CLASET, CUNM22, CROT, XERBLA
+      EXTERNAL           CGGHRD, CLARTG, CLASET, CUNM22, CROT, CGEMM,
+     $                   CGEMV, CTRMV, CLACPY, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          REAL, CMPLX, CONJG, MAX
index ca81715..80e67a0 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension LWORK.
+*>          WORK is COMPLEX array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
       SUBROUTINE CGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
      $                   SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
 *     ..
 *     from BLAS
-      EXTERNAL           CCOPY, CROT, CSWAP
+      EXTERNAL           CCOPY, CROT, CSWAP, CAXPY
 *     from LAPACK
       EXTERNAL           CLASCL, CLASSQ, XERBLA
 *     ..
index 1689caa..bebcd5c 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>         WORK is COMPLEX array, dimension LWORK.
+*>         WORK is COMPLEX array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
       SUBROUTINE CGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
      $                   EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Subroutines ..
 *     .. from BLAS
-      EXTERNAL           CCOPY, CROT, CSWAP
+      EXTERNAL           CCOPY, CROT, CSWAP, CAXPY
 *     .. from LAPACK
       EXTERNAL           CLASCL, CLASSQ, XERBLA
 *     ..
index 77ddaed..25c9ab7 100644 (file)
 *  Arguments:
 *  ==========
 *
-*> @param[in] n
-*>          The order of the matrix A.
-*>
-*> @param[in] nb
-*>          The size of the band.
-*>
-*> @param[in, out] A
-*>          A pointer to the matrix A.
-*>
-*> @param[in] lda
-*>          The leading dimension of the matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*> \endverbatim
 *>
-*> @param[out] V
-*>          COMPLEX array, dimension 2*n if eigenvalues only are
-*>          requested or to be queried for vectors.
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL which indicate if Eigenvalue are requested or both
+*>          Eigenvalue/Eigenvectors.
+*> \endverbatim
 *>
-*> @param[out] TAU
-*>          COMPLEX array, dimension (2*n).
-*>          The scalar factors of the Householder reflectors are stored
-*>          in this array.
+*> \param[in] TTYPE
+*> \verbatim
+*>          TTYPE is INTEGER
+*> \endverbatim
 *>
-*> @param[in] st
+*> \param[in] ST
+*> \verbatim
+*>          ST is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] ed
+*> \param[in] ED
+*> \verbatim
+*>          ED is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] sweep
+*> \param[in] SWEEP
+*> \verbatim
+*>          SWEEP is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] Vblksiz
-*>          internal parameter for indices.
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER. The order of the matrix A.
+*> \endverbatim
 *>
-*> @param[in] wantz
-*>          logical which indicate if Eigenvalue are requested or both
-*>          Eigenvalue/Eigenvectors.
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER. The size of the band.
+*> \endverbatim
+*>
+*> \param[in] IB
+*> \verbatim
+*>          IB is INTEGER.
+*> \endverbatim
+*>
+*> \param[in, out] A
+*> \verbatim
+*>          A is COMPLEX array. A pointer to the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER. The leading dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX array, dimension 2*n if eigenvalues only are
+*>          requested or to be queried for vectors.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX array, dimension (2*n).
+*>          The scalar factors of the Householder reflectors are stored
+*>          in this array.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER.
+*> \endverbatim
 *>
-*> @param[in] work
-*>          Workspace of size nb.
+*> \param[in] WORK
+*> \verbatim
+*>          WORK is COMPLEX array. Workspace of size nb.
+*> \endverbatim
 *>
 *> \par Further Details:
 *  =====================
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 5ced8c9..179fb5a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHB
-      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SSCAL, SSTERF, XERBLA, CLASCL, CSTEQR,
-     $                   CHETRD_2STAGE
+     $                   CHETRD_2STAGE, CHETRD_HB2ST
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          REAL, SQRT
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'CHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'CHETRD_HB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'CHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'CHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index f8296a4..4002339 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHB
-      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SSCAL, SSTERF, XERBLA, CGEMM, CLACPY,
          LRWMIN = 1
          LIWMIN = 1
       ELSE
-         IB    = ILAENV( 18, 'CHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+         IB    = ILAENV2STAGE( 2, 'CHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
          IF( WANTZ ) THEN
             LWMIN = 2*N**2
             LRWMIN = 1 + 5*N + 2*N**2
index e2cb8ca..ddc95e1 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHB
-      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, CLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SSCAL, SSTEBZ, SSTERF, XERBLA, CCOPY,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'CHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'CHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'CHETRD_HB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'CHETRD_HB2ST', JOBZ, 
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'CHETRD_HB2ST', JOBZ, 
+     $                            N, KD, IB, -1 )
             LWMIN = LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index 8b18dac..6427dd5 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexHEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CHECON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index f324a08..3c6085e 100644 (file)
 *  =====================================================================
       SUBROUTINE CHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
       EXTERNAL           LSAME, SLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CLASSQ
+      EXTERNAL           CLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, AIMAG, INT, LOG, MAX, MIN, REAL, SQRT
index 55a0ed6..a9d04ab 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHE
-      EXTERNAL           LSAME, ILAENV, SLAMCH, CLANHE
+      EXTERNAL           LSAME, SLAMCH, CLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SSCAL, SSTERF, XERBLA, CLASCL, CSTEQR,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index 56e2bac..6b31d4b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHE
-      EXTERNAL           LSAME, ILAENV, SLAMCH, CLANHE
+      EXTERNAL           LSAME, SLAMCH, CLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SSCAL, SSTERF, XERBLA, CLACPY, CLASCL,
             LRWMIN = 1
             LIWMIN = 1
          ELSE
-            KD    = ILAENV( 17, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'CHETRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             IF( WANTZ ) THEN
                LWMIN = 2*N + N*N
                LRWMIN = 1 + 5*N + 2*N**2
index 361addd..20a1cb3 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV, ILAENV2STAGE
       REAL               SLAMCH, CLANSY
-      EXTERNAL           LSAME, ILAENV, SLAMCH, CLANSY
+      EXTERNAL           LSAME, SLAMCH, CLANSY, ILAENV, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SSCAL, SSTEBZ, SSTERF, XERBLA, CSSCAL,
       LQUERY = ( ( LWORK.EQ.-1 ) .OR. ( LRWORK.EQ.-1 ) .OR.
      $         ( LIWORK.EQ.-1 ) )
 *
-      KD     = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-      LHTRD  = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-      LWTRD  = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+      LHTRD  = ILAENV2STAGE( 3, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      LWTRD  = ILAENV2STAGE( 4, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
       LWMIN  = N + LHTRD + LWTRD
       LRWMIN = MAX( 1, 24*N )
       LIWMIN = MAX( 1, 10*N )
index 002dddb..59c2ae8 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, CLANHE
-      EXTERNAL           LSAME, ILAENV, SLAMCH, CLANHE
+      EXTERNAL           LSAME, SLAMCH, CLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SSCAL, SSTEBZ, SSTERF, XERBLA, CSSCAL,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            KD    = ILAENV( 17, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'CHETRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'CHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          END IF
index 11956de..77bc7fc 100644 (file)
@@ -47,7 +47,7 @@
 *> positive definite.
 *> This routine use the 2stage technique for the reduction to tridiagonal
 *> which showed higher performance on recent architecture and for large
-*  sizes N>2000.
+*> sizes N>2000.
 *> \endverbatim
 *
 *  Arguments:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, CHEGST, CPOTRF, CTRMM, CTRSM,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'CHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'CHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'CHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index d087405..0bf636b 100644 (file)
 *>          The length of WORK.  LWORK >= MAX(1,2*N,3*N-2), and for best 
 *>          performance LWORK >= MAX(1,N*NB), where NB is the optimal
 *>          blocksize for CHETRF.
-*>          for LWORK < N, TRS will be done with Level BLAS 2
-*>          for LWORK >= N, TRS will be done with Level BLAS 3
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEsolve
 *
       SUBROUTINE CHESV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                     LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, CHETRF, CHETRS, CHETRS2
+      EXTERNAL           XERBLA, CHETRF_AA, CHETRS_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/chesv_aa_2stage.f b/lapack-netlib/SRC/chesv_aa_2stage.f
new file mode 100644 (file)
index 0000000..057d9c5
--- /dev/null
@@ -0,0 +1,276 @@
+*> \brief <b> CHESV_AA_2STAGE computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CHESV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chesv_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chesv_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chesv_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CHESV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CHESV_AA_2STAGE computes the solution to a complex system of 
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**H,  if UPLO = 'U', or
+*>    A = L * T * L**H,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is Hermitian and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CHESV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            LWKOPT
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           CHETRF_AA_2STAGE, CHETRS_AA_2STAGE,
+     $                   XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CHESV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*
+*     Compute the factorization A = U*T*U**H or A = L*T*L**H.
+*
+      CALL CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL CHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+*     End of CHESV_AA_2STAGE
+*
+      END
index 56d55f6..e7370a4 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension LWORK.
+*>          WORK is COMPLEX array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          VECT, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. Executable Statements ..
 *
 *
 *     Determine the block size, the workspace size and the hous size.
 *
-      KD     = ILAENV( 17, 'CHETRD_2STAGE', VECT, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'CHETRD_2STAGE', VECT, N, KD, -1, -1 )
-      LHMIN  = ILAENV( 19, 'CHETRD_2STAGE', VECT, N, KD, IB, -1 )
-      LWMIN  = ILAENV( 20, 'CHETRD_2STAGE', VECT, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'CHETRD_2STAGE', VECT, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'CHETRD_2STAGE', VECT, N, KD, -1, -1 )
+      LHMIN  = ILAENV2STAGE( 3, 'CHETRD_2STAGE', VECT, N, KD, IB, -1 )
+      LWMIN  = ILAENV2STAGE( 4, 'CHETRD_2STAGE', VECT, N, KD, IB, -1 )
 *      WRITE(*,*),'CHETRD_2STAGE N KD UPLO LHMIN LWMIN ',N, KD, UPLO,
 *     $            LHMIN, LWMIN
 *
index 83c5c26..b96e5db 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHERcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          STAGE1, UPLO, VECT
       COMPLEX            TMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CHB2ST_KERNELS, CLACPY, CLASET
+      EXTERNAL           CHB2ST_KERNELS, CLACPY, CLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN, MAX, CEILING, REAL
index 677f182..fd8c3fb 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension LWORK.
+*>          WORK is COMPLEX array, dimension (LWORK)
 *>          On exit, if INFO = 0, or if LWORK=-1, 
 *>          WORK(1) returns the size of LWORK.
 *> \endverbatim
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK which should be calculated
-*           by a workspace query. LWORK = MAX(1, LWORK_QUERY)
+*>          by a workspace query. LWORK = MAX(1, LWORK_QUERY)
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *>          this value as the first entry of the WORK array, and no error
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
 *>
 *>  where tau is a complex scalar, and v is a complex vector with
 *>  v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in
-*   A(i+kd+2:n,i), and tau in TAU(i).
+*>  A(i+kd+2:n,i), and tau in TAU(i).
 *>
 *>  The contents of A on exit are illustrated by the following examples
 *>  with n = 5:
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
      $                   TPOS, WPOS, S2POS, S1POS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, CHER2K, CHEMM, CGEMM,
+      EXTERNAL           XERBLA, CHER2K, CHEMM, CGEMM, CCOPY,
      $                   CLARFT, CGELQF, CGEQRF, CLASET
 *     ..
 *     .. Intrinsic Functions ..
index 153a089..2c55648 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
 *  =====================================================================
       SUBROUTINE CHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL      LQUERY, UPPER
-      INTEGER      J, LWKOPT, IINFO
+      INTEGER      J, LWKOPT
       INTEGER      NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       COMPLEX      ALPHA
 *     ..
       EXTERNAL     LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL     XERBLA
+      EXTERNAL     CLAHEF_AA, CGEMM, CCOPY, CSWAP, CSCAL, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC    REAL, CONJG, MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'CHETRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'CHETRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
          A( 1, 1 ) = REAL( A( 1, 1 ) )
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( MAX(1, J), J+1 ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                      IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( J+1, MAX(1, J) ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/chetrf_aa_2stage.f b/lapack-netlib/SRC/chetrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..0fa2ae3
--- /dev/null
@@ -0,0 +1,664 @@
+*> \brief \b CHETRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CHETRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chetrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chetrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chetrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CHETRF_AA_2STAGE computes the factorization of a real hermitian matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a hermitian band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      COMPLEX            ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0E+0, 0.0E+0 ),
+     $                     ONE  = ( 1.0E+0, 0.0E+0 ) )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      COMPLEX            PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+      
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, CCOPY, CLACGV, CLACPY,
+     $                   CLASET, CGBTRF, CGEMM,  CGETRF, 
+     $                   CHEGST, CSWAP, CTRSM 
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CONJG, MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CHETRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'CHETRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*U(I,J) + T(I+1,I)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL CLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL CGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( 1, J*NB+1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL CGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL CHEGST( 1, 'Upper', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               TB( TD+1 + (J*NB+I-1)*LDTB )
+     $            = REAL( TB( TD+1 + (J*NB+I-1)*LDTB ) )
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $               = CONJG( TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB ) )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL CGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -ONE, WORK( NB+1 ), N,
+     $                          A( 1, (J+1)*NB+1 ), LDA,
+     $                     ONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call CGETRF
+*
+               DO K = 1, NB
+                   CALL CCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL CGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+*
+*                  Copy only L-factor
+*
+                   CALL CCOPY( N-K-(J+1)*NB,
+     $                         WORK( K+1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+K+1 ), LDA )
+*
+*                  Transpose U-factor to be copied back into T(J+1, J)
+*
+                   CALL CLACGV( K, WORK( 1+(K-1)*N ), 1 )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL CLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL CLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL CTRSM( 'R', 'U', 'N', 'U', KB, NB, ONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = CONJG( TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB ) )
+                  END DO
+               END DO
+               CALL CLASET( 'Lower', KB, NB, ZERO, ONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL CSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL CSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+                     CALL CLACGV( I2-I1, A( I1, I1+1 ), LDA )
+                     CALL CLACGV( I2-I1-1, A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL CSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL CSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL CLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( J*NB+1, 1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL CGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL CHEGST( 1, 'Lower', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               TB( TD+1 + (J*NB+I-1)*LDTB ) 
+     $            = REAL( TB( TD+1 + (J*NB+I-1)*LDTB ) )
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $               = CONJG( TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB ) )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL CGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL CGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -ONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                          WORK( NB+1 ), N,
+     $                     ONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL CGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL CLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL CLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL CTRSM( 'R', 'L', 'C', 'U', KB, NB, ONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = CONJG( TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB ) )
+                  END DO
+               END DO
+               CALL CLASET( 'Upper', KB, NB, ZERO, ONE, 
+     $                      A( (J+1)*NB+1, J*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL CSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL CSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+                     CALL CLACGV( I2-I1, A( I1+1, I1 ), 1 )
+                     CALL CLACGV( I2-I1-1, A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL CSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL CSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL CLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of CHETRF_AA_2STAGE
+*
+      END
index 684bacf..722d130 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
 *  =====================================================================
       SUBROUTINE CHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CHETRI2X
+      EXTERNAL           CHETRI2X, CHETRI, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 8f1527d..0b31f53 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CHETRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CHETRI_3X
+      EXTERNAL           CHETRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index c8fc3d9..d4cddc1 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexHEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE CHETRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index ade0a15..c7c77b9 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexHEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CHETRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index f6640c5..50e5692 100644 (file)
@@ -66,7 +66,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX array, dimension (LDA,N)
 *>          Details of factors computed by CHETRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexHEcomputational
 *
       SUBROUTINE CHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CGTSV, CSWAP, CTRSM, XERBLA
+      EXTERNAL           CLACPY, CLACGV, CGTSV, CSWAP, CTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/chetrs_aa_2stage.f b/lapack-netlib/SRC/chetrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..3f85766
--- /dev/null
@@ -0,0 +1,283 @@
+*> \brief \b CHETRS_AA_2STAGE
+*
+* @generated from SRC/dsytrs_aa_2stage.f, fortran d -> c, Mon Oct 30 11:59:02 2017
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CHETRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/chetrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/chetrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/chetrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CHETRS_AA_2STAGE solves a system of linear equations A*X = B with a real
+*> hermitian matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by CHETRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          Details of factors computed by CHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          Details of factors computed by CHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          CHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          CHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      COMPLEX            ONE
+      PARAMETER          ( ONE = ( 1.0E+0, 0.0E+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           CGBTRS, CLASWP, CTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CHETRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL CTRSM( 'L', 'U', 'C', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL CGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL CTRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL CTRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL CGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL CTRSM( 'L', 'L', 'C', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of CHETRS_AA_2STAGE
+*
+      END
index 4415180..888ecd4 100644 (file)
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGBcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
index 6a3eef1..38a9492 100644 (file)
@@ -89,7 +89,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexHEcomputational
 *
       SUBROUTINE CLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index 7af5441..c69589d 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by CHETRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexHEcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 73184d7..3a3409c 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by CPOTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexPOcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 362d455..e1d3df9 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array of DIMENSION ( LDA, n ).
+*>          A is COMPLEX array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
       SUBROUTINE CLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index f99801c..5d2fa0c 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by CSYTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 87bcb1b..7830222 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX array dimension (NB)
+*>          TAUQ is COMPLEX array, dimension (NB)
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
       SUBROUTINE CLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
      $                   LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDX, LDY, M, N, NB
index f3a9add..88bc3d2 100644 (file)
 *  ===========
 *
 *       SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER    UPLO
-*       INTEGER      J1, M, NB, LDA, LDH, INFO
+*       INTEGER      J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER      IPIV( * )
 *>          WORK is COMPLEX workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                      H, LDH, WORK, INFO )
+     $                      H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER    UPLO
-      INTEGER      M, NB, J1, LDA, LDH, INFO
+      INTEGER      M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER      IPIV( * )
       PARAMETER    ( ZERO = (0.0E+0, 0.0E+0), ONE = (1.0E+0, 0.0E+0) )
 *
 *     .. Local Scalars ..
-      INTEGER      J, K, K1, I1, I2
+      INTEGER      J, K, K1, I1, I2, MJ
       COMPLEX      PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL     LSAME, ILAENV, ICAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL     XERBLA
+      EXTERNAL     CLACGV, CGEMV, CSCAL, CAXPY, CCOPY, CSWAP, CLASET,
+     $             XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC    REAL, CONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
 *        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
 *         where H(J:N, J) has been initialized to be A(J, J:N)
 *           first column
 *
             CALL CLACGV( J-K1, A( 1, J ), 1 )
-            CALL CGEMV( 'No transpose', M-J+1, J-K1,
+            CALL CGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
 *
 *        Copy H(i:n, i) into WORK
 *
-         CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL CCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
 *            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
 *
             ALPHA = -CONJG( A( K-1, J ) )
-            CALL CAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL CAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                END IF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
                CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
 *        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
 *         where H(J:N, J) has been initialized to be A(J:N, J)
 *           first column
 *
             CALL CLACGV( J-K1, A( J, 1 ), LDA )
-            CALL CGEMV( 'No transpose', M-J+1, J-K1,
+            CALL CGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
 *
 *        Copy H(J:N, J) into WORK
 *
-         CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL CCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -CONJG( A( J, K-1 ) )
-            CALL CAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL CAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
                CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (J.EQ.M)
-     $          .AND. (INFO.EQ.0) ) INFO = J
          END IF
          J = J + 1
          GO TO 30
index 8a81792..004d68f 100644 (file)
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array.
-*>         The dimension must be at least 3 * N
+*>          IWORK is INTEGER array, dimension (3*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERcomputational
 *
      $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
index fd19f0a..f2f9ab7 100644 (file)
@@ -23,7 +23,7 @@
 *>
 *>                    SIDE = 'L'     SIDE = 'R'
 *>    TRANS = 'N':      Q * C          C * Q
-*>    TRANS = 'T':      Q**T * C       C * Q**T
+*>    TRANS = 'T':      Q**H * C       C * Q**H
 *>    where Q is a real orthogonal matrix defined as the product of blocked
 *>    elementary reflectors computed by short wide LQ
 *>    factorization (CLASWLQ)
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**T from the Left;
-*>          = 'R': apply Q or Q**T from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'T':  Transpose, apply Q**T.
+*>          = 'C':  Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >=0.
+*>          The number of rows of the matrix C.  M >=0.
 *> \endverbatim
 *>
 *> \param[in] N
 *>
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is COMPLEX array, dimension (LDA,K)
+*>          A is COMPLEX array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the blocked
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          DLASWLQ in the first k rows of its array argument A.
+*>          CLASWLQ in the first k rows of its array argument A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          C is COMPLEX array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
       SUBROUTINE CLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $    LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
 *     ..
 *     .. Local Scalars ..
       LOGICAL    LEFT, RIGHT, TRAN, NOTRAN, LQUERY
-      INTEGER    I, II, KK, LW , CTR
+      INTEGER    I, II, KK, LW, CTR
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index a787caa..77d09a5 100644 (file)
@@ -23,7 +23,7 @@
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**C * C       C * Q**C
+*> TRANS = 'C':      Q**H * C       C * Q**H
 *>      where Q is a real orthogonal matrix defined as the product
 *>      of blocked elementary reflectors computed by tall skinny
 *>      QR factorization (CLATSQR)
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**T from the Left;
-*>          = 'R': apply Q or Q**T from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Conjugate Transpose, apply Q**C.
+*>          = 'C':  Conjugate Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
@@ -81,7 +81,7 @@
 *>          N >= NB >= 1.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX array, dimension (LDA,K)
 *>          The i-th column must contain the vector which defines the
 *> \verbatim
 *>          C is COMPLEX array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
       SUBROUTINE CLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $        LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
index d3141e8..b76bedf 100644 (file)
 *
 *> \param[in] N
 *> \verbatim
-*>          N is integer
+*>          N is INTEGER
 *>              Order of the matrix H. N must be either 2 or 3.
 *> \endverbatim
 *>
 *> \param[in] H
 *> \verbatim
-*>          H is COMPLEX array of dimension (LDH,N)
+*>          H is COMPLEX array, dimension (LDH,N)
 *>              The 2-by-2 or 3-by-3 matrix H in (*).
 *> \endverbatim
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>              The leading dimension of H as declared in
 *>              the calling procedure.  LDH.GE.N
 *> \endverbatim
@@ -81,7 +81,7 @@
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is COMPLEX array of dimension N
+*>          V is COMPLEX array, dimension (N)
 *>              A scalar multiple of the first column of the
 *>              matrix K in (*).
 *> \endverbatim
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX            S1, S2
index aead5d6..03e9760 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SH
 *> \verbatim
-*>          SH is COMPLEX array, dimension KBOT
+*>          SH is COMPLEX array, dimension (KBOT)
 *>          On output, approximate eigenvalues that may
 *>          be used for shifts are stored in SH(KBOT-ND-NS+1)
 *>          through SR(KBOT-ND).  Converged eigenvalues are
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension LWORK.
+*>          WORK is COMPLEX array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
      $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
      $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
index eff3f01..660a583 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SH
 *> \verbatim
-*>          SH is COMPLEX array, dimension KBOT
+*>          SH is COMPLEX array, dimension (KBOT)
 *>          On output, approximate eigenvalues that may
 *>          be used for shifts are stored in SH(KBOT-ND-NS+1)
 *>          through SR(KBOT-ND).  Converged eigenvalues are
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension LWORK.
+*>          WORK is COMPLEX array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
      $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
      $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 573b1aa..647fa67 100644 (file)
 *>
 *> \param[out] INFO
 *> \verbatim
-*> \verbatim
 *>          INFO is INTEGER
 *>             =  0:  successful exit
 *>           .GT. 0:  if INFO = i, CLAQR4 failed to compute all of
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
       SUBROUTINE CLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
      $                   IHIZ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
index 94a5bdf..4c89789 100644 (file)
 *
 *> \param[in] WANTT
 *> \verbatim
-*>          WANTT is logical scalar
+*>          WANTT is LOGICAL
 *>             WANTT = .true. if the triangular Schur factor
 *>             is being computed.  WANTT is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] WANTZ
 *> \verbatim
-*>          WANTZ is logical scalar
+*>          WANTZ is LOGICAL
 *>             WANTZ = .true. if the unitary Schur factor is being
 *>             computed.  WANTZ is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] KACC22
 *> \verbatim
-*>          KACC22 is integer with value 0, 1, or 2.
+*>          KACC22 is INTEGER with value 0, 1, or 2.
 *>             Specifies the computation mode of far-from-diagonal
 *>             orthogonal updates.
 *>        = 0: CLAQR5 does not accumulate reflections and does not
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
+*>          N is INTEGER
 *>             N is the order of the Hessenberg matrix H upon which this
 *>             subroutine operates.
 *> \endverbatim
 *>
 *> \param[in] KTOP
 *> \verbatim
-*>          KTOP is integer scalar
+*>          KTOP is INTEGER
 *> \endverbatim
 *>
 *> \param[in] KBOT
 *> \verbatim
-*>          KBOT is integer scalar
+*>          KBOT is INTEGER
 *>             These are the first and last rows and columns of an
 *>             isolated diagonal block upon which the QR sweep is to be
 *>             applied. It is assumed without a check that
 *>
 *> \param[in] NSHFTS
 *> \verbatim
-*>          NSHFTS is integer scalar
+*>          NSHFTS is INTEGER
 *>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
 *>             must be positive and even.
 *> \endverbatim
 *>
 *> \param[in,out] S
 *> \verbatim
-*>          S is COMPLEX array of size (NSHFTS)
+*>          S is COMPLEX array, dimension (NSHFTS)
 *>             S contains the shifts of origin that define the multi-
 *>             shift QR sweep.  On output S may be reordered.
 *> \endverbatim
 *>
 *> \param[in,out] H
 *> \verbatim
-*>          H is COMPLEX array of size (LDH,N)
+*>          H is COMPLEX array, dimension (LDH,N)
 *>             On input H contains a Hessenberg matrix.  On output a
 *>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
 *>             to the isolated diagonal block in rows and columns KTOP
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer scalar
+*>          LDH is INTEGER
 *>             LDH is the leading dimension of H just as declared in the
 *>             calling procedure.  LDH.GE.MAX(1,N).
 *> \endverbatim
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is COMPLEX array of size (LDZ,IHIZ)
+*>          Z is COMPLEX array, dimension (LDZ,IHIZ)
 *>             If WANTZ = .TRUE., then the QR Sweep unitary
 *>             similarity transformation is accumulated into
 *>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer scalar
+*>          LDZ is INTEGER
 *>             LDA is the leading dimension of Z just as declared in
 *>             the calling procedure. LDZ.GE.N.
 *> \endverbatim
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is COMPLEX array of size (LDV,NSHFTS/2)
+*>          V is COMPLEX array, dimension (LDV,NSHFTS/2)
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>             LDV is the leading dimension of V as declared in the
 *>             calling procedure.  LDV.GE.3.
 *> \endverbatim
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is COMPLEX array of size
-*>             (LDU,3*NSHFTS-3)
+*>          U is COMPLEX array, dimension (LDU,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDU
 *> \verbatim
-*>          LDU is integer scalar
+*>          LDU is INTEGER
 *>             LDU is the leading dimension of U just as declared in the
 *>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>             NH is the number of columns in array WH available for
 *>             workspace. NH.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WH
 *> \verbatim
-*>          WH is COMPLEX array of size (LDWH,NH)
+*>          WH is COMPLEX array, dimension (LDWH,NH)
 *> \endverbatim
 *>
 *> \param[in] LDWH
 *> \verbatim
-*>          LDWH is integer scalar
+*>          LDWH is INTEGER
 *>             Leading dimension of WH just as declared in the
 *>             calling procedure.  LDWH.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer scalar
+*>          NV is INTEGER
 *>             NV is the number of rows in WV agailable for workspace.
 *>             NV.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WV
 *> \verbatim
-*>          WV is COMPLEX array of size
-*>             (LDWV,3*NSHFTS-3)
+*>          WV is COMPLEX array, dimension (LDWV,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer scalar
+*>          LDWV is INTEGER
 *>             LDWV is the leading dimension of WV as declared in the
 *>             in the calling subroutine.  LDWV.GE.NV.
 *> \endverbatim
      $                   H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
      $                   WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 4c0c5f7..d54c227 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE CLARFG( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             BETA = BETA*RSAFMN
             ALPHI = ALPHI*RSAFMN
             ALPHR = ALPHR*RSAFMN
-            IF( ABS( BETA ).LT.SAFMIN .AND. KNT .LT. 1000)
+            IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SAFMIN
index 75cfd8c..19e48cc 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE CLARFGP( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             BETA = BETA*BIGNUM
             ALPHI = ALPHI*BIGNUM
             ALPHR = ALPHR*BIGNUM
-            IF( ABS( BETA ).LT.SMLNUM .AND. KNT .LT. 1000 )
+            IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SMLNUM
index 1e1a309..72fe1f9 100644 (file)
 *>
 *> \param[out] Z
 *> \verbatim
-*>          Z is array, dimension (LDZ, max(1,M) )
+*>          Z is COMPLEX array, dimension (LDZ, max(1,M) )
 *>          If INFO = 0, the first M columns of Z contain the
 *>          orthonormal eigenvectors of the matrix T
 *>          corresponding to the input eigenvalues, with the i-th
      $                   IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     The first N entries of WORK are reserved for the eigenvalues
       INDLD = N+1
       INDLLD= 2*N+1
index 8b77142..5fa2276 100644 (file)
@@ -55,7 +55,7 @@
 *> \verbatim
 *>          A is COMPLEX array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the elements on and bleow the diagonal
+*>          On exit, the elements on and below the diagonal
 *>          of the array contain the N-by-N lower triangular matrix L;
 *>          the elements above the diagonal represent Q by the rows
 *>          of blocked V (see Further Details).
       SUBROUTINE CLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
      $                  INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER           INFO, LDA, M, N, MB, NB, LWORK, LDT
index 8b5632c..9f8a2dc 100644 (file)
 *> \verbatim
 *>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
 *>          The vector of pivot indices. Only the elements in positions
-*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
-*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*>          K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed.
+*>          IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be
+*>          interchanged.
 *> \endverbatim
 *>
 *> \param[in] INCX
 *> \verbatim
 *>          INCX is INTEGER
-*>          The increment between successive values of IPIV.  If IPIV
+*>          The increment between successive values of IPIV. If INCX
 *>          is negative, the pivots are applied in reverse order.
 *> \endverbatim
 *
@@ -98,7 +99,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE CLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, K1, K2, LDA, N
 *     ..
 *     .. Executable Statements ..
 *
-*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
+*     Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows
+*     K1 through K2.
 *
       IF( INCX.GT.0 ) THEN
          IX0 = K1
index 2c8cdc4..1bc96ee 100644 (file)
 *  ===========
 *
 *       SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            J1, M, NB, LDA, LDH, INFO
+*       INTEGER            J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IPIV( * )
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] IPIV
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
+*>          IPIV is INTEGER array, dimension (M)
 *>          Details of the row and column interchanges,
 *>          the row and column k were interchanged with the row and
 *>          column IPIV(k).
 *>          WORK is REAL workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                      H, LDH, WORK, INFO )
+     $                      H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            M, NB, J1, LDA, LDH, INFO
+      INTEGER            M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER            IPIV( * )
       PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
 *
 *     .. Local Scalars ..
-      INTEGER            J, K, K1, I1, I2
+      INTEGER            J, K, K1, I1, I2, MJ
       COMPLEX            PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL           LSAME, ILAENV, ICAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           CAXPY, CGEMV, CSCAL, CCOPY, CSWAP, CLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
-*         where H(J:N, J) has been initialized to be A(J, J:N)
+*        H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J),
+*         where H(J:M, J) has been initialized to be A(J, J:M)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL CGEMV( 'No transpose', M-J+1, J-K1,
+            CALL CGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(i:n, i) into WORK
+*        Copy H(i:M, i) into WORK
 *
-         CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL CCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J-1, J:N) * T(J-1,J),
-*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
+*           Compute WORK := WORK - L(J-1, J:M) * T(J-1,J),
+*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M)
 *
             ALPHA = -A( K-1, J )
-            CALL CAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL CAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L(J, (J+1):N)
-*            where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N)
+*           Compute WORK(2:M) = T(J, J) L(J, (J+1):M)
+*            where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( K, J )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = ICAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1, I1+1:N) with A(I1+1:N, I2)
+*              Swap A(I1, I1+1:M) with A(I1+1:M, I2)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL CSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA,
      $                              A( J1+I1, I2 ), 1 )
 *
-*              Swap A(I1, I2+1:N) with A(I2, I2+1:N)
+*              Swap A(I1, I2+1:M) with A(I2, I2+1:M)
 *
                CALL CSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA,
      $                           A( J1+I2-1, I2+1 ), LDA )
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                ENDIF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J:N, J),
+*              Copy A(J+1:M, J+1) into H(J:M, J),
 *
                CALL CCOPY( M-J, A( K+1, J+1 ), LDA,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( K, J+1 ).NE.ZERO ) THEN
                ALPHA = ONE / A( K, J+1 )
                CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
-*         where H(J:N, J) has been initialized to be A(J:N, J)
+*        H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T,
+*         where H(J:M, J) has been initialized to be A(J:M, J)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL CGEMV( 'No transpose', M-J+1, J-K1,
+            CALL CGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(J:N, J) into WORK
+*        Copy H(J:M, J) into WORK
 *
-         CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL CCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J:N, J-1) * T(J-1,J),
+*           Compute WORK := WORK - L(J:M, J-1) * T(J-1,J),
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -A( J, K-1 )
-            CALL CAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL CAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L((J+1):N, J)
-*            where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J)
+*           Compute WORK(2:M) = T(J, J) L((J+1):M, J)
+*            where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( J, K )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = ICAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1+1:N, I1) with A(I2, I1+1:N)
+*              Swap A(I1+1:M, I1) with A(I2, I1+1:M)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL CSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1,
      $                              A( I2, J1+I1 ), LDA )
 *
-*              Swap A(I2+1:N, I1) with A(I2+1:N, I2)
+*              Swap A(I2+1:M, I1) with A(I2+1:M, I2)
 *
                CALL CSWAP( M-I2, A( I2+1, J1+I1-1 ), 1,
      $                           A( I2+1, J1+I2-1 ), 1 )
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J+1:N, J),
+*              Copy A(J+1:M, J+1) into H(J+1:M, J),
 *
                CALL CCOPY( M-J, A( J+1, K+1 ), 1,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( J+1, K ).NE.ZERO ) THEN
                ALPHA = ONE / A( J+1, K )
                CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 30
index 3209f27..98b82c1 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $           ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $           LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index f7e0abb..22ac842 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index a1ff812..47d52dd 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 0e843c3..77ecf46 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE CSYCONVF( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE CSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE CSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index 7a8ba60..1146a97 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE CSYCONVF_ROOK( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE CSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE CSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index ff1f014..b1c5c6f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
       EXTERNAL           LSAME, SLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CLASSQ
+      EXTERNAL           CLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, AIMAG, INT, LOG, MAX, MIN, REAL, SQRT
index 187a6aa..9cd669d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYsolve
 *
       SUBROUTINE CSYSV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                        LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, CSYTRF, CSYTRS, CSYTRS2
+      EXTERNAL           XERBLA, CSYTRF_AA, CSYTRS_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/csysv_aa_2stage.f b/lapack-netlib/SRC/csysv_aa_2stage.f
new file mode 100644 (file)
index 0000000..cba57fc
--- /dev/null
@@ -0,0 +1,276 @@
+*> \brief <b> CSYSV_AA_2STAGE computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CSYSV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csysv_aasen_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csysv_aasen_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csysv_aasen_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CSYSV_AA_2STAGE computes the solution to a complex system of
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**H,  if UPLO = 'U', or
+*>    A = L * T * L**H,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is symmetric and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            LWKOPT
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           CSYTRF_AA_2STAGE, 
+     $                   CSYTRS_AA_2STAGE, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CSYSV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*
+*     Compute the factorization A = U*T*U**H or A = L*T*L**H.
+*
+      CALL CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL CSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+*     End of CSYSV_AA_2STAGE
+*
+      END
index 7fcbb37..2f185b0 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL            LQUERY, UPPER
-      INTEGER            J, LWKOPT, IINFO
+      INTEGER            J, LWKOPT
       INTEGER            NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       COMPLEX            ALPHA
 *     ..
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           CLASYF_AA, CGEMM, CGEMV, CSCAL, CSWAP, CCOPY,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'CSYTRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'CSYTRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       ENDIF
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL CLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                   A( MAX(1, J), J+1 ), LDA,
-     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                   IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL CLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                   A( J+1, MAX(1, J) ), LDA,
-     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/csytrf_aa_2stage.f b/lapack-netlib/SRC/csytrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..0a6bfbe
--- /dev/null
@@ -0,0 +1,668 @@
+*> \brief \b CSYTRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CSYTRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CSYTRF_AA_2STAGE computes the factorization of a complex symmetric matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a complex symmetric band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      COMPLEX            CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0E+0, 0.0E+0 ),
+     $                     CONE  = ( 1.0E+0, 0.0E+0 ) )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      COMPLEX            PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           CCOPY, CGBTRF, CGEMM, CGETRF, CLACPY,  
+     $                   CLASET, CTRSM, CSWAP, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CSYTRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'CSYTRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*U(I,J) + T(I+1,I)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                           A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. J-1) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                           A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL CLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL CGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -CONE, A( 1, J*NB+1 ), LDA,
+     $                       WORK( NB+1 ), N,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL CGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 CONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 CZERO, WORK( 1 ), N )
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -CONE, WORK( 1 ), N,
+     $                       A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $                = TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+               END DO
+            END DO
+            IF( J.GT.0 ) THEN 
+c               CALL CHEGST( 1, 'Upper', KB, 
+c     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+c     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+               CALL CTRSM( 'L', 'U', 'T', 'N', KB, KB, CONE,
+     $                     A( (J-1)*NB+1, J*NB+1 ), LDA, 
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+               CALL CTRSM( 'R', 'U', 'N', 'N', KB, KB, CONE,
+     $                     A( (J-1)*NB+1, J*NB+1 ), LDA, 
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       CONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                              A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       CZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      CONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                             A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      CZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL CGEMM( 'Transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -CONE, WORK( NB+1 ), N,
+     $                           A( 1, (J+1)*NB+1 ), LDA,
+     $                     CONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call CGETRF
+*
+               DO K = 1, NB
+                   CALL CCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL CGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+                   CALL CCOPY( N-(J+1)*NB,
+     $                         WORK( 1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL CLASET( 'Full', KB, NB, CZERO, CZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL CLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL CTRSM( 'R', 'U', 'N', 'U', KB, NB, CONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL CLASET( 'Lower', KB, NB, CZERO, CONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL CSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL CSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL CSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL CSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    CONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                          A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL CGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                           A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL CLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -CONE, A( J*NB+1, 1 ), LDA,
+     $                       WORK( NB+1 ), N,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 CONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 CZERO, WORK( 1 ), N )
+               CALL CGEMM( 'NoTranspose', 'Transpose',
+     $                 KB, KB, NB,
+     $                -CONE, WORK( 1 ), N,
+     $                       A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+            IF( J.GT.0 ) THEN 
+c               CALL CHEGST( 1, 'Lower', KB, 
+c     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+c     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+               CALL CTRSM( 'L', 'L', 'N', 'N', KB, KB, CONE,
+     $                     A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+               CALL CTRSM( 'R', 'L', 'T', 'N', KB, KB, CONE,
+     $                     A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Symmetrize T(J,J)
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL CGEMM( 'NoTranspose', 'Transpose',
+     $                       KB, KB, KB,
+     $                       CONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                              A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       CZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL CGEMM( 'NoTranspose', 'Transpose',
+     $                      KB, KB, NB+KB,
+     $                      CONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                             A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      CZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL CGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -CONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                           WORK( NB+1 ), N,
+     $                     CONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL CGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL CLASET( 'Full', KB, NB, CZERO, CZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL CLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL CTRSM( 'R', 'L', 'T', 'U', KB, NB, CONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB ) =
+     $                  TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL CLASET( 'Upper', KB, NB, CZERO, CONE, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL CSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL CSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL CSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL CSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL CLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL CGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of CSYTRF_AA_2STAGE
+*
+      END
index 34058cb..4c6baaa 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CSYTRI, CSYTRI2X
+      EXTERNAL           CSYTRI, CSYTRI2X, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 046d613..151f063 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX array, dimension (N+NNB+1,NNB+3)
+*>          WORK is COMPLEX array, dimension (N+NB+1,NB+3)
 *> \endverbatim
 *>
 *> \param[in] NB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  =====================================================================
       SUBROUTINE CSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 43abc6a..d618c26 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CSYTRI_3X
+      EXTERNAL           CSYTRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index 2865839..5a81ee3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE CSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index b0e868e..8008c5d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE CSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 6fedf91..7cf9504 100644 (file)
@@ -66,7 +66,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is REAL array, dimension (LDA,N)
 *>          Details of factors computed by CSYTRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexSYcomputational
 *
       SUBROUTINE CSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CGTSV, CSWAP, CTRSM, XERBLA
+      EXTERNAL           CLACPY, CGTSV, CSWAP, CTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/csytrs_aa_2stage.f b/lapack-netlib/SRC/csytrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..03bccda
--- /dev/null
@@ -0,0 +1,281 @@
+*> \brief \b CSYTRS_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download CSYTRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csytrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csytrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csytrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE CSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX            A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CSYTRS_AA_2STAGE solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by CSYTRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          Details of factors computed by CSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          Details of factors computed by CSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          CSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          CSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complexSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE CSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX            A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      COMPLEX            ONE
+      PARAMETER          ( ONE  = ( 1.0E+0, 0.0E+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           CGBTRS, CLASWP, CTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'CSYTRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL CTRSM( 'L', 'U', 'T', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL CGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL CTRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL CTRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL CGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL CTRSM( 'L', 'L', 'T', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL CLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of CSYTRS_AA_2STAGE
+*
+      END
index c487e8f..7ac1784 100644 (file)
@@ -76,7 +76,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX arrays, dimensions (LDA,N)
+*>          A is COMPLEX array, dimension (LDA,N)
 *>          On entry, the matrix A in the pair (A, B).
 *>          On exit, the updated matrix A.
 *> \endverbatim
@@ -89,7 +89,7 @@
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is COMPLEX arrays, dimensions (LDB,N)
+*>          B is COMPLEX array, dimension (LDB,N)
 *>          On entry, the matrix B in the pair (A, B).
 *>          On exit, the updated matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is COMPLEX array, dimension (LDZ,N)
+*>          Q is COMPLEX array, dimension (LDQ,N)
 *>          If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
 *>          the updated matrix Q.
 *>          Not referenced if WANTQ = .FALSE..
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEauxiliary
 *
       SUBROUTINE CTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, J1, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index f6ccdcb..ba1c281 100644 (file)
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is COMPLEX array, dimension (LDZ,N)
+*>          Q is COMPLEX array, dimension (LDQ,N)
 *>          On entry, if WANTQ = .TRUE., the unitary matrix Q.
 *>          On exit, the updated matrix Q.
 *>          If WANTQ = .FALSE., Q is not referenced.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexGEcomputational
 *
       SUBROUTINE CTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, IFST, ILST, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index 8f02d0e..8198d45 100644 (file)
@@ -72,7 +72,7 @@
 *
 *> \param[in] IJOB
 *> \verbatim
-*>          IJOB is integer
+*>          IJOB is INTEGER
 *>          Specifies whether condition numbers are required for the
 *>          cluster of eigenvalues (PL and PR) or the deflating subspaces
 *>          (Difu and Difl):
      $                   ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
      $                   WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 322b6dc..cb4d419 100644 (file)
@@ -56,8 +56,8 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array, dimension (LDA,N)
-*>          On entry, the lower triangular N-by-N matrix A.
+*>          A is COMPLEX array, dimension (LDA,M)
+*>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
 *> \endverbatim
@@ -65,7 +65,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ] [ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>          [ B ] = [ B1 ] [ B2 ]
 *>                   [ B1 ]  <- M-by-(N-L) rectangular
-*>                   [ B2 ]  <-     M-by-L upper trapezoidal.
+*>                   [ B2 ]  <-     M-by-L lower trapezoidal.
 *>
 *>  The lower trapezoidal matrix B2 consists of the first L columns of a
-*>  N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
 *>  B is rectangular M-by-N; if M=L=N, B is lower triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th row
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>            [ C ] = [ A ] [ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>            [ W ] = [ I ] [ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
       SUBROUTINE CTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER     INFO, LDA, LDB, LDT, N, M, L, MB
index 1c9b128..b16d614 100644 (file)
@@ -48,7 +48,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX array, dimension (LDA,N)
+*>          A is COMPLEX array, dimension (LDA,M)
 *>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
@@ -57,7 +57,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ][ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>
 *>               C = [ A ][ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>
 *>               W = [ I ][ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
 *  =====================================================================
       SUBROUTINE CTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER        INFO, LDA, LDB, LDT, N, M, L
index b326d6a..cb5f033 100644 (file)
@@ -19,9 +19,9 @@
 *>
 *> \verbatim
 *>
-*> CTPMQRT applies a complex orthogonal matrix Q obtained from a
-*> "triangular-pentagonal" real block reflector H to a general
-*> real matrix C, which consists of two blocks A and B.
+*> CTPMLQT applies a complex orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" complex block reflector H to a general
+*> complex matrix C, which consists of two blocks A and B.
 *> \endverbatim
 *
 *  Arguments:
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**C from the Left;
-*>          = 'R': apply Q or Q**C from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Transpose, apply Q**C.
+*>          = 'C':  Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *>          (LDA,K) if SIDE = 'R'
 *>          On entry, the K-by-N or M-by-K matrix A.
 *>          On exit, A is overwritten by the corresponding block of
-*>          Q*C or Q**C*C or C*Q or C*Q**C.  See Further Details.
+*>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *>          B is COMPLEX array, dimension (LDB,N)
 *>          On entry, the M-by-N matrix B.
 *>          On exit, B is overwritten by the corresponding block of
-*>          Q*C or Q**C*C or C*Q or C*Q**C.  See Further Details.
+*>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>
 *>  If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
 *>
-*>  If TRANS='C' and SIDE='L', C is on exit replaced with Q**C * C.
+*>  If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
 *>
 *>  If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
 *>
-*>  If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**C.
+*>  If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
 *> \endverbatim
 *>
 *  =====================================================================
       SUBROUTINE CTPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
index 025de82..fd3d1b1 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complexOTHERcomputational
 *
       SUBROUTINE CTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           CTPRFB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index bb4c32e..c06b404 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @generated from ztrevc3.f, fortran z -> c, Tue Apr 19 01:47:44 2016
 *
      $                    LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO)
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, CCOPY, CLASET, CSSCAL, CGEMM, CGEMV,
-     $                   CLATRS, SLABAD
+     $                   CLATRS, CLACPY, SLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, REAL, CMPLX, CONJG, AIMAG, MAX
index fdcc686..bfd2147 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE CUNBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index d95276e..ae73699 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE CUNBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, CSCAL, XERBLA
+      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, CSCAL, CLACGV,
+     $                   XERBLA
 *     ..
 *     .. External Functions ..
       REAL               SCNRM2
index a9d05c2..c0abde1 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE CUNBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, XERBLA
+      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, CLACGV, XERBLA
 *     ..
 *     .. External Functions ..
       REAL               SCNRM2
index 8388e4e..803b851 100644 (file)
@@ -33,7 +33,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                    TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
      $                    INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, CSCAL, XERBLA
+      EXTERNAL           CLARF, CLARFGP, CUNBDB5, CSROT, CSCAL, CLACGV,
+     $                   XERBLA
 *     ..
 *     .. External Functions ..
       REAL               SCNRM2
index 006522d..9599745 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE CUNBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index ab7fe8a..05a1389 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE CUNBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 829c4bc..f305291 100644 (file)
 *>
 *> \param[out] U1
 *> \verbatim
-*>          U1 is COMPLEX array, dimension (P)
+*>          U1 is COMPLEX array, dimension (LDU1,P)
 *>          If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
 *> \endverbatim
 *>
 *>
 *> \param[out] U2
 *> \verbatim
-*>          U2 is COMPLEX array, dimension (M-P)
+*>          U2 is COMPLEX array, dimension (LDU2,M-P)
 *>          If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
 *>          matrix U2.
 *> \endverbatim
 *>
 *> \param[out] V1T
 *> \verbatim
-*>          V1T is COMPLEX array, dimension (Q)
+*>          V1T is COMPLEX array, dimension (LDV1T,Q)
 *>          If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
 *>          matrix V1**H.
 *> \endverbatim
 *>
 *> \param[out] V2T
 *> \verbatim
-*>          V2T is COMPLEX array, dimension (M-Q)
+*>          V2T is COMPLEX array, dimension (LDV2T,M-Q)
 *>          If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
 *>          matrix V2**H.
 *> \endverbatim
      $                             LDV2T, WORK, LWORK, RWORK, LRWORK,
      $                             IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 64070ca..1d49885 100644 (file)
@@ -39,7 +39,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                       LDV1T, WORK, LWORK, RWORK, LRWORK, IWORK,
      $                       INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 85c2269..3c6b4c1 100644 (file)
@@ -52,8 +52,8 @@
 *>  N2-by-N2 upper triangular matrix.
 *> \endverbatim
 *
-*  Arguments
-*  =========
+*  Arguments:
+*  ==========
 *
 *> \param[in] SIDE
 *> \verbatim
       SUBROUTINE CUNM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
index d7c7d14..f1df567 100644 (file)
 *>
 *> \param[in,out] V2T
 *> \verbatim
-*>          V2T is DOUBLE PRECISION array, dimenison (LDV2T,M-Q)
+*>          V2T is DOUBLE PRECISION array, dimension (LDV2T,M-Q)
 *>          On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is
 *>          premultiplied by the transpose of the right
 *>          singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
      $                   V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
      $                   B22D, B22E, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index e349b0c..4c8b95f 100644 (file)
       SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       WSTART = 1
       QSTART = 3
       IF( ICOMPQ.EQ.1 ) THEN
-         CALL DCOPY( N,   D, 1, Q( 1 ),   1 )
+         CALL DCOPY( N, D, 1, Q( 1 ), 1 )
          CALL DCOPY( N-1, E, 1, Q( N+1 ), 1 )
       END IF
       IF( IUPLO.EQ.2 ) THEN
          QSTART = 5
-         WSTART = 2*N - 1
+         IF( ICOMPQ .EQ. 2 ) WSTART = 2*N - 1
          DO 10 I = 1, N - 1
             CALL DLARTG( D( I ), E( I ), CS, SN, R )
             D( I ) = R
index c4cfbb3..93db95e 100644 (file)
 *>          algorithm through its inner loop. The algorithms stops
 *>          (and so fails to converge) if the number of passes
 *>          through the inner loop exceeds MAXITR*N**2.
+*>
 *> \endverbatim
 *
 *> \par Note:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
      $                   LDU, C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       ELSE IF( NRU.LT.0 ) THEN
          INFO = -4
       ELSE IF( NCC.LT.0 ) THEN
-         INFO = -5 
+         INFO = -5
       ELSE IF( ( NCVT.EQ.0 .AND. LDVT.LT.1 ) .OR.
      $         ( NCVT.GT.0 .AND. LDVT.LT.MAX( 1, N ) ) ) THEN
          INFO = -9
 *
       IF( M.LE.1 )
      $   GO TO 160
-*     
+*
       IF( ITER.GE.N ) THEN
          ITER = ITER - N
          ITERDIVN = ITERDIVN + 1
-         IF (ITERDIVN.GE.MAXITDIVN )
-     $   GO TO 200
+         IFITERDIVN.GE.MAXITDIVN )
+     $      GO TO 200
       END IF
 *
 *     Find diagonal block of matrix to work on
index 94f52b4..96fdb3d 100644 (file)
       SUBROUTINE DBDSVDX( UPLO, JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
      $                    NS, S, Z, LDZ, WORK, IWORK, INFO)
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
       EXTERNAL           IDAMAX, LSAME, DAXPY, DDOT, DLAMCH, DNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DCOPY, DLASET, DSCAL, DSWAP
+      EXTERNAL           DSTEVX, DCOPY, DLASET, DSCAL, DSWAP, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, SIGN, SQRT
index 93efd28..95876ac 100644 (file)
@@ -67,7 +67,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE array, dimension (LDA,N)
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          On entry, the input matrix A.
 *>          On exit,  A is overwritten by the balanced matrix.
 *>          If JOB = 'N', A is not referenced.
@@ -94,7 +94,7 @@
 *>
 *> \param[out] SCALE
 *> \verbatim
-*>          SCALE is DOUBLE array, dimension (N)
+*>          SCALE is DOUBLE PRECISION array, dimension (N)
 *>          Details of the permutations and scaling factors applied to
 *>          A.  If P(j) is the index of the row and column interchanged
 *>          with row and column j and D(j) is the scaling factor
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
index bb4035d..2bec4e2 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is DOUBLE PRECISION array dimension (min(M,N))
+*>          TAUQ is DOUBLE PRECISION array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
index 885ad9b..56a7abe 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is DOUBLE PRECISION array dimension (min(M,N))
+*>          TAUQ is DOUBLE PRECISION array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
 *     .. Local Scalars ..
       LOGICAL            LQUERY
       INTEGER            I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
-     $                   NBMIN, NX
-      DOUBLE PRECISION   WS
+     $                   NBMIN, NX, WS
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEBD2, DGEMM, DLABRD, XERBLA
index 81c0a21..25ed248 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension at least LWORK.
+*>          WORK is DOUBLE PRECISION array, dimension (LWORK)
 *>          On exit, if N.GT.0 .AND. M.GT.0 (else not referenced),
 *>          WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
 *>                    that SCALE*SVA(1:N) are the computed singular values
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array, dimension M+3*N.
+*>          IWORK is INTEGER array, dimension (M+3*N).
 *>          On exit,
 *>          IWORK(1) = the numerical rank determined after the initial
 *>                     QR factorization with pivoting. See the descriptions
      $                   M, N, A, LDA, SVA, U, LDU, V, LDV,
      $                   WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index b11e9d6..2124f3d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *>
 *>  where the vi's represent the vectors which define H(i), which are returned
 *>  in the matrix A.  The 1's along the diagonal of V are not stored in A.
-*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/NB), where each
-*>  block is of order NB except for the last block, which is of order
-*>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/MB), where each
+*>  block is of order MB except for the last block, which is of order
+*>  IB = K - (B-1)*MB.  For each of the B blocks, a upper triangular block
+*>  reflector factor is computed: T1, T2, ..., TB.  The MB-by-MB (and IB-by-IB
+*>  for the last block) T's are stored in the MB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE DGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, MB
       INTEGER    I, IB, IINFO, K
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL   DGEQRT2, DGEQRT3, DLARFB, XERBLA
+      EXTERNAL   DGEQRT2, DGELQT3, DGEQRT3, DLARFB, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index b0bb242..f19a91c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *  =====================================================================
       RECURSIVE SUBROUTINE DGELQT3( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, M, N, LDT
       PARAMETER ( ONE = 1.0D+00 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER   I, I1, J, J1, M1, M2, N1, N2, IINFO
+      INTEGER   I, I1, J, J1, M1, M2, IINFO
 *     ..
 *     .. External Subroutines ..
       EXTERNAL  DLARFG, DTRMM, DGEMM, XERBLA
index d24b255..f2cfd63 100644 (file)
@@ -89,7 +89,7 @@
 *>          of the matrices B and X. NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEsolve
 *
       SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
      $                   WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
index 41a517a..8cc59b8 100644 (file)
@@ -6,7 +6,7 @@
 *            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEMQRT + dependencies
+*> Download DGEMLQT + dependencies
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgemlqt.f">
 *> [TGZ]</a>
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgemlqt.f">
@@ -35,7 +35,7 @@
 *>
 *> \verbatim
 *>
-*> DGEMQRT overwrites the general real M-by-N matrix C with
+*> DGEMLQT overwrites the general real M-by-N matrix C with
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q C            C Q
@@ -99,7 +99,9 @@
 *>
 *> \param[in] V
 *> \verbatim
-*>          V is DOUBLE PRECISION array, dimension (LDV,K)
+*>          V is DOUBLE PRECISION array, dimension
+*>                               (LDV,M) if SIDE = 'L',
+*>                               (LDV,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
 *>          DGELQT in the first K rows of its array argument A.
 *> \param[in] LDV
 *> \verbatim
 *>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
+*>          The leading dimension of the array V. LDV >= max(1,K).
 *> \endverbatim
 *>
 *> \param[in] T
 *> \verbatim
 *>          T is DOUBLE PRECISION array, dimension (LDT,K)
 *>          The upper triangular factors of the block reflectors
-*>          as returned by DGELQT, stored as a MB-by-M matrix.
+*>          as returned by DGELQT, stored as a MB-by-K matrix.
 *> \endverbatim
 *>
 *> \param[in] LDT
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE DGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT,
      $                   C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, RIGHT, TRAN, NOTRAN
-      INTEGER            I, IB, LDWORK, KF, Q
+      INTEGER            I, IB, LDWORK, KF
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 6856bac..c7d9320 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>  block is of order NB except for the last block, which is of order
 *>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
 *>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  for the last block) T's are stored in the NB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, NB
index db684ba..2f01a76 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEauxiliary
 *
 *  =====================================================================
       SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, N
       DOUBLE PRECISION   BIGNUM, EPS, SMLNUM, TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASWP, DSCAL
+      EXTERNAL           DLASWP, DSCAL, DLABAD
 *     ..
 *     .. External Functions ..
       INTEGER            IDAMAX
index 7da3d09..3937c13 100644 (file)
      $                    IL, IU, NS, S, U, LDU, VT, LDVT, WORK,
      $                    LWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
       EXTERNAL           DBDSVDX, DGEBRD, DGELQF, DGEQRF, DLACPY,
      $                   DLASCL, DLASET, DORMBR, DORMLQ, DORMQR,
-     $                   XERBLA
+     $                   DCOPY, XERBLA
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 2b25994..2cbc5ce 100644 (file)
@@ -54,7 +54,7 @@
 *
 *> \param[in] JOBA
 *> \verbatim
-*>          JOBA is CHARACTER* 1
+*>          JOBA is CHARACTER*1
 *>          Specifies the structure of A.
 *>          = 'L': The input matrix A is lower triangular;
 *>          = 'U': The input matrix A is upper triangular;
 *>
 *> \param[in,out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension MAX(6,M+N).
+*>          WORK is DOUBLE PRECISION array, dimension (LWORK)
 *>          On entry :
 *>          If JOBU .EQ. 'C' :
 *>          WORK(1) = CTOL, where CTOL defines the threshold for convergence.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
      $                   LDV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N
index d850bc6..0896a70 100644 (file)
 *  =====================================================================
       SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       DOUBLE PRECISION   BIGNUM, EPS, SMIN, SMLNUM, XMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGER, DSWAP
+      EXTERNAL           DGER, DSWAP, DLABAD
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
index ca0ef77..3b44a40 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEsolve
 *
       SUBROUTINE DGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB,
      $                    WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       INTEGER            I, IASCL, IBSCL, J, MINMN, MAXMN, BROW,
      $                   SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2,
      $                   WSIZEO, WSIZEM, INFO2
-      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ
+      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ( 1 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
        IF( M.GE.N ) THEN
          CALL DGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL DGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL DGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL DGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZM, B, LDB, WORKQ, -1, INFO2 )
-         LWM = MAX( LWM, INT( WORKQ ) )
+         LWM = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        ELSE
          CALL DGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL DGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL DGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL DGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWM  = MAX( LWM, INT( WORKQ ) )
+         LWM  = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        END IF
index f316c7f..47022fb 100644 (file)
 *>
 *> \param[in] SELCTG
 *> \verbatim
-*>          SELCTG is procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments
+*>          SELCTG is a LOGICAL FUNCTION of three DOUBLE PRECISION arguments
 *>          SELCTG must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'N', SELCTG is not referenced.
 *>          If SORT = 'S', SELCTG is used to select eigenvalues to sort
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEeigen
 *
      $                   VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
      $                   LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
index 034e943..283d914 100644 (file)
       SUBROUTINE DGGHD3( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
      $                   LDQ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.1) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGGHRD, DLARTG, DLASET, DORM22, DROT, XERBLA
+      EXTERNAL           DGGHRD, DLARTG, DLASET, DORM22, DROT, DGEMM,
+     $                   DGEMV, DTRMV, DLACPY, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, MAX
index 7d24280..4fd38d3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
       SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
      $                   SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
       EXTERNAL           IDAMAX, LSAME, DDOT, DNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP
+      EXTERNAL           DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP,
+     $                   XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 9acab16..376682c 100644 (file)
       SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
      $                   EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       EXTERNAL           IDAMAX, LSAME, DDOT, DNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP
+      EXTERNAL           DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP,
+     $                   XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index da89158..a565ed3 100644 (file)
@@ -21,7 +21,7 @@
 *       LOGICAL FUNCTION DISNAN( DIN )
 *
 *       .. Scalar Arguments ..
-*       DOUBLE PRECISION   DIN
+*       DOUBLE PRECISION, INTENT(IN) :: DIN
 *       ..
 *
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION DISNAN( DIN )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
-      DOUBLE PRECISION   DIN
+      DOUBLE PRECISION, INTENT(IN) :: DIN
 *     ..
 *
 *  =====================================================================
index 577866c..350284c 100644 (file)
 *>
 *> \param[in] AB
 *> \verbatim
-*>          AB is DOUBLE PRECISION array of DIMENSION ( LDAB, n )
+*>          AB is DOUBLE PRECISION array, dimension ( LDAB, n )
 *>           Before entry, the leading m by n part of the array AB must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGBcomputational
 *
       SUBROUTINE DLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
      $                      INCX, BETA, Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index bab9bbc..12b2a32 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array, dimension
-*>                    (LDY,NRHS)
+*>          Y is DOUBLE PRECISION array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by DGBTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGBcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
index 9a91f6f..0a83e4b 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n )
+*>          A is DOUBLE PRECISION array, dimension ( LDA, n )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION
-*>           Array of DIMENSION at least
+*>          Y is DOUBLE PRECISION array,
+*>           dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE DLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
      $                       Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index d6af490..082f810 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array, dimension
-*>                    (LDY,NRHS)
+*>          Y is DOUBLE PRECISION array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by DGETRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERRS_N
 *> \verbatim
-*>          ERRS_N is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERRS_N is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERRS_C
 *> \verbatim
-*>          ERRS_C is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERRS_C is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 0e21f0b..8c0d6be 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array, dimension
-*>                    (LDY,NRHS)
+*>          Y is DOUBLE PRECISION array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by DPOTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doublePOcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 1f948a2..29566a6 100644 (file)
@@ -88,7 +88,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*>          A is DOUBLE PRECISION array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
       SUBROUTINE DLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index 66661f7..f54d151 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is DOUBLE PRECISION array, dimension
-*>                    (LDY,NRHS)
+*>          Y is DOUBLE PRECISION array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by DSYTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 36c2e85..b5e734d 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is DOUBLE PRECISION array dimension (NB)
+*>          TAUQ is DOUBLE PRECISION array, dimension (NB)
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
       SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
      $                   LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDX, LDY, M, N, NB
index 4e62b31..d200fc0 100644 (file)
 *>
 *> \param[in] Q2
 *> \verbatim
-*>          Q2 is DOUBLE PRECISION array, dimension (LDQ2N)
+*>          Q2 is DOUBLE PRECISION array, dimension (LDQ2*N)
 *>          The first K columns of this matrix contain the non-deflated
 *>          eigenvectors for the split problem.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
      $                   CTOT, W, S, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, N, N1
index 4b5ebb4..c2e87d8 100644 (file)
@@ -21,7 +21,7 @@
 *       LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
 *
 *       .. Scalar Arguments ..
-*       DOUBLE PRECISION   DIN1, DIN2
+*       DOUBLE PRECISION, INTENT(IN) :: DIN1, DIN2
 *       ..
 *
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
-      DOUBLE PRECISION   DIN1, DIN2
+      DOUBLE PRECISION, INTENT(IN) :: DIN1, DIN2
 *     ..
 *
 *  =====================================================================
index 4aef66c..b643f11 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array.
-*>         The dimension must be at least N.
+*>          WORK is DOUBLE PRECISION array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array.
-*>         The dimension must be at least 3 * N
+*>          IWORK is INTEGER array, dimension (3*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
      $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
index 8dc6df8..19e32f8 100644 (file)
@@ -49,7 +49,7 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >=0.
+*>          The number of rows of the matrix C.  M >=0.
 *> \endverbatim
 *>
 *> \param[in] N
 *>
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array, dimension (LDA,K)
+*>          A is DOUBLE PRECISION array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the blocked
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
 *>          DLASWLQ in the first k rows of its array argument A.
       SUBROUTINE DLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $    LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
index 9ba4590..6af89d2 100644 (file)
@@ -81,7 +81,7 @@
 *>          N >= NB >= 1.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,K)
 *>          The i-th column must contain the vector which defines the
       SUBROUTINE DLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $        LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
index 3861b1d..bc01829 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   X, Y
 *     ..
 *     .. Local Scalars ..
       DOUBLE PRECISION   W, XABS, YABS, Z
+      LOGICAL            X_IS_NAN, Y_IS_NAN
+*     ..
+*     .. External Functions ..
+      LOGICAL            DISNAN
+      EXTERNAL           DISNAN
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      XABS = ABS( X )
-      YABS = ABS( Y )
-      W = MAX( XABS, YABS )
-      Z = MIN( XABS, YABS )
-      IF( Z.EQ.ZERO ) THEN
-         DLAPY2 = W
-      ELSE
-         DLAPY2 = W*SQRT( ONE+( Z / W )**2 )
+      X_IS_NAN = DISNAN( X )
+      Y_IS_NAN = DISNAN( Y )
+      IF ( X_IS_NAN ) DLAPY2 = X
+      IF ( Y_IS_NAN ) DLAPY2 = Y
+*
+      IF ( .NOT.( X_IS_NAN.OR.Y_IS_NAN ) ) THEN
+         XABS = ABS( X )
+         YABS = ABS( Y )
+         W = MAX( XABS, YABS )
+         Z = MIN( XABS, YABS )
+         IF( Z.EQ.ZERO ) THEN
+            DLAPY2 = W
+         ELSE
+            DLAPY2 = W*SQRT( ONE+( Z / W )**2 )
+         END IF
       END IF
       RETURN
 *
index acaefde..81a462f 100644 (file)
 *
 *> \param[in] N
 *> \verbatim
-*>          N is integer
+*>          N is INTEGER
 *>              Order of the matrix H. N must be either 2 or 3.
 *> \endverbatim
 *>
 *> \param[in] H
 *> \verbatim
-*>          H is DOUBLE PRECISION array of dimension (LDH,N)
+*>          H is DOUBLE PRECISION array, dimension (LDH,N)
 *>              The 2-by-2 or 3-by-3 matrix H in (*).
 *> \endverbatim
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>              The leading dimension of H as declared in
 *>              the calling procedure.  LDH.GE.N
 *> \endverbatim
@@ -95,7 +95,7 @@
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is DOUBLE PRECISION array of dimension N
+*>          V is DOUBLE PRECISION array, dimension (N)
 *>              A scalar multiple of the first column of the
 *>              matrix K in (*).
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   SI1, SI2, SR1, SR2
index 910fdda..431b3f1 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
index 8a668bc..aa23617 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 8b536c0..5cc4eda 100644 (file)
 *
 *> \param[in] WANTT
 *> \verbatim
-*>          WANTT is logical scalar
+*>          WANTT is LOGICAL
 *>             WANTT = .true. if the quasi-triangular Schur factor
 *>             is being computed.  WANTT is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] WANTZ
 *> \verbatim
-*>          WANTZ is logical scalar
+*>          WANTZ is LOGICAL
 *>             WANTZ = .true. if the orthogonal Schur factor is being
 *>             computed.  WANTZ is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] KACC22
 *> \verbatim
-*>          KACC22 is integer with value 0, 1, or 2.
+*>          KACC22 is INTEGER with value 0, 1, or 2.
 *>             Specifies the computation mode of far-from-diagonal
 *>             orthogonal updates.
 *>        = 0: DLAQR5 does not accumulate reflections and does not
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
+*>          N is INTEGER
 *>             N is the order of the Hessenberg matrix H upon which this
 *>             subroutine operates.
 *> \endverbatim
 *>
 *> \param[in] KTOP
 *> \verbatim
-*>          KTOP is integer scalar
+*>          KTOP is INTEGER
 *> \endverbatim
 *>
 *> \param[in] KBOT
 *> \verbatim
-*>          KBOT is integer scalar
+*>          KBOT is INTEGER
 *>             These are the first and last rows and columns of an
 *>             isolated diagonal block upon which the QR sweep is to be
 *>             applied. It is assumed without a check that
 *>
 *> \param[in] NSHFTS
 *> \verbatim
-*>          NSHFTS is integer scalar
+*>          NSHFTS is INTEGER
 *>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
 *>             must be positive and even.
 *> \endverbatim
 *>
 *> \param[in,out] SR
 *> \verbatim
-*>          SR is DOUBLE PRECISION array of size (NSHFTS)
+*>          SR is DOUBLE PRECISION array, dimension (NSHFTS)
 *> \endverbatim
 *>
 *> \param[in,out] SI
 *> \verbatim
-*>          SI is DOUBLE PRECISION array of size (NSHFTS)
+*>          SI is DOUBLE PRECISION array, dimension (NSHFTS)
 *>             SR contains the real parts and SI contains the imaginary
 *>             parts of the NSHFTS shifts of origin that define the
 *>             multi-shift QR sweep.  On output SR and SI may be
 *>
 *> \param[in,out] H
 *> \verbatim
-*>          H is DOUBLE PRECISION array of size (LDH,N)
+*>          H is DOUBLE PRECISION array, dimension (LDH,N)
 *>             On input H contains a Hessenberg matrix.  On output a
 *>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
 *>             to the isolated diagonal block in rows and columns KTOP
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer scalar
+*>          LDH is INTEGER
 *>             LDH is the leading dimension of H just as declared in the
 *>             calling procedure.  LDH.GE.MAX(1,N).
 *> \endverbatim
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is DOUBLE PRECISION array of size (LDZ,IHIZ)
+*>          Z is DOUBLE PRECISION array, dimension (LDZ,IHIZ)
 *>             If WANTZ = .TRUE., then the QR Sweep orthogonal
 *>             similarity transformation is accumulated into
 *>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer scalar
+*>          LDZ is INTEGER
 *>             LDA is the leading dimension of Z just as declared in
 *>             the calling procedure. LDZ.GE.N.
 *> \endverbatim
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is DOUBLE PRECISION array of size (LDV,NSHFTS/2)
+*>          V is DOUBLE PRECISION array, dimension (LDV,NSHFTS/2)
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>             LDV is the leading dimension of V as declared in the
 *>             calling procedure.  LDV.GE.3.
 *> \endverbatim
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is DOUBLE PRECISION array of size
-*>             (LDU,3*NSHFTS-3)
+*>          U is DOUBLE PRECISION array, dimension (LDU,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDU
 *> \verbatim
-*>          LDU is integer scalar
+*>          LDU is INTEGER
 *>             LDU is the leading dimension of U just as declared in the
 *>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>             NH is the number of columns in array WH available for
 *>             workspace. NH.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WH
 *> \verbatim
-*>          WH is DOUBLE PRECISION array of size (LDWH,NH)
+*>          WH is DOUBLE PRECISION array, dimension (LDWH,NH)
 *> \endverbatim
 *>
 *> \param[in] LDWH
 *> \verbatim
-*>          LDWH is integer scalar
+*>          LDWH is INTEGER
 *>             Leading dimension of WH just as declared in the
 *>             calling procedure.  LDWH.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer scalar
+*>          NV is INTEGER
 *>             NV is the number of rows in WV agailable for workspace.
 *>             NV.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WV
 *> \verbatim
-*>          WV is DOUBLE PRECISION array of size
-*>             (LDWV,3*NSHFTS-3)
+*>          WV is DOUBLE PRECISION array, dimension (LDWV,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer scalar
+*>          LDWV is INTEGER
 *>             LDWV is the leading dimension of WV as declared in the
 *>             in the calling subroutine.  LDWV.GE.NV.
 *> \endverbatim
      $                   SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
      $                   LDU, NV, WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index aa5fabc..be33f93 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             CALL DSCAL( N-1, RSAFMN, X, INCX )
             BETA = BETA*RSAFMN
             ALPHA = ALPHA*RSAFMN
-            IF( ABS( BETA ).LT.SAFMIN .AND. KNT .LT. 1000 )
+            IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SAFMIN
index 70efabb..d040a8c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             CALL DSCAL( N-1, BIGNUM, X, INCX )
             BETA = BETA*BIGNUM
             ALPHA = ALPHA*BIGNUM
-            IF( ABS( BETA ).LT.SMLNUM .AND. KNT .LT. 1000)
+            IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SMLNUM
index 31a0bfb..7406a8f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
      $                    NSPLIT, ISPLIT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N, NSPLIT
 *     .. Executable Statements ..
 *
       INFO = 0
-
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     Compute splitting points
       NSPLIT = 1
       IF(SPLTOL.LT.ZERO) THEN
index 2733922..2b6389e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, TWIST, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET, TWIST
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) /
      $           LOG( TWO ) ) + 2
       MNWDTH = TWO * PIVMIN
index 9635e41..093bfa0 100644 (file)
       SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
      $                            EIGCNT, LCNT, RCNT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Executable Statements ..
 *
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       LCNT = 0
       RCNT = 0
       EIGCNT = 0
index 57abf74..5cc1052 100644 (file)
      $                    M, W, WERR, WL, WU, IBLOCK, INDEXW,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     Decode RANGE
 *
       IF( LSAME( RANGE, 'A' ) ) THEN
index f01b25f..0613efb 100644 (file)
      $                    W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DLARNV, DLARRA, DLARRB, DLARRC, DLARRD,
-     $                   DLASQ2
+     $                   DLASQ2, DLARRK
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *
 
       INFO = 0
-
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
 *
 *     Decode RANGE
 *
index 5ad4337..f814ee1 100644 (file)
      $                   SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
      $                   DPLUS, LPLUS, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Executable Statements ..
 *
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       FACT = DBLE(2**KTRYMAX)
       EPS = DLAMCH( 'Precision' )
       SHIFT = 0
index ecd136f..097ba9f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   RTOL, OFFSET, W, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) /
      $           LOG( TWO ) ) + 2
 *
index 8b307a4..e92fe72 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE DLARRK( N, IW, GL, GU,
      $                    D, E2, PIVMIN, RELTOL, W, WERR, INFO)
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, IW, N
 *     ..
 *     .. Executable Statements ..
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         INFO = 0
+         RETURN
+      END IF
+*
 *     Get machine constants
       EPS = DLAMCH( 'P' )
 
index c12b605..7aa2247 100644 (file)
@@ -78,7 +78,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARRR( N, D, E, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            N, INFO
 *     ..
 *     .. Executable Statements ..
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         INFO = 0
+         RETURN
+      END IF
+*
 *     As a default, do NOT go for relative-accuracy preserving computations.
       INFO = 1
 
index edda67d..cace17c 100644 (file)
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>          Upper bound of the interval that contains the desired
-*>          eigenvalues. VL < VU. Needed to compute gaps on the left or right
-*>          end of the extremal eigenvalues in the desired RANGE.
+*>          eigenvalues. VL < VU. 
+*>          Note: VU is currently not used by this implementation of DLARRV, VU is
+*>          passed to DLARRV because it could be used compute gaps on the right end
+*>          of the extremal eigenvalues. However, with not much initial accuracy in
+*>          LAMBDA and VU, the formula can lead to an overestimation of the right gap
+*>          and thus to inadequately early RQI 'convergence'. This is currently
+*>          prevented this by forcing a small right gap. And so it turns out that VU
+*>          is currently not used by this implementation of DLARRV.
 *> \endverbatim
 *>
 *> \param[in,out] D
      $                   IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     The first N entries of WORK are reserved for the eigenvalues
       INDLD = N+1
       INDLLD= 2*N+1
index a83e74d..29a9eb0 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION        CS, SIGMA, SN, X, Y
 *     .. Local Scalars ..
       DOUBLE PRECISION        R, S, THRESH, W, Z
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLARTGP
+*     ..
 *     .. External Functions ..
       DOUBLE PRECISION        DLAMCH
       EXTERNAL           DLAMCH
index ca0b3b9..522ca9a 100644 (file)
@@ -81,7 +81,7 @@
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is DOUBLE PRECISION array, dimension at least (LDQ, N)
+*>          U is DOUBLE PRECISION array, dimension (LDU, N)
 *>         On exit, U contains the left singular vectors.
 *> \endverbatim
 *>
@@ -93,7 +93,7 @@
 *>
 *> \param[out] VT
 *> \verbatim
-*>          VT is DOUBLE PRECISION array, dimension at least (LDVT, M)
+*>          VT is DOUBLE PRECISION array, dimension (LDVT, M)
 *>         On exit, VT**T contains the right singular vectors.
 *> \endverbatim
 *>
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER work array.
-*>         Dimension must be at least (8 * N)
+*>          IWORK is INTEGER array, dimension (8*N)
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION work array.
-*>         Dimension must be at least (3 * M**2 + 2 * M)
+*>          WORK is DOUBLE PRECISION array, dimension (3*M**2+2*M)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
      $                   WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDU, LDVT, N, SMLSIZ, SQRE
index a7ced41..87a1543 100644 (file)
 *>
 *> \param[out] IDXP
 *> \verbatim
-*>          IDXP is INTEGER array dimension(N)
+*>          IDXP is INTEGER array, dimension(N)
 *>         This will contain the permutation used to place deflated
 *>         values of D at the end of the array. On output IDXP(2:K)
 *>         points to the nondeflated D-values and IDXP(K+1:N)
 *>
 *> \param[out] IDX
 *> \verbatim
-*>          IDX is INTEGER array dimension(N)
+*>          IDX is INTEGER array, dimension(N)
 *>         This will contain the permutation used to sort the contents of
 *>         D into ascending order.
 *> \endverbatim
 *>
 *> \param[out] IDXC
 *> \verbatim
-*>          IDXC is INTEGER array dimension(N)
+*>          IDXC is INTEGER array, dimension(N)
 *>         This will contain the permutation used to arrange the columns
 *>         of the deflated U matrix into three groups:  the first group
 *>         contains non-zero entries only at and above NL, the second
 *>
 *> \param[in,out] IDXQ
 *> \verbatim
-*>          IDXQ is INTEGER array dimension(N)
+*>          IDXQ is INTEGER array, dimension(N)
 *>         This contains the permutation which separately sorts the two
 *>         sub-problems in D into ascending order.  Note that entries in
 *>         the first hlaf of this permutation must first be moved one
 *>
 *> \param[out] COLTYP
 *> \verbatim
-*>          COLTYP is INTEGER array dimension(N)
+*>          COLTYP is INTEGER array, dimension(N)
 *>         As workspace, this will contain a label which will indicate
 *>         which of the following types a column in the U2 matrix or a
 *>         row in the VT2 matrix is:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
      $                   IDXC, IDXQ, COLTYP, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
index 57d0abd..7662be3 100644 (file)
@@ -94,8 +94,7 @@
 *>
 *> \param[out] Q
 *> \verbatim
-*>          Q is DOUBLE PRECISION array,
-*>                     dimension at least (LDQ,K).
+*>          Q is DOUBLE PRECISION array, dimension (LDQ,K)
 *> \endverbatim
 *>
 *> \param[in] LDQ
 *>         The leading dimension of the array Q.  LDQ >= K.
 *> \endverbatim
 *>
-*> \param[in] DSIGMA
+*> \param[in,out] DSIGMA
 *> \verbatim
 *>          DSIGMA is DOUBLE PRECISION array, dimension(K)
 *>         The first K elements of this array contain the old roots
 *>         The leading dimension of the array U.  LDU >= N.
 *> \endverbatim
 *>
-*> \param[in,out] U2
+*> \param[in] U2
 *> \verbatim
 *>          U2 is DOUBLE PRECISION array, dimension (LDU2, N)
 *>         The first K columns of this matrix contain the non-deflated
 *>         type is any column which has been deflated.
 *> \endverbatim
 *>
-*> \param[in] Z
+*> \param[in,out] Z
 *> \verbatim
 *>          Z is DOUBLE PRECISION array, dimension (K)
 *>         The first K elements of this array contain the components
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
      $                   INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
index 245e814..fc5c48c 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension at least 3 * K
+*>          WORK is DOUBLE PRECISION array, dimension (3*K)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
      $                   DSIGMA, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, K, LDDIFR
index 20ceedd..f41a108 100644 (file)
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array.
-*>         Dimension must be at least (7 * N).
+*>          IWORK is INTEGER array, dimension (7*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
      $                   PERM, GIVNUM, C, S, WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
index cb7a714..d4ddbbc 100644 (file)
       SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
      $                   DN1, DN2, TAU, TTYPE, G )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
                   NP = NN - 9
                ELSE
                   NP = NN - 2*PP
-                  B2 = Z( NP-2 )
                   GAM = DN1
                   IF( Z( NP-4 ) .GT. Z( NP-2 ) )
      $               RETURN
index 99d4f67..3812c87 100644 (file)
 *>          IEEE is LOGICAL
 *>        Flag for IEEE or non IEEE arithmetic.
 *> \endverbatim
-*
+*>
 *> \param[in] EPS
 *> \verbatim
 *>          EPS is DOUBLE PRECISION
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2,
      $                   DN, DNM1, DNM2, IEEE, EPS )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            IEEE
index 2830711..6e4ca20 100644 (file)
@@ -55,7 +55,7 @@
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the elements on and bleow the diagonal
+*>          On exit, the elements on and below the diagonal
 *>          of the array contain the N-by-N lower triangular matrix L;
 *>          the elements above the diagonal represent Q by the rows
 *>          of blocked V (see Further Details).
       SUBROUTINE DLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
      $                  INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER           INFO, LDA, M, N, MB, NB, LWORK, LDT
index 2c526ff..202fd8d 100644 (file)
 *> \verbatim
 *>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
 *>          The vector of pivot indices. Only the elements in positions
-*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
-*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*>          K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed.
+*>          IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be
+*>          interchanged.
 *> \endverbatim
 *>
 *> \param[in] INCX
 *> \verbatim
 *>          INCX is INTEGER
-*>          The increment between successive values of IPIV.  If IPIV
+*>          The increment between successive values of IPIV. If INCX
 *>          is negative, the pivots are applied in reverse order.
 *> \endverbatim
 *
@@ -98,7 +99,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, K1, K2, LDA, N
 *     ..
 *     .. Executable Statements ..
 *
-*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
+*     Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows
+*     K1 through K2.
 *
       IF( INCX.GT.0 ) THEN
          IX0 = K1
index 0bd2d6d..6b75e46 100644 (file)
 *  ===========
 *
 *       SUBROUTINE DLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            J1, M, NB, LDA, LDH, INFO
+*       INTEGER            J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IPIV( * )
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] IPIV
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
+*>          IPIV is INTEGER array, dimension (M)
 *>          Details of the row and column interchanges,
 *>          the row and column k were interchanged with the row and
 *>          column IPIV(k).
 *>          WORK is DOUBLE PRECISION workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                      H, LDH, WORK, INFO )
+     $                      H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            M, NB, J1, LDA, LDH, INFO
+      INTEGER            M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER            IPIV( * )
       PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
 *
 *     .. Local Scalars ..
-      INTEGER            J, K, K1, I1, I2
+      INTEGER            J, K, K1, I1, I2, MJ
       DOUBLE PRECISION   PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL           LSAME, ILAENV, IDAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           DGEMV, DAXPY, DCOPY, DSWAP, DSCAL, DLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
-*         where H(J:N, J) has been initialized to be A(J, J:N)
+*        H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J),
+*         where H(J:M, J) has been initialized to be A(J, J:M)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL DGEMV( 'No transpose', M-J+1, J-K1,
+            CALL DGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(i:n, i) into WORK
+*        Copy H(i:M, i) into WORK
 *
-         CALL DCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL DCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J-1, J:N) * T(J-1,J),
-*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
+*           Compute WORK := WORK - L(J-1, J:M) * T(J-1,J),
+*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M)
 *
             ALPHA = -A( K-1, J )
-            CALL DAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL DAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L(J, (J+1):N)
-*            where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N)
+*           Compute WORK(2:M) = T(J, J) L(J, (J+1):M)
+*            where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( K, J )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = IDAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1, I1+1:N) with A(I1+1:N, I2)
+*              Swap A(I1, I1+1:M) with A(I1+1:M, I2)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL DSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA,
      $                              A( J1+I1, I2 ), 1 )
 *
-*              Swap A(I1, I2+1:N) with A(I2, I2+1:N)
+*              Swap A(I1, I2+1:M) with A(I2, I2+1:M)
 *
                CALL DSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA,
      $                           A( J1+I2-1, I2+1 ), LDA )
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                ENDIF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J:N, J),
+*              Copy A(J+1:M, J+1) into H(J:M, J),
 *
                CALL DCOPY( M-J, A( K+1, J+1 ), LDA,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( K, J+1 ).NE.ZERO ) THEN
                ALPHA = ONE / A( K, J+1 )
                CALL DLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
-*         where H(J:N, J) has been initialized to be A(J:N, J)
+*        H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T,
+*         where H(J:M, J) has been initialized to be A(J:M, J)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL DGEMV( 'No transpose', M-J+1, J-K1,
+            CALL DGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(J:N, J) into WORK
+*        Copy H(J:M, J) into WORK
 *
-         CALL DCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL DCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J:N, J-1) * T(J-1,J),
+*           Compute WORK := WORK - L(J:M, J-1) * T(J-1,J),
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -A( J, K-1 )
-            CALL DAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL DAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L((J+1):N, J)
-*            where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J)
+*           Compute WORK(2:M) = T(J, J) L((J+1):M, J)
+*            where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( J, K )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = IDAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1+1:N, I1) with A(I2, I1+1:N)
+*              Swap A(I1+1:M, I1) with A(I2, I1+1:M)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL DSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1,
      $                              A( I2, J1+I1 ), LDA )
 *
-*              Swap A(I2+1:N, I1) with A(I2+1:N, I2)
+*              Swap A(I2+1:M, I1) with A(I2+1:M, I2)
 *
                CALL DSWAP( M-I2, A( I2+1, J1+I1-1 ), 1,
      $                           A( I2+1, J1+I2-1 ), 1 )
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J+1:N, J),
+*              Copy A(J+1:M, J+1) into H(J+1:M, J),
 *
                CALL DCOPY( M-J, A( J+1, K+1 ), 1,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( J+1, K ).NE.ZERO ) THEN
                ALPHA = ONE / A( J+1, K )
                CALL DLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 30
index db3b14d..675028a 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE DORBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index cec60da..ea43d4f 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE DORBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 7149796..f5667b4 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE DORBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 606d708..ff141b9 100644 (file)
@@ -33,7 +33,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                    TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
      $                    INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index de01f5a..313c6d5 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE DORBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 6056d03..c92c9fe 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE DORBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 340e16a..f0284ce 100644 (file)
 *>
 *> \param[out] U1
 *> \verbatim
-*>          U1 is DOUBLE PRECISION array, dimension (P)
+*>          U1 is DOUBLE PRECISION array, dimension (LDU1,P)
 *>          If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
 *> \endverbatim
 *>
 *>
 *> \param[out] U2
 *> \verbatim
-*>          U2 is DOUBLE PRECISION array, dimension (M-P)
+*>          U2 is DOUBLE PRECISION array, dimension (LDU2,M-P)
 *>          If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
 *>          matrix U2.
 *> \endverbatim
 *>
 *> \param[out] V1T
 *> \verbatim
-*>          V1T is DOUBLE PRECISION array, dimension (Q)
+*>          V1T is DOUBLE PRECISION array, dimension (LDV1T,Q)
 *>          If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
 *>          matrix V1**T.
 *> \endverbatim
 *>
 *> \param[out] V2T
 *> \verbatim
-*>          V2T is DOUBLE PRECISION array, dimension (M-Q)
+*>          V2T is DOUBLE PRECISION array, dimension (LDV2T,M-Q)
 *>          If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
 *>          matrix V2**T.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
      $                             U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
      $                             LDV2T, WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
index 8542a2e..4f98800 100644 (file)
@@ -36,7 +36,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
index ac79e1e..aac4710 100644 (file)
@@ -53,8 +53,8 @@
 *>  N2-by-N2 upper triangular matrix.
 *> \endverbatim
 *
-*  Arguments
-*  =========
+*  Arguments:
+*  ==========
 *
 *> \param[in] SIDE
 *> \verbatim
       SUBROUTINE DORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
index df94989..4fc84ea 100644 (file)
 *>
 *> \param[in,out] AFP
 *> \verbatim
-*>          AFP is DOUBLE PRECISION array, dimension
-*>                            (N*(N+1)/2)
+*>          AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
 *>          If FACT = 'F', then AFP is an input argument and on entry
 *>          contains the triangular factor U or L from the Cholesky
 *>          factorization A = U**T*U or A = L*L**T, in the same storage
       SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
      $                   X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
index 9251143..cbd66dd 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DRSCL( N, SA, SX, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
       EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL
+      EXTERNAL           DSCAL, DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
index afed526..3bf126d 100644 (file)
 *  Arguments:
 *  ==========
 *
-*> @param[in] n
-*>          The order of the matrix A.
-*>
-*> @param[in] nb
-*>          The size of the band.
-*>
-*> @param[in, out] A
-*>          A pointer to the matrix A.
-*>
-*> @param[in] lda
-*>          The leading dimension of the matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*> \endverbatim
 *>
-*> @param[out] V
-*>          DOUBLE PRECISION array, dimension 2*n if eigenvalues only are
-*>          requested or to be queried for vectors.
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL which indicate if Eigenvalue are requested or both
+*>          Eigenvalue/Eigenvectors.
+*> \endverbatim
 *>
-*> @param[out] TAU
-*>          DOUBLE PRECISION array, dimension (2*n).
-*>          The scalar factors of the Householder reflectors are stored
-*>          in this array.
+*> \param[in] TTYPE
+*> \verbatim
+*>          TTYPE is INTEGER
+*> \endverbatim
 *>
-*> @param[in] st
+*> \param[in] ST
+*> \verbatim
+*>          ST is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] ed
+*> \param[in] ED
+*> \verbatim
+*>          ED is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] sweep
+*> \param[in] SWEEP
+*> \verbatim
+*>          SWEEP is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] Vblksiz
-*>          internal parameter for indices.
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER. The order of the matrix A.
+*> \endverbatim
 *>
-*> @param[in] wantz
-*>          logical which indicate if Eigenvalue are requested or both
-*>          Eigenvalue/Eigenvectors.
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER. The size of the band.
+*> \endverbatim
+*>
+*> \param[in] IB
+*> \verbatim
+*>          IB is INTEGER.
+*> \endverbatim
+*>
+*> \param[in, out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array. A pointer to the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER. The leading dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is DOUBLE PRECISION array, dimension 2*n if eigenvalues only are
+*>          requested or to be queried for vectors.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is DOUBLE PRECISION array, dimension (2*n).
+*>          The scalar factors of the Householder reflectors are stored
+*>          in this array.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER.
+*> \endverbatim
 *>
-*> @param[in] work
-*>          Workspace of size nb.
+*> \param[in] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array. Workspace of size nb.
+*> \endverbatim
 *>
 *> \par Further Details:
 *  =====================
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index c66b404..79991b6 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLASCL, DSCAL, DSTEQR, DSTERF, XERBLA,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'DSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index 1968f2b..859f87c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEMM, DLACPY, DLASCL, DSCAL, DSTEDC,
          LIWMIN = 1
          LWMIN = 1
       ELSE
-         IB    = ILAENV( 18, 'DSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+         IB    = ILAENV2STAGE( 2, 'DSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
          IF( WANTZ ) THEN
             LIWMIN = 3 + 5*N
             LWMIN = 1 + 5*N + 2*N**2
index 9e120e5..93a07f1 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSB
-      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, DLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DGEMV, DLACPY, DLASCL, DSCAL,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'DSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'DSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'DSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = 2*N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index e867b97..f47327d 100644 (file)
       SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
      $                   SWORK, ITER, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       DOUBLE PRECISION   ANRM, CTE, EPS, RNRM, XNRM
 *
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DGEMM, DLACPY, DLAG2S, SLAG2D, SGETRF,
-     $                   SGETRS, XERBLA
+      EXTERNAL           DAXPY, DGEMM, DLACPY, DLAG2S, DGETRF, DGETRS,
+     $                   SGETRF, SGETRS, SLAG2D, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            IDAMAX
index 234d03f..5b99d75 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array,
-*>                                         dimension (LWORK)
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
 *>          On exit, if INFO = 0, WORK(1) returns the required LWORK.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHEReigen
 *
       SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
index 085e96f..f7313ff 100644 (file)
@@ -77,8 +77,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array, dimension
-*>                            (N*(N+1)/2)
+*>          AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
 *>          On entry, the upper or lower triangle of the symmetric matrix
 *>          A, packed columnwise in a linear array.  The j-th column of A
 *>          is stored in the array AP as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHEReigen
 *
       SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
      $                  INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
index 0f9eff8..4a85752 100644 (file)
       SUBROUTINE DSPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
      $                   SWORK, ITER, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *
 *     .. External Subroutines ..
       EXTERNAL           DAXPY, DSYMM, DLACPY, DLAT2S, DLAG2S, SLAG2D,
-     $                   SPOTRF, SPOTRS, XERBLA
+     $                   SPOTRF, SPOTRS, DPOTRF, DPOTRS, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            IDAMAX
index b95c610..62df170 100644 (file)
 *>
 *> \param[in,out] AFP
 *> \verbatim
-*>          AFP is DOUBLE PRECISION array, dimension
-*>                            (N*(N+1)/2)
+*>          AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
 *>          If FACT = 'F', then AFP is an input argument and on entry
 *>          contains the block diagonal matrix D and the multipliers used
 *>          to obtain the factor U or L from the factorization
       SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
      $                   LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
index d7f9537..61b44bc 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array,
-*>                                         dimension (LWORK)
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
 *>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
      $                   LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPZ
index f328603..6a8c43f 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $           ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $           LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 924d738..a1a8e34 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 5802aa8..7245eba 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE DSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 673360f..37c8157 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DSYCONVF( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE DSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE DSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index 2d16370..5c77490 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DSYCONVF_ROOK( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE DSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE DSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index dd1dc80..de6b71a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
       EXTERNAL           DLAMCH, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASSQ
+      EXTERNAL           DLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, INT, LOG, MAX, MIN, SQRT
index af622fa..fff0ded 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLASCL, DORGTR, DSCAL, DSTEQR, DSTERF,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = 2*N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index d9d080c..75a6da4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV
+      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACPY, DLASCL, DORMTR, DSCAL, DSTEDC, DSTERF,
             LIWMIN = 1
             LWMIN = 1
          ELSE
-            KD    = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             IF( WANTZ ) THEN
                LIWMIN = 3 + 5*N
                LWMIN = 1 + 6*N + 2*N**2
index 42f6081..d140426 100644 (file)
@@ -88,7 +88,7 @@
 *>
 *> Note 1 : DSYEVR calls DSTEMR when the full spectrum is requested
 *> on machines which conform to the ieee-754 floating point standard.
-*> DSYEVR calls DSTEBZ and SSTEIN on non-ieee machines and
+*> DSYEVR calls DSTEBZ and DSTEIN on non-ieee machines and
 *> when partial spectrum requests are made.
 *>
 *> Normal execution of DSTEMR may create NaNs and infinities and
      $                   ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index ae62582..847acce 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV, ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DORMTR, DSCAL, DSTEBZ, DSTEMR, DSTEIN,
 *
       LQUERY = ( ( LWORK.EQ.-1 ) .OR. ( LIWORK.EQ.-1 ) )
 *
-      KD     = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-      LHTRD  = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-      LWTRD  = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+      LHTRD  = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      LWTRD  = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
       LWMIN  = MAX( 26*N, 5*N + LHTRD + LWTRD )
       LIWMIN = MAX( 1, 10*N )
 *
index 97ca806..7a93ac0 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, DLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANSY
+      EXTERNAL           LSAME, DLAMCH, DLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DLACPY, DORGTR, DORMTR, DSCAL, DSTEBZ,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            KD    = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = MAX( 8*N, 3*N + LHTRD + LWTRD )
             WORK( 1 )  = LWMIN
          END IF
index b7da00f..5b1a176 100644 (file)
@@ -46,7 +46,7 @@
 *> positive definite.
 *> This routine use the 2stage technique for the reduction to tridiagonal
 *> which showed higher performance on recent architecture and for large
-*  sizes N>2000.
+*> sizes N>2000.
 *> \endverbatim
 *
 *  Arguments:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DPOTRF, DSYGST, DTRMM, DTRSM, XERBLA,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = 2*N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index e458f12..cbccd5e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
-*
-*  @precisions fortran d -> z c
+*> \date November 2017
 *
 *> \ingroup doubleSYsolve
 *
       SUBROUTINE DSYSV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                     LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, DSYTRF, DSYTRS, DSYTRS2
+      EXTERNAL           XERBLA, DSYTRF_AA, DSYTRS_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/dsysv_aa_2stage.f b/lapack-netlib/SRC/dsysv_aa_2stage.f
new file mode 100644 (file)
index 0000000..ac3c77d
--- /dev/null
@@ -0,0 +1,280 @@
+*> \brief <b> DSYSV_AA_2STAGE computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* @generated from SRC/chesv_aa_2stage.f, fortran c -> d, Tue Oct 31 11:22:31 2017
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download DSYSV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsysv_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsysv_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsysv_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE DSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       DOUBLE PRECISION   A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DSYSV_AA_2STAGE computes the solution to a real system of
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**T,  if UPLO = 'U', or
+*>    A = L * T * L**T,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is symmetric and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is DOUBLE PRECISION array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup doubleSYsolve
+*
+*  =====================================================================
+      SUBROUTINE DSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            LWKOPT
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DSYTRF_AA_2STAGE, DSYTRS_AA_2STAGE,
+     $                   XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DSYSV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*
+*     Compute the factorization A = U*T*U**T or A = L*T*L**T.
+*
+      CALL DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL DSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+      RETURN
+*
+*     End of DSYSV_AA_2STAGE
+*
+      END
index 9997ecd..522602b 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension LWORK.
+*>          WORK is DOUBLE PRECISION array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          VECT, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. Executable Statements ..
 *
 *
 *     Determine the block size, the workspace size and the hous size.
 *
-      KD     = ILAENV( 17, 'DSYTRD_2STAGE', VECT, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'DSYTRD_2STAGE', VECT, N, KD, -1, -1 )
-      LHMIN  = ILAENV( 19, 'DSYTRD_2STAGE', VECT, N, KD, IB, -1 )
-      LWMIN  = ILAENV( 20, 'DSYTRD_2STAGE', VECT, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'DSYTRD_2STAGE', VECT, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'DSYTRD_2STAGE', VECT, N, KD, -1, -1 )
+      LHMIN  = ILAENV2STAGE( 3, 'DSYTRD_2STAGE', VECT, N, KD, IB, -1 )
+      LWMIN  = ILAENV2STAGE( 4, 'DSYTRD_2STAGE', VECT, N, KD, IB, -1 )
 *      WRITE(*,*),'DSYTRD_2STAGE N KD UPLO LHMIN LWMIN ',N, KD, UPLO,
 *     $            LHMIN, LWMIN
 *
index 59ef013..1e86000 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup real16OTHERcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          STAGE1, UPLO, VECT
      $                   SIDEV, SIZETAU, LDV, LHMIN, LWMIN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSB2ST_KERNELS, DLACPY, DLASET
+      EXTERNAL           DSB2ST_KERNELS, DLACPY, DLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN, MAX, CEILING, REAL
index a0e028a..85337f7 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension LWORK.
+*>          WORK is DOUBLE PRECISION array, dimension (LWORK)
 *>          On exit, if INFO = 0, or if LWORK=-1, 
 *>          WORK(1) returns the size of LWORK.
 *> \endverbatim
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK which should be calculated
-*           by a workspace query. LWORK = MAX(1, LWORK_QUERY)
+*>          by a workspace query. LWORK = MAX(1, LWORK_QUERY)
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *>          this value as the first entry of the WORK array, and no error
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *>
 *>  where tau is a real scalar, and v is a real vector with
 *>  v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in
-*   A(i+kd+2:n,i), and tau in TAU(i).
+*>  A(i+kd+2:n,i), and tau in TAU(i).
 *>
 *>  The contents of A on exit are illustrated by the following examples
 *>  with n = 5:
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
      $                   TPOS, WPOS, S2POS, S1POS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, DSYR2K, DSYMM, DGEMM,
+      EXTERNAL           XERBLA, DSYR2K, DSYMM, DGEMM, DCOPY,
      $                   DLARFT, DGELQF, DGEQRF, DLASET
 *     ..
 *     .. Intrinsic Functions ..
index c3d598b..24b3f39 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL            LQUERY, UPPER
-      INTEGER            J, LWKOPT, IINFO
+      INTEGER            J, LWKOPT
       INTEGER            NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       DOUBLE PRECISION   ALPHA
 *     ..
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           DLASYF_AA, DGEMM, DGEMV, DSCAL, DCOPY, DSWAP,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'DSYTRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       ENDIF
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL DLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( MAX(1, J), J+1 ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                      IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL DLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( J+1, MAX(1, J) ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/dsytrf_aa_2stage.f b/lapack-netlib/SRC/dsytrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..2991305
--- /dev/null
@@ -0,0 +1,647 @@
+*> \brief \b DSYTRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download DSYTRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       DOUBLE PRECISION   A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DSYTRF_AA_2STAGE computes the factorization of a real symmetric matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a symmetric band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is DOUBLE PRECISION array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup doubleSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE DSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      DOUBLE PRECISION   A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      DOUBLE PRECISION   PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, DCOPY, DLACGV, DLACPY,
+     $                   DLASET, DGBTRF, DGEMM,  DGETRF, 
+     $                   DSYGST, DSWAP, DTRSM 
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DSYTRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'DSYTRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I .EQ. 1 ) THEN
+*                 H(I,J) = T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE 
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. J-1) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL DLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL DGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( 1, J*NB+1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL DGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL DSYGST( 1, 'Upper', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $                = TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL DGEMM( 'Transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -ONE, WORK( NB+1 ), N,
+     $                          A( 1, (J+1)*NB+1 ), LDA,
+     $                     ONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call DGETRF
+*
+               DO K = 1, NB
+                   CALL DCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL DGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+                   CALL DCOPY( N-(J+1)*NB,
+     $                         WORK( 1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL DLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL DLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL DTRSM( 'R', 'U', 'N', 'U', KB, NB, ONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL DLASET( 'Lower', KB, NB, ZERO, ONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL DSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL DSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL DSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL DSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. J-1) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                   CALL DGEMM( 'NoTranspose', 'Transpose',
+     $                     NB, KB, JB,
+     $                     ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                          A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                     ZERO, WORK( I*NB+1 ), N )
+               ELSE 
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. J-1) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL DGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL DLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( J*NB+1, 1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL DGEMM( 'NoTranspose', 'Transpose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL DSYGST( 1, 'Lower', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL DGEMM( 'NoTranspose', 'Transpose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL DGEMM( 'NoTranspose', 'Transpose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL DGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -ONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                          WORK( NB+1 ), N,
+     $                     ONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL DGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL DLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL DLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL DTRSM( 'R', 'L', 'T', 'U', KB, NB, ONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL DLASET( 'Upper', KB, NB, ZERO, ONE, 
+     $                      A( (J+1)*NB+1, J*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL DSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL DSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL DSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL DSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL DLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL DGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of DSYTRF_AA_2STAGE
+*
+      END
index 0d5b029..9aa21a8 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSYTRI, DSYTRI2X
+      EXTERNAL           DSYTRI, DSYTRI2X, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index bcd5c94..ae29f12 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (N+NNB+1,NNB+3)
+*>          WORK is DOUBLE PRECISION array, dimension (N+NB+1,NB+3)
 *> \endverbatim
 *>
 *> \param[in] NB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 3437e14..d1980f8 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE DSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSYTRI_3X
+      EXTERNAL           DSYTRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index fecde38..d95e627 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE DSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 85c09e0..2d61f6b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE DSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index b572581..05ef31f 100644 (file)
@@ -66,7 +66,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          Details of factors computed by DSYTRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleSYcomputational
 *
       SUBROUTINE DSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGTSV, DSWAP, DTRSM, XERBLA
+      EXTERNAL           DLACPY, DGTSV, DSWAP, DTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/dsytrs_aa_2stage.f b/lapack-netlib/SRC/dsytrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..caff5d4
--- /dev/null
@@ -0,0 +1,281 @@
+*> \brief \b DSYTRS_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download DSYTRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE DSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       DOUBLE PRECISION   A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DSYTRS_AA_2STAGE solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by DSYTRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          Details of factors computed by DSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is DOUBLE PRECISION array, dimension (LTB)
+*>          Details of factors computed by DSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          DSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          DSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup doubleSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE DSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      DOUBLE PRECISION   A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      DOUBLE PRECISION   ONE
+      PARAMETER          ( ONE = 1.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DGBTRS, DLASWP, DTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DSYTRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL DLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL DTRSM( 'L', 'U', 'T', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL DGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL DTRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL DLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL DLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL DTRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL DGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL DTRSM( 'L', 'L', 'T', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL DLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of DSYTRS_AA_2STAGE
+*
+      END
index 9f49239..22323cf 100644 (file)
 *> \verbatim
 *>          PL is DOUBLE PRECISION
 *> \endverbatim
-
+*>
 *> \param[out] PR
 *> \verbatim
 *>          PR is DOUBLE PRECISION
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array,
-*>          dimension (MAX(1,LWORK))
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
 *>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
      $                   ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
      $                   PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index b312c50..4712950 100644 (file)
@@ -73,8 +73,8 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array, dimension (LDA,N)
-*>          On entry, the lower triangular N-by-N matrix A.
+*>          A is DOUBLE PRECISION array, dimension (LDA,M)
+*>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
 *> \endverbatim
@@ -82,7 +82,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ] [ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>          [ B ] = [ B1 ] [ B2 ]
 *>                   [ B1 ]  <- M-by-(N-L) rectangular
-*>                   [ B2 ]  <-     M-by-L upper trapezoidal.
+*>                   [ B2 ]  <-     M-by-L lower trapezoidal.
 *>
 *>  The lower trapezoidal matrix B2 consists of the first L columns of a
-*>  N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
 *>  B is rectangular M-by-N; if M=L=N, B is lower triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th row
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>            [ C ] = [ A ] [ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>            [ W ] = [ I ] [ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
       SUBROUTINE DTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDB, LDT, N, M, L, MB
index 7e87e6c..e2fefb6 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          A is DOUBLE PRECISION array, dimension (LDA,M)
 *>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
@@ -74,7 +74,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ][ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>
 *>               C = [ A ][ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>
 *>               W = [ I ][ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
 *  =====================================================================
       SUBROUTINE DTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, LDB, LDT, N, M, L
index fd31bed..3782d0c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
       SUBROUTINE DTPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, DLARFB
+      EXTERNAL           XERBLA, DLARFB, DTPRFB
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index ba9fdf8..44985a8 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
       SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           DTPRFB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index 921f514..2ed3efa 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
       SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
      $                   LDVR, MM, M, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
       EXTERNAL           LSAME, IDAMAX, DDOT, DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA
+      EXTERNAL           DLABAD, DAXPY, DCOPY, DGEMV, DLALN2, DSCAL,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
index e6c0f2f..745f636 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @precisions fortran d -> s
 *
      $                    VR, LDVR, MM, M, WORK, LWORK, INFO )
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA,
-     $                   DGEMM, DLASET, DLABAD
+     $                   DGEMM, DLASET, DLABAD, DLACPY
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
index 2966e5f..dd0ad2f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
      $                   LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, JOB
       EXTERNAL           LSAME, DDOT, DLAMCH, DLAPY2, DNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLACN2, DLACPY, DLAQTR, DTREXC, XERBLA
+      EXTERNAL           DLABAD, DLACN2, DLACPY, DLAQTR, DTREXC, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
index ac10ef4..5ee3dd5 100644 (file)
@@ -74,7 +74,7 @@
 *>
 *> \param[out] AP
 *> \verbatim
-*>          AP is DOUBLE PRECISION array, dimension (N*(N+1)/2
+*>          AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
 *>          On exit, the upper or lower triangular matrix A, packed
 *>          columnwise in a linear array. The j-th column of A is stored
 *>          in the array AP as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index c2e0584..3aad730 100644 (file)
@@ -53,7 +53,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is array, dimension (LDA,N)
+*>          A is COMPLEX array, dimension (LDA,N)
 *>          The m by n matrix A.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complexOTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILACLR( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
index 2be0581..a438ada 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*( * )    NAME, OPTS
 *
 *     .. Local Scalars ..
       INTEGER            I, IC, IZ, NB, NBMIN, NX
-      LOGICAL            CNAME, SNAME
-      CHARACTER          C1*1, C2*2, C4*2, C3*3, SUBNAM*6
+      LOGICAL            CNAME, SNAME, TWOSTAGE
+      CHARACTER          C1*1, C2*2, C4*2, C3*3, SUBNAM*16
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          CHAR, ICHAR, INT, MIN, REAL
 *     .. Executable Statements ..
 *
       GO TO ( 10, 10, 10, 80, 90, 100, 110, 120,
-     $        130, 140, 150, 160, 160, 160, 160, 160,
-     $        170, 170, 170, 170, 170 )ISPEC
+     $        130, 140, 150, 160, 160, 160, 160, 160)ISPEC
 *
 *     Invalid value for ISPEC
 *
       C2 = SUBNAM( 2: 3 )
       C3 = SUBNAM( 4: 6 )
       C4 = C3( 2: 3 )
+      TWOSTAGE = LEN( SUBNAM ).GE.11
+     $           .AND. SUBNAM( 11: 11 ).EQ.'2'
 *
       GO TO ( 50, 60, 70 )ISPEC
 *
       ELSE IF( C2.EQ.'SY' ) THEN
          IF( C3.EQ.'TRF' ) THEN
             IF( SNAME ) THEN
-               NB = 64
+               IF( TWOSTAGE ) THEN
+                  NB = 192
+               ELSE
+                  NB = 64
+               END IF
             ELSE
-               NB = 64
+               IF( TWOSTAGE ) THEN
+                  NB = 192
+               ELSE
+                  NB = 64
+               END IF
             END IF
          ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN
             NB = 32
          END IF
       ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN
          IF( C3.EQ.'TRF' ) THEN
-            NB = 64
+            IF( TWOSTAGE ) THEN
+               NB = 192
+            ELSE
+               NB = 64
+            END IF
          ELSE IF( C3.EQ.'TRD' ) THEN
             NB = 32
          ELSE IF( C3.EQ.'GST' ) THEN
       ILAENV = IPARMQ( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
       RETURN
 *
-  170 CONTINUE
-*
-*     17 <= ISPEC <= 21: 2stage eigenvalues and SVD or related subroutines.
-*
-      ILAENV = IPARAM2STAGE( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
-      RETURN
-*
 *     End of ILAENV
 *
       END
diff --git a/lapack-netlib/SRC/ilaenv2stage.f b/lapack-netlib/SRC/ilaenv2stage.f
new file mode 100644 (file)
index 0000000..3c0d34a
--- /dev/null
@@ -0,0 +1,191 @@
+*> \brief \b ILAENV2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ILAENV2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaenv2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaenv2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaenv2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       INTEGER FUNCTION ILAENV2STAGE( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER*( * )    NAME, OPTS
+*       INTEGER            ISPEC, N1, N2, N3, N4
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ILAENV2STAGE is called from the LAPACK routines to choose problem-dependent
+*> parameters for the local environment.  See ISPEC for a description of
+*> the parameters.
+*> It sets problem and machine dependent parameters useful for *_2STAGE and
+*> related subroutines.
+*>
+*> ILAENV2STAGE returns an INTEGER
+*> if ILAENV2STAGE >= 0: ILAENV2STAGE returns the value of the parameter
+*                        specified by ISPEC
+*> if ILAENV2STAGE < 0:  if ILAENV2STAGE = -k, the k-th argument had an
+*                        illegal value.
+*>
+*> This version provides a set of parameters which should give good,
+*> but not optimal, performance on many of the currently available
+*> computers for the 2-stage solvers. Users are encouraged to modify this
+*> subroutine to set the tuning parameters for their particular machine using
+*> the option and problem size information in the arguments.
+*>
+*> This routine will not function correctly if it is converted to all
+*> lower case.  Converting it to all upper case is allowed.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] ISPEC
+*> \verbatim
+*>          ISPEC is INTEGER
+*>          Specifies the parameter to be returned as the value of
+*>          ILAENV2STAGE.
+*>          = 1: the optimal blocksize nb for the reduction to BAND
+*>
+*>          = 2: the optimal blocksize ib for the eigenvectors
+*>               singular vectors update routine
+*>
+*>          = 3: The length of the array that store the Housholder 
+*>               representation for the second stage 
+*>               Band to Tridiagonal or Bidiagonal
+*>
+*>          = 4: The workspace needed for the routine in input.
+*>
+*>          = 5: For future release.
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*>          NAME is CHARACTER*(*)
+*>          The name of the calling subroutine, in either upper case or
+*>          lower case.
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*>          OPTS is CHARACTER*(*)
+*>          The character options to the subroutine NAME, concatenated
+*>          into a single character string.  For example, UPLO = 'U',
+*>          TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*>          be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*>          N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*>          N2 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N3
+*> \verbatim
+*>          N3 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N4
+*> \verbatim
+*>          N4 is INTEGER
+*>          Problem dimensions for the subroutine NAME; these may not all
+*>          be required.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*> \author Nick R. Papior
+*
+*> \date July 2017
+*
+*> \ingroup OTHERauxiliary
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The following conventions have been used when calling ILAENV2STAGE
+*> from the LAPACK routines:
+*>  1)  OPTS is a concatenation of all of the character options to
+*>      subroutine NAME, in the same order that they appear in the
+*>      argument list for NAME, even if they are not used in determining
+*>      the value of the parameter specified by ISPEC.
+*>  2)  The problem dimensions N1, N2, N3, N4 are specified in the order
+*>      that they appear in the argument list for NAME.  N1 is used
+*>      first, N2 second, and so on, and unused problem dimensions are
+*>      passed a value of -1.
+*>  3)  The parameter value returned by ILAENV2STAGE is checked for validity in
+*>      the calling subroutine.
+*>     
+*> \endverbatim
+*>
+*  =====================================================================
+      INTEGER FUNCTION ILAENV2STAGE( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
+*
+*  -- LAPACK auxiliary routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     July 2017
+*
+*     .. Scalar Arguments ..
+      CHARACTER*( * )    NAME, OPTS
+      INTEGER            ISPEC, N1, N2, N3, N4
+*     ..
+*
+*  =====================================================================
+*     ..
+*     .. Local Scalars ..
+      INTEGER            IISPEC
+*     ..
+*     .. External Functions ..
+      INTEGER            IPARAM2STAGE
+      EXTERNAL           IPARAM2STAGE
+*     ..
+*     .. Executable Statements ..
+*
+      GO TO ( 10, 10, 10, 10, 10 )ISPEC
+*
+*     Invalid value for ISPEC
+*
+      ILAENV2STAGE = -1
+      RETURN
+*
+   10 CONTINUE
+*
+*     2stage eigenvalues and SVD or related subroutines.
+*
+      IISPEC = 16 + ISPEC
+      ILAENV2STAGE = IPARAM2STAGE( IISPEC, NAME, OPTS,
+     $                             N1, N2, N3, N4 )
+      RETURN
+*
+*     End of ILAENV2STAGE
+*
+      END
index d7770fd..e59c575 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILASLC( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
@@ -94,7 +94,7 @@
 *
 *     .. Parameters ..
       REAL             ZERO
-      PARAMETER ( ZERO = 0.0D+0 )
+      PARAMETER ( ZERO = 0.0E+0 )
 *     ..
 *     .. Local Scalars ..
       INTEGER I
diff --git a/lapack-netlib/SRC/ilaver.f b/lapack-netlib/SRC/ilaver.f
deleted file mode 100644 (file)
index a99f727..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-*> \brief \b ILAVER returns the LAPACK version.
-**
-*  =========== DOCUMENTATION ===========
-*
-* Online html documentation available at
-*            http://www.netlib.org/lapack/explore-html/
-*
-*  Definition:
-*  ===========
-*
-*     SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
-*
-*     INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
-*
-*
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*>  This subroutine returns the LAPACK version.
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*>  \param[out] VERS_MAJOR
-*>  \verbatim
-*>      return the lapack major version
-*>  \endverbatim
-*>
-*>  \param[out] VERS_MINOR
-*>  \verbatim
-*>      return the lapack minor version from the major version
-*>  \endverbatim
-*>
-*>  \param[out] VERS_PATCH
-*>  \verbatim
-*>      return the lapack patch version from the minor version
-*>  \endverbatim
-*
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \date December 2016
-*
-*> \ingroup OTHERauxiliary
-*
-*  =====================================================================
-      SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
-*
-*  -- LAPACK computational routine (version 3.7.0) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     June 2016
-*
-*  =====================================================================
-*
-      INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
-*  =====================================================================
-      VERS_MAJOR = 3
-      VERS_MINOR = 7
-      VERS_PATCH = 0
-*  =====================================================================
-*
-      RETURN
-      END
index 0fc1795..836e20e 100644 (file)
@@ -38,7 +38,9 @@
 *>      useful for xHETRD_2STAGE, xHETRD_H@2HB, xHETRD_HB2ST,
 *>      xGEBRD_2STAGE, xGEBRD_GE2GB, xGEBRD_GB2BD 
 *>      and related subroutines for eigenvalue problems. 
-*>      It is called whenever ILAENV is called with 17 <= ISPEC <= 21
+*>      It is called whenever ILAENV is called with 17 <= ISPEC <= 21.
+*>      It is called whenever ILAENV2STAGE is called with 1 <= ISPEC <= 5
+*>      with a direct conversion ISPEC + 16.
 *> \endverbatim
 *
 *  Arguments:
 #endif
       IMPLICIT NONE
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       INTEGER            I, IC, IZ, KD, IB, LHOUS, LWORK, NTHREADS,
      $                   FACTOPTNB, QROPTNB, LQOPTNB
       LOGICAL            RPREC, CPREC
-      CHARACTER          PREC*1, ALGO*3, STAG*5, SUBNAM*12, VECT*3
+      CHARACTER          PREC*1, ALGO*3, STAG*5, SUBNAM*12, VECT*1
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          CHAR, ICHAR, MAX
index c0dedc9..e576e0d 100644 (file)
@@ -41,7 +41,7 @@
 *
 *> \param[in] ISPEC
 *> \verbatim
-*>          ISPEC is integer scalar
+*>          ISPEC is INTEGER
 *>              ISPEC specifies which tunable parameter IPARMQ should
 *>              return.
 *>
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
+*>          N is INTEGER
 *>               N is the order of the Hessenberg matrix H.
 *> \endverbatim
 *>
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer scalar
+*>          LWORK is INTEGER
 *>               The amount of workspace available.
 *> \endverbatim
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, ISPEC, LWORK, N
index 6d1d833..e1f8397 100644 (file)
 *>
 *> \param[in,out] V2T
 *> \verbatim
-*>          V2T is REAL array, dimenison (LDV2T,M-Q)
+*>          V2T is REAL array, dimension (LDV2T,M-Q)
 *>          On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is
 *>          premultiplied by the transpose of the right
 *>          singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
      $                   V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
      $                   B22D, B22E, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 21c0b64..1c559ce 100644 (file)
       SUBROUTINE SBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       WSTART = 1
       QSTART = 3
       IF( ICOMPQ.EQ.1 ) THEN
-         CALL SCOPY( N,   D, 1, Q( 1   ), 1 )
+         CALL SCOPY( N, D, 1, Q( 1 ), 1 )
          CALL SCOPY( N-1, E, 1, Q( N+1 ), 1 )
       END IF
       IF( IUPLO.EQ.2 ) THEN
          QSTART = 5
-         WSTART = 2*N - 1
+         IF( ICOMPQ .EQ. 2 ) WSTART = 2*N - 1
          DO 10 I = 1, N - 1
             CALL SLARTG( D( I ), E( I ), CS, SN, R )
             D( I ) = R
index e80ac4e..b0067f6 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE SBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
      $                   LDU, C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LOWER, ROTATE
-      INTEGER            I, IDIR, ISUB, ITER, ITERDIVN J, LL, LLL, M,
+      INTEGER            I, IDIR, ISUB, ITER, ITERDIVN, J, LL, LLL, M,
      $                   MAXITDIVN, NM1, NM12, NM13, OLDLL, OLDM
       REAL               ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU,
      $                   OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL,
 *
       IF( M.LE.1 )
      $   GO TO 160
-*     
+*
       IF( ITER.GE.N ) THEN
-         ITER = ITER - N 
+         ITER = ITER - N
          ITERDIVN = ITERDIVN + 1
          IF( ITERDIVN.GE.MAXITDIVN )
-     $   GO TO 200
+     $      GO TO 200
       END IF
 *
 *     Find diagonal block of matrix to work on
index 4fa16ec..a4b1887 100644 (file)
       SUBROUTINE SBDSVDX( UPLO, JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
      $                    NS, S, Z, LDZ, WORK, IWORK, INFO)
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
       EXTERNAL           ISAMAX, LSAME, SAXPY, SDOT, SLAMCH, SNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SCOPY, SLASET, SSCAL, SSWAP
+      EXTERNAL           SCOPY, SLASET, SSCAL, SSWAP, SSTEVX, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, REAL, SIGN, SQRT
index eb125fb..2123ce2 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is REAL array dimension (min(M,N))
+*>          TAUQ is REAL array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEcomputational
 *
 *  =====================================================================
       SUBROUTINE SGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
index 0f38156..e825b4f 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is REAL array dimension (min(M,N))
+*>          TAUQ is REAL array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realGEcomputational
 *
       SUBROUTINE SGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
 *     .. Local Scalars ..
       LOGICAL            LQUERY
       INTEGER            I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
-     $                   NBMIN, NX
-      REAL               WS
+     $                   NBMIN, NX, WS
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SGEBD2, SGEMM, SLABRD, XERBLA
index 06319bf..06c4513 100644 (file)
@@ -80,7 +80,7 @@
 *>
 *> \param[in] SELECT
 *> \verbatim
-*>          SELECT is LOGICAL FUNCTION of two REAL arguments
+*>          SELECT is LOGICAL FUNCTION of two REAL arguments
 *>          SELECT must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'S', SELECT is used to select eigenvalues to sort
 *>          to the top left of the Schur form.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEeigen
 *
       SUBROUTINE SGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
      $                  VS, LDVS, WORK, LWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVS, SORT
index 164cc6f..b11f500 100644 (file)
 *       .. Scalar Arguments ..
 *       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
 *       INTEGER            IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
-*       REAL   ABNRM
+*       REAL               ABNRM
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IWORK( * )
-*       REAL   A( LDA, * ), RCONDE( * ), RCONDV( * ),
+*       REAL               A( LDA, * ), RCONDE( * ), RCONDV( * ),
 *      $                   SCALE( * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   WI( * ), WORK( * ), WR( * )
 *       ..
      $                   RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
       implicit none
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Scalar Arguments ..
       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
       INTEGER            IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
-      REAL   ABNRM
+      REAL               ABNRM
 *     ..
 *     .. Array Arguments ..
       INTEGER            IWORK( * )
-      REAL   A( LDA, * ), RCONDE( * ), RCONDV( * ),
+      REAL               A( LDA, * ), RCONDE( * ), RCONDV( * ),
      $                   SCALE( * ), VL( LDVL, * ), VR( LDVR, * ),
      $                   WI( * ), WORK( * ), WR( * )
 *     ..
       CHARACTER          JOB, SIDE
       INTEGER            HSWORK, I, ICOND, IERR, ITAU, IWRK, K,
      $                   LWORK_TREVC, MAXWRK, MINWRK, NOUT
-      REAL   ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM,
+      REAL               ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM,
      $                   SN
 *     ..
 *     .. Local Arrays ..
       LOGICAL            SELECT( 1 )
-      REAL   DUM( 1 )
+      REAL               DUM( 1 )
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SGEBAK, SGEBAL, SGEHRD, SHSEQR, SLABAD, SLACPY,
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ISAMAX, ILAENV
-      REAL   SLAMCH, SLANGE, SLAPY2, SNRM2
+      REAL               SLAMCH, SLANGE, SLAPY2, SNRM2
       EXTERNAL           LSAME, ISAMAX, ILAENV, SLAMCH, SLANGE, SLAPY2,
      $                   SNRM2
 *     ..
index 589cf07..e4cbe8d 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension at least LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *>          On exit,
 *>          WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
 *>                    that SCALE*SVA(1:N) are the computed singular values
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array, dimension M+3*N.
+*>          IWORK is INTEGER array, dimension (M+3*N).
 *>          On exit,
 *>          IWORK(1) = the numerical rank determined after the initial
 *>                     QR factorization with pivoting. See the descriptions
      $                   M, N, A, LDA, SVA, U, LDU, V, LDV,
      $                   WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 786255d..9a93af3 100644 (file)
@@ -91,7 +91,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *>
 *>  where the vi's represent the vectors which define H(i), which are returned
 *>  in the matrix A.  The 1's along the diagonal of V are not stored in A.
-*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/NB), where each
-*>  block is of order NB except for the last block, which is of order
-*>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/MB), where each
+*>  block is of order MB except for the last block, which is of order
+*>  IB = K - (B-1)*MB.  For each of the B blocks, a upper triangular block
+*>  reflector factor is computed: T1, T2, ..., TB.  The MB-by-MB (and IB-by-IB
+*>  for the last block) T's are stored in the MB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE SGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, MB
       INTEGER    I, IB, IINFO, K
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL   SGEQRT2, SGEQRT3, SLARFB, XERBLA
+      EXTERNAL   SGEQRT2, SGEQRT3, SGELQT3, SLARFB, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index b94fc27..292ae88 100644 (file)
@@ -83,7 +83,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
@@ -92,8 +92,8 @@
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *  =====================================================================
       RECURSIVE SUBROUTINE SGELQT3( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, M, N, LDT
 *
 *     .. Parameters ..
       REAL   ONE
-      PARAMETER ( ONE = 1.0D+00 )
+      PARAMETER ( ONE = 1.0E+00 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER   I, I1, J, J1, M1, M2, N1, N2, IINFO
+      INTEGER   I, I1, J, J1, M1, M2, IINFO
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL  DLARFG, DTRMM, DGEMM, XERBLA
+      EXTERNAL  SLARFG, STRMM, SGEMM, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 91656a9..9a18961 100644 (file)
@@ -89,7 +89,7 @@
 *>          of the matrices B and X. NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
 *>          A is REAL array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEsolve
 *
       SUBROUTINE SGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND,
      $                   RANK, WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
index 4707434..a8f022b 100644 (file)
@@ -18,7 +18,7 @@
 *>
 *> \verbatim
 *>
-*> DGEMQRT overwrites the general real M-by-N matrix C with
+*> DGEMLQT overwrites the general real M-by-N matrix C with
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q C            C Q
@@ -82,7 +82,9 @@
 *>
 *> \param[in] V
 *> \verbatim
-*>          V is REAL array, dimension (LDV,K)
+*>          V is REAL array, dimension
+*>                               (LDV,M) if SIDE = 'L',
+*>                               (LDV,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
 *>          DGELQT in the first K rows of its array argument A.
 *> \param[in] LDV
 *> \verbatim
 *>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
+*>          The leading dimension of the array V. LDV >= max(1,K).
 *> \endverbatim
 *>
 *> \param[in] T
 *> \verbatim
 *>          T is REAL array, dimension (LDT,K)
 *>          The upper triangular factors of the block reflectors
-*>          as returned by DGELQT, stored as a MB-by-M matrix.
+*>          as returned by DGELQT, stored as a MB-by-K matrix.
 *> \endverbatim
 *>
 *> \param[in] LDT
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE SGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT,
      $                   C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, RIGHT, TRAN, NOTRAN
-      INTEGER            I, IB, LDWORK, KF, Q
+      INTEGER            I, IB, LDWORK, KF
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, DLARFB
+      EXTERNAL           XERBLA, SLARFB
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index d8b9fad..f7c5817 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEcomputational
 *
 *>  block is of order NB except for the last block, which is of order
 *>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
 *>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  for the last block) T's are stored in the NB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE SGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, NB
index 24422fd..d74e98f 100644 (file)
      $                    IL, IU, NS, S, U, LDU, VT, LDVT, WORK,
      $                    LWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
       EXTERNAL           SBDSVDX, SGEBRD, SGELQF, SGEQRF, SLACPY,
      $                   SLASCL, SLASET, SORMBR, SORMLQ, SORMQR,
-     $                   XERBLA
+     $                   SCOPY, XERBLA
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 5e53cea..7a79011 100644 (file)
@@ -54,7 +54,7 @@
 *
 *> \param[in] JOBA
 *> \verbatim
-*>          JOBA is CHARACTER* 1
+*>          JOBA is CHARACTER*1
 *>          Specifies the structure of A.
 *>          = 'L': The input matrix A is lower triangular;
 *>          = 'U': The input matrix A is upper triangular;
 *>
 *> \param[in,out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension MAX(6,M+N).
+*>          WORK is REAL array, dimension (LWORK)
 *>          On entry,
 *>          If JOBU .EQ. 'C' :
 *>          WORK(1) = CTOL, where CTOL defines the threshold for convergence.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEcomputational
 *
       SUBROUTINE SGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
      $                   LDV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N
index a7e778b..aa826f6 100644 (file)
@@ -38,7 +38,7 @@
 *>
 *>        [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
 *>    A = [ -----|----- ]  with n1 = min(m,n)/2
-*         [  A21 | A22  ]       n2 = n-n1
+*>        [  A21 | A22  ]       n2 = n-n1
 *>
 *>                                       [ A11 ]
 *> The subroutine calls itself to factor [ --- ],
 *  =====================================================================
       RECURSIVE SUBROUTINE SGETRF2( M, N, A, LDA, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index b2312d6..35af66c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEsolve
 *
       SUBROUTINE SGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB,
      $                    WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       INTEGER            I, IASCL, IBSCL, J, MINMN, MAXMN, BROW,
      $                   SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2,
      $                   WSIZEO, WSIZEM, INFO2
-      REAL               ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ
+      REAL               ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ( 1 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
        IF( M.GE.N ) THEN
          CALL SGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL SGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL SGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL SGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZM, B, LDB, WORKQ, -1, INFO2 )
-         LWM = MAX( LWM, INT( WORKQ ) )
+         LWM = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        ELSE
          CALL SGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL SGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL SGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL SGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWM  = MAX( LWM, INT( WORKQ ) )
+         LWM  = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        END IF
index 223256d..3c6273d 100644 (file)
 *>
 *> \param[in] SELCTG
 *> \verbatim
-*>          SELCTG is procedure) LOGICAL FUNCTION of three REAL arguments
+*>          SELCTG is a LOGICAL FUNCTION of three REAL arguments
 *>          SELCTG must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'N', SELCTG is not referenced.
 *>          If SORT = 'S', SELCTG is used to select eigenvalues to sort
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEeigen
 *
      $                   VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
      $                   LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
index 758f4b5..add2161 100644 (file)
       SUBROUTINE SGGHD3( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
      $                   LDQ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.1) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SGGHRD, SLARTG, SLASET, SORM22, SROT, XERBLA
+      EXTERNAL           SGGHRD, SLARTG, SLASET, SORM22, SROT, SGEMM,
+     $                   SGEMV, STRMV, SLACPY, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          REAL, MAX
index 690b03e..e580efc 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHERcomputational
 *
       SUBROUTINE SGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
      $                   SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
       EXTERNAL           ISAMAX, LSAME, SDOT, SNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SAXPY, SCOPY, SLASCL, SLASSQ, SROTM, SSWAP
+      EXTERNAL           SAXPY, SCOPY, SLASCL, SLASSQ, SROTM, SSWAP,
+     $                   XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 1005ee2..49b81cf 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHERcomputational
 *
       SUBROUTINE SGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
      $                   EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL               EPS, SFMIN, TOL
       EXTERNAL           ISAMAX, LSAME, SDOT, SNRM2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SAXPY, SCOPY, SLASCL, SLASSQ, SROTM, SSWAP
+      EXTERNAL           SAXPY, SCOPY, SLASCL, SLASSQ, SROTM, SSWAP,
+     $                   XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 05f5974..311bfbf 100644 (file)
@@ -21,7 +21,7 @@
 *       LOGICAL FUNCTION SISNAN( SIN )
 *
 *       .. Scalar Arguments ..
-*       REAL               SIN
+*       REAL, INTENT(IN) :: SIN
 *       ..
 *
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION SISNAN( SIN )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
-      REAL               SIN
+      REAL, INTENT(IN) :: SIN
 *     ..
 *
 *  =====================================================================
index 0798bac..b513f24 100644 (file)
 *>
 *> \param[in] AB
 *> \verbatim
-*>          AB is REAL array of DIMENSION ( LDAB, n )
+*>          AB is REAL array, dimension ( LDAB, n )
 *>           Before entry, the leading m by n part of the array AB must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGBcomputational
 *
       SUBROUTINE SLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
      $                      INCX, BETA, Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index 8262002..a81feb4 100644 (file)
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is REAL array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGBcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
index 35ce8b8..7906d04 100644 (file)
@@ -94,7 +94,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n )
+*>          A is REAL array, dimension ( LDA, n )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is REAL
-*>           Array of DIMENSION at least
+*>          Y is REAL array,
+*>           dimension at least
 *>           ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEcomputational
 *
       SUBROUTINE SLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
      $                       Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index 962e17a..d40e7bd 100644 (file)
@@ -88,7 +88,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION ( LDA, n ).
+*>          A is REAL array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realSYcomputational
 *
       SUBROUTINE SLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index 8073d00..f4e3d73 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is REAL array dimension (NB)
+*>          TAUQ is REAL array, dimension (NB)
 *>          The scalar factors of the elementary reflectors which
 *>          represent the orthogonal matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERauxiliary
 *
       SUBROUTINE SLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
      $                   LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDX, LDY, M, N, NB
index 3ff991d..dffd23e 100644 (file)
 *>
 *> \param[in] Q2
 *> \verbatim
-*>          Q2 is REAL array, dimension (LDQ2N)
+*>          Q2 is REAL array, dimension (LDQ2*N)
 *>          The first K columns of this matrix contain the non-deflated
 *>          eigenvectors for the split problem.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup auxOTHERcomputational
 *
       SUBROUTINE SLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
      $                   CTOT, W, S, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, N, N1
index 32f723d..568d632 100644 (file)
@@ -21,7 +21,7 @@
 *       LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 )
 *
 *       .. Scalar Arguments ..
-*       REAL               SIN1, SIN2
+*       REAL, INTENT(IN) :: SIN1, SIN2
 *       ..
 *
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
-      REAL               SIN1, SIN2
+      REAL, INTENT(IN) :: SIN1, SIN2
 *     ..
 *
 *  =====================================================================
index 65707a1..135a673 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array.
-*>         The dimension must be at least N.
+*>          WORK is REAL array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array.
-*>         The dimension must be at least 3 * N
+*>          IWORK is INTEGER array, dimension (3*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERcomputational
 *
      $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
index ccdddbb..b13d02b 100644 (file)
@@ -18,7 +18,7 @@
 *>
 *> \verbatim
 *>
-*>    DLAMQRTS overwrites the general real M-by-N matrix C with
+*>    SLAMSWLQ overwrites the general real M-by-N matrix C with
 *>
 *>
 *>                    SIDE = 'L'     SIDE = 'R'
@@ -26,7 +26,7 @@
 *>    TRANS = 'T':      Q**T * C       C * Q**T
 *>    where Q is a real orthogonal matrix defined as the product of blocked
 *>    elementary reflectors computed by short wide LQ
-*>    factorization (DLASWLQ)
+*>    factorization (SLASWLQ)
 *> \endverbatim
 *
 *  Arguments:
@@ -49,7 +49,7 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >=0.
+*>          The number of rows of the matrix C.  M >=0.
 *> \endverbatim
 *>
 *> \param[in] N
 *>
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is REAL array, dimension (LDA,K)
+*>          A is REAL array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the blocked
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          DLASWLQ in the first k rows of its array argument A.
+*>          SLASWLQ in the first k rows of its array argument A.
 *> \endverbatim
 *>
 *> \param[in] LDA
       SUBROUTINE SLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $    LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
       END IF
 *
       IF((NB.LE.K).OR.(NB.GE.MAX(M,N,K))) THEN
-        CALL DGEMLQT( SIDE, TRANS, M, N, K, MB, A, LDA,
+        CALL SGEMLQT( SIDE, TRANS, M, N, K, MB, A, LDA,
      $        T, LDT, C, LDC, WORK, INFO)
         RETURN
       END IF
index 747481d..84ac86e 100644 (file)
@@ -81,7 +81,7 @@
 *>          N >= NB >= 1.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is REAL array, dimension (LDA,K)
 *>          The i-th column must contain the vector which defines the
       SUBROUTINE SLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $        LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
index 13e2198..3b1b7e4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       REAL             FUNCTION SLAPY2( X, Y )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               X, Y
 *     ..
 *     .. Local Scalars ..
       REAL               W, XABS, YABS, Z
+      LOGICAL            X_IS_NAN, Y_IS_NAN
+*     ..
+*     .. External Functions ..
+      LOGICAL            SISNAN
+      EXTERNAL           SISNAN
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      XABS = ABS( X )
-      YABS = ABS( Y )
-      W = MAX( XABS, YABS )
-      Z = MIN( XABS, YABS )
-      IF( Z.EQ.ZERO ) THEN
-         SLAPY2 = W
-      ELSE
-         SLAPY2 = W*SQRT( ONE+( Z / W )**2 )
+*     ..
+*     .. Executable Statements ..
+*
+      X_IS_NAN = SISNAN( X )
+      Y_IS_NAN = SISNAN( Y )
+      IF ( X_IS_NAN ) SLAPY2 = X
+      IF ( Y_IS_NAN ) SLAPY2 = Y
+*
+      IF ( .NOT.( X_IS_NAN.OR.Y_IS_NAN ) ) THEN
+         XABS = ABS( X )
+         YABS = ABS( Y )
+         W = MAX( XABS, YABS )
+         Z = MIN( XABS, YABS )
+         IF( Z.EQ.ZERO ) THEN
+            SLAPY2 = W
+         ELSE
+            SLAPY2 = W*SQRT( ONE+( Z / W )**2 )
+         END IF
       END IF
       RETURN
 *
index 7e35b80..7d7d851 100644 (file)
 *
 *> \param[in] N
 *> \verbatim
-*>          N is integer
+*>          N is INTEGER
 *>              Order of the matrix H. N must be either 2 or 3.
 *> \endverbatim
 *>
 *> \param[in] H
 *> \verbatim
-*>          H is REAL array of dimension (LDH,N)
+*>          H is REAL array, dimension (LDH,N)
 *>              The 2-by-2 or 3-by-3 matrix H in (*).
 *> \endverbatim
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>              The leading dimension of H as declared in
 *>              the calling procedure.  LDH.GE.N
 *> \endverbatim
@@ -95,7 +95,7 @@
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is REAL array of dimension N
+*>          V is REAL array, dimension (N)
 *>              A scalar multiple of the first column of the
 *>              matrix K in (*).
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE SLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               SI1, SI2, SR1, SR2
index 1bcb138..8e1f349 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SR
 *> \verbatim
-*>          SR is REAL array, dimension KBOT
+*>          SR is REAL array, dimension (KBOT)
 *> \endverbatim
 *>
 *> \param[out] SI
 *> \verbatim
-*>          SI is REAL array, dimension KBOT
+*>          SI is REAL array, dimension (KBOT)
 *>          On output, the real and imaginary parts of approximate
 *>          eigenvalues that may be used for shifts are stored in
 *>          SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERauxiliary
 *
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
index 2fabacf..534e2c4 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SR
 *> \verbatim
-*>          SR is REAL array, dimension KBOT
+*>          SR is REAL array, dimension (KBOT)
 *> \endverbatim
 *>
 *> \param[out] SI
 *> \verbatim
-*>          SI is REAL array, dimension KBOT
+*>          SI is REAL array, dimension (KBOT)
 *>          On output, the real and imaginary parts of approximate
 *>          eigenvalues that may be used for shifts are stored in
 *>          SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index ea3910a..65278e3 100644 (file)
 *
 *> \param[in] WANTT
 *> \verbatim
-*>          WANTT is logical scalar
+*>          WANTT is LOGICAL
 *>             WANTT = .true. if the quasi-triangular Schur factor
 *>             is being computed.  WANTT is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] WANTZ
 *> \verbatim
-*>          WANTZ is logical scalar
+*>          WANTZ is LOGICAL
 *>             WANTZ = .true. if the orthogonal Schur factor is being
 *>             computed.  WANTZ is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] KACC22
 *> \verbatim
-*>          KACC22 is integer with value 0, 1, or 2.
+*>          KACC22 is INTEGER with value 0, 1, or 2.
 *>             Specifies the computation mode of far-from-diagonal
 *>             orthogonal updates.
 *>        = 0: SLAQR5 does not accumulate reflections and does not
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
+*>          N is INTEGER
 *>             N is the order of the Hessenberg matrix H upon which this
 *>             subroutine operates.
 *> \endverbatim
 *>
 *> \param[in] KTOP
 *> \verbatim
-*>          KTOP is integer scalar
+*>          KTOP is INTEGER
 *> \endverbatim
 *>
 *> \param[in] KBOT
 *> \verbatim
-*>          KBOT is integer scalar
+*>          KBOT is INTEGER
 *>             These are the first and last rows and columns of an
 *>             isolated diagonal block upon which the QR sweep is to be
 *>             applied. It is assumed without a check that
 *>
 *> \param[in] NSHFTS
 *> \verbatim
-*>          NSHFTS is integer scalar
+*>          NSHFTS is INTEGER
 *>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
 *>             must be positive and even.
 *> \endverbatim
 *>
 *> \param[in,out] SR
 *> \verbatim
-*>          SR is REAL array of size (NSHFTS)
+*>          SR is REAL array, dimension (NSHFTS)
 *> \endverbatim
 *>
 *> \param[in,out] SI
 *> \verbatim
-*>          SI is REAL array of size (NSHFTS)
+*>          SI is REAL array, dimension (NSHFTS)
 *>             SR contains the real parts and SI contains the imaginary
 *>             parts of the NSHFTS shifts of origin that define the
 *>             multi-shift QR sweep.  On output SR and SI may be
 *>
 *> \param[in,out] H
 *> \verbatim
-*>          H is REAL array of size (LDH,N)
+*>          H is REAL array, dimension (LDH,N)
 *>             On input H contains a Hessenberg matrix.  On output a
 *>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
 *>             to the isolated diagonal block in rows and columns KTOP
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer scalar
+*>          LDH is INTEGER
 *>             LDH is the leading dimension of H just as declared in the
 *>             calling procedure.  LDH.GE.MAX(1,N).
 *> \endverbatim
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is REAL array of size (LDZ,IHIZ)
+*>          Z is REAL array, dimension (LDZ,IHIZ)
 *>             If WANTZ = .TRUE., then the QR Sweep orthogonal
 *>             similarity transformation is accumulated into
 *>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer scalar
+*>          LDZ is INTEGER
 *>             LDA is the leading dimension of Z just as declared in
 *>             the calling procedure. LDZ.GE.N.
 *> \endverbatim
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is REAL array of size (LDV,NSHFTS/2)
+*>          V is REAL array, dimension (LDV,NSHFTS/2)
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>             LDV is the leading dimension of V as declared in the
 *>             calling procedure.  LDV.GE.3.
 *> \endverbatim
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is REAL array of size
-*>             (LDU,3*NSHFTS-3)
+*>          U is REAL array, dimension (LDU,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDU
 *> \verbatim
-*>          LDU is integer scalar
+*>          LDU is INTEGER
 *>             LDU is the leading dimension of U just as declared in the
 *>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>             NH is the number of columns in array WH available for
 *>             workspace. NH.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WH
 *> \verbatim
-*>          WH is REAL array of size (LDWH,NH)
+*>          WH is REAL array, dimension (LDWH,NH)
 *> \endverbatim
 *>
 *> \param[in] LDWH
 *> \verbatim
-*>          LDWH is integer scalar
+*>          LDWH is INTEGER
 *>             Leading dimension of WH just as declared in the
 *>             calling procedure.  LDWH.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer scalar
+*>          NV is INTEGER
 *>             NV is the number of rows in WV agailable for workspace.
 *>             NV.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WV
 *> \verbatim
-*>          WV is REAL array of size
-*>             (LDWV,3*NSHFTS-3)
+*>          WV is REAL array, dimension (LDWV,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer scalar
+*>          LDWV is INTEGER
 *>             LDWV is the leading dimension of WV as declared in the
 *>             in the calling subroutine.  LDWV.GE.NV.
 *> \endverbatim
      $                   SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
      $                   LDU, NV, WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index d63c4ac..a528ce3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE SLARFG( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             CALL SSCAL( N-1, RSAFMN, X, INCX )
             BETA = BETA*RSAFMN
             ALPHA = ALPHA*RSAFMN
-            IF( ABS( BETA ).LT.SAFMIN .AND. KNT .LT. 1000)
+            IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SAFMIN
index d63a409..6a4c084 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE SLARFGP( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             CALL SSCAL( N-1, BIGNUM, X, INCX )
             BETA = BETA*BIGNUM
             ALPHA = ALPHA*BIGNUM
-            IF( ABS( BETA ).LT.SMLNUM .AND. KNT .LT. 1000 )
+            IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SMLNUM
index fd248c9..0456263 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
      $                    NSPLIT, ISPLIT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N, NSPLIT
 *     .. Executable Statements ..
 *
       INFO = 0
-
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     Compute splitting points
       NSPLIT = 1
       IF(SPLTOL.LT.ZERO) THEN
index c2d130b..988e25f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, TWIST, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET, TWIST
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) /
      $           LOG( TWO ) ) + 2
       MNWDTH = TWO * PIVMIN
index 8469660..f0c0335 100644 (file)
       SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
      $                            EIGCNT, LCNT, RCNT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Executable Statements ..
 *
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       LCNT = 0
       RCNT = 0
       EIGCNT = 0
index 8da31a9..7a7ec0a 100644 (file)
      $                    M, W, WERR, WL, WU, IBLOCK, INDEXW,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     Decode RANGE
 *
       IF( LSAME( RANGE, 'A' ) ) THEN
index 3c1b511..ea9b8fc 100644 (file)
      $                    W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SLARNV, SLARRA, SLARRB, SLARRC, SLARRD,
-     $                   SLASQ2
+     $                   SLASQ2, SLARRK
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *
 
       INFO = 0
-
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
 *
 *     Decode RANGE
 *
index ee8af8c..8c8de52 100644 (file)
      $                   SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
      $                   DPLUS, LPLUS, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. Executable Statements ..
 *
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       FACT = REAL(2**KTRYMAX)
       EPS = SLAMCH( 'Precision' )
       SHIFT = 0
index 6ce1516..a721d07 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   RTOL, OFFSET, W, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET
 *
       INFO = 0
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
       MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) /
      $           LOG( TWO ) ) + 2
 *
index 4d625c5..f39f074 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE SLARRK( N, IW, GL, GU,
      $                    D, E2, PIVMIN, RELTOL, W, WERR, INFO)
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, IW, N
 *     ..
 *     .. Executable Statements ..
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         INFO = 0
+         RETURN
+      END IF
+*
 *     Get machine constants
       EPS = SLAMCH( 'P' )
 
index e4181ea..3f77d38 100644 (file)
@@ -78,7 +78,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE SLARRR( N, D, E, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            N, INFO
 *     ..
 *     .. Executable Statements ..
 *
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         INFO = 0
+         RETURN
+      END IF
+*
 *     As a default, do NOT go for relative-accuracy preserving computations.
       INFO = 1
 
index e574da5..f9e3cf2 100644 (file)
 *> \verbatim
 *>          VU is REAL
 *>          Upper bound of the interval that contains the desired
-*>          eigenvalues. VL < VU. Needed to compute gaps on the left or right
-*>          end of the extremal eigenvalues in the desired RANGE.
+*>          eigenvalues. VL < VU. 
+*>          Note: VU is currently not used by this implementation of SLARRV, VU is
+*>          passed to SLARRV because it could be used compute gaps on the right end
+*>          of the extremal eigenvalues. However, with not much initial accuracy in
+*>          LAMBDA and VU, the formula can lead to an overestimation of the right gap
+*>          and thus to inadequately early RQI 'convergence'. This is currently
+*>          prevented this by forcing a small right gap. And so it turns out that VU
+*>          is currently not used by this implementation of SLARRV.
 *> \endverbatim
 *>
 *> \param[in,out] D
      $                   IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     The first N entries of WORK are reserved for the eigenvalues
       INDLD = N+1
       INDLLD= 2*N+1
index fbff9c0..59a2182 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE SLARTGS( X, Y, SIGMA, CS, SN )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       REAL                    CS, SIGMA, SN, X, Y
 *     .. Local Scalars ..
       REAL                    R, S, THRESH, W, Z
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL           SLARTGP
+*     ..
 *     .. External Functions ..
       REAL                    SLAMCH
       EXTERNAL           SLAMCH
index b3eb073..3b87544 100644 (file)
@@ -81,7 +81,7 @@
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is REAL array, dimension at least (LDQ, N)
+*>          U is REAL array, dimension (LDU, N)
 *>         On exit, U contains the left singular vectors.
 *> \endverbatim
 *>
@@ -93,7 +93,7 @@
 *>
 *> \param[out] VT
 *> \verbatim
-*>          VT is REAL array, dimension at least (LDVT, M)
+*>          VT is REAL array, dimension (LDVT, M)
 *>         On exit, VT**T contains the right singular vectors.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE SLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
      $                   WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDU, LDVT, N, SMLSIZ, SQRE
index 6b1d0f0..add92f3 100644 (file)
@@ -94,8 +94,7 @@
 *>
 *> \param[out] Q
 *> \verbatim
-*>          Q is REAL array,
-*>                     dimension at least (LDQ,K).
+*>          Q is REAL array, dimension (LDQ,K)
 *> \endverbatim
 *>
 *> \param[in] LDQ
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
      $                   LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
      $                   INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
index 81a8625..1d1d5cd 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension at least 3 * K
+*>          WORK is REAL array, dimension (3*K)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup OTHERauxiliary
 *
       SUBROUTINE SLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
      $                   DSIGMA, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, K, LDDIFR
index 32496a2..9931783 100644 (file)
       SUBROUTINE SLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
      $                   DN1, DN2, TAU, TTYPE, G )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
                   NP = NN - 9
                ELSE
                   NP = NN - 2*PP
-                  B2 = Z( NP-2 )
                   GAM = DN1
                   IF( Z( NP-4 ) .GT. Z( NP-2 ) )
      $               RETURN
index efd28a6..27b5b80 100644 (file)
@@ -55,7 +55,7 @@
 *> \verbatim
 *>          A is REAL array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the elements on and bleow the diagonal
+*>          On exit, the elements on and below the diagonal
 *>          of the array contain the N-by-N lower triangular matrix L;
 *>          the elements above the diagonal represent Q by the rows
 *>          of blocked V (see Further Details).
       SUBROUTINE SLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
      $                  INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER           INFO, LDA, M, N, MB, NB, LWORK, LDT
       LOGICAL            LSAME
       EXTERNAL           LSAME
 *     .. EXTERNAL SUBROUTINES ..
-      EXTERNAL           SGEQRT, STPQRT, XERBLA
+      EXTERNAL           SGELQT, SGEQRT, STPLQT, STPQRT, XERBLA
 *     .. INTRINSIC FUNCTIONS ..
       INTRINSIC          MAX, MIN, MOD
 *     ..
index ad12a3a..4fcef5b 100644 (file)
 *> \verbatim
 *>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
 *>          The vector of pivot indices. Only the elements in positions
-*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
-*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*>          K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed.
+*>          IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be
+*>          interchanged.
 *> \endverbatim
 *>
 *> \param[in] INCX
 *> \verbatim
 *>          INCX is INTEGER
-*>          The increment between successive values of IPIV.  If IPIV
+*>          The increment between successive values of IPIV. If INCX
 *>          is negative, the pivots are applied in reverse order.
 *> \endverbatim
 *
@@ -98,7 +99,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE SLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, K1, K2, LDA, N
 *     ..
 *     .. Executable Statements ..
 *
-*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
+*     Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows
+*     K1 through K2.
 *
       IF( INCX.GT.0 ) THEN
          IX0 = K1
index 5fb3cc9..ed4ef62 100644 (file)
 *  ===========
 *
 *       SUBROUTINE SLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            J1, M, NB, LDA, LDH, INFO
+*       INTEGER            J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IPIV( * )
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] IPIV
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
+*>          IPIV is INTEGER array, dimension (M)
 *>          Details of the row and column interchanges,
 *>          the row and column k were interchanged with the row and
 *>          column IPIV(k).
 *>          WORK is REAL workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *  =====================================================================
       SUBROUTINE SLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                      H, LDH, WORK, INFO )
+     $                      H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            M, NB, J1, LDA, LDH, INFO
+      INTEGER            M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER            IPIV( * )
       PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
 *
 *     .. Local Scalars ..
-      INTEGER            J, K, K1, I1, I2
+      INTEGER            J, K, K1, I1, I2, MJ
       REAL               PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL           LSAME, ILAENV, ISAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           SAXPY, SGEMV, SSCAL, SCOPY, SSWAP, SLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
-*         where H(J:N, J) has been initialized to be A(J, J:N)
+*        H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J),
+*         where H(J:M, J) has been initialized to be A(J, J:M)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL SGEMV( 'No transpose', M-J+1, J-K1,
+            CALL SGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(i:n, i) into WORK
+*        Copy H(i:M, i) into WORK
 *
-         CALL SCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL SCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J-1, J:N) * T(J-1,J),
-*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
+*           Compute WORK := WORK - L(J-1, J:M) * T(J-1,J),
+*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M)
 *
             ALPHA = -A( K-1, J )
-            CALL SAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL SAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L(J, (J+1):N)
-*            where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N)
+*           Compute WORK(2:M) = T(J, J) L(J, (J+1):M)
+*            where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( K, J )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = ISAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1, I1+1:N) with A(I1+1:N, I2)
+*              Swap A(I1, I1+1:M) with A(I1+1:M, I2)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL SSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA,
      $                              A( J1+I1, I2 ), 1 )
 *
-*              Swap A(I1, I2+1:N) with A(I2, I2+1:N)
+*              Swap A(I1, I2+1:M) with A(I2, I2+1:M)
 *
                CALL SSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA,
      $                           A( J1+I2-1, I2+1 ), LDA )
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                ENDIF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J:N, J),
+*              Copy A(J+1:M, J+1) into H(J:M, J),
 *
                CALL SCOPY( M-J, A( K+1, J+1 ), LDA,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( K, J+1 ).NE.ZERO ) THEN
                ALPHA = ONE / A( K, J+1 )
                CALL SLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
-*         where H(J:N, J) has been initialized to be A(J:N, J)
+*        H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T,
+*         where H(J:M, J) has been initialized to be A(J:M, J)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL SGEMV( 'No transpose', M-J+1, J-K1,
+            CALL SGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(J:N, J) into WORK
+*        Copy H(J:M, J) into WORK
 *
-         CALL SCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL SCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J:N, J-1) * T(J-1,J),
+*           Compute WORK := WORK - L(J:M, J-1) * T(J-1,J),
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -A( J, K-1 )
-            CALL SAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL SAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L((J+1):N, J)
-*            where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J)
+*           Compute WORK(2:M) = T(J, J) L((J+1):M, J)
+*            where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( J, K )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = ISAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1+1:N, I1) with A(I2, I1+1:N)
+*              Swap A(I1+1:M, I1) with A(I2, I1+1:M)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL SSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1,
      $                              A( I2, J1+I1 ), LDA )
 *
-*              Swap A(I2+1:N, I1) with A(I2+1:N, I2)
+*              Swap A(I2+1:M, I1) with A(I2+1:M, I2)
 *
                CALL SSWAP( M-I2, A( I2+1, J1+I1-1 ), 1,
      $                           A( I2+1, J1+I2-1 ), 1 )
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J+1:N, J),
+*              Copy A(J+1:M, J+1) into H(J+1:M, J),
 *
                CALL SCOPY( M-J, A( J+1, K+1 ), 1,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( J+1, K ).NE.ZERO ) THEN
                ALPHA = ONE / A( J+1, K )
                CALL SLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 30
index 0e99826..98bc8e7 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE SORBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index dec4dbe..684778e 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE SORBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 5b6e946..d849613 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE SORBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 0b209b2..42bbcbd 100644 (file)
@@ -33,7 +33,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                    TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
      $                    INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index f037ba1..f5af1db 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE SORBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 83d9661..beedbfc 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE SORBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 5621d58..06c77d8 100644 (file)
 *>
 *> \param[out] U1
 *> \verbatim
-*>          U1 is REAL array, dimension (P)
+*>          U1 is REAL array, dimension (LDU1,P)
 *>          If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
 *> \endverbatim
 *>
 *>
 *> \param[out] U2
 *> \verbatim
-*>          U2 is REAL array, dimension (M-P)
+*>          U2 is REAL array, dimension (LDU2,M-P)
 *>          If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
 *>          matrix U2.
 *> \endverbatim
 *>
 *> \param[out] V1T
 *> \verbatim
-*>          V1T is REAL array, dimension (Q)
+*>          V1T is REAL array, dimension (LDV1T,Q)
 *>          If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
 *>          matrix V1**T.
 *> \endverbatim
 *>
 *> \param[out] V2T
 *> \verbatim
-*>          V2T is REAL array, dimension (M-Q)
+*>          V2T is REAL array, dimension (LDV2T,M-Q)
 *>          If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
 *>          matrix V2**T.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERcomputational
 *
      $                             U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
      $                             LDV2T, WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
index 1ff4732..18a2a79 100644 (file)
@@ -36,7 +36,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                       X21, LDX21, THETA, U1, LDU1, U2, LDU2, V1T,
      $                       LDV1T, WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index fdb5cd8..265e976 100644 (file)
@@ -53,8 +53,8 @@
 *>  N2-by-N2 upper triangular matrix.
 *> \endverbatim
 *
-*  Arguments
-*  =========
+*  Arguments:
+*  ==========
 *
 *> \param[in] SIDE
 *> \verbatim
       SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
index 6a371b3..474bd39 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realPOcomputational
 *
 *  =====================================================================
       RECURSIVE SUBROUTINE SPOTRF2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, SISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SSYRK, XERBLA
+      EXTERNAL           SSYRK, STRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, SQRT
index 021aa60..a4ac149 100644 (file)
 *>
 *> \param[in,out] AFP
 *> \verbatim
-*>          AFP is REAL array, dimension
-*>                            (N*(N+1)/2)
+*>          AFP is REAL array, dimension (N*(N+1)/2)
 *>          If FACT = 'F', then AFP is an input argument and on entry
 *>          contains the triangular factor U or L from the Cholesky
 *>          factorization A = U**T*U or A = L*L**T, in the same storage
       SUBROUTINE SPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
      $                   X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
index 7183c9a..54479f8 100644 (file)
 *  Arguments:
 *  ==========
 *
-*> @param[in] n
-*>          The order of the matrix A.
-*>
-*> @param[in] nb
-*>          The size of the band.
-*>
-*> @param[in, out] A
-*>          A pointer to the matrix A.
-*>
-*> @param[in] lda
-*>          The leading dimension of the matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*> \endverbatim
 *>
-*> @param[out] V
-*>          REAL array, dimension 2*n if eigenvalues only are
-*>          requested or to be queried for vectors.
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL which indicate if Eigenvalue are requested or both
+*>          Eigenvalue/Eigenvectors.
+*> \endverbatim
 *>
-*> @param[out] TAU
-*>          REAL array, dimension (2*n).
-*>          The scalar factors of the Householder reflectors are stored
-*>          in this array.
+*> \param[in] TTYPE
+*> \verbatim
+*>          TTYPE is INTEGER
+*> \endverbatim
 *>
-*> @param[in] st
+*> \param[in] ST
+*> \verbatim
+*>          ST is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] ed
+*> \param[in] ED
+*> \verbatim
+*>          ED is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] sweep
+*> \param[in] SWEEP
+*> \verbatim
+*>          SWEEP is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] Vblksiz
-*>          internal parameter for indices.
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER. The order of the matrix A.
+*> \endverbatim
 *>
-*> @param[in] wantz
-*>          logical which indicate if Eigenvalue are requested or both
-*>          Eigenvalue/Eigenvectors.
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER. The size of the band.
+*> \endverbatim
+*>
+*> \param[in] IB
+*> \verbatim
+*>          IB is INTEGER.
+*> \endverbatim
+*>
+*> \param[in, out] A
+*> \verbatim
+*>          A is REAL array. A pointer to the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER. The leading dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is REAL array, dimension 2*n if eigenvalues only are
+*>          requested or to be queried for vectors.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is REAL array, dimension (2*n).
+*>          The scalar factors of the Householder reflectors are stored
+*>          in this array.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*>          WORK is REAL array. Workspace of size nb.
+*> \endverbatim
+*> @param[in] n
+*>          The order of the matrix A.
 *>
-*> @param[in] work
-*>          Workspace of size nb.
 *>
 *> \par Further Details:
 *  =====================
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index f77368a..542fa8d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSB
-      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SLASCL, SSCAL, SSTEQR, SSTERF, XERBLA,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'SSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index b1c67d4..84add84 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSB
-      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SGEMM, SLACPY, SLASCL, SSCAL, SSTEDC,
          LIWMIN = 1
          LWMIN = 1
       ELSE
-         IB    = ILAENV( 18, 'SSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+         IB    = ILAENV2STAGE( 2, 'SSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
          IF( WANTZ ) THEN
             LIWMIN = 3 + 5*N
             LWMIN = 1 + 5*N + 2*N**2
index 1d8f2cc..5962e78 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSB
-      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV
+      EXTERNAL           LSAME, SLAMCH, SLANSB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SGEMV, SLACPY, SLASCL, SSCAL,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'SSYTRD_SB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'SSYTRD_SB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'SSYTRD_SB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = 2*N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index fe2ea61..3408810 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension (7N)
+*>          WORK is REAL array, dimension (7*N)
 *> \endverbatim
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array, dimension (5N)
+*>          IWORK is INTEGER array, dimension (5*N)
 *> \endverbatim
 *>
 *> \param[out] IFAIL
      $                   LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
      $                   LDZ, WORK, IWORK, IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index b2cc4fc..6dc50fe 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is REAL array of DIMENSION (LDA,ka)
+*>          A is REAL array, dimension (LDA,ka)
 *>           where KA
 *>           is K  when TRANS = 'N' or 'n', and is N otherwise. Before
 *>           entry with TRANS = 'N' or 'n', the leading N--by--K part of
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERcomputational
 *
       SUBROUTINE SSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
      $                  C )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       REAL               ALPHA, BETA
index bb8279a..3f20f62 100644 (file)
@@ -77,8 +77,7 @@
 *>
 *> \param[in,out] AP
 *> \verbatim
-*>          AP is REAL array, dimension
-*>                            (N*(N+1)/2)
+*>          AP is REAL array, dimension (N*(N+1)/2)
 *>          On entry, the upper or lower triangle of the symmetric matrix
 *>          A, packed columnwise in a linear array.  The j-th column of A
 *>          is stored in the array AP as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHEReigen
 *
       SUBROUTINE SSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
      $                  INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
index 53d0973..52819b1 100644 (file)
 *>
 *> \param[in,out] AFP
 *> \verbatim
-*>          AFP is REAL array, dimension
-*>                            (N*(N+1)/2)
+*>          AFP is REAL array, dimension (N*(N+1)/2)
 *>          If FACT = 'F', then AFP is an input argument and on entry
 *>          contains the block diagonal matrix D and the multipliers used
 *>          to obtain the factor U or L from the factorization
       SUBROUTINE SSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
      $                   LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
index 0a28c58..37ce8cd 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $           ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $           LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index cff89ef..2285381 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 74f6761..f91a527 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup singleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE SSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index b906909..d43b947 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE SSYCONVF( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE SSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup singleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE SSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index 1ed5774..833b9c6 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE SSYCONVF_ROOK( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE SSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup singleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE SSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index e03f5fe..deb5510 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *  =====================================================================
       SUBROUTINE SSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
       EXTERNAL           LSAME, SLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SLASSQ
+      EXTERNAL           SLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, INT, LOG, MAX, MIN, SQRT
index 0de3ca7..1667669 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSY
-      EXTERNAL           LSAME, ILAENV, SLAMCH, SLANSY
+      EXTERNAL           LSAME, SLAMCH, SLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SLASCL, SORGTR, SSCAL, SSTEQR, SSTERF,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = 2*N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index d655477..8ab90b6 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSY
-      EXTERNAL           LSAME, SLAMCH, SLANSY, ILAENV
+      EXTERNAL           LSAME, SLAMCH, SLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SLACPY, SLASCL, SORMTR, SSCAL, SSTEDC, SSTERF,
             LIWMIN = 1
             LWMIN = 1
          ELSE
-            KD    = ILAENV( 17, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             IF( WANTZ ) THEN
                LIWMIN = 3 + 5*N
                LWMIN = 1 + 6*N + 2*N**2
index 9628a89..60339cd 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV, ILAENV2STAGE
       REAL               SLAMCH, SLANSY
-      EXTERNAL           LSAME, ILAENV, SLAMCH, SLANSY
+      EXTERNAL           LSAME, SLAMCH, SLANSY, ILAENV, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SORMTR, SSCAL, SSTEBZ, SSTEMR, SSTEIN,
 *
       LQUERY = ( ( LWORK.EQ.-1 ) .OR. ( LIWORK.EQ.-1 ) )
 *
-      KD     = ILAENV( 17, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-      LHTRD  = ILAENV( 19, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-      LWTRD  = ILAENV( 20, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+      LHTRD  = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      LWTRD  = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
       LWMIN  = MAX( 26*N, 5*N + LHTRD + LWTRD )
       LIWMIN = MAX( 1, 10*N )
 *
index fd8518c..227a70b 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       REAL               SLAMCH, SLANSY
-      EXTERNAL           LSAME, ILAENV, SLAMCH, SLANSY
+      EXTERNAL           LSAME, SLAMCH, SLANSY, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SCOPY, SLACPY, SORGTR, SORMTR, SSCAL, SSTEBZ,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            KD    = ILAENV( 17, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = MAX( 8*N, 3*N + LHTRD + LWTRD )
             WORK( 1 )  = LWMIN
          END IF
index 2a376ea..7dfbbaa 100644 (file)
@@ -46,7 +46,7 @@
 *> positive definite.
 *> This routine use the 2stage technique for the reduction to tridiagonal
 *> which showed higher performance on recent architecture and for large
-*  sizes N>2000.
+*> sizes N>2000.
 *> \endverbatim
 *
 *  Arguments:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     .. Local Scalars ..
       LOGICAL            LQUERY, UPPER, WANTZ
       CHARACTER          TRANS
-      INTEGER            NEIG,
-     $                   LLWORK, LWMIN, LHTRD, LWTRD, KD, IB, INDHOUS
+      INTEGER            NEIG, LWMIN, LHTRD, LWTRD, KD, IB
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SPOTRF, SSYGST, STRMM, STRSM, XERBLA,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = 2*N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index 2982e17..8a99c93 100644 (file)
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is REAL array, dimension (LDA, N)
+*>          B is REAL array, dimension (LDB, N)
 *>          On entry, the symmetric matrix B.  If UPLO = 'U', the
 *>          leading N-by-N upper triangular part of B contains the
 *>          upper triangular part of the matrix B.  If UPLO = 'L',
      $                   VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
      $                   LWORK, IWORK, IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 5221dba..abf52b1 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYsolve
 *
       SUBROUTINE SSYSV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                     LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, SSYTRF, SSYTRS, SSYTRS2
+      EXTERNAL           XERBLA, SSYTRS_AA, SSYTRF_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/ssysv_aa_2stage.f b/lapack-netlib/SRC/ssysv_aa_2stage.f
new file mode 100644 (file)
index 0000000..a738c74
--- /dev/null
@@ -0,0 +1,279 @@
+*> \brief <b> SSYSV_AA_2STAGE computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download SSYSV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssysv_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssysv_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssysv_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE SSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       REAL               A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> SSYSV_AA_2STAGE computes the solution to a real system of
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**T,  if UPLO = 'U', or
+*>    A = L * T * L**T,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is symmetric and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is REAL array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is REAL array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is REAL array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is REAL workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup realSYsolve
+*
+*  =====================================================================
+      SUBROUTINE SSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK driver routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      REAL               A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            LWKOPT
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           SSYTRF_AA_2STAGE, SSYTRS_AA_2STAGE,
+     $                   XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'SSYSV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*
+*     Compute the factorization A = U*T*U**T or A = L*T*L**T.
+*
+      CALL SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL SSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+      RETURN
+*
+*     End of SSYSV_AA_2STAGE
+*
+      END
index 7bb38c7..7ddc022 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          VECT, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. Executable Statements ..
 *
 *
 *     Determine the block size, the workspace size and the hous size.
 *
-      KD     = ILAENV( 17, 'SSYTRD_2STAGE', VECT, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'SSYTRD_2STAGE', VECT, N, KD, -1, -1 )
-      LHMIN  = ILAENV( 19, 'SSYTRD_2STAGE', VECT, N, KD, IB, -1 )
-      LWMIN  = ILAENV( 20, 'SSYTRD_2STAGE', VECT, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'SSYTRD_2STAGE', VECT, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'SSYTRD_2STAGE', VECT, N, KD, -1, -1 )
+      LHMIN  = ILAENV2STAGE( 3, 'SSYTRD_2STAGE', VECT, N, KD, IB, -1 )
+      LWMIN  = ILAENV2STAGE( 4, 'SSYTRD_2STAGE', VECT, N, KD, IB, -1 )
 *      WRITE(*,*),'SSYTRD_2STAGE N KD UPLO LHMIN LWMIN ',N, KD, UPLO,
 *     $            LHMIN, LWMIN
 *
index c3c4069..891ec9b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup real16OTHERcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          STAGE1, UPLO, VECT
      $                   SISEV, SIZETAU, LDV, LHMIN, LWMIN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SSB2ST_KERNELS, SLACPY, SLASET
+      EXTERNAL           SSB2ST_KERNELS, SLACPY, SLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN, MAX, CEILING, REAL
index a37672e..c01fe35 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension LWORK.
+*>          WORK is REAL array, dimension (LWORK)
 *>          On exit, if INFO = 0, or if LWORK=-1, 
 *>          WORK(1) returns the size of LWORK.
 *> \endverbatim
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK which should be calculated
-*           by a workspace query. LWORK = MAX(1, LWORK_QUERY)
+*>          by a workspace query. LWORK = MAX(1, LWORK_QUERY)
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *>          this value as the first entry of the WORK array, and no error
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *>
 *>  where tau is a real scalar, and v is a real vector with
 *>  v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in
-*   A(i+kd+2:n,i), and tau in TAU(i).
+*>  A(i+kd+2:n,i), and tau in TAU(i).
 *>
 *>  The contents of A on exit are illustrated by the following examples
 *>  with n = 5:
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
      $                   TPOS, WPOS, S2POS, S1POS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, SSYR2K, SSYMM, SGEMM,
+      EXTERNAL           XERBLA, SSYR2K, SSYMM, SGEMM, SCOPY,
      $                   SLARFT, SGELQF, SGEQRF, SLASET
 *     ..
 *     .. Intrinsic Functions ..
index 98f433a..4aaa978 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *  =====================================================================
       SUBROUTINE SSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL            LQUERY, UPPER
-      INTEGER            J, LWKOPT, IINFO
+      INTEGER            J, LWKOPT
       INTEGER            NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       REAL   ALPHA
 *     ..
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           SLASYF_AA, SGEMV, SSCAL, SCOPY, SSWAP, SGEMM,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'SSYTRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'SSYTRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       ENDIF
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL SLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( MAX(1, J), J+1 ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                      IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL SLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( J+1, MAX(1, J) ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/ssytrf_aa_2stage.f b/lapack-netlib/SRC/ssytrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..be6809d
--- /dev/null
@@ -0,0 +1,647 @@
+*> \brief \b SSYTRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download SSYTRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssytrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssytrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssytrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       REAL               A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> SSYTRF_AA_2STAGE computes the factorization of a real symmetric matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a symmetric band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is REAL array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is REAL array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is REAL workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup realSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE SSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      REAL               A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      REAL               ZERO, ONE
+      PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      REAL               PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, SCOPY, SLACGV, SLACPY,
+     $                   SLASET, SGBTRF, SGEMM,  SGETRF, 
+     $                   SSYGST, SSWAP, STRSM 
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'SSYTRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'SSYTRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                 H(I,J) = T(I,I)*U(I,J) + T(I+1,I)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. J-1) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL SLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL SGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( 1, J*NB+1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL SGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL SSYGST( 1, 'Upper', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $                = TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL SGEMM( 'Transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -ONE, WORK( NB+1 ), N,
+     $                          A( 1, (J+1)*NB+1 ), LDA,
+     $                     ONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call SGETRF
+*
+               DO K = 1, NB
+                   CALL SCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL SGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+                   CALL SCOPY( N-(J+1)*NB,
+     $                         WORK( 1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL SLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL SLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL STRSM( 'R', 'U', 'N', 'U', KB, NB, ONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL SLASET( 'Lower', KB, NB, ZERO, ONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL SSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL SSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL SSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL SSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL SGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. J-1) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL SGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL SLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( J*NB+1, 1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL SGEMM( 'NoTranspose', 'Transpose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL SSYGST( 1, 'Lower', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL SGEMM( 'NoTranspose', 'Transpose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL SGEMM( 'NoTranspose', 'Transpose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL SGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -ONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                          WORK( NB+1 ), N,
+     $                     ONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL SGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL SLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL SLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL STRSM( 'R', 'L', 'T', 'U', KB, NB, ONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB ) =
+     $                  TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL SLASET( 'Upper', KB, NB, ZERO, ONE, 
+     $                      A( (J+1)*NB+1, J*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL SSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL SSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL SSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL SSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL SLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL SGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of SSYTRF_AA_2STAGE
+*
+      END
index 7da7eed..97b5390 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
 *  =====================================================================
       SUBROUTINE SSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SSYTRI, SSYTRI2X
+      EXTERNAL           SSYTRI, SSYTRI2X, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index c218383..9aa567f 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension (N+NNB+1,NNB+3)
+*>          WORK is REAL array, dimension (N+NB+1,NB+3)
 *> \endverbatim
 *>
 *> \param[in] NB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realSYcomputational
 *
 *  =====================================================================
       SUBROUTINE SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index e1ef66e..a7d8fe7 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup singleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE SSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SSYTRI_3X
+      EXTERNAL           SSYTRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index 09c9f93..a2b011f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup singleSYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE SSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index bf56570..4e98819 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup singleSYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE SSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 6d08473..b05c9f7 100644 (file)
@@ -66,7 +66,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is REAL array, dimension (LDA,N)
 *>          Details of factors computed by SSYTRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realSYcomputational
 *
       SUBROUTINE SSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SGTSV, SSWAP, STRSM, XERBLA
+      EXTERNAL           SGTSV, SSWAP, SLACPY, STRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/ssytrs_aa_2stage.f b/lapack-netlib/SRC/ssytrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..c9c7181
--- /dev/null
@@ -0,0 +1,281 @@
+*> \brief \b SSYTRS_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download SSYTRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ssytrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ssytrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ssytrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE SSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       REAL               A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> SSYTRS_AA_2STAGE solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by SSYTRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is REAL array, dimension (LDA,N)
+*>          Details of factors computed by SSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is REAL array, dimension (LTB)
+*>          Details of factors computed by SSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          SSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          SSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is REAL array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup realSYcomputational
+*
+*  =====================================================================
+      SUBROUTINE SSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      REAL               A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      REAL               ONE
+      PARAMETER          ( ONE = 1.0E+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           SGBTRS, SLASWP, STRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'SSYTRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL SLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL STRSM( 'L', 'U', 'T', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL SGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL STRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL SLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL SLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL STRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL SGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL STRSM( 'L', 'L', 'T', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL SLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of SSYTRS_AA_2STAGE
+*
+      END
index b8b81a8..a631cc4 100644 (file)
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is REAL array, DIMENSION (LDB,N)
+*>          B is REAL array, dimension (LDB,N)
 *>           Before entry,  the leading  m by n part of the array  B must
 *>           contain  the  right-hand  side  matrix  B,  and  on exit  is
 *>           overwritten by the solution matrix  X.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERcomputational
 *
       SUBROUTINE STFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
      $                  B, LDB )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, DIAG, SIDE, TRANS, UPLO
index fc5f933..1ae9563 100644 (file)
@@ -77,7 +77,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL arrays, dimensions (LDA,N)
+*>          A is REAL array, dimension (LDA,N)
 *>          On entry, the matrix A in the pair (A, B).
 *>          On exit, the updated matrix A.
 *> \endverbatim
@@ -90,7 +90,7 @@
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is REAL arrays, dimensions (LDB,N)
+*>          B is REAL array, dimension (LDB,N)
 *>          On entry, the matrix B in the pair (A, B).
 *>          On exit, the updated matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is REAL array, dimension (LDZ,N)
+*>          Q is REAL array, dimension (LDQ,N)
 *>          On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
 *>          On exit, the updated matrix Q.
 *>          Not referenced if WANTQ = .FALSE..
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEauxiliary
 *
       SUBROUTINE STGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, J1, N1, N2, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index a1d9dbb..840036d 100644 (file)
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is REAL array, dimension (LDZ,N)
+*>          Q is REAL array, dimension (LDQ,N)
 *>          On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
 *>          On exit, the updated matrix Q.
 *>          If WANTQ = .FALSE., Q is not referenced.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realGEcomputational
 *
       SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, IFST, ILST, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index e3c37ab..8077b08 100644 (file)
@@ -73,8 +73,8 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL array, dimension (LDA,N)
-*>          On entry, the lower triangular N-by-N matrix A.
+*>          A is REAL array, dimension (LDA,M)
+*>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
 *> \endverbatim
@@ -82,7 +82,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ] [ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>          [ B ] = [ B1 ] [ B2 ]
 *>                   [ B1 ]  <- M-by-(N-L) rectangular
-*>                   [ B2 ]  <-     M-by-L upper trapezoidal.
+*>                   [ B2 ]  <-     M-by-L lower trapezoidal.
 *>
 *>  The lower trapezoidal matrix B2 consists of the first L columns of a
-*>  N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
 *>  B is rectangular M-by-N; if M=L=N, B is lower triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th row
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>            [ C ] = [ A ] [ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>            [ W ] = [ I ] [ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
       SUBROUTINE STPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDB, LDT, N, M, L, MB
index f1b8e03..ca38a95 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is REAL array, dimension (LDA,N)
+*>          A is REAL array, dimension (LDA,M)
 *>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
@@ -74,7 +74,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ][ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>
 *>               C = [ A ][ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>
 *>               W = [ I ][ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
 *  =====================================================================
       SUBROUTINE STPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, LDB, LDT, N, M, L
index 3f87164..565dadd 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
       SUBROUTINE STPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, SLARFB
+      EXTERNAL           SLARFB, STPRFB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index 2a97505..b1813b7 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup realOTHERcomputational
 *
       SUBROUTINE STPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           STPRFB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index 84a4a8f..0df1189 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @generated from dtrevc3.f, fortran d -> s, Tue Apr 19 01:47:44 2016
 *
      $                    VR, LDVR, MM, M, WORK, LWORK, INFO )
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SAXPY, SCOPY, SGEMV, SLALN2, SSCAL, XERBLA,
-     $                   SGEMM, SLABAD, SLASET
+     $                   SLACPY, SGEMM, SLABAD, SLASET
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, SQRT
index c51a528..557ccfa 100644 (file)
@@ -74,7 +74,7 @@
 *>
 *> \param[out] AP
 *> \verbatim
-*>          AP is REAL array, dimension (N*(N+1)/2
+*>          AP is REAL array, dimension (N*(N+1)/2)
 *>          On exit, the upper or lower triangular matrix A, packed
 *>          columnwise in a linear array. The j-th column of A is stored
 *>          in the array AP as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup realOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE STRTTP( UPLO, N, A, LDA, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 51e148b..4647181 100644 (file)
 *>
 *> \param[in,out] V2T
 *> \verbatim
-*>          V2T is COMPLEX*16 array, dimenison (LDV2T,M-Q)
+*>          V2T is COMPLEX*16 array, dimension (LDV2T,M-Q)
 *>          On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is
 *>          premultiplied by the conjugate transpose of the right
 *>          singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
      $                   V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
      $                   B22D, B22E, RWORK, LRWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 8240e2b..bb12d4f 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N*NRHS)
+*>          WORK is COMPLEX*16 array, dimension (N,NRHS)
 *>          This array is used to hold the residual vectors.
 *> \endverbatim
 *>
       SUBROUTINE ZCGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
      $                   SWORK, RWORK, ITER, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *
 *     .. External Subroutines ..
       EXTERNAL           CGETRS, CGETRF, CLAG2Z, XERBLA, ZAXPY, ZGEMM,
-     $                   ZLACPY, ZLAG2C
+     $                   ZLACPY, ZLAG2C, ZGETRF, ZGETRS
 *     ..
 *     .. External Functions ..
       INTEGER            IZAMAX
index 3159c3d..eafcce6 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N*NRHS)
+*>          WORK is COMPLEX*16 array, dimension (N,NRHS)
 *>          This array is used to hold the residual vectors.
 *> \endverbatim
 *>
       SUBROUTINE ZCPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
      $                   SWORK, RWORK, ITER, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *
 *     .. External Subroutines ..
       EXTERNAL           ZAXPY, ZHEMM, ZLACPY, ZLAT2C, ZLAG2C, CLAG2Z,
-     $                   CPOTRF, CPOTRS, XERBLA
+     $                   CPOTRF, CPOTRS, XERBLA, ZPOTRF, ZPOTRS
 *     ..
 *     .. External Functions ..
       INTEGER            IZAMAX
index 601d543..68291e2 100644 (file)
 *>
 *> \param[out] ILO
 *> \verbatim
+*>          ILO is INTEGER
 *> \endverbatim
 *>
 *> \param[out] IHI
 *> \verbatim
+*>          IHI is INTEGER
 *>          ILO and IHI are set to INTEGER such that on exit
 *>          A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
 *>          If JOB = 'N' or 'S', ILO = 1 and IHI = N.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
index d5752e0..3afe79e 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX*16 array dimension (min(M,N))
+*>          TAUQ is COMPLEX*16 array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
index 26879a7..bccd6b8 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX*16 array dimension (min(M,N))
+*>          TAUQ is COMPLEX*16 array, dimension (min(M,N))
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16GEcomputational
 *
       SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
 *     .. Local Scalars ..
       LOGICAL            LQUERY
       INTEGER            I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB,
-     $                   NBMIN, NX
-      DOUBLE PRECISION   WS
+     $                   NBMIN, NX, WS
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZGEBD2, ZGEMM, ZLABRD
index fcf0735..e8418c6 100644 (file)
-*> \brief \b ZGEJSV\r
-*\r
-*  =========== DOCUMENTATION ===========\r
-*\r
-* Online html documentation available at\r
-*            http://www.netlib.org/lapack/explore-html/\r
-*\r
-*> \htmlonly\r
-*> Download ZGEJSV + dependencies\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgejsv.f">\r
-*> [TGZ]</a>\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgejsv.f">\r
-*> [ZIP]</a>\r
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgejsv.f">\r
-*> [TXT]</a>\r
-*> \endhtmlonly\r
-*\r
-*  Definition:\r
-*  ===========\r
-*\r
-*     SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,\r
-*                         M, N, A, LDA, SVA, U, LDU, V, LDV,\r
-*                         CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )\r
-*\r
-*     .. Scalar Arguments ..\r
-*     IMPLICIT    NONE\r
-*     INTEGER     INFO, LDA, LDU, LDV, LWORK, M, N\r
-*     ..\r
-*     .. Array Arguments ..\r
-*     COMPLEX*16     A( LDA, * ),  U( LDU, * ), V( LDV, * ), CWORK( LWORK )\r
-*     DOUBLE PRECISION   SVA( N ), RWORK( LRWORK )\r
-*     INTEGER     IWORK( * )\r
-*     CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV\r
-*       ..\r
-*\r
-*\r
-*> \par Purpose:\r
-*  =============\r
-*>\r
-*> \verbatim\r
-*>\r
-*> ZGEJSV computes the singular value decomposition (SVD) of a complex M-by-N\r
-*> matrix [A], where M >= N. The SVD of [A] is written as\r
-*>\r
-*>              [A] = [U] * [SIGMA] * [V]^*,\r
-*>\r
-*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N\r
-*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and\r
-*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are\r
-*> the singular values of [A]. The columns of [U] and [V] are the left and\r
-*> the right singular vectors of [A], respectively. The matrices [U] and [V]\r
-*> are computed and stored in the arrays U and V, respectively. The diagonal\r
-*> of [SIGMA] is computed and stored in the array SVA.\r
-*> \endverbatim\r
-*>\r
-*>  Arguments:\r
-*>  ==========\r
-*>\r
-*> \param[in] JOBA\r
-*> \verbatim\r
-*>          JOBA is CHARACTER*1\r
-*>         Specifies the level of accuracy:\r
-*>       = 'C': This option works well (high relative accuracy) if A = B * D,\r
-*>              with well-conditioned B and arbitrary diagonal matrix D.\r
-*>              The accuracy cannot be spoiled by COLUMN scaling. The\r
-*>              accuracy of the computed output depends on the condition of\r
-*>              B, and the procedure aims at the best theoretical accuracy.\r
-*>              The relative error max_{i=1:N}|d sigma_i| / sigma_i is\r
-*>              bounded by f(M,N)*epsilon* cond(B), independent of D.\r
-*>              The input matrix is preprocessed with the QRF with column\r
-*>              pivoting. This initial preprocessing and preconditioning by\r
-*>              a rank revealing QR factorization is common for all values of\r
-*>              JOBA. Additional actions are specified as follows:\r
-*>       = 'E': Computation as with 'C' with an additional estimate of the\r
-*>              condition number of B. It provides a realistic error bound.\r
-*>       = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings\r
-*>              D1, D2, and well-conditioned matrix C, this option gives\r
-*>              higher accuracy than the 'C' option. If the structure of the\r
-*>              input matrix is not known, and relative accuracy is\r
-*>              desirable, then this option is advisable. The input matrix A\r
-*>              is preprocessed with QR factorization with FULL (row and\r
-*>              column) pivoting.\r
-*>       = 'G'  Computation as with 'F' with an additional estimate of the\r
-*>              condition number of B, where A=B*D. If A has heavily weighted\r
-*>              rows, then using this condition number gives too pessimistic\r
-*>              error bound.\r
-*>       = 'A': Small singular values are not well determined by the data \r
-*>              and are considered as noisy; the matrix is treated as\r
-*>              numerically rank defficient. The error in the computed\r
-*>              singular values is bounded by f(m,n)*epsilon*||A||.\r
-*>              The computed SVD A = U * S * V^* restores A up to\r
-*>              f(m,n)*epsilon*||A||.\r
-*>              This gives the procedure the licence to discard (set to zero)\r
-*>              all singular values below N*epsilon*||A||.\r
-*>       = 'R': Similar as in 'A'. Rank revealing property of the initial\r
-*>              QR factorization is used do reveal (using triangular factor)\r
-*>              a gap sigma_{r+1} < epsilon * sigma_r in which case the\r
-*>              numerical RANK is declared to be r. The SVD is computed with\r
-*>              absolute error bounds, but more accurately than with 'A'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBU\r
-*> \verbatim\r
-*>          JOBU is CHARACTER*1\r
-*>         Specifies whether to compute the columns of U:\r
-*>       = 'U': N columns of U are returned in the array U.\r
-*>       = 'F': full set of M left sing. vectors is returned in the array U.\r
-*>       = 'W': U may be used as workspace of length M*N. See the description\r
-*>              of U.\r
-*>       = 'N': U is not computed.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBV\r
-*> \verbatim\r
-*>          JOBV is CHARACTER*1\r
-*>         Specifies whether to compute the matrix V:\r
-*>       = 'V': N columns of V are returned in the array V; Jacobi rotations\r
-*>              are not explicitly accumulated.\r
-*>       = 'J': N columns of V are returned in the array V, but they are\r
-*>              computed as the product of Jacobi rotations, if JOBT .EQ. 'N'.\r
-*>       = 'W': V may be used as workspace of length N*N. See the description\r
-*>              of V.\r
-*>       = 'N': V is not computed.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBR\r
-*> \verbatim\r
-*>          JOBR is CHARACTER*1\r
-*>         Specifies the RANGE for the singular values. Issues the licence to\r
-*>         set to zero small positive singular values if they are outside\r
-*>         specified range. If A .NE. 0 is scaled so that the largest singular\r
-*>         value of c*A is around SQRT(BIG), BIG=DLAMCH('O'), then JOBR issues\r
-*>         the licence to kill columns of A whose norm in c*A is less than\r
-*>         SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,\r
-*>         where SFMIN=DLAMCH('S'), EPSLN=DLAMCH('E').\r
-*>       = 'N': Do not kill small columns of c*A. This option assumes that\r
-*>              BLAS and QR factorizations and triangular solvers are\r
-*>              implemented to work in that range. If the condition of A\r
-*>              is greater than BIG, use ZGESVJ.\r
-*>       = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]\r
-*>              (roughly, as described above). This option is recommended.\r
-*>                                             ===========================\r
-*>         For computing the singular values in the FULL range [SFMIN,BIG]\r
-*>         use ZGESVJ.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBT\r
-*> \verbatim\r
-*>          JOBT is CHARACTER*1\r
-*>         If the matrix is square then the procedure may determine to use\r
-*>         transposed A if A^* seems to be better with respect to convergence.\r
-*>         If the matrix is not square, JOBT is ignored. \r
-*>         The decision is based on two values of entropy over the adjoint\r
-*>         orbit of A^* * A. See the descriptions of WORK(6) and WORK(7).\r
-*>       = 'T': transpose if entropy test indicates possibly faster\r
-*>         convergence of Jacobi process if A^* is taken as input. If A is\r
-*>         replaced with A^*, then the row pivoting is included automatically.\r
-*>       = 'N': do not speculate.\r
-*>         The option 'T' can be used to compute only the singular values, or\r
-*>         the full SVD (U, SIGMA and V). For only one set of singular vectors\r
-*>         (U or V), the caller should provide both U and V, as one of the\r
-*>         matrices is used as workspace if the matrix A is transposed.\r
-*>         The implementer can easily remove this constraint and make the\r
-*>         code more complicated. See the descriptions of U and V.\r
-*>         In general, this option is considered experimental, and 'N'; should\r
-*>         be preferred. This is subject to changes in the future.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] JOBP\r
-*> \verbatim\r
-*>          JOBP is CHARACTER*1\r
-*>         Issues the licence to introduce structured perturbations to drown\r
-*>         denormalized numbers. This licence should be active if the\r
-*>         denormals are poorly implemented, causing slow computation,\r
-*>         especially in cases of fast convergence (!). For details see [1,2].\r
-*>         For the sake of simplicity, this perturbations are included only\r
-*>         when the full SVD or only the singular values are requested. The\r
-*>         implementer/user can easily add the perturbation for the cases of\r
-*>         computing one set of singular vectors.\r
-*>       = 'P': introduce perturbation\r
-*>       = 'N': do not perturb\r
-*> \endverbatim\r
-*>\r
-*> \param[in] M\r
-*> \verbatim\r
-*>          M is INTEGER\r
-*>         The number of rows of the input matrix A.  M >= 0.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] N\r
-*> \verbatim\r
-*>          N is INTEGER\r
-*>         The number of columns of the input matrix A. M >= N >= 0.\r
-*> \endverbatim\r
-*>\r
-*> \param[in,out] A\r
-*> \verbatim\r
-*>          A is COMPLEX*16 array, dimension (LDA,N)\r
-*>          On entry, the M-by-N matrix A.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDA\r
-*> \verbatim\r
-*>          LDA is INTEGER\r
-*>          The leading dimension of the array A.  LDA >= max(1,M).\r
-*> \endverbatim\r
-*>\r
-*> \param[out] SVA\r
-*> \verbatim\r
-*>          SVA is DOUBLE PRECISION array, dimension (N)\r
-*>          On exit,\r
-*>          - For WORK(1)/WORK(2) = ONE: The singular values of A. During the\r
-*>            computation SVA contains Euclidean column norms of the\r
-*>            iterated matrices in the array A.\r
-*>          - For WORK(1) .NE. WORK(2): The singular values of A are\r
-*>            (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if\r
-*>            sigma_max(A) overflows or if small singular values have been\r
-*>            saved from underflow by scaling the input matrix A.\r
-*>          - If JOBR='R' then some of the singular values may be returned\r
-*>            as exact zeros obtained by "set to zero" because they are\r
-*>            below the numerical rank threshold or are denormalized numbers.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] U\r
-*> \verbatim\r
-*>          U is COMPLEX*16 array, dimension ( LDU, N )\r
-*>          If JOBU = 'U', then U contains on exit the M-by-N matrix of\r
-*>                         the left singular vectors.\r
-*>          If JOBU = 'F', then U contains on exit the M-by-M matrix of\r
-*>                         the left singular vectors, including an ONB\r
-*>                         of the orthogonal complement of the Range(A).\r
-*>          If JOBU = 'W'  .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),\r
-*>                         then U is used as workspace if the procedure\r
-*>                         replaces A with A^*. In that case, [V] is computed\r
-*>                         in U as left singular vectors of A^* and then\r
-*>                         copied back to the V array. This 'W' option is just\r
-*>                         a reminder to the caller that in this case U is\r
-*>                         reserved as workspace of length N*N.\r
-*>          If JOBU = 'N'  U is not referenced, unless JOBT='T'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDU\r
-*> \verbatim\r
-*>          LDU is INTEGER\r
-*>          The leading dimension of the array U,  LDU >= 1.\r
-*>          IF  JOBU = 'U' or 'F' or 'W',  then LDU >= M.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] V\r
-*> \verbatim\r
-*>          V is COMPLEX*16 array, dimension ( LDV, N )\r
-*>          If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of\r
-*>                         the right singular vectors;\r
-*>          If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),\r
-*>                         then V is used as workspace if the pprocedure\r
-*>                         replaces A with A^*. In that case, [U] is computed\r
-*>                         in V as right singular vectors of A^* and then\r
-*>                         copied back to the U array. This 'W' option is just\r
-*>                         a reminder to the caller that in this case V is\r
-*>                         reserved as workspace of length N*N.\r
-*>          If JOBV = 'N'  V is not referenced, unless JOBT='T'.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LDV\r
-*> \verbatim\r
-*>          LDV is INTEGER\r
-*>          The leading dimension of the array V,  LDV >= 1.\r
-*>          If JOBV = 'V' or 'J' or 'W', then LDV >= N.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] CWORK\r
-*> \verbatim\r
-*>          CWORK is COMPLEX*16 array, dimension (MAX(2,LWORK))\r
-*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit CWORK(1) contains the required length of\r
-*>          CWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LWORK\r
-*> \verbatim\r
-*>          LWORK is INTEGER\r
-*>          Length of CWORK to confirm proper allocation of workspace.\r
-*>          LWORK depends on the job:\r
-*>\r
-*>          1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and\r
-*>            1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):\r
-*>               LWORK >= 2*N+1. This is the minimal requirement.\r
-*>               ->> For optimal performance (blocked code) the optimal value\r
-*>               is LWORK >= N + (N+1)*NB. Here NB is the optimal\r
-*>               block size for ZGEQP3 and ZGEQRF.\r
-*>               In general, optimal LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ)).\r
-*>            1.2. .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G'). In this case, LWORK the minimal\r
-*>               requirement is LWORK >= N*N + 2*N.\r
-*>               ->> For optimal performance (blocked code) the optimal value\r
-*>               is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ),\r
-*>                            N*N+LWORK(ZPOCON)).\r
-*>          2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),\r
-*>             (JOBU.EQ.'N')\r
-*>            2.1   .. no scaled condition estimate requested (JOBE.EQ.'N'):    \r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance, \r
-*>               LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ,\r
-*>               ZUNMLQ. In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3), N+LWORK(ZGESVJ),\r
-*>                       N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).\r
-*>            2.2 .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G').\r
-*>            -> the minimal requirement is LWORK >= 3*N.      \r
-*>            -> For optimal performance, \r
-*>               LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ,\r
-*>               ZUNMLQ. In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3), LWORK(ZPOCON), N+LWORK(ZGESVJ),\r
-*>                       N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).   \r
-*>          3. If SIGMA and the left singular vectors are needed\r
-*>            3.1  .. no scaled condition estimate requested (JOBE.EQ.'N'):\r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance:\r
-*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). \r
-*>            3.2  .. an estimate of the scaled condition number of A is\r
-*>               required (JOBA='E', or 'G').\r
-*>            -> the minimal requirement is LWORK >= 3*N.\r
-*>            -> For optimal performance:\r
-*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,\r
-*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.\r
-*>               In general, the optimal length LWORK is computed as\r
-*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZPOCON),\r
-*>                        2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)).\r
-*>          4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and \r
-*>            4.1. if JOBV.EQ.'V'  \r
-*>               the minimal requirement is LWORK >= 5*N+2*N*N. \r
-*>            4.2. if JOBV.EQ.'J' the minimal requirement is \r
-*>               LWORK >= 4*N+N*N.\r
-*>            In both cases, the allocated CWORK can accommodate blocked runs\r
-*>            of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ.\r
-*>\r
-*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the\r
-*>          minimal length of CWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] RWORK\r
-*> \verbatim\r
-*>          RWORK is DOUBLE PRECISION array, dimension (MAX(7,LWORK))\r
-*>          On exit,\r
-*>          RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)\r
-*>                    such that SCALE*SVA(1:N) are the computed singular values\r
-*>                    of A. (See the description of SVA().)\r
-*>          RWORK(2) = See the description of RWORK(1).\r
-*>          RWORK(3) = SCONDA is an estimate for the condition number of\r
-*>                    column equilibrated A. (If JOBA .EQ. 'E' or 'G')\r
-*>                    SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).\r
-*>                    It is computed using SPOCON. It holds\r
-*>                    N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA\r
-*>                    where R is the triangular factor from the QRF of A.\r
-*>                    However, if R is truncated and the numerical rank is\r
-*>                    determined to be strictly smaller than N, SCONDA is\r
-*>                    returned as -1, thus indicating that the smallest\r
-*>                    singular values might be lost.\r
-*>\r
-*>          If full SVD is needed, the following two condition numbers are\r
-*>          useful for the analysis of the algorithm. They are provied for\r
-*>          a developer/implementer who is familiar with the details of\r
-*>          the method.\r
-*>\r
-*>          RWORK(4) = an estimate of the scaled condition number of the\r
-*>                    triangular factor in the first QR factorization.\r
-*>          RWORK(5) = an estimate of the scaled condition number of the\r
-*>                    triangular factor in the second QR factorization.\r
-*>          The following two parameters are computed if JOBT .EQ. 'T'.\r
-*>          They are provided for a developer/implementer who is familiar\r
-*>          with the details of the method.\r
-*>          RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy\r
-*>                    of diag(A^* * A) / Trace(A^* * A) taken as point in the\r
-*>                    probability simplex.\r
-*>          RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)\r
-*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or\r
-*>          LRWORK=-1), then on exit RWORK(1) contains the required length of\r
-*>          RWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[in] LRWORK\r
-*> \verbatim\r
-*>          LRWORK is INTEGER\r
-*>          Length of RWORK to confirm proper allocation of workspace.\r
-*>          LRWORK depends on the job:\r
-*>\r
-*>       1. If only the singular values are requested i.e. if\r
-*>          LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')\r
-*>          then:\r
-*>          1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>               then: LRWORK = max( 7, 2 * M ).\r
-*>          1.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       2. If singular values with the right singular vectors are requested\r
-*>          i.e. if\r
-*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.\r
-*>          .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))\r
-*>          then:\r
-*>          2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          2.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       3. If singular values with the left singular vectors are requested, i.e. if\r
-*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.\r
-*>          .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))\r
-*>          then:\r
-*>          3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          3.2. Otherwise, LRWORK  = max( 7,  N ).\r
-*>       4. If singular values with both the left and the right singular vectors\r
-*>          are requested, i.e. if\r
-*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.\r
-*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))\r
-*>          then:\r
-*>          4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),\r
-*>          then LRWORK = max( 7, 2 * M ).\r
-*>          4.2. Otherwise, LRWORK  = max( 7, N ).\r
-*>\r
-*>          If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and \r
-*>          the length of RWORK is returned in RWORK(1). \r
-*> \endverbatim\r
-*>\r
-*> \param[out] IWORK\r
-*> \verbatim\r
-*>          IWORK is INTEGER array, of dimension at least 4, that further depends \r
-*>          on the job:\r
-*>\r
-*>          1. If only the singular values are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N.\r
-*>          2. If the singular values and the right singular vectors are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>          3. If the singular values and the left singular vectors are requested then:\r
-*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>          4. If the singular values with both the left and the right singular vectors\r
-*>             are requested, then:      \r
-*>             4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:\r
-*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>                  then the length of IWORK is N+M; otherwise the length of IWORK is N. \r
-*>             4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:\r
-*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) \r
-*>                  then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.\r
-*>        \r
-*>          On exit,\r
-*>          IWORK(1) = the numerical rank determined after the initial\r
-*>                     QR factorization with pivoting. See the descriptions\r
-*>                     of JOBA and JOBR.\r
-*>          IWORK(2) = the number of the computed nonzero singular values\r
-*>          IWORK(3) = if nonzero, a warning message:\r
-*>                     If IWORK(3).EQ.1 then some of the column norms of A\r
-*>                     were denormalized floats. The requested high accuracy\r
-*>                     is not warranted by the data.\r
-*>          IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to\r
-*>                     do the job as specified by the JOB parameters.\r
-*>          If the call to ZGEJSV is a workspace query (indicated by LWORK .EQ. -1 or\r
-*>          LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of \r
-*>          IWORK for the job parameters used in the call.\r
-*> \endverbatim\r
-*>\r
-*> \param[out] INFO\r
-*> \verbatim\r
-*>          INFO is INTEGER\r
-*>           < 0  : if INFO = -i, then the i-th argument had an illegal value.\r
-*>           = 0 :  successful exit;\r
-*>           > 0 :  ZGEJSV  did not converge in the maximal allowed number\r
-*>                  of sweeps. The computed values may be inaccurate.\r
-*> \endverbatim\r
-*\r
-*  Authors:\r
-*  ========\r
-*\r
-*> \author Univ. of Tennessee\r
-*> \author Univ. of California Berkeley\r
-*> \author Univ. of Colorado Denver\r
-*> \author NAG Ltd.\r
-*\r
-*> \date June 2016\r
-*\r
-*> \ingroup complex16GEsing\r
-*\r
-*> \par Further Details:\r
-*  =====================\r
-*>\r
-*> \verbatim\r
-*>\r
-*>  ZGEJSV implements a preconditioned Jacobi SVD algorithm. It uses ZGEQP3,\r
-*>  ZGEQRF, and ZGELQF as preprocessors and preconditioners. Optionally, an\r
-*>  additional row pivoting can be used as a preprocessor, which in some\r
-*>  cases results in much higher accuracy. An example is matrix A with the\r
-*>  structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned\r
-*>  diagonal matrices and C is well-conditioned matrix. In that case, complete\r
-*>  pivoting in the first QR factorizations provides accuracy dependent on the\r
-*>  condition number of C, and independent of D1, D2. Such higher accuracy is\r
-*>  not completely understood theoretically, but it works well in practice.\r
-*>  Further, if A can be written as A = B*D, with well-conditioned B and some\r
-*>  diagonal D, then the high accuracy is guaranteed, both theoretically and\r
-*>  in software, independent of D. For more details see [1], [2].\r
-*>     The computational range for the singular values can be the full range\r
-*>  ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS\r
-*>  & LAPACK routines called by ZGEJSV are implemented to work in that range.\r
-*>  If that is not the case, then the restriction for safe computation with\r
-*>  the singular values in the range of normalized IEEE numbers is that the\r
-*>  spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not\r
-*>  overflow. This code (ZGEJSV) is best used in this restricted range,\r
-*>  meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are\r
-*>  returned as zeros. See JOBR for details on this.\r
-*>     Further, this implementation is somewhat slower than the one described\r
-*>  in [1,2] due to replacement of some non-LAPACK components, and because\r
-*>  the choice of some tuning parameters in the iterative part (ZGESVJ) is\r
-*>  left to the implementer on a particular machine.\r
-*>     The rank revealing QR factorization (in this code: ZGEQP3) should be\r
-*>  implemented as in [3]. We have a new version of ZGEQP3 under development\r
-*>  that is more robust than the current one in LAPACK, with a cleaner cut in\r
-*>  rank deficient cases. It will be available in the SIGMA library [4].\r
-*>  If M is much larger than N, it is obvious that the initial QRF with\r
-*>  column pivoting can be preprocessed by the QRF without pivoting. That\r
-*>  well known trick is not used in ZGEJSV because in some cases heavy row\r
-*>  weighting can be treated with complete pivoting. The overhead in cases\r
-*>  M much larger than N is then only due to pivoting, but the benefits in\r
-*>  terms of accuracy have prevailed. The implementer/user can incorporate\r
-*>  this extra QRF step easily. The implementer can also improve data movement\r
-*>  (matrix transpose, matrix copy, matrix transposed copy) - this\r
-*>  implementation of ZGEJSV uses only the simplest, naive data movement.\r
-*> \endverbatim\r
-*\r
-*> \par Contributor:\r
-*  ==================\r
-*>\r
-*>  Zlatko Drmac, Department of Mathematics, Faculty of Science,\r
-*>  University of Zagreb (Zagreb, Croatia); drmac@math.hr\r
-*\r
-*> \par References:\r
-*  ================\r
-*>\r
-*> \verbatim\r
-*>\r
-*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.\r
-*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.\r
-*>     LAPACK Working note 169.\r
-*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.\r
-*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.\r
-*>     LAPACK Working note 170.\r
-*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR\r
-*>     factorization software - a case study.\r
-*>     ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.\r
-*>     LAPACK Working note 176.\r
-*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,\r
-*>     QSVD, (H,K)-SVD computations.\r
-*>     Department of Mathematics, University of Zagreb, 2008, 2016.\r
-*> \endverbatim\r
-*\r
-*>  \par Bugs, examples and comments:\r
-*   =================================\r
-*>\r
-*>  Please report all bugs and send interesting examples and/or comments to\r
-*>  drmac@math.hr. Thank you.\r
-*>\r
-*  =====================================================================\r
-      SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,\r
-     $                   M, N, A, LDA, SVA, U, LDU, V, LDV,\r
-     $                   CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )\r
-*\r
-*  -- LAPACK computational routine (version 3.7.0) --\r
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --\r
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\r
-*     December 2016\r
-*\r
-*     .. Scalar Arguments ..\r
-      IMPLICIT    NONE\r
-      INTEGER     INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N\r
-*     ..\r
-*     .. Array Arguments ..\r
-      COMPLEX*16       A( LDA, * ), U( LDU, * ), V( LDV, * ),\r
-     $                 CWORK( LWORK )\r
-      DOUBLE PRECISION SVA( N ), RWORK( LRWORK )\r
-      INTEGER          IWORK( * )\r
-      CHARACTER*1      JOBA, JOBP, JOBR, JOBT, JOBU, JOBV\r
-*     ..\r
-*\r
-*  ===========================================================================\r
-*\r
-*     .. Local Parameters ..\r
-      DOUBLE PRECISION ZERO, ONE\r
-      PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 )\r
-      COMPLEX*16 CZERO, CONE\r
-      PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), CONE = ( 1.0D0, 0.0D0 ) )\r
-*     ..\r
-*     .. Local Scalars ..\r
-      COMPLEX*16       CTEMP\r
-      DOUBLE PRECISION AAPP,    AAQQ,   AATMAX, AATMIN, BIG,    BIG1,\r
-     $                 COND_OK, CONDR1, CONDR2, ENTRA,  ENTRAT, EPSLN,\r
-     $                 MAXPRJ,  SCALEM, SCONDA, SFMIN,  SMALL,  TEMP1,\r
-     $                 USCAL1,  USCAL2, XSC\r
-      INTEGER IERR,   N1,     NR,     NUMRANK,        p, q,   WARNING\r
-      LOGICAL ALMORT, DEFR,   ERREST, GOSCAL,  JRACC,  KILL,   LQUERY,\r
-     $        LSVEC,  L2ABER, L2KILL, L2PERT,  L2RANK, L2TRAN, NOSCAL,\r
-     $        ROWPIV, RSVEC,  TRANSP\r
-*\r
-      INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK\r
-      INTEGER LWCON,  LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,\r
-     $        LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF\r
-      INTEGER LWRK_ZGELQF, LWRK_ZGEQP3,  LWRK_ZGEQP3N, LWRK_ZGEQRF,  \r
-     $        LWRK_ZGESVJ, LWRK_ZGESVJV, LWRK_ZGESVJU, LWRK_ZUNMLQ, \r
-     $        LWRK_ZUNMQR, LWRK_ZUNMQRM    \r
-*     ..\r
-*     .. Local Arrays\r
-      COMPLEX*16         CDUMMY(1)\r
-      DOUBLE PRECISION   RDUMMY(1)\r
-*\r
-*     .. Intrinsic Functions ..\r
-      INTRINSIC ABS, DCMPLX, CONJG, DLOG, MAX, MIN, DBLE, NINT, SQRT\r
-*     ..\r
-*     .. External Functions ..\r
-      DOUBLE PRECISION      DLAMCH, DZNRM2\r
-      INTEGER   IDAMAX, IZAMAX\r
-      LOGICAL   LSAME\r
-      EXTERNAL  IDAMAX, IZAMAX, LSAME, DLAMCH, DZNRM2\r
-*     ..\r
-*     .. External Subroutines ..\r
-      EXTERNAL  DLASSQ, ZCOPY,  ZGELQF, ZGEQP3, ZGEQRF, ZLACPY, ZLAPMR,\r
-     $          ZLASCL, DLASCL, ZLASET, ZLASSQ, ZLASWP, ZUNGQR, ZUNMLQ,\r
-     $          ZUNMQR, ZPOCON, DSCAL,  ZDSCAL, ZSWAP,  ZTRSM,  ZLACGV,\r
-     $          XERBLA\r
-*\r
-      EXTERNAL  ZGESVJ\r
-*     ..\r
-*\r
-*     Test the input arguments\r
-*\r
-      LSVEC  = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )\r
-      JRACC  = LSAME( JOBV, 'J' )\r
-      RSVEC  = LSAME( JOBV, 'V' ) .OR. JRACC\r
-      ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )\r
-      L2RANK = LSAME( JOBA, 'R' )\r
-      L2ABER = LSAME( JOBA, 'A' )\r
-      ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )\r
-      L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )\r
-      L2KILL = LSAME( JOBR, 'R' )\r
-      DEFR   = LSAME( JOBR, 'N' )\r
-      L2PERT = LSAME( JOBP, 'P' )\r
-*\r
-      LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )\r
-*\r
-      IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.\r
-     $     ERREST .OR. LSAME( JOBA, 'C' ) )) THEN\r
-         INFO = - 1\r
-      ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.\r
-     $   ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN\r
-         INFO = - 2\r
-      ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.\r
-     $   ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN\r
-         INFO = - 3\r
-      ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) )    THEN\r
-         INFO = - 4\r
-      ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN\r
-         INFO = - 5\r
-      ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN\r
-         INFO = - 6\r
-      ELSE IF ( M .LT. 0 ) THEN\r
-         INFO = - 7\r
-      ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN\r
-         INFO = - 8\r
-      ELSE IF ( LDA .LT. M ) THEN\r
-         INFO = - 10\r
-      ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN\r
-         INFO = - 13\r
-      ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN\r
-         INFO = - 15\r
-      ELSE\r
-*        #:)\r
-         INFO = 0\r
-      END IF\r
-*\r
-      IF ( INFO .EQ. 0 ) THEN \r
-*         .. compute the minimal and the optimal workspace lengths \r
-*         [[The expressions for computing the minimal and the optimal\r
-*         values of LCWORK, LRWORK are written with a lot of redundancy and\r
-*         can be simplified. However, this verbose form is useful for\r
-*         maintenance and modifications of the code.]]\r
-*\r
-*        .. minimal workspace length for ZGEQP3 of an M x N matrix,\r
-*         ZGEQRF of an N x N matrix, ZGELQF of an N x N matrix,\r
-*         ZUNMLQ for computing N x N matrix, ZUNMQR for computing N x N\r
-*         matrix, ZUNMQR for computing M x N matrix, respectively.\r
-          LWQP3 = N+1   \r
-          LWQRF = MAX( 1, N )\r
-          LWLQF = MAX( 1, N )\r
-          LWUNMLQ  = MAX( 1, N )\r
-          LWUNMQR  = MAX( 1, N )\r
-          LWUNMQRM = MAX( 1, M )\r
-*        .. minimal workspace length for ZPOCON of an N x N matrix\r
-          LWCON = 2 * N \r
-*        .. minimal workspace length for ZGESVJ of an N x N matrix,\r
-*         without and with explicit accumulation of Jacobi rotations\r
-          LWSVDJ  = MAX( 2 * N, 1 )         \r
-          LWSVDJV = MAX( 2 * N, 1 )\r
-*         .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ\r
-          LRWQP3  = N \r
-          LRWCON  = N \r
-          LRWSVDJ = N \r
-          IF ( LQUERY ) THEN \r
-              CALL ZGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, \r
-     $             RDUMMY, IERR )\r
-              LWRK_ZGEQP3 = CDUMMY(1)\r
-              CALL ZGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )\r
-              LWRK_ZGEQRF = CDUMMY(1)\r
-              CALL ZGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )\r
-              LWRK_ZGELQF = CDUMMY(1)             \r
-          END IF\r
-          MINWRK  = 2\r
-          OPTWRK  = 2\r
-          MINIWRK = N \r
-          IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN\r
-*             .. minimal and optimal sizes of the complex workspace if\r
-*             only the singular values are requested\r
-              IF ( ERREST ) THEN \r
-                  MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )\r
-              ELSE\r
-                  MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )\r
-              END IF\r
-              IF ( LQUERY ) THEN \r
-                  CALL ZGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, \r
-     $                 LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                  LWRK_ZGESVJ = CDUMMY(1)\r
-                  IF ( ERREST ) THEN \r
-                      OPTWRK = MAX( N+LWRK_ZGEQP3, N**2+LWCON, \r
-     $                              N+LWRK_ZGEQRF, LWRK_ZGESVJ )\r
-                  ELSE\r
-                      OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWRK_ZGEQRF, \r
-     $                              LWRK_ZGESVJ )\r
-                  END IF\r
-              END IF\r
-              IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWCON, LRWSVDJ )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )\r
-                  END IF                 \r
-              ELSE\r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )\r
-                  END IF\r
-              END IF   \r
-              IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M \r
-          ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN\r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            singular values and the right singular vectors are requested\r
-             IF ( ERREST ) THEN \r
-                 MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,  \r
-     $                         2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )\r
-             ELSE\r
-                 MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, \r
-     $                         N+LWSVDJ, N+LWUNMLQ )\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,\r
-     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                 LWRK_ZGESVJ = CDUMMY(1)\r
-                 CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,\r
-     $                V, LDV, CDUMMY, -1, IERR )\r
-                 LWRK_ZUNMLQ = CDUMMY(1)                \r
-                 IF ( ERREST ) THEN \r
-                 OPTWRK = MAX( N+LWRK_ZGEQP3, LWCON, LWRK_ZGESVJ, \r
-     $                         N+LWRK_ZGELQF, 2*N+LWRK_ZGEQRF,\r
-     $                         N+LWRK_ZGESVJ,  N+LWRK_ZUNMLQ )\r
-                 ELSE\r
-                 OPTWRK = MAX( N+LWRK_ZGEQP3, LWRK_ZGESVJ,N+LWRK_ZGELQF,\r
-     $                         2*N+LWRK_ZGEQRF, N+LWRK_ZGESVJ, \r
-     $                         N+LWRK_ZUNMLQ )\r
-                 END IF\r
-             END IF\r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ ) \r
-                  END IF                  \r
-             ELSE\r
-                  IF ( ERREST ) THEN \r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-                  ELSE\r
-                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) \r
-                  END IF                 \r
-             END IF\r
-             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-          ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN  \r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            singular values and the left singular vectors are requested\r
-             IF ( ERREST ) THEN\r
-                 MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )\r
-             ELSE\r
-                 MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,\r
-     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                 LWRK_ZGESVJ = CDUMMY(1)\r
-                 CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $               LDU, CDUMMY, -1, IERR )\r
-                 LWRK_ZUNMQRM = CDUMMY(1)\r
-                 IF ( ERREST ) THEN\r
-                 OPTWRK = N + MAX( LWRK_ZGEQP3, LWCON, N+LWRK_ZGEQRF,\r
-     $                             LWRK_ZGESVJ, LWRK_ZUNMQRM )\r
-                 ELSE\r
-                 OPTWRK = N + MAX( LWRK_ZGEQP3, N+LWRK_ZGEQRF,\r
-     $                             LWRK_ZGESVJ, LWRK_ZUNMQRM )\r
-                 END IF\r
-             END IF\r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                 IF ( ERREST ) THEN \r
-                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-                 ELSE\r
-                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )\r
-                 END IF                 \r
-             ELSE\r
-                 IF ( ERREST ) THEN \r
-                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-                 ELSE\r
-                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )\r
-                 END IF                \r
-             END IF \r
-             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-          ELSE\r
-*            .. minimal and optimal sizes of the complex workspace if the\r
-*            full SVD is requested\r
-             IF ( .NOT. JRACC ) THEN                \r
-                 IF ( ERREST ) THEN \r
-                    MINWRK = MAX( N+LWQP3, N+LWCON,  2*N+N**2+LWCON, \r
-     $                         2*N+LWQRF,         2*N+LWQP3, \r
-     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,\r
-     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, \r
-     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, \r
-     $                         N+N**2+LWSVDJ,   N+LWUNMQRM )\r
-                 ELSE\r
-                    MINWRK = MAX( N+LWQP3,        2*N+N**2+LWCON, \r
-     $                         2*N+LWQRF,         2*N+LWQP3, \r
-     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,\r
-     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,\r
-     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,\r
-     $                         N+N**2+LWSVDJ,      N+LWUNMQRM ) \r
-                 END IF \r
-                 MINIWRK = MINIWRK + N \r
-                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-             ELSE\r
-                 IF ( ERREST ) THEN \r
-                    MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, \r
-     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, \r
-     $                         N+LWUNMQRM )\r
-                 ELSE\r
-                    MINWRK = MAX( N+LWQP3, 2*N+LWQRF, \r
-     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, \r
-     $                         N+LWUNMQRM ) \r
-                 END IF   \r
-                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M\r
-             END IF\r
-             IF ( LQUERY ) THEN\r
-                 CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $                LDU, CDUMMY, -1, IERR )\r
-                 LWRK_ZUNMQRM = CDUMMY(1)\r
-                 CALL ZUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,\r
-     $                LDU, CDUMMY, -1, IERR )\r
-                 LWRK_ZUNMQR = CDUMMY(1)\r
-                 IF ( .NOT. JRACC ) THEN\r
-                     CALL ZGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,\r
-     $                    RDUMMY, IERR )\r
-                     LWRK_ZGEQP3N = CDUMMY(1)\r
-                     CALL ZGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_ZGESVJ = CDUMMY(1)\r
-                     CALL ZGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_ZGESVJU = CDUMMY(1)\r
-                     CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_ZGESVJV = CDUMMY(1)\r
-                     CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,\r
-     $                    V, LDV, CDUMMY, -1, IERR )\r
-                     LWRK_ZUNMLQ = CDUMMY(1)\r
-                     IF ( ERREST ) THEN \r
-                       OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, \r
-     $                          2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, \r
-     $                          2*N+LWRK_ZGEQP3N, \r
-     $                          2*N+N**2+N+LWRK_ZGELQF,  \r
-     $                          2*N+N**2+N+N**2+LWCON,\r
-     $                          2*N+N**2+N+LWRK_ZGESVJ, \r
-     $                          2*N+N**2+N+LWRK_ZGESVJV,               \r
-     $                          2*N+N**2+N+LWRK_ZUNMQR,\r
-     $                          2*N+N**2+N+LWRK_ZUNMLQ, \r
-     $                          N+N**2+LWRK_ZGESVJU,                  \r
-     $                          N+LWRK_ZUNMQRM )\r
-                     ELSE\r
-                       OPTWRK = MAX( N+LWRK_ZGEQP3,  \r
-     $                          2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, \r
-     $                          2*N+LWRK_ZGEQP3N, \r
-     $                          2*N+N**2+N+LWRK_ZGELQF,  \r
-     $                          2*N+N**2+N+N**2+LWCON,\r
-     $                          2*N+N**2+N+LWRK_ZGESVJ,               \r
-     $                          2*N+N**2+N+LWRK_ZGESVJV, \r
-     $                          2*N+N**2+N+LWRK_ZUNMQR,\r
-     $                          2*N+N**2+N+LWRK_ZUNMLQ, \r
-     $                          N+N**2+LWRK_ZGESVJU,\r
-     $                          N+LWRK_ZUNMQRM )\r
-                     END IF                    \r
-                 ELSE\r
-                     CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,\r
-     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )\r
-                     LWRK_ZGESVJV = CDUMMY(1)\r
-                     CALL ZUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,\r
-     $                    V, LDV, CDUMMY, -1, IERR )\r
-                     LWRK_ZUNMQR = CDUMMY(1)\r
-                     CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,\r
-     $                    LDU, CDUMMY, -1, IERR )\r
-                     LWRK_ZUNMQRM = CDUMMY(1)   \r
-                     IF ( ERREST ) THEN \r
-                        OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON,   \r
-     $                           2*N+LWRK_ZGEQRF, 2*N+N**2,  \r
-     $                           2*N+N**2+LWRK_ZGESVJV,  \r
-     $                           2*N+N**2+N+LWRK_ZUNMQR,N+LWRK_ZUNMQRM )\r
-                     ELSE\r
-                        OPTWRK = MAX( N+LWRK_ZGEQP3, 2*N+LWRK_ZGEQRF,  \r
-     $                           2*N+N**2, 2*N+N**2+LWRK_ZGESVJV, \r
-     $                           2*N+N**2+N+LWRK_ZUNMQR, \r
-     $                           N+LWRK_ZUNMQRM )   \r
-                     END IF                  \r
-                 END IF               \r
-             END IF \r
-             IF ( L2TRAN .OR. ROWPIV ) THEN \r
-                 MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )\r
-             ELSE\r
-                 MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )\r
-             END IF \r
-          END IF\r
-          MINWRK = MAX( 2, MINWRK )\r
-          OPTWRK = MAX( 2, OPTWRK )\r
-          IF ( LWORK  .LT. MINWRK  .AND. (.NOT.LQUERY) ) INFO = - 17\r
-          IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19   \r
-      END IF\r
-*      \r
-      IF ( INFO .NE. 0 ) THEN\r
-*       #:(\r
-         CALL XERBLA( 'ZGEJSV', - INFO )\r
-         RETURN\r
-      ELSE IF ( LQUERY ) THEN\r
-          CWORK(1) = OPTWRK\r
-          CWORK(2) = MINWRK\r
-          RWORK(1) = MINRWRK\r
-          IWORK(1) = MAX( 4, MINIWRK )\r
-          RETURN   \r
-      END IF\r
-*\r
-*     Quick return for void matrix (Y3K safe)\r
-* #:)\r
-      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN\r
-         IWORK(1:4) = 0\r
-         RWORK(1:7) = 0\r
-         RETURN\r
-      ENDIF\r
-*\r
-*     Determine whether the matrix U should be M x N or M x M\r
-*\r
-      IF ( LSVEC ) THEN\r
-         N1 = N\r
-         IF ( LSAME( JOBU, 'F' ) ) N1 = M\r
-      END IF\r
-*\r
-*     Set numerical parameters\r
-*\r
-*!    NOTE: Make sure DLAMCH() does not fail on the target architecture.\r
-*\r
-      EPSLN = DLAMCH('Epsilon')\r
-      SFMIN = DLAMCH('SafeMinimum')\r
-      SMALL = SFMIN / EPSLN\r
-      BIG   = DLAMCH('O')\r
-*     BIG   = ONE / SFMIN\r
-*\r
-*     Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N\r
-*\r
-*(!)  If necessary, scale SVA() to protect the largest norm from\r
-*     overflow. It is possible that this scaling pushes the smallest\r
-*     column norm left from the underflow threshold (extreme case).\r
-*\r
-      SCALEM  = ONE / SQRT(DBLE(M)*DBLE(N))\r
-      NOSCAL  = .TRUE.\r
-      GOSCAL  = .TRUE.\r
-      DO 1874 p = 1, N\r
-         AAPP = ZERO\r
-         AAQQ = ONE\r
-         CALL ZLASSQ( M, A(1,p), 1, AAPP, AAQQ )\r
-         IF ( AAPP .GT. BIG ) THEN\r
-            INFO = - 9\r
-            CALL XERBLA( 'ZGEJSV', -INFO )\r
-            RETURN\r
-         END IF\r
-         AAQQ = SQRT(AAQQ)\r
-         IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL  ) THEN\r
-            SVA(p)  = AAPP * AAQQ\r
-         ELSE\r
-            NOSCAL  = .FALSE.\r
-            SVA(p)  = AAPP * ( AAQQ * SCALEM )\r
-            IF ( GOSCAL ) THEN\r
-               GOSCAL = .FALSE.\r
-               CALL DSCAL( p-1, SCALEM, SVA, 1 )\r
-            END IF\r
-         END IF\r
- 1874 CONTINUE\r
-*\r
-      IF ( NOSCAL ) SCALEM = ONE\r
-*\r
-      AAPP = ZERO\r
-      AAQQ = BIG\r
-      DO 4781 p = 1, N\r
-         AAPP = MAX( AAPP, SVA(p) )\r
-         IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )\r
- 4781 CONTINUE\r
-*\r
-*     Quick return for zero M x N matrix\r
-* #:)\r
-      IF ( AAPP .EQ. ZERO ) THEN\r
-         IF ( LSVEC ) CALL ZLASET( 'G', M, N1, CZERO, CONE, U, LDU )\r
-         IF ( RSVEC ) CALL ZLASET( 'G', N, N,  CZERO, CONE, V, LDV )\r
-         RWORK(1) = ONE\r
-         RWORK(2) = ONE\r
-         IF ( ERREST ) RWORK(3) = ONE\r
-         IF ( LSVEC .AND. RSVEC ) THEN\r
-            RWORK(4) = ONE\r
-            RWORK(5) = ONE\r
-         END IF\r
-         IF ( L2TRAN ) THEN\r
-            RWORK(6) = ZERO\r
-            RWORK(7) = ZERO\r
-         END IF\r
-         IWORK(1) = 0\r
-         IWORK(2) = 0\r
-         IWORK(3) = 0\r
-         IWORK(4) = -1\r
-         RETURN\r
-      END IF\r
-*\r
-*     Issue warning if denormalized column norms detected. Override the\r
-*     high relative accuracy request. Issue licence to kill nonzero columns\r
-*     (set them to zero) whose norm is less than sigma_max / BIG (roughly).\r
-* #:(\r
-      WARNING = 0\r
-      IF ( AAQQ .LE. SFMIN ) THEN\r
-         L2RANK = .TRUE.\r
-         L2KILL = .TRUE.\r
-         WARNING = 1\r
-      END IF\r
-*\r
-*     Quick return for one-column matrix\r
-* #:)\r
-      IF ( N .EQ. 1 ) THEN\r
-*\r
-         IF ( LSVEC ) THEN\r
-            CALL ZLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )\r
-            CALL ZLACPY( 'A', M, 1, A, LDA, U, LDU )\r
-*           computing all M left singular vectors of the M x 1 matrix\r
-            IF ( N1 .NE. N  ) THEN\r
-              CALL ZGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )\r
-              CALL ZUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )\r
-              CALL ZCOPY( M, A(1,1), 1, U(1,1), 1 )\r
-            END IF\r
-         END IF\r
-         IF ( RSVEC ) THEN\r
-             V(1,1) = CONE\r
-         END IF\r
-         IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN\r
-            SVA(1)  = SVA(1) / SCALEM\r
-            SCALEM  = ONE\r
-         END IF\r
-         RWORK(1) = ONE / SCALEM\r
-         RWORK(2) = ONE\r
-         IF ( SVA(1) .NE. ZERO ) THEN\r
-            IWORK(1) = 1\r
-            IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN\r
-               IWORK(2) = 1\r
-            ELSE\r
-               IWORK(2) = 0\r
-            END IF\r
-         ELSE\r
-            IWORK(1) = 0\r
-            IWORK(2) = 0\r
-         END IF\r
-         IWORK(3) = 0\r
-         IWORK(4) = -1\r
-         IF ( ERREST ) RWORK(3) = ONE\r
-         IF ( LSVEC .AND. RSVEC ) THEN\r
-            RWORK(4) = ONE\r
-            RWORK(5) = ONE\r
-         END IF\r
-         IF ( L2TRAN ) THEN\r
-            RWORK(6) = ZERO\r
-            RWORK(7) = ZERO\r
-         END IF\r
-         RETURN\r
-*\r
-      END IF\r
-*\r
-      TRANSP = .FALSE.\r
-*\r
-      AATMAX = -ONE\r
-      AATMIN =  BIG\r
-      IF ( ROWPIV .OR. L2TRAN ) THEN\r
-*\r
-*     Compute the row norms, needed to determine row pivoting sequence\r
-*     (in the case of heavily row weighted A, row pivoting is strongly\r
-*     advised) and to collect information needed to compare the\r
-*     structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).\r
-*\r
-         IF ( L2TRAN ) THEN\r
-            DO 1950 p = 1, M\r
-               XSC   = ZERO\r
-               TEMP1 = ONE\r
-               CALL ZLASSQ( N, A(p,1), LDA, XSC, TEMP1 )\r
-*              ZLASSQ gets both the ell_2 and the ell_infinity norm\r
-*              in one pass through the vector\r
-               RWORK(M+p)  = XSC * SCALEM\r
-               RWORK(p)    = XSC * (SCALEM*SQRT(TEMP1))\r
-               AATMAX = MAX( AATMAX, RWORK(p) )\r
-               IF (RWORK(p) .NE. ZERO) \r
-     $            AATMIN = MIN(AATMIN,RWORK(p))\r
- 1950       CONTINUE\r
-         ELSE\r
-            DO 1904 p = 1, M\r
-               RWORK(M+p) = SCALEM*ABS( A(p,IZAMAX(N,A(p,1),LDA)) )\r
-               AATMAX = MAX( AATMAX, RWORK(M+p) )\r
-               AATMIN = MIN( AATMIN, RWORK(M+p) )\r
- 1904       CONTINUE\r
-         END IF\r
-*\r
-      END IF\r
-*\r
-*     For square matrix A try to determine whether A^*  would be better\r
-*     input for the preconditioned Jacobi SVD, with faster convergence.\r
-*     The decision is based on an O(N) function of the vector of column\r
-*     and row norms of A, based on the Shannon entropy. This should give\r
-*     the right choice in most cases when the difference actually matters.\r
-*     It may fail and pick the slower converging side.\r
-*\r
-      ENTRA  = ZERO\r
-      ENTRAT = ZERO\r
-      IF ( L2TRAN ) THEN\r
-*\r
-         XSC   = ZERO\r
-         TEMP1 = ONE\r
-         CALL DLASSQ( N, SVA, 1, XSC, TEMP1 )\r
-         TEMP1 = ONE / TEMP1\r
-*\r
-         ENTRA = ZERO\r
-         DO 1113 p = 1, N\r
-            BIG1  = ( ( SVA(p) / XSC )**2 ) * TEMP1\r
-            IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1)\r
- 1113    CONTINUE\r
-         ENTRA = - ENTRA / DLOG(DBLE(N))\r
-*\r
-*        Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.\r
-*        It is derived from the diagonal of  A^* * A.  Do the same with the\r
-*        diagonal of A * A^*, compute the entropy of the corresponding\r
-*        probability distribution. Note that A * A^* and A^* * A have the\r
-*        same trace.\r
-*\r
-         ENTRAT = ZERO\r
-         DO 1114 p = 1, M\r
-            BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1\r
-            IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1)\r
- 1114    CONTINUE\r
-         ENTRAT = - ENTRAT / DLOG(DBLE(M))\r
-*\r
-*        Analyze the entropies and decide A or A^*. Smaller entropy\r
-*        usually means better input for the algorithm.\r
-*\r
-         TRANSP = ( ENTRAT .LT. ENTRA )\r
-* \r
-*        If A^* is better than A, take the adjoint of A. This is allowed\r
-*        only for square matrices, M=N.\r
-         IF ( TRANSP ) THEN\r
-*           In an optimal implementation, this trivial transpose\r
-*           should be replaced with faster transpose.\r
-            DO 1115 p = 1, N - 1\r
-               A(p,p) = CONJG(A(p,p))\r
-               DO 1116 q = p + 1, N\r
-                   CTEMP = CONJG(A(q,p))\r
-                  A(q,p) = CONJG(A(p,q))\r
-                  A(p,q) = CTEMP\r
- 1116          CONTINUE\r
- 1115       CONTINUE\r
-            A(N,N) = CONJG(A(N,N))\r
-            DO 1117 p = 1, N\r
-               RWORK(M+p) = SVA(p)\r
-               SVA(p)     = RWORK(p)\r
-*              previously computed row 2-norms are now column 2-norms\r
-*              of the transposed matrix\r
- 1117       CONTINUE\r
-            TEMP1  = AAPP\r
-            AAPP   = AATMAX\r
-            AATMAX = TEMP1\r
-            TEMP1  = AAQQ\r
-            AAQQ   = AATMIN\r
-            AATMIN = TEMP1\r
-            KILL   = LSVEC\r
-            LSVEC  = RSVEC\r
-            RSVEC  = KILL\r
-            IF ( LSVEC ) N1 = N\r
-*\r
-            ROWPIV = .TRUE.\r
-         END IF\r
-*\r
-      END IF\r
-*     END IF L2TRAN\r
-*\r
-*     Scale the matrix so that its maximal singular value remains less\r
-*     than SQRT(BIG) -- the matrix is scaled so that its maximal column\r
-*     has Euclidean norm equal to SQRT(BIG/N). The only reason to keep\r
-*     SQRT(BIG) instead of BIG is the fact that ZGEJSV uses LAPACK and\r
-*     BLAS routines that, in some implementations, are not capable of\r
-*     working in the full interval [SFMIN,BIG] and that they may provoke\r
-*     overflows in the intermediate results. If the singular values spread\r
-*     from SFMIN to BIG, then ZGESVJ will compute them. So, in that case,\r
-*     one should use ZGESVJ instead of ZGEJSV.\r
-*     >> change in the April 2016 update: allow bigger range, i.e. the\r
-*     largest column is allowed up to BIG/N and ZGESVJ will do the rest.\r
-      BIG1   = SQRT( BIG )\r
-      TEMP1  = SQRT( BIG / DBLE(N) ) \r
-*      TEMP1  = BIG/DBLE(N)\r
-*\r
-      CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )\r
-      IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN\r
-          AAQQ = ( AAQQ / AAPP ) * TEMP1\r
-      ELSE\r
-          AAQQ = ( AAQQ * TEMP1 ) / AAPP\r
-      END IF\r
-      TEMP1 = TEMP1 * SCALEM\r
-      CALL ZLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )\r
-*\r
-*     To undo scaling at the end of this procedure, multiply the\r
-*     computed singular values with USCAL2 / USCAL1.\r
-*\r
-      USCAL1 = TEMP1\r
-      USCAL2 = AAPP\r
-*\r
-      IF ( L2KILL ) THEN\r
-*        L2KILL enforces computation of nonzero singular values in\r
-*        the restricted range of condition number of the initial A,\r
-*        sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).\r
-         XSC = SQRT( SFMIN )\r
-      ELSE\r
-         XSC = SMALL\r
-*\r
-*        Now, if the condition number of A is too big,\r
-*        sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,\r
-*        as a precaution measure, the full SVD is computed using ZGESVJ\r
-*        with accumulated Jacobi rotations. This provides numerically\r
-*        more robust computation, at the cost of slightly increased run\r
-*        time. Depending on the concrete implementation of BLAS and LAPACK\r
-*        (i.e. how they behave in presence of extreme ill-conditioning) the\r
-*        implementor may decide to remove this switch.\r
-         IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN\r
-            JRACC = .TRUE.\r
-         END IF\r
-*\r
-      END IF\r
-      IF ( AAQQ .LT. XSC ) THEN\r
-         DO 700 p = 1, N\r
-            IF ( SVA(p) .LT. XSC ) THEN\r
-               CALL ZLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )\r
-               SVA(p) = ZERO\r
-            END IF\r
- 700     CONTINUE\r
-      END IF\r
-*\r
-*     Preconditioning using QR factorization with pivoting\r
-*\r
-      IF ( ROWPIV ) THEN\r
-*        Optional row permutation (Bjoerck row pivoting):\r
-*        A result by Cox and Higham shows that the Bjoerck's\r
-*        row pivoting combined with standard column pivoting\r
-*        has similar effect as Powell-Reid complete pivoting.\r
-*        The ell-infinity norms of A are made nonincreasing.\r
-         IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN \r
-              IWOFF = 2*N\r
-         ELSE\r
-              IWOFF = N\r
-         END IF\r
-         DO 1952 p = 1, M - 1\r
-            q = IDAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1\r
-            IWORK(IWOFF+p) = q\r
-            IF ( p .NE. q ) THEN\r
-               TEMP1      = RWORK(M+p)\r
-               RWORK(M+p) = RWORK(M+q)\r
-               RWORK(M+q) = TEMP1\r
-            END IF\r
- 1952    CONTINUE\r
-         CALL ZLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )\r
-      END IF\r
-*\r
-*     End of the preparation phase (scaling, optional sorting and\r
-*     transposing, optional flushing of small columns).\r
-*\r
-*     Preconditioning\r
-*\r
-*     If the full SVD is needed, the right singular vectors are computed\r
-*     from a matrix equation, and for that we need theoretical analysis\r
-*     of the Businger-Golub pivoting. So we use ZGEQP3 as the first RR QRF.\r
-*     In all other cases the first RR QRF can be chosen by other criteria\r
-*     (eg speed by replacing global with restricted window pivoting, such\r
-*     as in xGEQPX from TOMS # 782). Good results will be obtained using\r
-*     xGEQPX with properly (!) chosen numerical parameters.\r
-*     Any improvement of ZGEQP3 improves overal performance of ZGEJSV.\r
-*\r
-*     A * P1 = Q1 * [ R1^* 0]^*:\r
-      DO 1963 p = 1, N\r
-*        .. all columns are free columns\r
-         IWORK(p) = 0\r
- 1963 CONTINUE\r
-      CALL ZGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,\r
-     $             RWORK, IERR )\r
-*\r
-*     The upper triangular matrix R1 from the first QRF is inspected for\r
-*     rank deficiency and possibilities for deflation, or possible\r
-*     ill-conditioning. Depending on the user specified flag L2RANK,\r
-*     the procedure explores possibilities to reduce the numerical\r
-*     rank by inspecting the computed upper triangular factor. If\r
-*     L2RANK or L2ABER are up, then ZGEJSV will compute the SVD of\r
-*     A + dA, where ||dA|| <= f(M,N)*EPSLN.\r
-*\r
-      NR = 1\r
-      IF ( L2ABER ) THEN\r
-*        Standard absolute error bound suffices. All sigma_i with\r
-*        sigma_i < N*EPSLN*||A|| are flushed to zero. This is an\r
-*        agressive enforcement of lower numerical rank by introducing a\r
-*        backward error of the order of N*EPSLN*||A||.\r
-         TEMP1 = SQRT(DBLE(N))*EPSLN\r
-         DO 3001 p = 2, N\r
-            IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN\r
-               NR = NR + 1\r
-            ELSE\r
-               GO TO 3002\r
-            END IF\r
- 3001    CONTINUE\r
- 3002    CONTINUE\r
-      ELSE IF ( L2RANK ) THEN\r
-*        .. similarly as above, only slightly more gentle (less agressive).\r
-*        Sudden drop on the diagonal of R1 is used as the criterion for\r
-*        close-to-rank-deficient.\r
-         TEMP1 = SQRT(SFMIN)\r
-         DO 3401 p = 2, N\r
-            IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.\r
-     $           ( ABS(A(p,p)) .LT. SMALL ) .OR.\r
-     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402\r
-            NR = NR + 1\r
- 3401    CONTINUE\r
- 3402    CONTINUE\r
-*\r
-      ELSE\r
-*        The goal is high relative accuracy. However, if the matrix\r
-*        has high scaled condition number the relative accuracy is in\r
-*        general not feasible. Later on, a condition number estimator\r
-*        will be deployed to estimate the scaled condition number.\r
-*        Here we just remove the underflowed part of the triangular\r
-*        factor. This prevents the situation in which the code is\r
-*        working hard to get the accuracy not warranted by the data.\r
-         TEMP1  = SQRT(SFMIN)\r
-         DO 3301 p = 2, N\r
-            IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.\r
-     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302\r
-            NR = NR + 1\r
- 3301    CONTINUE\r
- 3302    CONTINUE\r
-*\r
-      END IF\r
-*\r
-      ALMORT = .FALSE.\r
-      IF ( NR .EQ. N ) THEN\r
-         MAXPRJ = ONE\r
-         DO 3051 p = 2, N\r
-            TEMP1  = ABS(A(p,p)) / SVA(IWORK(p))\r
-            MAXPRJ = MIN( MAXPRJ, TEMP1 )\r
- 3051    CONTINUE\r
-         IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE.\r
-      END IF\r
-*\r
-*\r
-      SCONDA = - ONE\r
-      CONDR1 = - ONE\r
-      CONDR2 = - ONE\r
-*\r
-      IF ( ERREST ) THEN\r
-         IF ( N .EQ. NR ) THEN\r
-            IF ( RSVEC ) THEN\r
-*              .. V is available as workspace\r
-               CALL ZLACPY( 'U', N, N, A, LDA, V, LDV )\r
-               DO 3053 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-                  CALL ZDSCAL( p, ONE/TEMP1, V(1,p), 1 )\r
- 3053          CONTINUE\r
-               IF ( LSVEC )THEN\r
-                   CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,\r
-     $                  CWORK(N+1), RWORK, IERR )\r
-               ELSE\r
-                   CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,\r
-     $                  CWORK, RWORK, IERR )\r
-               END IF               \r
-*          \r
-            ELSE IF ( LSVEC ) THEN\r
-*              .. U is available as workspace\r
-               CALL ZLACPY( 'U', N, N, A, LDA, U, LDU )\r
-               DO 3054 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-                  CALL ZDSCAL( p, ONE/TEMP1, U(1,p), 1 )\r
- 3054          CONTINUE\r
-               CALL ZPOCON( 'U', N, U, LDU, ONE, TEMP1,\r
-     $              CWORK(N+1), RWORK, IERR )\r
-            ELSE\r
-               CALL ZLACPY( 'U', N, N, A, LDA, CWORK, N )\r
-*[]            CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )\r
-*              Change: here index shifted by N to the left, CWORK(1:N) \r
-*              not needed for SIGMA only computation\r
-               DO 3052 p = 1, N\r
-                  TEMP1 = SVA(IWORK(p))\r
-*[]               CALL ZDSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )\r
-                  CALL ZDSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )\r
- 3052          CONTINUE\r
-*           .. the columns of R are scaled to have unit Euclidean lengths.\r
-*[]               CALL ZPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,\r
-*[]     $              CWORK(N+N*N+1), RWORK, IERR )\r
-               CALL ZPOCON( 'U', N, CWORK, N, ONE, TEMP1,\r
-     $              CWORK(N*N+1), RWORK, IERR )               \r
-*              \r
-            END IF\r
-            IF ( TEMP1 .NE. ZERO ) THEN \r
-               SCONDA = ONE / SQRT(TEMP1)\r
-            ELSE\r
-               SCONDA = - ONE\r
-            END IF\r
-*           SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).\r
-*           N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA\r
-         ELSE\r
-            SCONDA = - ONE\r
-         END IF\r
-      END IF\r
-*\r
-      L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )\r
-*     If there is no violent scaling, artificial perturbation is not needed.\r
-*\r
-*     Phase 3:\r
-*\r
-      IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN\r
-*\r
-*         Singular Values only\r
-*\r
-*         .. transpose A(1:NR,1:N)\r
-         DO 1946 p = 1, MIN( N-1, NR )\r
-            CALL ZCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )\r
-            CALL ZLACGV( N-p+1, A(p,p), 1 )\r
- 1946    CONTINUE\r
-         IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))\r
-*\r
-*        The following two DO-loops introduce small relative perturbation\r
-*        into the strict upper triangle of the lower triangular matrix.\r
-*        Small entries below the main diagonal are also changed.\r
-*        This modification is useful if the computing environment does not\r
-*        provide/allow FLUSH TO ZERO underflow, for it prevents many\r
-*        annoying denormalized numbers in case of strongly scaled matrices.\r
-*        The perturbation is structured so that it does not introduce any\r
-*        new perturbation of the singular values, and it does not destroy\r
-*        the job done by the preconditioner.\r
-*        The licence for this perturbation is in the variable L2PERT, which\r
-*        should be .FALSE. if FLUSH TO ZERO underflow is active.\r
-*\r
-         IF ( .NOT. ALMORT ) THEN\r
-*\r
-            IF ( L2PERT ) THEN\r
-*              XSC = SQRT(SMALL)\r
-               XSC = EPSLN / DBLE(N)\r
-               DO 4947 q = 1, NR\r
-                  CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)\r
-                  DO 4949 p = 1, N\r
-                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )\r
-     $                    .OR. ( p .LT. q ) )\r
-*     $                     A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )\r
-     $                     A(p,q) = CTEMP\r
- 4949             CONTINUE\r
- 4947          CONTINUE\r
-            ELSE\r
-               CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )\r
-            END IF\r
-*\r
-*            .. second preconditioning using the QR factorization\r
-*\r
-            CALL ZGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )\r
-*\r
-*           .. and transpose upper to lower triangular\r
-            DO 1948 p = 1, NR - 1\r
-               CALL ZCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )\r
-               CALL ZLACGV( NR-p+1, A(p,p), 1 )\r
- 1948       CONTINUE\r
-*\r
-      END IF\r
-*\r
-*           Row-cyclic Jacobi SVD algorithm with column pivoting\r
-*\r
-*           .. again some perturbation (a "background noise") is added\r
-*           to drown denormals\r
-            IF ( L2PERT ) THEN\r
-*              XSC = SQRT(SMALL)\r
-               XSC = EPSLN / DBLE(N)\r
-               DO 1947 q = 1, NR\r
-                  CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)\r
-                  DO 1949 p = 1, NR\r
-                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )\r
-     $                       .OR. ( p .LT. q ) )\r
-*     $                   A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )\r
-     $                   A(p,q) = CTEMP\r
- 1949             CONTINUE\r
- 1947          CONTINUE\r
-            ELSE\r
-               CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )\r
-            END IF\r
-*\r
-*           .. and one-sided Jacobi rotations are started on a lower\r
-*           triangular matrix (plus perturbation which is ignored in\r
-*           the part which destroys triangular form (confusing?!))\r
-*\r
-            CALL ZGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,\r
-     $                N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )\r
-*\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-*\r
-*\r
-      ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) )\r
-     $       .OR. \r
-     $   ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN\r
-*\r
-*        -> Singular Values and Right Singular Vectors <-\r
-*\r
-         IF ( ALMORT ) THEN\r
-*\r
-*           .. in this case NR equals N\r
-            DO 1998 p = 1, NR\r
-               CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-               CALL ZLACGV( N-p+1, V(p,p), 1 )\r
- 1998       CONTINUE\r
-            CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )\r
-*\r
-            CALL ZGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,\r
-     $                  CWORK, LWORK, RWORK, LRWORK, INFO )\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-\r
-         ELSE\r
-*\r
-*        .. two more QR factorizations ( one QRF is not enough, two require\r
-*        accumulated product of Jacobi rotations, three are perfect )\r
-*\r
-            CALL ZLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )\r
-            CALL ZGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)\r
-            CALL ZLACPY( 'L', NR, NR, A, LDA, V, LDV )\r
-            CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )\r
-            CALL ZGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $                   LWORK-2*N, IERR )\r
-            DO 8998 p = 1, NR\r
-               CALL ZCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )\r
-               CALL ZLACGV( NR-p+1, V(p,p), 1 )\r
- 8998       CONTINUE\r
-            CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)\r
-*\r
-            CALL ZGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,\r
-     $                  LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-            IF ( NR .LT. N ) THEN\r
-               CALL ZLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1),  LDV )\r
-               CALL ZLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1),  LDV )\r
-               CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )\r
-            END IF\r
-*\r
-         CALL ZUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,\r
-     $               V, LDV, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-         END IF\r
-*         .. permute the rows of V\r
-*         DO 8991 p = 1, N\r
-*            CALL ZCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )\r
-* 8991    CONTINUE\r
-*         CALL ZLACPY( 'All', N, N, A, LDA, V, LDV )\r
-         CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )\r
-*\r
-          IF ( TRANSP ) THEN\r
-            CALL ZLACPY( 'A', N, N, V, LDV, U, LDU )\r
-          END IF\r
-*\r
-      ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN \r
-*          \r
-         CALL ZLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )\r
-*\r
-         CALL ZGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,\r
-     $               CWORK, LWORK, RWORK, LRWORK, INFO )\r
-          SCALEM  = RWORK(1)\r
-          NUMRANK = NINT(RWORK(2))\r
-          CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )\r
-*\r
-      ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN\r
-*\r
-*        .. Singular Values and Left Singular Vectors                 ..\r
-*\r
-*        .. second preconditioning step to avoid need to accumulate\r
-*        Jacobi rotations in the Jacobi iterations.\r
-         DO 1965 p = 1, NR\r
-            CALL ZCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )\r
-            CALL ZLACGV( N-p+1, U(p,p), 1 )\r
- 1965    CONTINUE\r
-         CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-*\r
-         CALL ZGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),\r
-     $              LWORK-2*N, IERR )\r
-*\r
-         DO 1967 p = 1, NR - 1\r
-            CALL ZCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )\r
-            CALL ZLACGV( N-p+1, U(p,p), 1 )\r
- 1967    CONTINUE\r
-         CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-*\r
-         CALL ZGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,\r
-     $        LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )\r
-         SCALEM  = RWORK(1)\r
-         NUMRANK = NINT(RWORK(2))\r
-*\r
-         IF ( NR .LT. M ) THEN\r
-            CALL ZLASET( 'A',  M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )\r
-            IF ( NR .LT. N1 ) THEN\r
-               CALL ZLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )\r
-               CALL ZLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )\r
-            END IF\r
-         END IF\r
-*\r
-         CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $               LDU, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-         IF ( ROWPIV )\r
-     $       CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         DO 1974 p = 1, N1\r
-            XSC = ONE / DZNRM2( M, U(1,p), 1 )\r
-            CALL ZDSCAL( M, XSC, U(1,p), 1 )\r
- 1974    CONTINUE\r
-*\r
-         IF ( TRANSP ) THEN\r
-            CALL ZLACPY( 'A', N, N, U, LDU, V, LDV )\r
-         END IF\r
-*\r
-      ELSE\r
-*\r
-*        .. Full SVD ..\r
-*\r
-         IF ( .NOT. JRACC ) THEN\r
-*\r
-         IF ( .NOT. ALMORT ) THEN\r
-*\r
-*           Second Preconditioning Step (QRF [with pivoting])\r
-*           Note that the composition of TRANSPOSE, QRF and TRANSPOSE is\r
-*           equivalent to an LQF CALL. Since in many libraries the QRF\r
-*           seems to be better optimized than the LQF, we do explicit\r
-*           transpose and use the QRF. This is subject to changes in an\r
-*           optimized implementation of ZGEJSV.\r
-*\r
-            DO 1968 p = 1, NR\r
-               CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-               CALL ZLACGV( N-p+1, V(p,p), 1 )\r
- 1968       CONTINUE\r
-*\r
-*           .. the following two loops perturb small entries to avoid\r
-*           denormals in the second QR factorization, where they are\r
-*           as good as zeros. This is done to avoid painfully slow\r
-*           computation with denormals. The relative size of the perturbation\r
-*           is a parameter that can be changed by the implementer.\r
-*           This perturbation device will be obsolete on machines with\r
-*           properly implemented arithmetic.\r
-*           To switch it off, set L2PERT=.FALSE. To remove it from  the\r
-*           code, remove the action under L2PERT=.TRUE., leave the ELSE part.\r
-*           The following two loops should be blocked and fused with the\r
-*           transposed copy above.\r
-*\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 2969 q = 1, NR\r
-                  CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)\r
-                  DO 2968 p = 1, N\r
-                     IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )\r
-     $                   .OR. ( p .LT. q ) )\r
-*     $                   V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )\r
-     $                   V(p,q) = CTEMP\r
-                     IF ( p .LT. q ) V(p,q) = - V(p,q)\r
- 2968             CONTINUE\r
- 2969          CONTINUE\r
-            ELSE\r
-               CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )\r
-            END IF\r
-*\r
-*           Estimate the row scaled condition number of R1\r
-*           (If R1 is rectangular, N > NR, then the condition number\r
-*           of the leading NR x NR submatrix is estimated.)\r
-*\r
-            CALL ZLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )\r
-            DO 3950 p = 1, NR\r
-               TEMP1 = DZNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)\r
-               CALL ZDSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)\r
- 3950       CONTINUE\r
-            CALL ZPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,\r
-     $                   CWORK(2*N+NR*NR+1),RWORK,IERR)\r
-            CONDR1 = ONE / SQRT(TEMP1)\r
-*           .. here need a second oppinion on the condition number\r
-*           .. then assume worst case scenario\r
-*           R1 is OK for inverse <=> CONDR1 .LT. DBLE(N)\r
-*           more conservative    <=> CONDR1 .LT. SQRT(DBLE(N))\r
-*\r
-            COND_OK = SQRT(SQRT(DBLE(NR)))\r
-*[TP]       COND_OK is a tuning parameter.\r
-*\r
-            IF ( CONDR1 .LT. COND_OK ) THEN\r
-*              .. the second QRF without pivoting. Note: in an optimized\r
-*              implementation, this QRF should be implemented as the QRF\r
-*              of a lower triangular matrix.\r
-*              R1^* = Q2 * R2\r
-               CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $              LWORK-2*N, IERR )\r
-*\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)/EPSLN\r
-                  DO 3959 p = 2, NR\r
-                     DO 3958 q = 1, p - 1\r
-                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                              ZERO)\r
-                        IF ( ABS(V(q,p)) .LE. TEMP1 )\r
-*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )\r
-     $                     V(q,p) = CTEMP\r
- 3958                CONTINUE\r
- 3959             CONTINUE\r
-               END IF\r
-*\r
-               IF ( NR .NE. N )\r
-     $         CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*              .. save ...\r
-*\r
-*           .. this transposed copy should be better than naive\r
-               DO 1969 p = 1, NR - 1\r
-                  CALL ZCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )\r
-                  CALL ZLACGV(NR-p+1, V(p,p), 1 )\r
- 1969          CONTINUE\r
-               V(NR,NR)=CONJG(V(NR,NR))\r
-*\r
-               CONDR2 = CONDR1\r
-*\r
-            ELSE\r
-*\r
-*              .. ill-conditioned case: second QRF with pivoting\r
-*              Note that windowed pivoting would be equaly good\r
-*              numerically, and more run-time efficient. So, in\r
-*              an optimal implementation, the next call to ZGEQP3\r
-*              should be replaced with eg. CALL ZGEQPX (ACM TOMS #782)\r
-*              with properly (carefully) chosen parameters.\r
-*\r
-*              R1^* * P2 = Q2 * R2\r
-               DO 3003 p = 1, NR\r
-                  IWORK(N+p) = 0\r
- 3003          CONTINUE\r
-               CALL ZGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),\r
-     $                  CWORK(2*N+1), LWORK-2*N, RWORK, IERR )\r
-**               CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-**     $              LWORK-2*N, IERR )\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)\r
-                  DO 3969 p = 2, NR\r
-                     DO 3968 q = 1, p - 1\r
-                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                                ZERO)\r
-                        IF ( ABS(V(q,p)) .LE. TEMP1 )\r
-*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )\r
-     $                     V(q,p) = CTEMP\r
- 3968                CONTINUE\r
- 3969             CONTINUE\r
-               END IF\r
-*\r
-               CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*\r
-               IF ( L2PERT ) THEN\r
-                  XSC = SQRT(SMALL)\r
-                  DO 8970 p = 2, NR\r
-                     DO 8971 q = 1, p - 1\r
-                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),\r
-     $                               ZERO)\r
-*                        V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )\r
-                        V(p,q) = - CTEMP\r
- 8971                CONTINUE\r
- 8970             CONTINUE\r
-               ELSE\r
-                  CALL ZLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )\r
-               END IF\r
-*              Now, compute R2 = L3 * Q3, the LQ factorization.\r
-               CALL ZGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),\r
-     $               CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )\r
-*              .. and estimate the condition number\r
-               CALL ZLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )\r
-               DO 4950 p = 1, NR\r
-                  TEMP1 = DZNRM2( p, CWORK(2*N+N*NR+NR+p), NR )\r
-                  CALL ZDSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )\r
- 4950          CONTINUE\r
-               CALL ZPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,\r
-     $              CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )\r
-               CONDR2 = ONE / SQRT(TEMP1)\r
-*\r
-*\r
-               IF ( CONDR2 .GE. COND_OK ) THEN\r
-*                 .. save the Householder vectors used for Q3\r
-*                 (this overwrittes the copy of R2, as it will not be\r
-*                 needed in this branch, but it does not overwritte the\r
-*                 Huseholder vectors of Q2.).\r
-                  CALL ZLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )\r
-*                 .. and the rest of the information on Q3 is in\r
-*                 WORK(2*N+N*NR+1:2*N+N*NR+N)\r
-               END IF\r
-*\r
-            END IF\r
-*\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 4968 q = 2, NR\r
-                  CTEMP = XSC * V(q,q)\r
-                  DO 4969 p = 1, q - 1\r
-*                     V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )\r
-                     V(p,q) = - CTEMP\r
- 4969             CONTINUE\r
- 4968          CONTINUE\r
-            ELSE\r
-               CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )\r
-            END IF\r
-*\r
-*        Second preconditioning finished; continue with Jacobi SVD\r
-*        The input matrix is lower trinagular.\r
-*\r
-*        Recover the right singular vectors as solution of a well\r
-*        conditioned triangular matrix equation.\r
-*\r
-            IF ( CONDR1 .LT. COND_OK ) THEN\r
-*\r
-               CALL ZGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,\r
-     $              CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,\r
-     $              LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               DO 3970 p = 1, NR\r
-                  CALL ZCOPY(  NR, V(1,p), 1, U(1,p), 1 )\r
-                  CALL ZDSCAL( NR, SVA(p),    V(1,p), 1 )\r
- 3970          CONTINUE\r
-\r
-*        .. pick the right matrix equation and solve it\r
-*\r
-               IF ( NR .EQ. N ) THEN\r
-* :))             .. best case, R1 is inverted. The solution of this matrix\r
-*                 equation is Q2*V2 = the product of the Jacobi rotations\r
-*                 used in ZGESVJ, premultiplied with the orthogonal matrix\r
-*                 from the second QR factorization.\r
-                  CALL ZTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)\r
-               ELSE\r
-*                 .. R1 is well conditioned, but non-square. Adjoint of R2\r
-*                 is inverted to get the product of the Jacobi rotations\r
-*                 used in ZGESVJ. The Q-factor from the second QR\r
-*                 factorization is then built in explicitly.\r
-                  CALL ZTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),\r
-     $                 N,V,LDV)\r
-                  IF ( NR .LT. N ) THEN\r
-                  CALL ZLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)\r
-                  CALL ZLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)\r
-                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-                  END IF\r
-                  CALL ZUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $                V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)\r
-               END IF\r
-*\r
-            ELSE IF ( CONDR2 .LT. COND_OK ) THEN\r
-*\r
-*              The matrix R2 is inverted. The solution of the matrix equation\r
-*              is Q3^* * V3 = the product of the Jacobi rotations (appplied to\r
-*              the lower triangular L3 from the LQ factorization of\r
-*              R2=L3*Q3), pre-multiplied with the transposed Q3.\r
-               CALL ZGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,\r
-     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,\r
-     $              RWORK, LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               DO 3870 p = 1, NR\r
-                  CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 )\r
-                  CALL ZDSCAL( NR, SVA(p),    U(1,p), 1 )\r
- 3870          CONTINUE\r
-               CALL ZTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,\r
-     $                    U,LDU)\r
-*              .. apply the permutation from the second QR factorization\r
-               DO 873 q = 1, NR\r
-                  DO 872 p = 1, NR\r
-                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)\r
- 872              CONTINUE\r
-                  DO 874 p = 1, NR\r
-                     U(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 874              CONTINUE\r
- 873           CONTINUE\r
-               IF ( NR .LT. N ) THEN\r
-                  CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-                  CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-               END IF\r
-               CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-            ELSE\r
-*              Last line of defense.\r
-* #:(          This is a rather pathological case: no scaled condition\r
-*              improvement after two pivoted QR factorizations. Other\r
-*              possibility is that the rank revealing QR factorization\r
-*              or the condition estimator has failed, or the COND_OK\r
-*              is set very close to ONE (which is unnecessary). Normally,\r
-*              this branch should never be executed, but in rare cases of\r
-*              failure of the RRQR or condition estimator, the last line of\r
-*              defense ensures that ZGEJSV completes the task.\r
-*              Compute the full SVD of L3 using ZGESVJ with explicit\r
-*              accumulation of Jacobi rotations.\r
-               CALL ZGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,\r
-     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,\r
-     $                         RWORK, LRWORK, INFO )\r
-               SCALEM  = RWORK(1)\r
-               NUMRANK = NINT(RWORK(2))\r
-               IF ( NR .LT. N ) THEN\r
-                  CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-                  CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)\r
-               END IF\r
-               CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-*\r
-               CALL ZUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,\r
-     $              CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),\r
-     $              LWORK-2*N-N*NR-NR, IERR )\r
-               DO 773 q = 1, NR\r
-                  DO 772 p = 1, NR\r
-                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)\r
- 772              CONTINUE\r
-                  DO 774 p = 1, NR\r
-                     U(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 774              CONTINUE\r
- 773           CONTINUE\r
-*\r
-            END IF\r
-*\r
-*           Permute the rows of V using the (column) permutation from the\r
-*           first QRF. Also, scale the columns to make them unit in\r
-*           Euclidean norm. This applies to all cases.\r
-*\r
-            TEMP1 = SQRT(DBLE(N)) * EPSLN\r
-            DO 1972 q = 1, N\r
-               DO 972 p = 1, N\r
-                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)\r
-  972          CONTINUE\r
-               DO 973 p = 1, N\r
-                  V(p,q) = CWORK(2*N+N*NR+NR+p)\r
-  973          CONTINUE\r
-               XSC = ONE / DZNRM2( N, V(1,q), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $           CALL ZDSCAL( N, XSC, V(1,q), 1 )\r
- 1972       CONTINUE\r
-*           At this moment, V contains the right singular vectors of A.\r
-*           Next, assemble the left singular vector matrix U (M x N).\r
-            IF ( NR .LT. M ) THEN\r
-               CALL ZLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)\r
-               IF ( NR .LT. N1 ) THEN\r
-                  CALL ZLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)\r
-                  CALL ZLASET('A',M-NR,N1-NR,CZERO,CONE,\r
-     $                        U(NR+1,NR+1),LDU)\r
-               END IF\r
-            END IF\r
-*\r
-*           The Q matrix from the first QRF is built into the left singular\r
-*           matrix U. This applies to all cases.\r
-*\r
-            CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $           LDU, CWORK(N+1), LWORK-N, IERR )\r
-\r
-*           The columns of U are normalized. The cost is O(M*N) flops.\r
-            TEMP1 = SQRT(DBLE(M)) * EPSLN\r
-            DO 1973 p = 1, NR\r
-               XSC = ONE / DZNRM2( M, U(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $          CALL ZDSCAL( M, XSC, U(1,p), 1 )\r
- 1973       CONTINUE\r
-*\r
-*           If the initial QRF is computed with row pivoting, the left\r
-*           singular vectors must be adjusted.\r
-*\r
-            IF ( ROWPIV )\r
-     $          CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         ELSE\r
-*\r
-*        .. the initial matrix A has almost orthogonal columns and\r
-*        the second QRF is not needed\r
-*\r
-            CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )\r
-            IF ( L2PERT ) THEN\r
-               XSC = SQRT(SMALL)\r
-               DO 5970 p = 2, N\r
-                  CTEMP = XSC * CWORK( N + (p-1)*N + p )\r
-                  DO 5971 q = 1, p - 1\r
-*                     CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /\r
-*     $                                        ABS(CWORK(N+(p-1)*N+q)) )\r
-                     CWORK(N+(q-1)*N+p)=-CTEMP\r
- 5971             CONTINUE\r
- 5970          CONTINUE\r
-            ELSE\r
-               CALL ZLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )\r
-            END IF\r
-*\r
-            CALL ZGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,\r
-     $           N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,\r
-     $       INFO )\r
-*\r
-            SCALEM  = RWORK(1)\r
-            NUMRANK = NINT(RWORK(2))\r
-            DO 6970 p = 1, N\r
-               CALL ZCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )\r
-               CALL ZDSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )\r
- 6970       CONTINUE\r
-*\r
-            CALL ZTRSM( 'L', 'U', 'N', 'N', N, N,\r
-     $           CONE, A, LDA, CWORK(N+1), N )\r
-            DO 6972 p = 1, N\r
-               CALL ZCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )\r
- 6972       CONTINUE\r
-            TEMP1 = SQRT(DBLE(N))*EPSLN\r
-            DO 6971 p = 1, N\r
-               XSC = ONE / DZNRM2( N, V(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $            CALL ZDSCAL( N, XSC, V(1,p), 1 )\r
- 6971       CONTINUE\r
-*\r
-*           Assemble the left singular vector matrix U (M x N).\r
-*\r
-            IF ( N .LT. M ) THEN\r
-               CALL ZLASET( 'A',  M-N, N, CZERO, CZERO, U(N+1,1), LDU )\r
-               IF ( N .LT. N1 ) THEN\r
-                  CALL ZLASET('A',N,  N1-N, CZERO, CZERO,  U(1,N+1),LDU)\r
-                  CALL ZLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)\r
-               END IF\r
-            END IF\r
-            CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $           LDU, CWORK(N+1), LWORK-N, IERR )\r
-            TEMP1 = SQRT(DBLE(M))*EPSLN\r
-            DO 6973 p = 1, N1\r
-               XSC = ONE / DZNRM2( M, U(1,p), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $            CALL ZDSCAL( M, XSC, U(1,p), 1 )\r
- 6973       CONTINUE\r
-*\r
-            IF ( ROWPIV )\r
-     $         CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-         END IF\r
-*\r
-*        end of the  >> almost orthogonal case <<  in the full SVD\r
-*\r
-         ELSE\r
-*\r
-*        This branch deploys a preconditioned Jacobi SVD with explicitly\r
-*        accumulated rotations. It is included as optional, mainly for\r
-*        experimental purposes. It does perfom well, and can also be used.\r
-*        In this implementation, this branch will be automatically activated\r
-*        if the  condition number sigma_max(A) / sigma_min(A) is predicted\r
-*        to be greater than the overflow threshold. This is because the\r
-*        a posteriori computation of the singular vectors assumes robust\r
-*        implementation of BLAS and some LAPACK procedures, capable of working\r
-*        in presence of extreme values, e.g. when the singular values spread from\r
-*        the underflow to the overflow threshold. \r
-*\r
-         DO 7968 p = 1, NR\r
-            CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )\r
-            CALL ZLACGV( N-p+1, V(p,p), 1 )\r
- 7968    CONTINUE\r
-*\r
-         IF ( L2PERT ) THEN\r
-            XSC = SQRT(SMALL/EPSLN)\r
-            DO 5969 q = 1, NR\r
-               CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)\r
-               DO 5968 p = 1, N\r
-                  IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )\r
-     $                .OR. ( p .LT. q ) )\r
-*     $                V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )\r
-     $                V(p,q) = CTEMP\r
-                  IF ( p .LT. q ) V(p,q) = - V(p,q)\r
- 5968          CONTINUE\r
- 5969       CONTINUE\r
-         ELSE\r
-            CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )\r
-         END IF\r
-\r
-         CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),\r
-     $        LWORK-2*N, IERR )\r
-         CALL ZLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )\r
-*\r
-         DO 7969 p = 1, NR\r
-            CALL ZCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )\r
-            CALL ZLACGV( NR-p+1, U(p,p), 1 )\r
- 7969    CONTINUE\r
-\r
-         IF ( L2PERT ) THEN\r
-            XSC = SQRT(SMALL/EPSLN)\r
-            DO 9970 q = 2, NR\r
-               DO 9971 p = 1, q - 1\r
-                  CTEMP = DCMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),\r
-     $                            ZERO)\r
-*                  U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )\r
-                  U(p,q) = - CTEMP\r
- 9971          CONTINUE\r
- 9970       CONTINUE\r
-         ELSE\r
-            CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )\r
-         END IF\r
-\r
-         CALL ZGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,\r
-     $        N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,\r
-     $         RWORK, LRWORK, INFO )\r
-         SCALEM  = RWORK(1)\r
-         NUMRANK = NINT(RWORK(2))\r
-\r
-         IF ( NR .LT. N ) THEN\r
-            CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )\r
-            CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )\r
-            CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )\r
-         END IF\r
-\r
-         CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),\r
-     $        V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )\r
-*\r
-*           Permute the rows of V using the (column) permutation from the\r
-*           first QRF. Also, scale the columns to make them unit in\r
-*           Euclidean norm. This applies to all cases.\r
-*\r
-            TEMP1 = SQRT(DBLE(N)) * EPSLN\r
-            DO 7972 q = 1, N\r
-               DO 8972 p = 1, N\r
-                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)\r
- 8972          CONTINUE\r
-               DO 8973 p = 1, N\r
-                  V(p,q) = CWORK(2*N+N*NR+NR+p)\r
- 8973          CONTINUE\r
-               XSC = ONE / DZNRM2( N, V(1,q), 1 )\r
-               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )\r
-     $           CALL ZDSCAL( N, XSC, V(1,q), 1 )\r
- 7972       CONTINUE\r
-*\r
-*           At this moment, V contains the right singular vectors of A.\r
-*           Next, assemble the left singular vector matrix U (M x N).\r
-*\r
-         IF ( NR .LT. M ) THEN\r
-            CALL ZLASET( 'A',  M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )\r
-            IF ( NR .LT. N1 ) THEN\r
-               CALL ZLASET('A',NR,  N1-NR, CZERO, CZERO,  U(1,NR+1),LDU)\r
-               CALL ZLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)\r
-            END IF\r
-         END IF\r
-*\r
-         CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,\r
-     $        LDU, CWORK(N+1), LWORK-N, IERR )\r
-*\r
-            IF ( ROWPIV )\r
-     $         CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )\r
-*\r
-*\r
-         END IF\r
-         IF ( TRANSP ) THEN\r
-*           .. swap U and V because the procedure worked on A^*\r
-            DO 6974 p = 1, N\r
-               CALL ZSWAP( N, U(1,p), 1, V(1,p), 1 )\r
- 6974       CONTINUE\r
-         END IF\r
-*\r
-      END IF\r
-*     end of the full SVD\r
-*\r
-*     Undo scaling, if necessary (and possible)\r
-*\r
-      IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN\r
-         CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )\r
-         USCAL1 = ONE\r
-         USCAL2 = ONE\r
-      END IF\r
-*\r
-      IF ( NR .LT. N ) THEN\r
-         DO 3004 p = NR+1, N\r
-            SVA(p) = ZERO\r
- 3004    CONTINUE\r
-      END IF\r
-*\r
-      RWORK(1) = USCAL2 * SCALEM\r
-      RWORK(2) = USCAL1\r
-      IF ( ERREST ) RWORK(3) = SCONDA\r
-      IF ( LSVEC .AND. RSVEC ) THEN\r
-         RWORK(4) = CONDR1\r
-         RWORK(5) = CONDR2\r
-      END IF\r
-      IF ( L2TRAN ) THEN\r
-         RWORK(6) = ENTRA\r
-         RWORK(7) = ENTRAT\r
-      END IF\r
-*\r
-      IWORK(1) = NR\r
-      IWORK(2) = NUMRANK\r
-      IWORK(3) = WARNING\r
-      IF ( TRANSP ) THEN\r
-          IWORK(4) =  1 \r
-      ELSE\r
-          IWORK(4) = -1\r
-      END IF \r
-      \r
-*\r
-      RETURN\r
-*     ..\r
-*     .. END OF ZGEJSV\r
-*     ..\r
-      END\r
-*\r
+*> \brief \b ZGEJSV
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGEJSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgejsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgejsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgejsv.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*     SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+*                         M, N, A, LDA, SVA, U, LDU, V, LDV,
+*                         CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
+*
+*     .. Scalar Arguments ..
+*     IMPLICIT    NONE
+*     INTEGER     INFO, LDA, LDU, LDV, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+*     COMPLEX*16     A( LDA, * ),  U( LDU, * ), V( LDV, * ), CWORK( LWORK )
+*     DOUBLE PRECISION   SVA( N ), RWORK( LRWORK )
+*     INTEGER     IWORK( * )
+*     CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGEJSV computes the singular value decomposition (SVD) of a complex M-by-N
+*> matrix [A], where M >= N. The SVD of [A] is written as
+*>
+*>              [A] = [U] * [SIGMA] * [V]^*,
+*>
+*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
+*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and
+*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are
+*> the singular values of [A]. The columns of [U] and [V] are the left and
+*> the right singular vectors of [A], respectively. The matrices [U] and [V]
+*> are computed and stored in the arrays U and V, respectively. The diagonal
+*> of [SIGMA] is computed and stored in the array SVA.
+*> \endverbatim
+*>
+*>  Arguments:
+*>  ==========
+*>
+*> \param[in] JOBA
+*> \verbatim
+*>          JOBA is CHARACTER*1
+*>         Specifies the level of accuracy:
+*>       = 'C': This option works well (high relative accuracy) if A = B * D,
+*>              with well-conditioned B and arbitrary diagonal matrix D.
+*>              The accuracy cannot be spoiled by COLUMN scaling. The
+*>              accuracy of the computed output depends on the condition of
+*>              B, and the procedure aims at the best theoretical accuracy.
+*>              The relative error max_{i=1:N}|d sigma_i| / sigma_i is
+*>              bounded by f(M,N)*epsilon* cond(B), independent of D.
+*>              The input matrix is preprocessed with the QRF with column
+*>              pivoting. This initial preprocessing and preconditioning by
+*>              a rank revealing QR factorization is common for all values of
+*>              JOBA. Additional actions are specified as follows:
+*>       = 'E': Computation as with 'C' with an additional estimate of the
+*>              condition number of B. It provides a realistic error bound.
+*>       = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
+*>              D1, D2, and well-conditioned matrix C, this option gives
+*>              higher accuracy than the 'C' option. If the structure of the
+*>              input matrix is not known, and relative accuracy is
+*>              desirable, then this option is advisable. The input matrix A
+*>              is preprocessed with QR factorization with FULL (row and
+*>              column) pivoting.
+*>       = 'G'  Computation as with 'F' with an additional estimate of the
+*>              condition number of B, where A=B*D. If A has heavily weighted
+*>              rows, then using this condition number gives too pessimistic
+*>              error bound.
+*>       = 'A': Small singular values are not well determined by the data 
+*>              and are considered as noisy; the matrix is treated as
+*>              numerically rank defficient. The error in the computed
+*>              singular values is bounded by f(m,n)*epsilon*||A||.
+*>              The computed SVD A = U * S * V^* restores A up to
+*>              f(m,n)*epsilon*||A||.
+*>              This gives the procedure the licence to discard (set to zero)
+*>              all singular values below N*epsilon*||A||.
+*>       = 'R': Similar as in 'A'. Rank revealing property of the initial
+*>              QR factorization is used do reveal (using triangular factor)
+*>              a gap sigma_{r+1} < epsilon * sigma_r in which case the
+*>              numerical RANK is declared to be r. The SVD is computed with
+*>              absolute error bounds, but more accurately than with 'A'.
+*> \endverbatim
+*>
+*> \param[in] JOBU
+*> \verbatim
+*>          JOBU is CHARACTER*1
+*>         Specifies whether to compute the columns of U:
+*>       = 'U': N columns of U are returned in the array U.
+*>       = 'F': full set of M left sing. vectors is returned in the array U.
+*>       = 'W': U may be used as workspace of length M*N. See the description
+*>              of U.
+*>       = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*>          JOBV is CHARACTER*1
+*>         Specifies whether to compute the matrix V:
+*>       = 'V': N columns of V are returned in the array V; Jacobi rotations
+*>              are not explicitly accumulated.
+*>       = 'J': N columns of V are returned in the array V, but they are
+*>              computed as the product of Jacobi rotations, if JOBT .EQ. 'N'.
+*>       = 'W': V may be used as workspace of length N*N. See the description
+*>              of V.
+*>       = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBR
+*> \verbatim
+*>          JOBR is CHARACTER*1
+*>         Specifies the RANGE for the singular values. Issues the licence to
+*>         set to zero small positive singular values if they are outside
+*>         specified range. If A .NE. 0 is scaled so that the largest singular
+*>         value of c*A is around SQRT(BIG), BIG=DLAMCH('O'), then JOBR issues
+*>         the licence to kill columns of A whose norm in c*A is less than
+*>         SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
+*>         where SFMIN=DLAMCH('S'), EPSLN=DLAMCH('E').
+*>       = 'N': Do not kill small columns of c*A. This option assumes that
+*>              BLAS and QR factorizations and triangular solvers are
+*>              implemented to work in that range. If the condition of A
+*>              is greater than BIG, use ZGESVJ.
+*>       = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
+*>              (roughly, as described above). This option is recommended.
+*>                                             ===========================
+*>         For computing the singular values in the FULL range [SFMIN,BIG]
+*>         use ZGESVJ.
+*> \endverbatim
+*>
+*> \param[in] JOBT
+*> \verbatim
+*>          JOBT is CHARACTER*1
+*>         If the matrix is square then the procedure may determine to use
+*>         transposed A if A^* seems to be better with respect to convergence.
+*>         If the matrix is not square, JOBT is ignored. 
+*>         The decision is based on two values of entropy over the adjoint
+*>         orbit of A^* * A. See the descriptions of WORK(6) and WORK(7).
+*>       = 'T': transpose if entropy test indicates possibly faster
+*>         convergence of Jacobi process if A^* is taken as input. If A is
+*>         replaced with A^*, then the row pivoting is included automatically.
+*>       = 'N': do not speculate.
+*>         The option 'T' can be used to compute only the singular values, or
+*>         the full SVD (U, SIGMA and V). For only one set of singular vectors
+*>         (U or V), the caller should provide both U and V, as one of the
+*>         matrices is used as workspace if the matrix A is transposed.
+*>         The implementer can easily remove this constraint and make the
+*>         code more complicated. See the descriptions of U and V.
+*>         In general, this option is considered experimental, and 'N'; should
+*>         be preferred. This is subject to changes in the future.
+*> \endverbatim
+*>
+*> \param[in] JOBP
+*> \verbatim
+*>          JOBP is CHARACTER*1
+*>         Issues the licence to introduce structured perturbations to drown
+*>         denormalized numbers. This licence should be active if the
+*>         denormals are poorly implemented, causing slow computation,
+*>         especially in cases of fast convergence (!). For details see [1,2].
+*>         For the sake of simplicity, this perturbations are included only
+*>         when the full SVD or only the singular values are requested. The
+*>         implementer/user can easily add the perturbation for the cases of
+*>         computing one set of singular vectors.
+*>       = 'P': introduce perturbation
+*>       = 'N': do not perturb
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>         The number of rows of the input matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         The number of columns of the input matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*>          SVA is DOUBLE PRECISION array, dimension (N)
+*>          On exit,
+*>          - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
+*>            computation SVA contains Euclidean column norms of the
+*>            iterated matrices in the array A.
+*>          - For WORK(1) .NE. WORK(2): The singular values of A are
+*>            (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
+*>            sigma_max(A) overflows or if small singular values have been
+*>            saved from underflow by scaling the input matrix A.
+*>          - If JOBR='R' then some of the singular values may be returned
+*>            as exact zeros obtained by "set to zero" because they are
+*>            below the numerical rank threshold or are denormalized numbers.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*>          U is COMPLEX*16 array, dimension ( LDU, N )
+*>          If JOBU = 'U', then U contains on exit the M-by-N matrix of
+*>                         the left singular vectors.
+*>          If JOBU = 'F', then U contains on exit the M-by-M matrix of
+*>                         the left singular vectors, including an ONB
+*>                         of the orthogonal complement of the Range(A).
+*>          If JOBU = 'W'  .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
+*>                         then U is used as workspace if the procedure
+*>                         replaces A with A^*. In that case, [V] is computed
+*>                         in U as left singular vectors of A^* and then
+*>                         copied back to the V array. This 'W' option is just
+*>                         a reminder to the caller that in this case U is
+*>                         reserved as workspace of length N*N.
+*>          If JOBU = 'N'  U is not referenced, unless JOBT='T'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*>          LDU is INTEGER
+*>          The leading dimension of the array U,  LDU >= 1.
+*>          IF  JOBU = 'U' or 'F' or 'W',  then LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension ( LDV, N )
+*>          If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
+*>                         the right singular vectors;
+*>          If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
+*>                         then V is used as workspace if the pprocedure
+*>                         replaces A with A^*. In that case, [U] is computed
+*>                         in V as right singular vectors of A^* and then
+*>                         copied back to the U array. This 'W' option is just
+*>                         a reminder to the caller that in this case V is
+*>                         reserved as workspace of length N*N.
+*>          If JOBV = 'N'  V is not referenced, unless JOBT='T'.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*>          LDV is INTEGER
+*>          The leading dimension of the array V,  LDV >= 1.
+*>          If JOBV = 'V' or 'J' or 'W', then LDV >= N.
+*> \endverbatim
+*>
+*> \param[out] CWORK
+*> \verbatim
+*>          CWORK is COMPLEX*16 array, dimension (MAX(2,LWORK))
+*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit CWORK(1) contains the required length of
+*>          CWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          Length of CWORK to confirm proper allocation of workspace.
+*>          LWORK depends on the job:
+*>
+*>          1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
+*>            1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'):
+*>               LWORK >= 2*N+1. This is the minimal requirement.
+*>               ->> For optimal performance (blocked code) the optimal value
+*>               is LWORK >= N + (N+1)*NB. Here NB is the optimal
+*>               block size for ZGEQP3 and ZGEQRF.
+*>               In general, optimal LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ)).
+*>            1.2. .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G'). In this case, LWORK the minimal
+*>               requirement is LWORK >= N*N + 2*N.
+*>               ->> For optimal performance (blocked code) the optimal value
+*>               is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ),
+*>                            N*N+LWORK(ZPOCON)).
+*>          2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
+*>             (JOBU.EQ.'N')
+*>            2.1   .. no scaled condition estimate requested (JOBE.EQ.'N'):    
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance, 
+*>               LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ,
+*>               ZUNMLQ. In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3), N+LWORK(ZGESVJ),
+*>                       N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).
+*>            2.2 .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G').
+*>            -> the minimal requirement is LWORK >= 3*N.      
+*>            -> For optimal performance, 
+*>               LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ,
+*>               ZUNMLQ. In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3), LWORK(ZPOCON), N+LWORK(ZGESVJ),
+*>                       N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)).   
+*>          3. If SIGMA and the left singular vectors are needed
+*>            3.1  .. no scaled condition estimate requested (JOBE.EQ.'N'):
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance:
+*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). 
+*>            3.2  .. an estimate of the scaled condition number of A is
+*>               required (JOBA='E', or 'G').
+*>            -> the minimal requirement is LWORK >= 3*N.
+*>            -> For optimal performance:
+*>               if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB,
+*>               where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR.
+*>               In general, the optimal length LWORK is computed as
+*>               LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZPOCON),
+*>                        2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)).
+*>          4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and 
+*>            4.1. if JOBV.EQ.'V'  
+*>               the minimal requirement is LWORK >= 5*N+2*N*N. 
+*>            4.2. if JOBV.EQ.'J' the minimal requirement is 
+*>               LWORK >= 4*N+N*N.
+*>            In both cases, the allocated CWORK can accommodate blocked runs
+*>            of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ.
+*>
+*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the
+*>          minimal length of CWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (MAX(7,LWORK))
+*>          On exit,
+*>          RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1)
+*>                    such that SCALE*SVA(1:N) are the computed singular values
+*>                    of A. (See the description of SVA().)
+*>          RWORK(2) = See the description of RWORK(1).
+*>          RWORK(3) = SCONDA is an estimate for the condition number of
+*>                    column equilibrated A. (If JOBA .EQ. 'E' or 'G')
+*>                    SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
+*>                    It is computed using SPOCON. It holds
+*>                    N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+*>                    where R is the triangular factor from the QRF of A.
+*>                    However, if R is truncated and the numerical rank is
+*>                    determined to be strictly smaller than N, SCONDA is
+*>                    returned as -1, thus indicating that the smallest
+*>                    singular values might be lost.
+*>
+*>          If full SVD is needed, the following two condition numbers are
+*>          useful for the analysis of the algorithm. They are provied for
+*>          a developer/implementer who is familiar with the details of
+*>          the method.
+*>
+*>          RWORK(4) = an estimate of the scaled condition number of the
+*>                    triangular factor in the first QR factorization.
+*>          RWORK(5) = an estimate of the scaled condition number of the
+*>                    triangular factor in the second QR factorization.
+*>          The following two parameters are computed if JOBT .EQ. 'T'.
+*>          They are provided for a developer/implementer who is familiar
+*>          with the details of the method.
+*>          RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy
+*>                    of diag(A^* * A) / Trace(A^* * A) taken as point in the
+*>                    probability simplex.
+*>          RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).)
+*>          If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or
+*>          LRWORK=-1), then on exit RWORK(1) contains the required length of
+*>          RWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*>          LRWORK is INTEGER
+*>          Length of RWORK to confirm proper allocation of workspace.
+*>          LRWORK depends on the job:
+*>
+*>       1. If only the singular values are requested i.e. if
+*>          LSAME(JOBU,'N') .AND. LSAME(JOBV,'N')
+*>          then:
+*>          1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>               then: LRWORK = max( 7, 2 * M ).
+*>          1.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       2. If singular values with the right singular vectors are requested
+*>          i.e. if
+*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND.
+*>          .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F'))
+*>          then:
+*>          2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          2.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       3. If singular values with the left singular vectors are requested, i.e. if
+*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
+*>          .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
+*>          then:
+*>          3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          3.2. Otherwise, LRWORK  = max( 7,  N ).
+*>       4. If singular values with both the left and the right singular vectors
+*>          are requested, i.e. if
+*>          (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND.
+*>          (LSAME(JOBV,'V').OR.LSAME(JOBV,'J'))
+*>          then:
+*>          4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'),
+*>          then LRWORK = max( 7, 2 * M ).
+*>          4.2. Otherwise, LRWORK  = max( 7, N ).
+*>
+*>          If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and 
+*>          the length of RWORK is returned in RWORK(1). 
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, of dimension at least 4, that further depends 
+*>          on the job:
+*>
+*>          1. If only the singular values are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N.
+*>          2. If the singular values and the right singular vectors are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>          3. If the singular values and the left singular vectors are requested then:
+*>             If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>             then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>          4. If the singular values with both the left and the right singular vectors
+*>             are requested, then:      
+*>             4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows:
+*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>                  then the length of IWORK is N+M; otherwise the length of IWORK is N. 
+*>             4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows:
+*>                  If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) 
+*>                  then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N.
+*>        
+*>          On exit,
+*>          IWORK(1) = the numerical rank determined after the initial
+*>                     QR factorization with pivoting. See the descriptions
+*>                     of JOBA and JOBR.
+*>          IWORK(2) = the number of the computed nonzero singular values
+*>          IWORK(3) = if nonzero, a warning message:
+*>                     If IWORK(3).EQ.1 then some of the column norms of A
+*>                     were denormalized floats. The requested high accuracy
+*>                     is not warranted by the data.
+*>          IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to
+*>                     do the job as specified by the JOB parameters.
+*>          If the call to ZGEJSV is a workspace query (indicated by LWORK .EQ. -1 or
+*>          LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of 
+*>          IWORK for the job parameters used in the call.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>           < 0  : if INFO = -i, then the i-th argument had an illegal value.
+*>           = 0 :  successful exit;
+*>           > 0 :  ZGEJSV  did not converge in the maximal allowed number
+*>                  of sweeps. The computed values may be inaccurate.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup complex16GEsing
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  ZGEJSV implements a preconditioned Jacobi SVD algorithm. It uses ZGEQP3,
+*>  ZGEQRF, and ZGELQF as preprocessors and preconditioners. Optionally, an
+*>  additional row pivoting can be used as a preprocessor, which in some
+*>  cases results in much higher accuracy. An example is matrix A with the
+*>  structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
+*>  diagonal matrices and C is well-conditioned matrix. In that case, complete
+*>  pivoting in the first QR factorizations provides accuracy dependent on the
+*>  condition number of C, and independent of D1, D2. Such higher accuracy is
+*>  not completely understood theoretically, but it works well in practice.
+*>  Further, if A can be written as A = B*D, with well-conditioned B and some
+*>  diagonal D, then the high accuracy is guaranteed, both theoretically and
+*>  in software, independent of D. For more details see [1], [2].
+*>     The computational range for the singular values can be the full range
+*>  ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
+*>  & LAPACK routines called by ZGEJSV are implemented to work in that range.
+*>  If that is not the case, then the restriction for safe computation with
+*>  the singular values in the range of normalized IEEE numbers is that the
+*>  spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
+*>  overflow. This code (ZGEJSV) is best used in this restricted range,
+*>  meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are
+*>  returned as zeros. See JOBR for details on this.
+*>     Further, this implementation is somewhat slower than the one described
+*>  in [1,2] due to replacement of some non-LAPACK components, and because
+*>  the choice of some tuning parameters in the iterative part (ZGESVJ) is
+*>  left to the implementer on a particular machine.
+*>     The rank revealing QR factorization (in this code: ZGEQP3) should be
+*>  implemented as in [3]. We have a new version of ZGEQP3 under development
+*>  that is more robust than the current one in LAPACK, with a cleaner cut in
+*>  rank deficient cases. It will be available in the SIGMA library [4].
+*>  If M is much larger than N, it is obvious that the initial QRF with
+*>  column pivoting can be preprocessed by the QRF without pivoting. That
+*>  well known trick is not used in ZGEJSV because in some cases heavy row
+*>  weighting can be treated with complete pivoting. The overhead in cases
+*>  M much larger than N is then only due to pivoting, but the benefits in
+*>  terms of accuracy have prevailed. The implementer/user can incorporate
+*>  this extra QRF step easily. The implementer can also improve data movement
+*>  (matrix transpose, matrix copy, matrix transposed copy) - this
+*>  implementation of ZGEJSV uses only the simplest, naive data movement.
+*> \endverbatim
+*
+*> \par Contributor:
+*  ==================
+*>
+*>  Zlatko Drmac, Department of Mathematics, Faculty of Science,
+*>  University of Zagreb (Zagreb, Croatia); drmac@math.hr
+*
+*> \par References:
+*  ================
+*>
+*> \verbatim
+*>
+*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*>     LAPACK Working note 169.
+*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*>     SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*>     LAPACK Working note 170.
+*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
+*>     factorization software - a case study.
+*>     ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
+*>     LAPACK Working note 176.
+*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*>     QSVD, (H,K)-SVD computations.
+*>     Department of Mathematics, University of Zagreb, 2008, 2016.
+*> \endverbatim
+*
+*>  \par Bugs, examples and comments:
+*   =================================
+*>
+*>  Please report all bugs and send interesting examples and/or comments to
+*>  drmac@math.hr. Thank you.
+*>
+*  =====================================================================
+      SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+     $                   M, N, A, LDA, SVA, U, LDU, V, LDV,
+     $                   CWORK, LWORK, RWORK, LRWORK, IWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.1) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2017
+*
+*     .. Scalar Arguments ..
+      IMPLICIT    NONE
+      INTEGER     INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16       A( LDA, * ), U( LDU, * ), V( LDV, * ),
+     $                 CWORK( LWORK )
+      DOUBLE PRECISION SVA( N ), RWORK( LRWORK )
+      INTEGER          IWORK( * )
+      CHARACTER*1      JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+*     ..
+*
+*  ===========================================================================
+*
+*     .. Local Parameters ..
+      DOUBLE PRECISION ZERO, ONE
+      PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 )
+      COMPLEX*16 CZERO, CONE
+      PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      COMPLEX*16       CTEMP
+      DOUBLE PRECISION AAPP,    AAQQ,   AATMAX, AATMIN, BIG,    BIG1,
+     $                 COND_OK, CONDR1, CONDR2, ENTRA,  ENTRAT, EPSLN,
+     $                 MAXPRJ,  SCALEM, SCONDA, SFMIN,  SMALL,  TEMP1,
+     $                 USCAL1,  USCAL2, XSC
+      INTEGER IERR,   N1,     NR,     NUMRANK,        p, q,   WARNING
+      LOGICAL ALMORT, DEFR,   ERREST, GOSCAL,  JRACC,  KILL,   LQUERY,
+     $        LSVEC,  L2ABER, L2KILL, L2PERT,  L2RANK, L2TRAN, NOSCAL,
+     $        ROWPIV, RSVEC,  TRANSP
+*
+      INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK
+      INTEGER LWCON,  LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM,
+     $        LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF
+      INTEGER LWRK_ZGELQF, LWRK_ZGEQP3,  LWRK_ZGEQP3N, LWRK_ZGEQRF,  
+     $        LWRK_ZGESVJ, LWRK_ZGESVJV, LWRK_ZGESVJU, LWRK_ZUNMLQ, 
+     $        LWRK_ZUNMQR, LWRK_ZUNMQRM    
+*     ..
+*     .. Local Arrays
+      COMPLEX*16         CDUMMY(1)
+      DOUBLE PRECISION   RDUMMY(1)
+*
+*     .. Intrinsic Functions ..
+      INTRINSIC ABS, DCMPLX, CONJG, DLOG, MAX, MIN, DBLE, NINT, SQRT
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION      DLAMCH, DZNRM2
+      INTEGER   IDAMAX, IZAMAX
+      LOGICAL   LSAME
+      EXTERNAL  IDAMAX, IZAMAX, LSAME, DLAMCH, DZNRM2
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL  DLASSQ, ZCOPY,  ZGELQF, ZGEQP3, ZGEQRF, ZLACPY, ZLAPMR,
+     $          ZLASCL, DLASCL, ZLASET, ZLASSQ, ZLASWP, ZUNGQR, ZUNMLQ,
+     $          ZUNMQR, ZPOCON, DSCAL,  ZDSCAL, ZSWAP,  ZTRSM,  ZLACGV,
+     $          XERBLA
+*
+      EXTERNAL  ZGESVJ
+*     ..
+*
+*     Test the input arguments
+*
+      LSVEC  = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' )
+      JRACC  = LSAME( JOBV, 'J' )
+      RSVEC  = LSAME( JOBV, 'V' ) .OR. JRACC
+      ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' )
+      L2RANK = LSAME( JOBA, 'R' )
+      L2ABER = LSAME( JOBA, 'A' )
+      ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' )
+      L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N )
+      L2KILL = LSAME( JOBR, 'R' )
+      DEFR   = LSAME( JOBR, 'N' )
+      L2PERT = LSAME( JOBP, 'P' )
+*
+      LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 )
+*
+      IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR.
+     $     ERREST .OR. LSAME( JOBA, 'C' ) )) THEN
+         INFO = - 1
+      ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR.
+     $   ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN
+         INFO = - 2
+      ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR.
+     $   ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN
+         INFO = - 3
+      ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) )    THEN
+         INFO = - 4
+      ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN
+         INFO = - 5
+      ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN
+         INFO = - 6
+      ELSE IF ( M .LT. 0 ) THEN
+         INFO = - 7
+      ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN
+         INFO = - 8
+      ELSE IF ( LDA .LT. M ) THEN
+         INFO = - 10
+      ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
+         INFO = - 13
+      ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
+         INFO = - 15
+      ELSE
+*        #:)
+         INFO = 0
+      END IF
+*
+      IF ( INFO .EQ. 0 ) THEN 
+*         .. compute the minimal and the optimal workspace lengths 
+*         [[The expressions for computing the minimal and the optimal
+*         values of LCWORK, LRWORK are written with a lot of redundancy and
+*         can be simplified. However, this verbose form is useful for
+*         maintenance and modifications of the code.]]
+*
+*        .. minimal workspace length for ZGEQP3 of an M x N matrix,
+*         ZGEQRF of an N x N matrix, ZGELQF of an N x N matrix,
+*         ZUNMLQ for computing N x N matrix, ZUNMQR for computing N x N
+*         matrix, ZUNMQR for computing M x N matrix, respectively.
+          LWQP3 = N+1   
+          LWQRF = MAX( 1, N )
+          LWLQF = MAX( 1, N )
+          LWUNMLQ  = MAX( 1, N )
+          LWUNMQR  = MAX( 1, N )
+          LWUNMQRM = MAX( 1, M )
+*        .. minimal workspace length for ZPOCON of an N x N matrix
+          LWCON = 2 * N 
+*        .. minimal workspace length for ZGESVJ of an N x N matrix,
+*         without and with explicit accumulation of Jacobi rotations
+          LWSVDJ  = MAX( 2 * N, 1 )         
+          LWSVDJV = MAX( 2 * N, 1 )
+*         .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ
+          LRWQP3  = N 
+          LRWCON  = N 
+          LRWSVDJ = N 
+          IF ( LQUERY ) THEN 
+              CALL ZGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, 
+     $             RDUMMY, IERR )
+              LWRK_ZGEQP3 = CDUMMY(1)
+              CALL ZGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
+              LWRK_ZGEQRF = CDUMMY(1)
+              CALL ZGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR )
+              LWRK_ZGELQF = CDUMMY(1)             
+          END IF
+          MINWRK  = 2
+          OPTWRK  = 2
+          MINIWRK = N 
+          IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN
+*             .. minimal and optimal sizes of the complex workspace if
+*             only the singular values are requested
+              IF ( ERREST ) THEN 
+                  MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ )
+              ELSE
+                  MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ )
+              END IF
+              IF ( LQUERY ) THEN 
+                  CALL ZGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, 
+     $                 LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                  LWRK_ZGESVJ = CDUMMY(1)
+                  IF ( ERREST ) THEN 
+                      OPTWRK = MAX( N+LWRK_ZGEQP3, N**2+LWCON, 
+     $                              N+LWRK_ZGEQRF, LWRK_ZGESVJ )
+                  ELSE
+                      OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWRK_ZGEQRF, 
+     $                              LWRK_ZGESVJ )
+                  END IF
+              END IF
+              IF ( L2TRAN .OR. ROWPIV ) THEN 
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWCON, LRWSVDJ )
+                  ELSE
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )
+                  END IF                 
+              ELSE
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ )
+                  ELSE
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
+                  END IF
+              END IF   
+              IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M 
+          ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN
+*            .. minimal and optimal sizes of the complex workspace if the
+*            singular values and the right singular vectors are requested
+             IF ( ERREST ) THEN 
+                 MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF,  
+     $                         2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ )
+             ELSE
+                 MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, 
+     $                         N+LWSVDJ, N+LWUNMLQ )
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
+     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )
+                 LWRK_ZGESVJ = CDUMMY(1)
+                 CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
+     $                V, LDV, CDUMMY, -1, IERR )
+                 LWRK_ZUNMLQ = CDUMMY(1)                
+                 IF ( ERREST ) THEN 
+                 OPTWRK = MAX( N+LWRK_ZGEQP3, LWCON, LWRK_ZGESVJ, 
+     $                         N+LWRK_ZGELQF, 2*N+LWRK_ZGEQRF,
+     $                         N+LWRK_ZGESVJ,  N+LWRK_ZUNMLQ )
+                 ELSE
+                 OPTWRK = MAX( N+LWRK_ZGEQP3, LWRK_ZGESVJ,N+LWRK_ZGELQF,
+     $                         2*N+LWRK_ZGEQRF, N+LWRK_ZGESVJ, 
+     $                         N+LWRK_ZUNMLQ )
+                 END IF
+             END IF
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+                  ELSE
+                     MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ ) 
+                  END IF                  
+             ELSE
+                  IF ( ERREST ) THEN 
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+                  ELSE
+                     MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) 
+                  END IF                 
+             END IF
+             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+          ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN  
+*            .. minimal and optimal sizes of the complex workspace if the
+*            singular values and the left singular vectors are requested
+             IF ( ERREST ) THEN
+                 MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM )
+             ELSE
+                 MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM )
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A,
+     $                LDA, CDUMMY, -1, RDUMMY, -1, IERR )
+                 LWRK_ZGESVJ = CDUMMY(1)
+                 CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $               LDU, CDUMMY, -1, IERR )
+                 LWRK_ZUNMQRM = CDUMMY(1)
+                 IF ( ERREST ) THEN
+                 OPTWRK = N + MAX( LWRK_ZGEQP3, LWCON, N+LWRK_ZGEQRF,
+     $                             LWRK_ZGESVJ, LWRK_ZUNMQRM )
+                 ELSE
+                 OPTWRK = N + MAX( LWRK_ZGEQP3, N+LWRK_ZGEQRF,
+     $                             LWRK_ZGESVJ, LWRK_ZUNMQRM )
+                 END IF
+             END IF
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                 IF ( ERREST ) THEN 
+                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+                 ELSE
+                    MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ )
+                 END IF                 
+             ELSE
+                 IF ( ERREST ) THEN 
+                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+                 ELSE
+                    MINRWRK = MAX( 7, LRWQP3, LRWSVDJ )
+                 END IF                
+             END IF 
+             IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+          ELSE
+*            .. minimal and optimal sizes of the complex workspace if the
+*            full SVD is requested
+             IF ( .NOT. JRACC ) THEN                
+                 IF ( ERREST ) THEN 
+                    MINWRK = MAX( N+LWQP3, N+LWCON,  2*N+N**2+LWCON, 
+     $                         2*N+LWQRF,         2*N+LWQP3, 
+     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,
+     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, 
+     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, 
+     $                         N+N**2+LWSVDJ,   N+LWUNMQRM )
+                 ELSE
+                    MINWRK = MAX( N+LWQP3,        2*N+N**2+LWCON, 
+     $                         2*N+LWQRF,         2*N+LWQP3, 
+     $                         2*N+N**2+N+LWLQF,  2*N+N**2+N+N**2+LWCON,
+     $                         2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV,
+     $                         2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ,
+     $                         N+N**2+LWSVDJ,      N+LWUNMQRM ) 
+                 END IF 
+                 MINIWRK = MINIWRK + N 
+                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+             ELSE
+                 IF ( ERREST ) THEN 
+                    MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, 
+     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, 
+     $                         N+LWUNMQRM )
+                 ELSE
+                    MINWRK = MAX( N+LWQP3, 2*N+LWQRF, 
+     $                         2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, 
+     $                         N+LWUNMQRM ) 
+                 END IF   
+                 IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M
+             END IF
+             IF ( LQUERY ) THEN
+                 CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $                LDU, CDUMMY, -1, IERR )
+                 LWRK_ZUNMQRM = CDUMMY(1)
+                 CALL ZUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U,
+     $                LDU, CDUMMY, -1, IERR )
+                 LWRK_ZUNMQR = CDUMMY(1)
+                 IF ( .NOT. JRACC ) THEN
+                     CALL ZGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1,
+     $                    RDUMMY, IERR )
+                     LWRK_ZGEQP3N = CDUMMY(1)
+                     CALL ZGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_ZGESVJ = CDUMMY(1)
+                     CALL ZGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_ZGESVJU = CDUMMY(1)
+                     CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_ZGESVJV = CDUMMY(1)
+                     CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY,
+     $                    V, LDV, CDUMMY, -1, IERR )
+                     LWRK_ZUNMLQ = CDUMMY(1)
+                     IF ( ERREST ) THEN 
+                       OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, 
+     $                          2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, 
+     $                          2*N+LWRK_ZGEQP3N, 
+     $                          2*N+N**2+N+LWRK_ZGELQF,  
+     $                          2*N+N**2+N+N**2+LWCON,
+     $                          2*N+N**2+N+LWRK_ZGESVJ, 
+     $                          2*N+N**2+N+LWRK_ZGESVJV,               
+     $                          2*N+N**2+N+LWRK_ZUNMQR,
+     $                          2*N+N**2+N+LWRK_ZUNMLQ, 
+     $                          N+N**2+LWRK_ZGESVJU,                  
+     $                          N+LWRK_ZUNMQRM )
+                     ELSE
+                       OPTWRK = MAX( N+LWRK_ZGEQP3,  
+     $                          2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, 
+     $                          2*N+LWRK_ZGEQP3N, 
+     $                          2*N+N**2+N+LWRK_ZGELQF,  
+     $                          2*N+N**2+N+N**2+LWCON,
+     $                          2*N+N**2+N+LWRK_ZGESVJ,               
+     $                          2*N+N**2+N+LWRK_ZGESVJV, 
+     $                          2*N+N**2+N+LWRK_ZUNMQR,
+     $                          2*N+N**2+N+LWRK_ZUNMLQ, 
+     $                          N+N**2+LWRK_ZGESVJU,
+     $                          N+LWRK_ZUNMQRM )
+                     END IF                    
+                 ELSE
+                     CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA,
+     $                    N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR )
+                     LWRK_ZGESVJV = CDUMMY(1)
+                     CALL ZUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY,
+     $                    V, LDV, CDUMMY, -1, IERR )
+                     LWRK_ZUNMQR = CDUMMY(1)
+                     CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U,
+     $                    LDU, CDUMMY, -1, IERR )
+                     LWRK_ZUNMQRM = CDUMMY(1)   
+                     IF ( ERREST ) THEN 
+                        OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON,   
+     $                           2*N+LWRK_ZGEQRF, 2*N+N**2,  
+     $                           2*N+N**2+LWRK_ZGESVJV,  
+     $                           2*N+N**2+N+LWRK_ZUNMQR,N+LWRK_ZUNMQRM )
+                     ELSE
+                        OPTWRK = MAX( N+LWRK_ZGEQP3, 2*N+LWRK_ZGEQRF,  
+     $                           2*N+N**2, 2*N+N**2+LWRK_ZGESVJV, 
+     $                           2*N+N**2+N+LWRK_ZUNMQR, 
+     $                           N+LWRK_ZUNMQRM )   
+                     END IF                  
+                 END IF               
+             END IF 
+             IF ( L2TRAN .OR. ROWPIV ) THEN 
+                 MINRWRK = MAX( 7, 2*M,  LRWQP3, LRWSVDJ, LRWCON )
+             ELSE
+                 MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON )
+             END IF 
+          END IF
+          MINWRK = MAX( 2, MINWRK )
+          OPTWRK = MAX( 2, OPTWRK )
+          IF ( LWORK  .LT. MINWRK  .AND. (.NOT.LQUERY) ) INFO = - 17
+          IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19   
+      END IF
+*      
+      IF ( INFO .NE. 0 ) THEN
+*       #:(
+         CALL XERBLA( 'ZGEJSV', - INFO )
+         RETURN
+      ELSE IF ( LQUERY ) THEN
+          CWORK(1) = OPTWRK
+          CWORK(2) = MINWRK
+          RWORK(1) = MINRWRK
+          IWORK(1) = MAX( 4, MINIWRK )
+          RETURN   
+      END IF
+*
+*     Quick return for void matrix (Y3K safe)
+* #:)
+      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
+         IWORK(1:4) = 0
+         RWORK(1:7) = 0
+         RETURN
+      ENDIF
+*
+*     Determine whether the matrix U should be M x N or M x M
+*
+      IF ( LSVEC ) THEN
+         N1 = N
+         IF ( LSAME( JOBU, 'F' ) ) N1 = M
+      END IF
+*
+*     Set numerical parameters
+*
+*!    NOTE: Make sure DLAMCH() does not fail on the target architecture.
+*
+      EPSLN = DLAMCH('Epsilon')
+      SFMIN = DLAMCH('SafeMinimum')
+      SMALL = SFMIN / EPSLN
+      BIG   = DLAMCH('O')
+*     BIG   = ONE / SFMIN
+*
+*     Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N
+*
+*(!)  If necessary, scale SVA() to protect the largest norm from
+*     overflow. It is possible that this scaling pushes the smallest
+*     column norm left from the underflow threshold (extreme case).
+*
+      SCALEM  = ONE / SQRT(DBLE(M)*DBLE(N))
+      NOSCAL  = .TRUE.
+      GOSCAL  = .TRUE.
+      DO 1874 p = 1, N
+         AAPP = ZERO
+         AAQQ = ONE
+         CALL ZLASSQ( M, A(1,p), 1, AAPP, AAQQ )
+         IF ( AAPP .GT. BIG ) THEN
+            INFO = - 9
+            CALL XERBLA( 'ZGEJSV', -INFO )
+            RETURN
+         END IF
+         AAQQ = SQRT(AAQQ)
+         IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL  ) THEN
+            SVA(p)  = AAPP * AAQQ
+         ELSE
+            NOSCAL  = .FALSE.
+            SVA(p)  = AAPP * ( AAQQ * SCALEM )
+            IF ( GOSCAL ) THEN
+               GOSCAL = .FALSE.
+               CALL DSCAL( p-1, SCALEM, SVA, 1 )
+            END IF
+         END IF
+ 1874 CONTINUE
+*
+      IF ( NOSCAL ) SCALEM = ONE
+*
+      AAPP = ZERO
+      AAQQ = BIG
+      DO 4781 p = 1, N
+         AAPP = MAX( AAPP, SVA(p) )
+         IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
+ 4781 CONTINUE
+*
+*     Quick return for zero M x N matrix
+* #:)
+      IF ( AAPP .EQ. ZERO ) THEN
+         IF ( LSVEC ) CALL ZLASET( 'G', M, N1, CZERO, CONE, U, LDU )
+         IF ( RSVEC ) CALL ZLASET( 'G', N, N,  CZERO, CONE, V, LDV )
+         RWORK(1) = ONE
+         RWORK(2) = ONE
+         IF ( ERREST ) RWORK(3) = ONE
+         IF ( LSVEC .AND. RSVEC ) THEN
+            RWORK(4) = ONE
+            RWORK(5) = ONE
+         END IF
+         IF ( L2TRAN ) THEN
+            RWORK(6) = ZERO
+            RWORK(7) = ZERO
+         END IF
+         IWORK(1) = 0
+         IWORK(2) = 0
+         IWORK(3) = 0
+         IWORK(4) = -1
+         RETURN
+      END IF
+*
+*     Issue warning if denormalized column norms detected. Override the
+*     high relative accuracy request. Issue licence to kill nonzero columns
+*     (set them to zero) whose norm is less than sigma_max / BIG (roughly).
+* #:(
+      WARNING = 0
+      IF ( AAQQ .LE. SFMIN ) THEN
+         L2RANK = .TRUE.
+         L2KILL = .TRUE.
+         WARNING = 1
+      END IF
+*
+*     Quick return for one-column matrix
+* #:)
+      IF ( N .EQ. 1 ) THEN
+*
+         IF ( LSVEC ) THEN
+            CALL ZLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR )
+            CALL ZLACPY( 'A', M, 1, A, LDA, U, LDU )
+*           computing all M left singular vectors of the M x 1 matrix
+            IF ( N1 .NE. N  ) THEN
+              CALL ZGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR )
+              CALL ZUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR )
+              CALL ZCOPY( M, A(1,1), 1, U(1,1), 1 )
+            END IF
+         END IF
+         IF ( RSVEC ) THEN
+             V(1,1) = CONE
+         END IF
+         IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN
+            SVA(1)  = SVA(1) / SCALEM
+            SCALEM  = ONE
+         END IF
+         RWORK(1) = ONE / SCALEM
+         RWORK(2) = ONE
+         IF ( SVA(1) .NE. ZERO ) THEN
+            IWORK(1) = 1
+            IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN
+               IWORK(2) = 1
+            ELSE
+               IWORK(2) = 0
+            END IF
+         ELSE
+            IWORK(1) = 0
+            IWORK(2) = 0
+         END IF
+         IWORK(3) = 0
+         IWORK(4) = -1
+         IF ( ERREST ) RWORK(3) = ONE
+         IF ( LSVEC .AND. RSVEC ) THEN
+            RWORK(4) = ONE
+            RWORK(5) = ONE
+         END IF
+         IF ( L2TRAN ) THEN
+            RWORK(6) = ZERO
+            RWORK(7) = ZERO
+         END IF
+         RETURN
+*
+      END IF
+*
+      TRANSP = .FALSE.
+*
+      AATMAX = -ONE
+      AATMIN =  BIG
+      IF ( ROWPIV .OR. L2TRAN ) THEN
+*
+*     Compute the row norms, needed to determine row pivoting sequence
+*     (in the case of heavily row weighted A, row pivoting is strongly
+*     advised) and to collect information needed to compare the
+*     structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.).
+*
+         IF ( L2TRAN ) THEN
+            DO 1950 p = 1, M
+               XSC   = ZERO
+               TEMP1 = ONE
+               CALL ZLASSQ( N, A(p,1), LDA, XSC, TEMP1 )
+*              ZLASSQ gets both the ell_2 and the ell_infinity norm
+*              in one pass through the vector
+               RWORK(M+p)  = XSC * SCALEM
+               RWORK(p)    = XSC * (SCALEM*SQRT(TEMP1))
+               AATMAX = MAX( AATMAX, RWORK(p) )
+               IF (RWORK(p) .NE. ZERO) 
+     $            AATMIN = MIN(AATMIN,RWORK(p))
+ 1950       CONTINUE
+         ELSE
+            DO 1904 p = 1, M
+               RWORK(M+p) = SCALEM*ABS( A(p,IZAMAX(N,A(p,1),LDA)) )
+               AATMAX = MAX( AATMAX, RWORK(M+p) )
+               AATMIN = MIN( AATMIN, RWORK(M+p) )
+ 1904       CONTINUE
+         END IF
+*
+      END IF
+*
+*     For square matrix A try to determine whether A^*  would be better
+*     input for the preconditioned Jacobi SVD, with faster convergence.
+*     The decision is based on an O(N) function of the vector of column
+*     and row norms of A, based on the Shannon entropy. This should give
+*     the right choice in most cases when the difference actually matters.
+*     It may fail and pick the slower converging side.
+*
+      ENTRA  = ZERO
+      ENTRAT = ZERO
+      IF ( L2TRAN ) THEN
+*
+         XSC   = ZERO
+         TEMP1 = ONE
+         CALL DLASSQ( N, SVA, 1, XSC, TEMP1 )
+         TEMP1 = ONE / TEMP1
+*
+         ENTRA = ZERO
+         DO 1113 p = 1, N
+            BIG1  = ( ( SVA(p) / XSC )**2 ) * TEMP1
+            IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1)
+ 1113    CONTINUE
+         ENTRA = - ENTRA / DLOG(DBLE(N))
+*
+*        Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex.
+*        It is derived from the diagonal of  A^* * A.  Do the same with the
+*        diagonal of A * A^*, compute the entropy of the corresponding
+*        probability distribution. Note that A * A^* and A^* * A have the
+*        same trace.
+*
+         ENTRAT = ZERO
+         DO 1114 p = 1, M
+            BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1
+            IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1)
+ 1114    CONTINUE
+         ENTRAT = - ENTRAT / DLOG(DBLE(M))
+*
+*        Analyze the entropies and decide A or A^*. Smaller entropy
+*        usually means better input for the algorithm.
+*
+         TRANSP = ( ENTRAT .LT. ENTRA )
+* 
+*        If A^* is better than A, take the adjoint of A. This is allowed
+*        only for square matrices, M=N.
+         IF ( TRANSP ) THEN
+*           In an optimal implementation, this trivial transpose
+*           should be replaced with faster transpose.
+            DO 1115 p = 1, N - 1
+               A(p,p) = CONJG(A(p,p))
+               DO 1116 q = p + 1, N
+                   CTEMP = CONJG(A(q,p))
+                  A(q,p) = CONJG(A(p,q))
+                  A(p,q) = CTEMP
+ 1116          CONTINUE
+ 1115       CONTINUE
+            A(N,N) = CONJG(A(N,N))
+            DO 1117 p = 1, N
+               RWORK(M+p) = SVA(p)
+               SVA(p)     = RWORK(p)
+*              previously computed row 2-norms are now column 2-norms
+*              of the transposed matrix
+ 1117       CONTINUE
+            TEMP1  = AAPP
+            AAPP   = AATMAX
+            AATMAX = TEMP1
+            TEMP1  = AAQQ
+            AAQQ   = AATMIN
+            AATMIN = TEMP1
+            KILL   = LSVEC
+            LSVEC  = RSVEC
+            RSVEC  = KILL
+            IF ( LSVEC ) N1 = N
+*
+            ROWPIV = .TRUE.
+         END IF
+*
+      END IF
+*     END IF L2TRAN
+*
+*     Scale the matrix so that its maximal singular value remains less
+*     than SQRT(BIG) -- the matrix is scaled so that its maximal column
+*     has Euclidean norm equal to SQRT(BIG/N). The only reason to keep
+*     SQRT(BIG) instead of BIG is the fact that ZGEJSV uses LAPACK and
+*     BLAS routines that, in some implementations, are not capable of
+*     working in the full interval [SFMIN,BIG] and that they may provoke
+*     overflows in the intermediate results. If the singular values spread
+*     from SFMIN to BIG, then ZGESVJ will compute them. So, in that case,
+*     one should use ZGESVJ instead of ZGEJSV.
+*     >> change in the April 2016 update: allow bigger range, i.e. the
+*     largest column is allowed up to BIG/N and ZGESVJ will do the rest.
+      BIG1   = SQRT( BIG )
+      TEMP1  = SQRT( BIG / DBLE(N) ) 
+*      TEMP1  = BIG/DBLE(N)
+*
+      CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR )
+      IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN
+          AAQQ = ( AAQQ / AAPP ) * TEMP1
+      ELSE
+          AAQQ = ( AAQQ * TEMP1 ) / AAPP
+      END IF
+      TEMP1 = TEMP1 * SCALEM
+      CALL ZLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR )
+*
+*     To undo scaling at the end of this procedure, multiply the
+*     computed singular values with USCAL2 / USCAL1.
+*
+      USCAL1 = TEMP1
+      USCAL2 = AAPP
+*
+      IF ( L2KILL ) THEN
+*        L2KILL enforces computation of nonzero singular values in
+*        the restricted range of condition number of the initial A,
+*        sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN).
+         XSC = SQRT( SFMIN )
+      ELSE
+         XSC = SMALL
+*
+*        Now, if the condition number of A is too big,
+*        sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN,
+*        as a precaution measure, the full SVD is computed using ZGESVJ
+*        with accumulated Jacobi rotations. This provides numerically
+*        more robust computation, at the cost of slightly increased run
+*        time. Depending on the concrete implementation of BLAS and LAPACK
+*        (i.e. how they behave in presence of extreme ill-conditioning) the
+*        implementor may decide to remove this switch.
+         IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN
+            JRACC = .TRUE.
+         END IF
+*
+      END IF
+      IF ( AAQQ .LT. XSC ) THEN
+         DO 700 p = 1, N
+            IF ( SVA(p) .LT. XSC ) THEN
+               CALL ZLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA )
+               SVA(p) = ZERO
+            END IF
+ 700     CONTINUE
+      END IF
+*
+*     Preconditioning using QR factorization with pivoting
+*
+      IF ( ROWPIV ) THEN
+*        Optional row permutation (Bjoerck row pivoting):
+*        A result by Cox and Higham shows that the Bjoerck's
+*        row pivoting combined with standard column pivoting
+*        has similar effect as Powell-Reid complete pivoting.
+*        The ell-infinity norms of A are made nonincreasing.
+         IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN 
+              IWOFF = 2*N
+         ELSE
+              IWOFF = N
+         END IF
+         DO 1952 p = 1, M - 1
+            q = IDAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1
+            IWORK(IWOFF+p) = q
+            IF ( p .NE. q ) THEN
+               TEMP1      = RWORK(M+p)
+               RWORK(M+p) = RWORK(M+q)
+               RWORK(M+q) = TEMP1
+            END IF
+ 1952    CONTINUE
+         CALL ZLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 )
+      END IF
+*
+*     End of the preparation phase (scaling, optional sorting and
+*     transposing, optional flushing of small columns).
+*
+*     Preconditioning
+*
+*     If the full SVD is needed, the right singular vectors are computed
+*     from a matrix equation, and for that we need theoretical analysis
+*     of the Businger-Golub pivoting. So we use ZGEQP3 as the first RR QRF.
+*     In all other cases the first RR QRF can be chosen by other criteria
+*     (eg speed by replacing global with restricted window pivoting, such
+*     as in xGEQPX from TOMS # 782). Good results will be obtained using
+*     xGEQPX with properly (!) chosen numerical parameters.
+*     Any improvement of ZGEQP3 improves overal performance of ZGEJSV.
+*
+*     A * P1 = Q1 * [ R1^* 0]^*:
+      DO 1963 p = 1, N
+*        .. all columns are free columns
+         IWORK(p) = 0
+ 1963 CONTINUE
+      CALL ZGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N,
+     $             RWORK, IERR )
+*
+*     The upper triangular matrix R1 from the first QRF is inspected for
+*     rank deficiency and possibilities for deflation, or possible
+*     ill-conditioning. Depending on the user specified flag L2RANK,
+*     the procedure explores possibilities to reduce the numerical
+*     rank by inspecting the computed upper triangular factor. If
+*     L2RANK or L2ABER are up, then ZGEJSV will compute the SVD of
+*     A + dA, where ||dA|| <= f(M,N)*EPSLN.
+*
+      NR = 1
+      IF ( L2ABER ) THEN
+*        Standard absolute error bound suffices. All sigma_i with
+*        sigma_i < N*EPSLN*||A|| are flushed to zero. This is an
+*        agressive enforcement of lower numerical rank by introducing a
+*        backward error of the order of N*EPSLN*||A||.
+         TEMP1 = SQRT(DBLE(N))*EPSLN
+         DO 3001 p = 2, N
+            IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN
+               NR = NR + 1
+            ELSE
+               GO TO 3002
+            END IF
+ 3001    CONTINUE
+ 3002    CONTINUE
+      ELSE IF ( L2RANK ) THEN
+*        .. similarly as above, only slightly more gentle (less agressive).
+*        Sudden drop on the diagonal of R1 is used as the criterion for
+*        close-to-rank-deficient.
+         TEMP1 = SQRT(SFMIN)
+         DO 3401 p = 2, N
+            IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR.
+     $           ( ABS(A(p,p)) .LT. SMALL ) .OR.
+     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402
+            NR = NR + 1
+ 3401    CONTINUE
+ 3402    CONTINUE
+*
+      ELSE
+*        The goal is high relative accuracy. However, if the matrix
+*        has high scaled condition number the relative accuracy is in
+*        general not feasible. Later on, a condition number estimator
+*        will be deployed to estimate the scaled condition number.
+*        Here we just remove the underflowed part of the triangular
+*        factor. This prevents the situation in which the code is
+*        working hard to get the accuracy not warranted by the data.
+         TEMP1  = SQRT(SFMIN)
+         DO 3301 p = 2, N
+            IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR.
+     $           ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302
+            NR = NR + 1
+ 3301    CONTINUE
+ 3302    CONTINUE
+*
+      END IF
+*
+      ALMORT = .FALSE.
+      IF ( NR .EQ. N ) THEN
+         MAXPRJ = ONE
+         DO 3051 p = 2, N
+            TEMP1  = ABS(A(p,p)) / SVA(IWORK(p))
+            MAXPRJ = MIN( MAXPRJ, TEMP1 )
+ 3051    CONTINUE
+         IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE.
+      END IF
+*
+*
+      SCONDA = - ONE
+      CONDR1 = - ONE
+      CONDR2 = - ONE
+*
+      IF ( ERREST ) THEN
+         IF ( N .EQ. NR ) THEN
+            IF ( RSVEC ) THEN
+*              .. V is available as workspace
+               CALL ZLACPY( 'U', N, N, A, LDA, V, LDV )
+               DO 3053 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+                  CALL ZDSCAL( p, ONE/TEMP1, V(1,p), 1 )
+ 3053          CONTINUE
+               IF ( LSVEC )THEN
+                   CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,
+     $                  CWORK(N+1), RWORK, IERR )
+               ELSE
+                   CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1,
+     $                  CWORK, RWORK, IERR )
+               END IF               
+*          
+            ELSE IF ( LSVEC ) THEN
+*              .. U is available as workspace
+               CALL ZLACPY( 'U', N, N, A, LDA, U, LDU )
+               DO 3054 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+                  CALL ZDSCAL( p, ONE/TEMP1, U(1,p), 1 )
+ 3054          CONTINUE
+               CALL ZPOCON( 'U', N, U, LDU, ONE, TEMP1,
+     $              CWORK(N+1), RWORK, IERR )
+            ELSE
+               CALL ZLACPY( 'U', N, N, A, LDA, CWORK, N )
+*[]            CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
+*              Change: here index shifted by N to the left, CWORK(1:N) 
+*              not needed for SIGMA only computation
+               DO 3052 p = 1, N
+                  TEMP1 = SVA(IWORK(p))
+*[]               CALL ZDSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 )
+                  CALL ZDSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 )
+ 3052          CONTINUE
+*           .. the columns of R are scaled to have unit Euclidean lengths.
+*[]               CALL ZPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1,
+*[]     $              CWORK(N+N*N+1), RWORK, IERR )
+               CALL ZPOCON( 'U', N, CWORK, N, ONE, TEMP1,
+     $              CWORK(N*N+1), RWORK, IERR )               
+*              
+            END IF
+            IF ( TEMP1 .NE. ZERO ) THEN 
+               SCONDA = ONE / SQRT(TEMP1)
+            ELSE
+               SCONDA = - ONE
+            END IF
+*           SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1).
+*           N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+         ELSE
+            SCONDA = - ONE
+         END IF
+      END IF
+*
+      L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) )
+*     If there is no violent scaling, artificial perturbation is not needed.
+*
+*     Phase 3:
+*
+      IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN
+*
+*         Singular Values only
+*
+*         .. transpose A(1:NR,1:N)
+         DO 1946 p = 1, MIN( N-1, NR )
+            CALL ZCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
+            CALL ZLACGV( N-p+1, A(p,p), 1 )
+ 1946    CONTINUE
+         IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N))
+*
+*        The following two DO-loops introduce small relative perturbation
+*        into the strict upper triangle of the lower triangular matrix.
+*        Small entries below the main diagonal are also changed.
+*        This modification is useful if the computing environment does not
+*        provide/allow FLUSH TO ZERO underflow, for it prevents many
+*        annoying denormalized numbers in case of strongly scaled matrices.
+*        The perturbation is structured so that it does not introduce any
+*        new perturbation of the singular values, and it does not destroy
+*        the job done by the preconditioner.
+*        The licence for this perturbation is in the variable L2PERT, which
+*        should be .FALSE. if FLUSH TO ZERO underflow is active.
+*
+         IF ( .NOT. ALMORT ) THEN
+*
+            IF ( L2PERT ) THEN
+*              XSC = SQRT(SMALL)
+               XSC = EPSLN / DBLE(N)
+               DO 4947 q = 1, NR
+                  CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)
+                  DO 4949 p = 1, N
+                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
+     $                    .OR. ( p .LT. q ) )
+*     $                     A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
+     $                     A(p,q) = CTEMP
+ 4949             CONTINUE
+ 4947          CONTINUE
+            ELSE
+               CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA )
+            END IF
+*
+*            .. second preconditioning using the QR factorization
+*
+            CALL ZGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR )
+*
+*           .. and transpose upper to lower triangular
+            DO 1948 p = 1, NR - 1
+               CALL ZCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 )
+               CALL ZLACGV( NR-p+1, A(p,p), 1 )
+ 1948       CONTINUE
+*
+      END IF
+*
+*           Row-cyclic Jacobi SVD algorithm with column pivoting
+*
+*           .. again some perturbation (a "background noise") is added
+*           to drown denormals
+            IF ( L2PERT ) THEN
+*              XSC = SQRT(SMALL)
+               XSC = EPSLN / DBLE(N)
+               DO 1947 q = 1, NR
+                  CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO)
+                  DO 1949 p = 1, NR
+                     IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) )
+     $                       .OR. ( p .LT. q ) )
+*     $                   A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) )
+     $                   A(p,q) = CTEMP
+ 1949             CONTINUE
+ 1947          CONTINUE
+            ELSE
+               CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA )
+            END IF
+*
+*           .. and one-sided Jacobi rotations are started on a lower
+*           triangular matrix (plus perturbation which is ignored in
+*           the part which destroys triangular form (confusing?!))
+*
+            CALL ZGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA,
+     $                N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
+*
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+*
+*
+      ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) )
+     $       .OR. 
+     $   ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN
+*
+*        -> Singular Values and Right Singular Vectors <-
+*
+         IF ( ALMORT ) THEN
+*
+*           .. in this case NR equals N
+            DO 1998 p = 1, NR
+               CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+               CALL ZLACGV( N-p+1, V(p,p), 1 )
+ 1998       CONTINUE
+            CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
+*
+            CALL ZGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA,
+     $                  CWORK, LWORK, RWORK, LRWORK, INFO )
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+
+         ELSE
+*
+*        .. two more QR factorizations ( one QRF is not enough, two require
+*        accumulated product of Jacobi rotations, three are perfect )
+*
+            CALL ZLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA )
+            CALL ZGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR)
+            CALL ZLACPY( 'L', NR, NR, A, LDA, V, LDV )
+            CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV )
+            CALL ZGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $                   LWORK-2*N, IERR )
+            DO 8998 p = 1, NR
+               CALL ZCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 )
+               CALL ZLACGV( NR-p+1, V(p,p), 1 )
+ 8998       CONTINUE
+            CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV)
+*
+            CALL ZGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U,
+     $                  LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+            IF ( NR .LT. N ) THEN
+               CALL ZLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1),  LDV )
+               CALL ZLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1),  LDV )
+               CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV )
+            END IF
+*
+         CALL ZUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK,
+     $               V, LDV, CWORK(N+1), LWORK-N, IERR )
+*
+         END IF
+*         .. permute the rows of V
+*         DO 8991 p = 1, N
+*            CALL ZCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA )
+* 8991    CONTINUE
+*         CALL ZLACPY( 'All', N, N, A, LDA, V, LDV )
+         CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )
+*
+          IF ( TRANSP ) THEN
+            CALL ZLACPY( 'A', N, N, V, LDV, U, LDU )
+          END IF
+*
+      ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN 
+*          
+         CALL ZLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA )
+*
+         CALL ZGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV,
+     $               CWORK, LWORK, RWORK, LRWORK, INFO )
+          SCALEM  = RWORK(1)
+          NUMRANK = NINT(RWORK(2))
+          CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK )
+*
+      ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN
+*
+*        .. Singular Values and Left Singular Vectors                 ..
+*
+*        .. second preconditioning step to avoid need to accumulate
+*        Jacobi rotations in the Jacobi iterations.
+         DO 1965 p = 1, NR
+            CALL ZCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 )
+            CALL ZLACGV( N-p+1, U(p,p), 1 )
+ 1965    CONTINUE
+         CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+*
+         CALL ZGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1),
+     $              LWORK-2*N, IERR )
+*
+         DO 1967 p = 1, NR - 1
+            CALL ZCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 )
+            CALL ZLACGV( N-p+1, U(p,p), 1 )
+ 1967    CONTINUE
+         CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+*
+         CALL ZGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A,
+     $        LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO )
+         SCALEM  = RWORK(1)
+         NUMRANK = NINT(RWORK(2))
+*
+         IF ( NR .LT. M ) THEN
+            CALL ZLASET( 'A',  M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU )
+            IF ( NR .LT. N1 ) THEN
+               CALL ZLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU )
+               CALL ZLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU )
+            END IF
+         END IF
+*
+         CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $               LDU, CWORK(N+1), LWORK-N, IERR )
+*
+         IF ( ROWPIV )
+     $       CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         DO 1974 p = 1, N1
+            XSC = ONE / DZNRM2( M, U(1,p), 1 )
+            CALL ZDSCAL( M, XSC, U(1,p), 1 )
+ 1974    CONTINUE
+*
+         IF ( TRANSP ) THEN
+            CALL ZLACPY( 'A', N, N, U, LDU, V, LDV )
+         END IF
+*
+      ELSE
+*
+*        .. Full SVD ..
+*
+         IF ( .NOT. JRACC ) THEN
+*
+         IF ( .NOT. ALMORT ) THEN
+*
+*           Second Preconditioning Step (QRF [with pivoting])
+*           Note that the composition of TRANSPOSE, QRF and TRANSPOSE is
+*           equivalent to an LQF CALL. Since in many libraries the QRF
+*           seems to be better optimized than the LQF, we do explicit
+*           transpose and use the QRF. This is subject to changes in an
+*           optimized implementation of ZGEJSV.
+*
+            DO 1968 p = 1, NR
+               CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+               CALL ZLACGV( N-p+1, V(p,p), 1 )
+ 1968       CONTINUE
+*
+*           .. the following two loops perturb small entries to avoid
+*           denormals in the second QR factorization, where they are
+*           as good as zeros. This is done to avoid painfully slow
+*           computation with denormals. The relative size of the perturbation
+*           is a parameter that can be changed by the implementer.
+*           This perturbation device will be obsolete on machines with
+*           properly implemented arithmetic.
+*           To switch it off, set L2PERT=.FALSE. To remove it from  the
+*           code, remove the action under L2PERT=.TRUE., leave the ELSE part.
+*           The following two loops should be blocked and fused with the
+*           transposed copy above.
+*
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 2969 q = 1, NR
+                  CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)
+                  DO 2968 p = 1, N
+                     IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
+     $                   .OR. ( p .LT. q ) )
+*     $                   V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
+     $                   V(p,q) = CTEMP
+                     IF ( p .LT. q ) V(p,q) = - V(p,q)
+ 2968             CONTINUE
+ 2969          CONTINUE
+            ELSE
+               CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
+            END IF
+*
+*           Estimate the row scaled condition number of R1
+*           (If R1 is rectangular, N > NR, then the condition number
+*           of the leading NR x NR submatrix is estimated.)
+*
+            CALL ZLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR )
+            DO 3950 p = 1, NR
+               TEMP1 = DZNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1)
+               CALL ZDSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1)
+ 3950       CONTINUE
+            CALL ZPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1,
+     $                   CWORK(2*N+NR*NR+1),RWORK,IERR)
+            CONDR1 = ONE / SQRT(TEMP1)
+*           .. here need a second oppinion on the condition number
+*           .. then assume worst case scenario
+*           R1 is OK for inverse <=> CONDR1 .LT. DBLE(N)
+*           more conservative    <=> CONDR1 .LT. SQRT(DBLE(N))
+*
+            COND_OK = SQRT(SQRT(DBLE(NR)))
+*[TP]       COND_OK is a tuning parameter.
+*
+            IF ( CONDR1 .LT. COND_OK ) THEN
+*              .. the second QRF without pivoting. Note: in an optimized
+*              implementation, this QRF should be implemented as the QRF
+*              of a lower triangular matrix.
+*              R1^* = Q2 * R2
+               CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $              LWORK-2*N, IERR )
+*
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)/EPSLN
+                  DO 3959 p = 2, NR
+                     DO 3958 q = 1, p - 1
+                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                              ZERO)
+                        IF ( ABS(V(q,p)) .LE. TEMP1 )
+*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
+     $                     V(q,p) = CTEMP
+ 3958                CONTINUE
+ 3959             CONTINUE
+               END IF
+*
+               IF ( NR .NE. N )
+     $         CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
+*              .. save ...
+*
+*           .. this transposed copy should be better than naive
+               DO 1969 p = 1, NR - 1
+                  CALL ZCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 )
+                  CALL ZLACGV(NR-p+1, V(p,p), 1 )
+ 1969          CONTINUE
+               V(NR,NR)=CONJG(V(NR,NR))
+*
+               CONDR2 = CONDR1
+*
+            ELSE
+*
+*              .. ill-conditioned case: second QRF with pivoting
+*              Note that windowed pivoting would be equaly good
+*              numerically, and more run-time efficient. So, in
+*              an optimal implementation, the next call to ZGEQP3
+*              should be replaced with eg. CALL ZGEQPX (ACM TOMS #782)
+*              with properly (carefully) chosen parameters.
+*
+*              R1^* * P2 = Q2 * R2
+               DO 3003 p = 1, NR
+                  IWORK(N+p) = 0
+ 3003          CONTINUE
+               CALL ZGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1),
+     $                  CWORK(2*N+1), LWORK-2*N, RWORK, IERR )
+**               CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+**     $              LWORK-2*N, IERR )
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)
+                  DO 3969 p = 2, NR
+                     DO 3968 q = 1, p - 1
+                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                                ZERO)
+                        IF ( ABS(V(q,p)) .LE. TEMP1 )
+*     $                     V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) )
+     $                     V(q,p) = CTEMP
+ 3968                CONTINUE
+ 3969             CONTINUE
+               END IF
+*
+               CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N )
+*
+               IF ( L2PERT ) THEN
+                  XSC = SQRT(SMALL)
+                  DO 8970 p = 2, NR
+                     DO 8971 q = 1, p - 1
+                        CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))),
+     $                               ZERO)
+*                        V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) )
+                        V(p,q) = - CTEMP
+ 8971                CONTINUE
+ 8970             CONTINUE
+               ELSE
+                  CALL ZLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV )
+               END IF
+*              Now, compute R2 = L3 * Q3, the LQ factorization.
+               CALL ZGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1),
+     $               CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR )
+*              .. and estimate the condition number
+               CALL ZLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR )
+               DO 4950 p = 1, NR
+                  TEMP1 = DZNRM2( p, CWORK(2*N+N*NR+NR+p), NR )
+                  CALL ZDSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR )
+ 4950          CONTINUE
+               CALL ZPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1,
+     $              CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR )
+               CONDR2 = ONE / SQRT(TEMP1)
+*
+*
+               IF ( CONDR2 .GE. COND_OK ) THEN
+*                 .. save the Householder vectors used for Q3
+*                 (this overwrittes the copy of R2, as it will not be
+*                 needed in this branch, but it does not overwritte the
+*                 Huseholder vectors of Q2.).
+                  CALL ZLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N )
+*                 .. and the rest of the information on Q3 is in
+*                 WORK(2*N+N*NR+1:2*N+N*NR+N)
+               END IF
+*
+            END IF
+*
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 4968 q = 2, NR
+                  CTEMP = XSC * V(q,q)
+                  DO 4969 p = 1, q - 1
+*                     V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) )
+                     V(p,q) = - CTEMP
+ 4969             CONTINUE
+ 4968          CONTINUE
+            ELSE
+               CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV )
+            END IF
+*
+*        Second preconditioning finished; continue with Jacobi SVD
+*        The input matrix is lower trinagular.
+*
+*        Recover the right singular vectors as solution of a well
+*        conditioned triangular matrix equation.
+*
+            IF ( CONDR1 .LT. COND_OK ) THEN
+*
+               CALL ZGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU,
+     $              CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK,
+     $              LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               DO 3970 p = 1, NR
+                  CALL ZCOPY(  NR, V(1,p), 1, U(1,p), 1 )
+                  CALL ZDSCAL( NR, SVA(p),    V(1,p), 1 )
+ 3970          CONTINUE
+
+*        .. pick the right matrix equation and solve it
+*
+               IF ( NR .EQ. N ) THEN
+* :))             .. best case, R1 is inverted. The solution of this matrix
+*                 equation is Q2*V2 = the product of the Jacobi rotations
+*                 used in ZGESVJ, premultiplied with the orthogonal matrix
+*                 from the second QR factorization.
+                  CALL ZTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV)
+               ELSE
+*                 .. R1 is well conditioned, but non-square. Adjoint of R2
+*                 is inverted to get the product of the Jacobi rotations
+*                 used in ZGESVJ. The Q-factor from the second QR
+*                 factorization is then built in explicitly.
+                  CALL ZTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1),
+     $                 N,V,LDV)
+                  IF ( NR .LT. N ) THEN
+                  CALL ZLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV)
+                  CALL ZLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV)
+                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+                  END IF
+                  CALL ZUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $                V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR)
+               END IF
+*
+            ELSE IF ( CONDR2 .LT. COND_OK ) THEN
+*
+*              The matrix R2 is inverted. The solution of the matrix equation
+*              is Q3^* * V3 = the product of the Jacobi rotations (appplied to
+*              the lower triangular L3 from the LQ factorization of
+*              R2=L3*Q3), pre-multiplied with the transposed Q3.
+               CALL ZGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U,
+     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
+     $              RWORK, LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               DO 3870 p = 1, NR
+                  CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 )
+                  CALL ZDSCAL( NR, SVA(p),    U(1,p), 1 )
+ 3870          CONTINUE
+               CALL ZTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N,
+     $                    U,LDU)
+*              .. apply the permutation from the second QR factorization
+               DO 873 q = 1, NR
+                  DO 872 p = 1, NR
+                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
+ 872              CONTINUE
+                  DO 874 p = 1, NR
+                     U(p,q) = CWORK(2*N+N*NR+NR+p)
+ 874              CONTINUE
+ 873           CONTINUE
+               IF ( NR .LT. N ) THEN
+                  CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+                  CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+               END IF
+               CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+            ELSE
+*              Last line of defense.
+* #:(          This is a rather pathological case: no scaled condition
+*              improvement after two pivoted QR factorizations. Other
+*              possibility is that the rank revealing QR factorization
+*              or the condition estimator has failed, or the COND_OK
+*              is set very close to ONE (which is unnecessary). Normally,
+*              this branch should never be executed, but in rare cases of
+*              failure of the RRQR or condition estimator, the last line of
+*              defense ensures that ZGEJSV completes the task.
+*              Compute the full SVD of L3 using ZGESVJ with explicit
+*              accumulation of Jacobi rotations.
+               CALL ZGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U,
+     $              LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR,
+     $                         RWORK, LRWORK, INFO )
+               SCALEM  = RWORK(1)
+               NUMRANK = NINT(RWORK(2))
+               IF ( NR .LT. N ) THEN
+                  CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+                  CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+                  CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV)
+               END IF
+               CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $              V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+*
+               CALL ZUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N,
+     $              CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1),
+     $              LWORK-2*N-N*NR-NR, IERR )
+               DO 773 q = 1, NR
+                  DO 772 p = 1, NR
+                     CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q)
+ 772              CONTINUE
+                  DO 774 p = 1, NR
+                     U(p,q) = CWORK(2*N+N*NR+NR+p)
+ 774              CONTINUE
+ 773           CONTINUE
+*
+            END IF
+*
+*           Permute the rows of V using the (column) permutation from the
+*           first QRF. Also, scale the columns to make them unit in
+*           Euclidean norm. This applies to all cases.
+*
+            TEMP1 = SQRT(DBLE(N)) * EPSLN
+            DO 1972 q = 1, N
+               DO 972 p = 1, N
+                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
+  972          CONTINUE
+               DO 973 p = 1, N
+                  V(p,q) = CWORK(2*N+N*NR+NR+p)
+  973          CONTINUE
+               XSC = ONE / DZNRM2( N, V(1,q), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $           CALL ZDSCAL( N, XSC, V(1,q), 1 )
+ 1972       CONTINUE
+*           At this moment, V contains the right singular vectors of A.
+*           Next, assemble the left singular vector matrix U (M x N).
+            IF ( NR .LT. M ) THEN
+               CALL ZLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU)
+               IF ( NR .LT. N1 ) THEN
+                  CALL ZLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU)
+                  CALL ZLASET('A',M-NR,N1-NR,CZERO,CONE,
+     $                        U(NR+1,NR+1),LDU)
+               END IF
+            END IF
+*
+*           The Q matrix from the first QRF is built into the left singular
+*           matrix U. This applies to all cases.
+*
+            CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $           LDU, CWORK(N+1), LWORK-N, IERR )
+
+*           The columns of U are normalized. The cost is O(M*N) flops.
+            TEMP1 = SQRT(DBLE(M)) * EPSLN
+            DO 1973 p = 1, NR
+               XSC = ONE / DZNRM2( M, U(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $          CALL ZDSCAL( M, XSC, U(1,p), 1 )
+ 1973       CONTINUE
+*
+*           If the initial QRF is computed with row pivoting, the left
+*           singular vectors must be adjusted.
+*
+            IF ( ROWPIV )
+     $          CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         ELSE
+*
+*        .. the initial matrix A has almost orthogonal columns and
+*        the second QRF is not needed
+*
+            CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N )
+            IF ( L2PERT ) THEN
+               XSC = SQRT(SMALL)
+               DO 5970 p = 2, N
+                  CTEMP = XSC * CWORK( N + (p-1)*N + p )
+                  DO 5971 q = 1, p - 1
+*                     CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) /
+*     $                                        ABS(CWORK(N+(p-1)*N+q)) )
+                     CWORK(N+(q-1)*N+p)=-CTEMP
+ 5971             CONTINUE
+ 5970          CONTINUE
+            ELSE
+               CALL ZLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N )
+            END IF
+*
+            CALL ZGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA,
+     $           N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK,
+     $       INFO )
+*
+            SCALEM  = RWORK(1)
+            NUMRANK = NINT(RWORK(2))
+            DO 6970 p = 1, N
+               CALL ZCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 )
+               CALL ZDSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 )
+ 6970       CONTINUE
+*
+            CALL ZTRSM( 'L', 'U', 'N', 'N', N, N,
+     $           CONE, A, LDA, CWORK(N+1), N )
+            DO 6972 p = 1, N
+               CALL ZCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV )
+ 6972       CONTINUE
+            TEMP1 = SQRT(DBLE(N))*EPSLN
+            DO 6971 p = 1, N
+               XSC = ONE / DZNRM2( N, V(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $            CALL ZDSCAL( N, XSC, V(1,p), 1 )
+ 6971       CONTINUE
+*
+*           Assemble the left singular vector matrix U (M x N).
+*
+            IF ( N .LT. M ) THEN
+               CALL ZLASET( 'A',  M-N, N, CZERO, CZERO, U(N+1,1), LDU )
+               IF ( N .LT. N1 ) THEN
+                  CALL ZLASET('A',N,  N1-N, CZERO, CZERO,  U(1,N+1),LDU)
+                  CALL ZLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU)
+               END IF
+            END IF
+            CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $           LDU, CWORK(N+1), LWORK-N, IERR )
+            TEMP1 = SQRT(DBLE(M))*EPSLN
+            DO 6973 p = 1, N1
+               XSC = ONE / DZNRM2( M, U(1,p), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $            CALL ZDSCAL( M, XSC, U(1,p), 1 )
+ 6973       CONTINUE
+*
+            IF ( ROWPIV )
+     $         CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+         END IF
+*
+*        end of the  >> almost orthogonal case <<  in the full SVD
+*
+         ELSE
+*
+*        This branch deploys a preconditioned Jacobi SVD with explicitly
+*        accumulated rotations. It is included as optional, mainly for
+*        experimental purposes. It does perfom well, and can also be used.
+*        In this implementation, this branch will be automatically activated
+*        if the  condition number sigma_max(A) / sigma_min(A) is predicted
+*        to be greater than the overflow threshold. This is because the
+*        a posteriori computation of the singular vectors assumes robust
+*        implementation of BLAS and some LAPACK procedures, capable of working
+*        in presence of extreme values, e.g. when the singular values spread from
+*        the underflow to the overflow threshold. 
+*
+         DO 7968 p = 1, NR
+            CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 )
+            CALL ZLACGV( N-p+1, V(p,p), 1 )
+ 7968    CONTINUE
+*
+         IF ( L2PERT ) THEN
+            XSC = SQRT(SMALL/EPSLN)
+            DO 5969 q = 1, NR
+               CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO)
+               DO 5968 p = 1, N
+                  IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 )
+     $                .OR. ( p .LT. q ) )
+*     $                V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) )
+     $                V(p,q) = CTEMP
+                  IF ( p .LT. q ) V(p,q) = - V(p,q)
+ 5968          CONTINUE
+ 5969       CONTINUE
+         ELSE
+            CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV )
+         END IF
+
+         CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1),
+     $        LWORK-2*N, IERR )
+         CALL ZLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N )
+*
+         DO 7969 p = 1, NR
+            CALL ZCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 )
+            CALL ZLACGV( NR-p+1, U(p,p), 1 )
+ 7969    CONTINUE
+
+         IF ( L2PERT ) THEN
+            XSC = SQRT(SMALL/EPSLN)
+            DO 9970 q = 2, NR
+               DO 9971 p = 1, q - 1
+                  CTEMP = DCMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))),
+     $                            ZERO)
+*                  U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) )
+                  U(p,q) = - CTEMP
+ 9971          CONTINUE
+ 9970       CONTINUE
+         ELSE
+            CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU )
+         END IF
+
+         CALL ZGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA,
+     $        N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR,
+     $         RWORK, LRWORK, INFO )
+         SCALEM  = RWORK(1)
+         NUMRANK = NINT(RWORK(2))
+
+         IF ( NR .LT. N ) THEN
+            CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV )
+            CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV )
+            CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV )
+         END IF
+
+         CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1),
+     $        V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR )
+*
+*           Permute the rows of V using the (column) permutation from the
+*           first QRF. Also, scale the columns to make them unit in
+*           Euclidean norm. This applies to all cases.
+*
+            TEMP1 = SQRT(DBLE(N)) * EPSLN
+            DO 7972 q = 1, N
+               DO 8972 p = 1, N
+                  CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q)
+ 8972          CONTINUE
+               DO 8973 p = 1, N
+                  V(p,q) = CWORK(2*N+N*NR+NR+p)
+ 8973          CONTINUE
+               XSC = ONE / DZNRM2( N, V(1,q), 1 )
+               IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) )
+     $           CALL ZDSCAL( N, XSC, V(1,q), 1 )
+ 7972       CONTINUE
+*
+*           At this moment, V contains the right singular vectors of A.
+*           Next, assemble the left singular vector matrix U (M x N).
+*
+         IF ( NR .LT. M ) THEN
+            CALL ZLASET( 'A',  M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU )
+            IF ( NR .LT. N1 ) THEN
+               CALL ZLASET('A',NR,  N1-NR, CZERO, CZERO,  U(1,NR+1),LDU)
+               CALL ZLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU)
+            END IF
+         END IF
+*
+         CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U,
+     $        LDU, CWORK(N+1), LWORK-N, IERR )
+*
+            IF ( ROWPIV )
+     $         CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 )
+*
+*
+         END IF
+         IF ( TRANSP ) THEN
+*           .. swap U and V because the procedure worked on A^*
+            DO 6974 p = 1, N
+               CALL ZSWAP( N, U(1,p), 1, V(1,p), 1 )
+ 6974       CONTINUE
+         END IF
+*
+      END IF
+*     end of the full SVD
+*
+*     Undo scaling, if necessary (and possible)
+*
+      IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN
+         CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR )
+         USCAL1 = ONE
+         USCAL2 = ONE
+      END IF
+*
+      IF ( NR .LT. N ) THEN
+         DO 3004 p = NR+1, N
+            SVA(p) = ZERO
+ 3004    CONTINUE
+      END IF
+*
+      RWORK(1) = USCAL2 * SCALEM
+      RWORK(2) = USCAL1
+      IF ( ERREST ) RWORK(3) = SCONDA
+      IF ( LSVEC .AND. RSVEC ) THEN
+         RWORK(4) = CONDR1
+         RWORK(5) = CONDR2
+      END IF
+      IF ( L2TRAN ) THEN
+         RWORK(6) = ENTRA
+         RWORK(7) = ENTRAT
+      END IF
+*
+      IWORK(1) = NR
+      IWORK(2) = NUMRANK
+      IWORK(3) = WARNING
+      IF ( TRANSP ) THEN
+          IWORK(4) =  1 
+      ELSE
+          IWORK(4) = -1
+      END IF 
+      
+*
+      RETURN
+*     ..
+*     .. END OF ZGEJSV
+*     ..
+      END
+*
index c8afd1c..015bd3d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *>
 *>  where the vi's represent the vectors which define H(i), which are returned
 *>  in the matrix A.  The 1's along the diagonal of V are not stored in A.
-*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/NB), where each
-*>  block is of order NB except for the last block, which is of order
-*>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/MB), where each
+*>  block is of order MB except for the last block, which is of order
+*>  IB = K - (B-1)*MB.  For each of the B blocks, a upper triangular block
+*>  reflector factor is computed: T1, T2, ..., TB.  The MB-by-MB (and IB-by-IB
+*>  for the last block) T's are stored in the MB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE ZGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, MB
index 1406354..45e74f4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  The matrix V stores the elementary reflectors H(i) in the i-th column
-*>  below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>  The matrix V stores the elementary reflectors H(i) in the i-th row
+*>  above the diagonal. For example, if M=5 and N=3, the matrix V is
 *>
 *>               V = (  1  v1 v1 v1 v1 )
 *>                   (     1  v2 v2 v2 )
 *  =====================================================================
       RECURSIVE SUBROUTINE ZGELQT3( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, M, N, LDT
       PARAMETER ( ZERO = (0.0D+00,0.0D+00))
 *     ..
 *     .. Local Scalars ..
-      INTEGER   I, I1, J, J1, M1, M2, N1, N2, IINFO
+      INTEGER   I, I1, J, J1, M1, M2, IINFO
 *     ..
 *     .. External Subroutines ..
       EXTERNAL  ZLARFG, ZTRMM, ZGEMM, XERBLA
index ce57417..9463ccc 100644 (file)
@@ -90,7 +90,7 @@
 *>          of the matrices B and X. NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEsolve
 *
       SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
      $                   WORK, LWORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
index 569713c..6a4175e 100644 (file)
@@ -6,7 +6,7 @@
 *            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEMQRT + dependencies
+*> Download DGEMLQT + dependencies
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgemlqt.f">
 *> [TGZ]</a>
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgemlqt.f">
 *>
 *> \verbatim
 *>
-*> ZGEMQRT overwrites the general real M-by-N matrix C with
+*> ZGEMLQT overwrites the general real M-by-N matrix C with
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q C            C Q
-*> TRANS = 'C':   Q**C C            C Q**C
+*> TRANS = 'C':   Q**H C            C Q**H
 *>
 *> where Q is a complex orthogonal matrix defined as the product of K
 *> elementary reflectors:
 *>
-*>       Q = H(1) H(2) . . . H(K) = I - V C V**C
+*>       Q = H(1) H(2) . . . H(K) = I - V T V**H
 *>
 *> generated using the compact WY representation as returned by ZGELQT.
 *>
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**C from the Left;
-*>          = 'R': apply Q or Q**C from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Transpose, apply Q**C.
+*>          = 'C':  Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
@@ -99,7 +99,9 @@
 *>
 *> \param[in] V
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension (LDV,K)
+*>          V is COMPLEX*16 array, dimension
+*>                               (LDV,M) if SIDE = 'L',
+*>                               (LDV,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
 *>          DGELQT in the first K rows of its array argument A.
 *> \param[in] LDV
 *> \verbatim
 *>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
+*>          The leading dimension of the array V. LDV >= max(1,K).
 *> \endverbatim
 *>
 *> \param[in] T
 *> \verbatim
 *>          T is COMPLEX*16 array, dimension (LDT,K)
 *>          The upper triangular factors of the block reflectors
-*>          as returned by DGELQT, stored as a MB-by-M matrix.
+*>          as returned by DGELQT, stored as a MB-by-K matrix.
 *> \endverbatim
 *>
 *> \param[in] LDT
 *> \verbatim
 *>          C is COMPLEX*16 array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q C, Q**C C, C Q**C or C Q.
+*>          On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup doubleGEcomputational
 *
       SUBROUTINE ZGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT,
      $                   C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, RIGHT, TRAN, NOTRAN
-      INTEGER            I, IB, LDWORK, KF, Q
+      INTEGER            I, IB, LDWORK, KF
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 4f872c5..60adfec 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
 *>  block is of order NB except for the last block, which is of order
 *>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
 *>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
-*>  for the last block) T's are stored in the NB-by-N matrix T as
+*>  for the last block) T's are stored in the NB-by-K matrix T as
 *>
 *>               T = (T1 T2 ... TB).
 *> \endverbatim
 *  =====================================================================
       SUBROUTINE ZGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, NB
index e5bea14..72ef99d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16GEauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, N
       COMPLEX*16         TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLASWP, ZSCAL
+      EXTERNAL           ZLASWP, ZSCAL, DLABAD
 *     ..
 *     .. External Functions ..
       INTEGER            IZAMAX
index 316965a..40dd14f 100644 (file)
@@ -1,4 +1,4 @@
-*> \brief <b> ZGESV computes the solution to system of linear equations A * X = B for GE matrices</b> (simple driver) </b>
+*> \brief <b> ZGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) </b>
 *
 *  =========== DOCUMENTATION ===========
 *
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEsolve
 *
 *  =====================================================================
       SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, N, NRHS
index 1643b10..56b5cd4 100644 (file)
      $                    IL, IU, NS, S, U, LDU, VT, LDVT, WORK,
      $                    LWORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGEBRD, ZGELQF, ZGEQRF, ZLASCL, ZLASET,
-     $                   DLASCL, XERBLA
+      EXTERNAL           ZGEBRD, ZGELQF, ZGEQRF, ZLASCL, ZLASET, ZLACPY,
+     $                   ZUNMLQ, ZUNMBR, ZUNMQR, DBDSVDX, DLASCL, XERBLA
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index d08cfa5..fd32f92 100644 (file)
@@ -52,7 +52,7 @@
 *
 *> \param[in] JOBA
 *> \verbatim
-*>          JOBA is CHARACTER* 1
+*>          JOBA is CHARACTER*1
 *>          Specifies the structure of A.
 *>          = 'L': The input matrix A is lower triangular;
 *>          = 'U': The input matrix A is upper triangular;
 *>
 *> \param[in,out] CWORK
 *> \verbatim
-*>          CWORK is COMPLEX*16 array, dimension max(1,LWORK).
+*>          CWORK is COMPLEX*16 array, dimension (max(1,LWORK))
 *>          Used as workspace.
 *>          If on entry LWORK .EQ. -1, then a workspace query is assumed and
 *>          no computation is done; CWORK(1) is set to the minial (and optimal)
 *>
 *> \param[in,out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension max(6,LRWORK).
+*>          RWORK is DOUBLE PRECISION array, dimension (max(6,LRWORK))
 *>          On entry,
 *>          If JOBU .EQ. 'C' :
 *>          RWORK(1) = CTOL, where CTOL defines the threshold for convergence.
 *> \par References:
 *  ================
 *>
+*> \verbatim
+*>
 *> [1] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
 *>    singular value decomposition on a vector computer.
 *>    SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
       SUBROUTINE ZGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
      $                   LDV, CWORK, LWORK, RWORK, LRWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
 *     ..
 *     from BLAS
-      EXTERNAL           ZCOPY, ZROT, ZDSCAL, ZSWAP
+      EXTERNAL           ZCOPY, ZROT, ZDSCAL, ZSWAP, ZAXPY
 *     from LAPACK
       EXTERNAL           DLASCL, ZLASCL, ZLASET, ZLASSQ, XERBLA
       EXTERNAL           ZGSVJ0, ZGSVJ1
index 40e4d91..b790e34 100644 (file)
 *  =====================================================================
       SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
       DOUBLE PRECISION   BIGNUM, EPS, SMIN, SMLNUM, XMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGERU, ZSWAP
+      EXTERNAL           ZGERU, ZSWAP, DLABAD
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
index 40ad10e..5ce11ef 100644 (file)
@@ -53,7 +53,7 @@
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N': the linear system involves A;
-*>          = 'C': the linear system involves A**C.
+*>          = 'C': the linear system involves A**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEsolve
 *
       SUBROUTINE ZGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB,
      $                    WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       INTEGER            I, IASCL, IBSCL, J, MINMN, MAXMN, BROW,
      $                   SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2,
      $                   WSIZEO, WSIZEM, INFO2
-      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, SMLNUM
-      COMPLEX*16         TQ( 5 ), WORKQ
+      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, SMLNUM, DUM( 1 )
+      COMPLEX*16         TQ( 5 ), WORKQ( 1 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
        IF( M.GE.N ) THEN
          CALL ZGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL ZGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL ZGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL ZGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ,
      $                TSZM, B, LDB, WORKQ, -1, INFO2 )
-         LWM = MAX( LWM, INT( WORKQ ) )
+         LWM = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        ELSE
          CALL ZGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 )
          TSZO = INT( TQ( 1 ) )
-         LWO  = INT( WORKQ )
+         LWO  = INT( WORKQ( 1 ) )
          CALL ZGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWO  = MAX( LWO, INT( WORKQ ) )
+         LWO  = MAX( LWO, INT( WORKQ( 1 ) ) )
          CALL ZGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 )
          TSZM = INT( TQ( 1 ) )
-         LWM  = INT( WORKQ )
+         LWM  = INT( WORKQ( 1 ) )
          CALL ZGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ,
      $                TSZO, B, LDB, WORKQ, -1, INFO2 )
-         LWM  = MAX( LWM, INT( WORKQ ) )
+         LWM  = MAX( LWM, INT( WORKQ( 1 ) ) )
          WSIZEO = TSZO + LWO
          WSIZEM = TSZM + LWM
        END IF
 *
 *     Scale A, B if max element outside range [SMLNUM,BIGNUM]
 *
-      ANRM = ZLANGE( 'M', M, N, A, LDA, WORK )
+      ANRM = ZLANGE( 'M', M, N, A, LDA, DUM )
       IASCL = 0
       IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
 *
       IF ( TRAN ) THEN
         BROW = N
       END IF
-      BNRM = ZLANGE( 'M', BROW, NRHS, B, LDB, WORK )
+      BNRM = ZLANGE( 'M', BROW, NRHS, B, LDB, DUM )
       IBSCL = 0
       IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
 *
index ac91384..6615234 100644 (file)
 *>
 *> \param[in] SELCTG
 *> \verbatim
-*>          SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments
+*>          SELCTG is a LOGICAL FUNCTION of two COMPLEX*16 arguments
 *>          SELCTG must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'N', SELCTG is not referenced.
 *>          If SORT = 'S', SELCTG is used to select eigenvalues to sort
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEeigen
 *
      $                   LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
      $                   IWORK, LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
index 94ae93b..4b0e782 100644 (file)
       SUBROUTINE ZGGHD3( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
      $                   LDQ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.1) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGGHRD, ZLARTG, ZLASET, ZUNM22, ZROT, XERBLA
+      EXTERNAL           ZGGHRD, ZLARTG, ZLASET, ZUNM22, ZROT, ZGEMM,
+     $                   ZGEMV, ZTRMV, ZLACPY, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, DCMPLX, DCONJG, MAX
index ea2b542..c4a6bd3 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
       SUBROUTINE ZGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
      $                   SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     .. External Subroutines ..
 *     ..
 *     from BLAS
-      EXTERNAL           ZCOPY, ZROT, ZSWAP
+      EXTERNAL           ZCOPY, ZROT, ZSWAP, ZAXPY
 *     from LAPACK
       EXTERNAL           ZLASCL, ZLASSQ, XERBLA
 *     ..
index aba6ea2..91e39ca 100644 (file)
       SUBROUTINE ZGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
      $                   EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Subroutines ..
 *     .. from BLAS
-      EXTERNAL           ZCOPY, ZROT, ZSWAP
+      EXTERNAL           ZCOPY, ZROT, ZSWAP, ZAXPY
 *     .. from LAPACK
       EXTERNAL           ZLASCL, ZLASSQ, XERBLA
 *     ..
index e4114b5..a440b5c 100644 (file)
 *  Arguments:
 *  ==========
 *
-*> @param[in] n
-*>          The order of the matrix A.
-*>
-*> @param[in] nb
-*>          The size of the band.
-*>
-*> @param[in, out] A
-*>          A pointer to the matrix A.
-*>
-*> @param[in] lda
-*>          The leading dimension of the matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*> \endverbatim
 *>
-*> @param[out] V
-*>          COMPLEX*16 array, dimension 2*n if eigenvalues only are
-*>          requested or to be queried for vectors.
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL which indicate if Eigenvalue are requested or both
+*>          Eigenvalue/Eigenvectors.
+*> \endverbatim
 *>
-*> @param[out] TAU
-*>          COMPLEX*16 array, dimension (2*n).
-*>          The scalar factors of the Householder reflectors are stored
-*>          in this array.
+*> \param[in] TTYPE
+*> \verbatim
+*>          TTYPE is INTEGER
+*> \endverbatim
 *>
-*> @param[in] st
+*> \param[in] ST
+*> \verbatim
+*>          ST is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] ed
+*> \param[in] ED
+*> \verbatim
+*>          ED is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] sweep
+*> \param[in] SWEEP
+*> \verbatim
+*>          SWEEP is INTEGER
 *>          internal parameter for indices.
+*> \endverbatim
 *>
-*> @param[in] Vblksiz
-*>          internal parameter for indices.
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER. The order of the matrix A.
+*> \endverbatim
 *>
-*> @param[in] wantz
-*>          logical which indicate if Eigenvalue are requested or both
-*>          Eigenvalue/Eigenvectors.
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER. The size of the band.
+*> \endverbatim
+*>
+*> \param[in] IB
+*> \verbatim
+*>          IB is INTEGER.
+*> \endverbatim
+*>
+*> \param[in, out] A
+*> \verbatim
+*>          A is COMPLEX*16 array. A pointer to the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER. The leading dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension 2*n if eigenvalues only are
+*>          requested or to be queried for vectors.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (2*n).
+*>          The scalar factors of the Householder reflectors are stored
+*>          in this array.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER.
+*> \endverbatim
 *>
-*> @param[in] work
-*>          Workspace of size nb.
+*> \param[in] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array. Workspace of size nb.
+*> \endverbatim
 *>
 *> \par Further Details:
 *  =====================
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index bb0faef..583e55c 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHB
-      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DSCAL, DSTERF, XERBLA, ZLASCL, ZSTEQR,
-     $                   ZHETRD_2STAGE
+     $                   ZHETRD_2STAGE, ZHETRD_HB2ST
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE, SQRT
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'ZHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index 94863c7..be493a1 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHEReigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHB
-      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DSCAL, DSTERF, XERBLA, ZGEMM, ZLACPY,
          LRWMIN = 1
          LIWMIN = 1
       ELSE
-         IB    = ILAENV( 18, 'ZHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+         IB    = ILAENV2STAGE( 2, 'ZHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
          IF( WANTZ ) THEN
             LWMIN = 2*N**2
             LRWMIN = 1 + 5*N + 2*N**2
index 8473c4a..9b1f5fe 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHB
-      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV
+      EXTERNAL           LSAME, DLAMCH, ZLANHB, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DSCAL, DSTEBZ, DSTERF, XERBLA, ZCOPY,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            IB    = ILAENV( 18, 'ZHETRD_HB2ST', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'ZHETRD_HB2ST', JOBZ, N, KD, IB, -1 )
+            IB    = ILAENV2STAGE( 2, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'ZHETRD_HB2ST', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          ENDIF
index db93f6d..8c3a9f3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZHECON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
 *  =====================================================================
 *
 *     .. Parameters ..
-      REAL               ONE, ZERO
+      DOUBLE PRECISION   ONE, ZERO
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
index 3daf535..6dabdcf 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZHECON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
      $                        INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
 *  =====================================================================
 *
 *     .. Parameters ..
-      REAL               ONE, ZERO
+      DOUBLE PRECISION   ONE, ZERO
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
index ec6d095..d698232 100644 (file)
 *  =====================================================================
       SUBROUTINE ZHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
       EXTERNAL           DLAMCH, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
+      EXTERNAL           ZLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DIMAG, INT, LOG, MAX, MIN, SQRT
index 0cf57e9..d80a80d 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+      EXTERNAL           LSAME, DLAMCH, ZLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DSCAL, DSTERF, XERBLA, ZLASCL, ZSTEQR,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index 7a8c159..1bf5fec 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+      EXTERNAL           LSAME, DLAMCH, ZLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DSCAL, DSTERF, XERBLA, ZLACPY, ZLASCL,
             LRWMIN = 1
             LIWMIN = 1
          ELSE
-            KD    = ILAENV( 17, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             IF( WANTZ ) THEN
                LWMIN = 2*N + N*N
                LRWMIN = 1 + 5*N + 2*N**2
index 5457853..ab7f337 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV, ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANSY
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANSY
+      EXTERNAL           LSAME, DLAMCH, ZLANSY, ILAENV, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DSCAL, DSTEBZ, DSTERF, XERBLA, ZDSCAL,
       LQUERY = ( ( LWORK.EQ.-1 ) .OR. ( LRWORK.EQ.-1 ) .OR.
      $         ( LIWORK.EQ.-1 ) )
 *
-      KD     = ILAENV( 17, 'DSYTRD_2STAGE', JOBZ, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'DSYTRD_2STAGE', JOBZ, N, KD, -1, -1 )
-      LHTRD  = ILAENV( 19, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
-      LWTRD  = ILAENV( 20, 'DSYTRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+      LHTRD  = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+      LWTRD  = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
       LWMIN  = N + LHTRD + LWTRD
       LRWMIN = MAX( 1, 24*N )
       LIWMIN = MAX( 1, 10*N )
index 9def33c..a70c870 100644 (file)
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
+      INTEGER            ILAENV2STAGE
       DOUBLE PRECISION   DLAMCH, ZLANHE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+      EXTERNAL           LSAME, DLAMCH, ZLANHE, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DCOPY, DSCAL, DSTEBZ, DSTERF, XERBLA, ZDSCAL,
             LWMIN = 1
             WORK( 1 ) = LWMIN
          ELSE
-            KD    = ILAENV( 17, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-            IB    = ILAENV( 18, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-            LHTRD = ILAENV( 19, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-            LWTRD = ILAENV( 20, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+            KD    = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, -1, -1, -1 )
+            IB    = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, -1, -1 )
+            LHTRD = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
+            LWTRD = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', JOBZ,
+     $                            N, KD, IB, -1 )
             LWMIN = N + LHTRD + LWTRD
             WORK( 1 )  = LWMIN
          END IF
index 1afd2e1..53f1b8d 100644 (file)
@@ -47,7 +47,7 @@
 *> positive definite.
 *> This routine use the 2stage technique for the reduction to tridiagonal
 *> which showed higher performance on recent architecture and for large
-*  sizes N>2000.
+*> sizes N>2000.
 *> \endverbatim
 *
 *  Arguments:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEeigen
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZHEGST, ZPOTRF, ZTRMM, ZTRSM,
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         KD    = ILAENV( 17, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
-         IB    = ILAENV( 18, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
-         LHTRD = ILAENV( 19, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
-         LWTRD = ILAENV( 20, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         KD    = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', JOBZ, N, -1, -1, -1 )
+         IB    = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', JOBZ, N, KD, -1, -1 )
+         LHTRD = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
+         LWTRD = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', JOBZ, N, KD, IB, -1 )
          LWMIN = N + LHTRD + LWTRD
          WORK( 1 )  = LWMIN
 *
index 56a3086..bbd0fdf 100644 (file)
 *>          The length of WORK.  LWORK >= MAX(1,2*N,3*N-2), and for best 
 *>          performance LWORK >= max(1,N*NB), where NB is the optimal
 *>          blocksize for ZHETRF.
-*>          for LWORK < N, TRS will be done with Level BLAS 2
-*>          for LWORK >= N, TRS will be done with Level BLAS 3
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEsolve
 *
       SUBROUTINE ZHESV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                     LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZHETRF, ZHETRS, ZHETRS2
+      EXTERNAL           XERBLA, ZHETRF_AA, ZHETRS_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/zhesv_aa_2stage.f b/lapack-netlib/SRC/zhesv_aa_2stage.f
new file mode 100644 (file)
index 0000000..a344400
--- /dev/null
@@ -0,0 +1,284 @@
+*> \brief <b> ZHESV_AA_2STAGE computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHESV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhesv_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhesv_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhesv_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZHESV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHESV_AA_2STAGE computes the solution to a complex system of 
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**H,  if UPLO = 'U', or
+*>    A = L * T * L**H,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is Hermitian and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX*16 array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16HEsolve
+*
+*  =====================================================================
+      SUBROUTINE ZHESV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK driver routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                     ONE  = ( 1.0D+0, 0.0D+0 ) )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, LWKOPT, NB, KB, NT, IINFO
+      COMPLEX            PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZHETRF_AA_2STAGE, ZHETRS_AA_2STAGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHESV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Compute the factorization A = U*T*U**H or A = L*T*L**H.
+*
+      CALL ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL ZHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+      RETURN
+*
+*     End of ZHESV_AA_2STAGE
+*
+      END
index 4245b32..9d6a426 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          VECT, UPLO
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            ILAENV2STAGE
+      EXTERNAL           LSAME, ILAENV2STAGE
 *     ..
 *     .. Executable Statements ..
 *
 *
 *     Determine the block size, the workspace size and the hous size.
 *
-      KD     = ILAENV( 17, 'ZHETRD_2STAGE', VECT, N, -1, -1, -1 )
-      IB     = ILAENV( 18, 'ZHETRD_2STAGE', VECT, N, KD, -1, -1 )
-      LHMIN  = ILAENV( 19, 'ZHETRD_2STAGE', VECT, N, KD, IB, -1 )
-      LWMIN  = ILAENV( 20, 'ZHETRD_2STAGE', VECT, N, KD, IB, -1 )
+      KD     = ILAENV2STAGE( 1, 'ZHETRD_2STAGE', VECT, N, -1, -1, -1 )
+      IB     = ILAENV2STAGE( 2, 'ZHETRD_2STAGE', VECT, N, KD, -1, -1 )
+      LHMIN  = ILAENV2STAGE( 3, 'ZHETRD_2STAGE', VECT, N, KD, IB, -1 )
+      LWMIN  = ILAENV2STAGE( 4, 'ZHETRD_2STAGE', VECT, N, KD, IB, -1 )
 *      WRITE(*,*),'ZHETRD_2STAGE N KD UPLO LHMIN LWMIN ',N, KD, UPLO,
 *     $            LHMIN, LWMIN
 *
index d963d8c..0739062 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          STAGE1, UPLO, VECT
       COMPLEX*16         TMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZHB2ST_KERNELS, ZLACPY, ZLASET
+      EXTERNAL           ZHB2ST_KERNELS, ZLACPY, ZLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MIN, MAX, CEILING, DBLE, REAL
index 89fb1b8..e35578b 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
 *>          On exit, if INFO = 0, or if LWORK=-1, 
 *>          WORK(1) returns the size of LWORK.
 *> \endverbatim
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK which should be calculated
-*           by a workspace query. LWORK = MAX(1, LWORK_QUERY)
+*>          by a workspace query. LWORK = MAX(1, LWORK_QUERY)
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
 *>          this value as the first entry of the WORK array, and no error
 *> \author Univ. of Colorado Denver 
 *> \author NAG Ltd. 
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *>
 *>  where tau is a complex scalar, and v is a complex vector with
 *>  v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in
-*   A(i+kd+2:n,i), and tau in TAU(i).
+*>  A(i+kd+2:n,i), and tau in TAU(i).
 *>
 *>  The contents of A on exit are illustrated by the following examples
 *>  with n = 5:
 *
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
      $                   TPOS, WPOS, S2POS, S1POS
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZHER2K, ZHEMM, ZGEMM,
+      EXTERNAL           XERBLA, ZHER2K, ZHEMM, ZGEMM, ZCOPY,
      $                   ZLARFT, ZGELQF, ZGEQRF, ZLASET
 *     ..
 *     .. Intrinsic Functions ..
index 05844bb..e355aed 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZHETRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL      LQUERY, UPPER
-      INTEGER      J, LWKOPT, IINFO
+      INTEGER      J, LWKOPT
       INTEGER      NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       COMPLEX*16   ALPHA
 *     ..
       EXTERNAL     LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL     XERBLA
+      EXTERNAL     ZLAHEF_AA, ZGEMM, ZGEMV, ZCOPY, ZSCAL, ZSWAP, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC    DBLE, DCONJG, MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'ZHETRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'ZHETRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
          A( 1, 1 ) = DBLE( A( 1, 1 ) )
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL ZLAHEF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( MAX(1, J), J+1 ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                      IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL ZLAHEF_AA( UPLO, 2-K1, N-J, JB,
      $                      A( J+1, MAX(1, J) ), LDA,
-     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                      IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/zhetrf_aa_2stage.f b/lapack-netlib/SRC/zhetrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..4d62198
--- /dev/null
@@ -0,0 +1,663 @@
+*> \brief \b ZHETRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHETRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHETRF_AA_2STAGE computes the factorization of a double hermitian matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a hermitian band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16SYcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZHETRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0E+0, 0.0E+0 ),
+     $                     ONE  = ( 1.0E+0, 0.0E+0 ) )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      COMPLEX*16         PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZCOPY, ZLACGV, ZLACPY,
+     $                   ZLASET, ZGBTRF, ZGEMM,  ZGETRF, 
+     $                   ZHEGST, ZSWAP, ZTRSM 
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHETRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'ZHETRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*U(I,J) + T(I+1,I)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL ZLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL ZGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( 1, J*NB+1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL ZGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL ZHEGST( 1, 'Upper', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               TB( TD+1 + (J*NB+I-1)*LDTB )
+     $            = REAL( TB( TD+1 + (J*NB+I-1)*LDTB ) )
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $               = DCONJG( TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB ) )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL ZGEMM( 'Conjugate transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -ONE, WORK( NB+1 ), N,
+     $                          A( 1, (J+1)*NB+1 ), LDA,
+     $                     ONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call ZGETRF
+*
+               DO K = 1, NB
+                   CALL ZCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL ZGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+*
+*                  Copy only L-factor
+*
+                   CALL ZCOPY( N-K-(J+1)*NB,
+     $                         WORK( K+1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+K+1 ), LDA )
+*
+*                  Transpose U-factor to be copied back into T(J+1, J)
+*
+                   CALL ZLACGV( K, WORK( 1+(K-1)*N ), 1 )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL ZLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB) , LDTB-1 )
+               CALL ZLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL ZTRSM( 'R', 'U', 'N', 'U', KB, NB, ONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = DCONJG( TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB ) )
+                  END DO
+               END DO
+               CALL ZLASET( 'Lower', KB, NB, ZERO, ONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL ZSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL ZSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+                     CALL ZLACGV( I2-I1, A( I1, I1+1 ), LDA )
+                     CALL ZLACGV( I2-I1-1, A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL ZSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL ZSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                    NB, KB, JB,
+     $                    ONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                         A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                    NB, KB, JB,
+     $                    ONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                          A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    ZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL ZLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -ONE, A( J*NB+1, 1 ), LDA,
+     $                      WORK( NB+1 ), N,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 ONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 ZERO, WORK( 1 ), N )
+               CALL ZGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                 KB, KB, NB,
+     $                -ONE, WORK( 1 ), N,
+     $                      A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 ONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+            IF( J.GT.0 ) THEN 
+               CALL ZHEGST( 1, 'Lower', KB, 
+     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               TB( TD+1 + (J*NB+I-1)*LDTB ) 
+     $            = REAL( TB( TD+1 + (J*NB+I-1)*LDTB ) )
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $               = DCONJG( TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB ) )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL ZGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                       KB, KB, KB,
+     $                       ONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                             A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       ZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL ZGEMM( 'NoTranspose', 'Conjugate transpose',
+     $                      KB, KB, NB+KB,
+     $                      ONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                            A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      ZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -ONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                          WORK( NB+1 ), N,
+     $                     ONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL ZGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL ZLASET( 'Full', KB, NB, ZERO, ZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB) , LDTB-1 )
+               CALL ZLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL ZTRSM( 'R', 'L', 'C', 'U', KB, NB, ONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = DCONJG( TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB ) )
+                  END DO
+               END DO
+               CALL ZLASET( 'Upper', KB, NB, ZERO, ONE, 
+     $                      A( (J+1)*NB+1, J*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL ZSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL ZSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+                     CALL ZLACGV( I2-I1, A( I1+1, I1 ), 1 )
+                     CALL ZLACGV( I2-I1-1, A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL ZSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL ZSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL ZLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of ZHETRF_AA_2STAGE
+*
+      END
index 7e743a1..a7acff4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZHETRI2X
+      EXTERNAL           ZHETRI2X, ZHETRI, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index 1690172..ab35e70 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
 *  =====================================================================
 *
 *     .. Parameters ..
-      REAL               ONE
+      DOUBLE PRECISION   ONE
       COMPLEX*16            CONE, ZERO
       PARAMETER          ( ONE = 1.0D+0,
      $                   CONE = ( 1.0D+0, 0.0D+0 ),
index 69d6e0b..14be660 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZHETRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZHETRI_3X
+      EXTERNAL           ZHETRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index 8be104c..d7c00c8 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE ZHETRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index a73f51b..937544e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZHETRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 044bf4c..9d302b9 100644 (file)
@@ -67,7 +67,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          Details of factors computed by ZHETRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
       SUBROUTINE ZHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGTSV, ZSWAP, ZTRSM, XERBLA
+      EXTERNAL           ZGTSV, ZSWAP, ZTRSM, ZLACGV, ZLACPY, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/zhetrs_aa_2stage.f b/lapack-netlib/SRC/zhetrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..02e1747
--- /dev/null
@@ -0,0 +1,283 @@
+*> \brief \b ZHETRS_AA_2STAGE
+*
+* @generated from SRC/dsytrs_aa_2stage.f, fortran d -> c, Mon Oct 30 11:59:02 2017
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHETRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHETRS_AA_2STAGE solves a system of linear equations A*X = B with a 
+*> hermitian matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by ZHETRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16array, dimension (LDA,N)
+*>          Details of factors computed by ZHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX*16array, dimension (LTB)
+*>          Details of factors computed by ZHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          ZHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          ZHETRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16SYcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZHETRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGBTRS, ZLASWP, ZTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHETRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL ZTRSM( 'L', 'U', 'C', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL ZGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL ZTRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL ZTRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL ZGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL ZTRSM( 'L', 'L', 'C', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of ZHETRS_AA_2STAGE
+*
+      END
index cfc3e11..6440542 100644 (file)
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION (LDA,ka)
+*>          A is COMPLEX*16 array, dimension (LDA,ka)
 *>           where KA
 *>           is K  when TRANS = 'N' or 'n', and is N otherwise. Before
 *>           entry with TRANS = 'N' or 'n', the leading N--by--K part of
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
       SUBROUTINE ZHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
      $                  C )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index 10b59c9..83983ee 100644 (file)
 *>
 *> \param[out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array,
-*>                                         dimension (LRWORK)
+*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
 *>          On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHEReigen
 *
       SUBROUTINE ZHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
      $                   RWORK, LRWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
index 9d5291b..6ffaf8f 100644 (file)
 *>
 *> \param[in] AB
 *> \verbatim
-*>          AB is COMPLEX*16 array of DIMENSION ( LDAB, n )
+*>          AB is COMPLEX*16 array, dimension ( LDAB, n )
 *>           Before entry, the leading m by n part of the array AB must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GBcomputational
 *
       SUBROUTINE ZLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
      $                      INCX, BETA, Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index c95e48b..7a850f1 100644 (file)
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GBcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
index 8d22169..221e0c3 100644 (file)
@@ -96,7 +96,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array of DIMENSION ( LDA, n )
+*>          A is COMPLEX*16 array, dimension ( LDA, n )
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array of DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
 *>           and at least
 *>           ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
       SUBROUTINE ZLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
      $                       Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index 2382d60..2e93e26 100644 (file)
 *>
 *> \param[in,out] ERRS_N
 *> \verbatim
-*>          ERRS_N is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERRS_N is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERRS_C
 *> \verbatim
-*>          ERRS_C is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERRS_C is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
      $                                Y_TAIL, RCOND, ITHRESH, RTHRESH,
      $                                DZ_UB, IGNORE_CWISE, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 1fa0e0a..cd536ef 100644 (file)
@@ -89,7 +89,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array, DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) )
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
       SUBROUTINE ZLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index e80a591..5b43a58 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX*16 array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by ZHETRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16HEcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 34a0ac5..85dd427 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX*16 array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by ZPOTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16POcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 01854a9..02958be 100644 (file)
@@ -90,7 +90,7 @@
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, DIMENSION ( LDA, n ).
+*>          A is COMPLEX*16 array, dimension ( LDA, n ).
 *>           Before entry, the leading m by n part of the array A must
 *>           contain the matrix of coefficients.
 *>           Unchanged on exit.
 *>
 *> \param[in] X
 *> \verbatim
-*>          X is COMPLEX*16 array, DIMENSION at least
+*>          X is COMPLEX*16 array, dimension at least
 *>           ( 1 + ( n - 1 )*abs( INCX ) )
 *>           Before entry, the incremented array X must contain the
 *>           vector x.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
       SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
      $                      INCY )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
index 0091e81..a9716fd 100644 (file)
 *>
 *> \param[in,out] Y
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension
-*>                    (LDY,NRHS)
+*>          Y is COMPLEX*16 array, dimension (LDY,NRHS)
 *>     On entry, the solution matrix X, as computed by ZSYTRS.
 *>     On exit, the improved solution matrix Y.
 *> \endverbatim
 *>
 *> \param[in,out] ERR_BNDS_NORM
 *> \verbatim
-*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     normwise relative error, which is defined as follows:
 *>
 *> \param[in,out] ERR_BNDS_COMP
 *> \verbatim
-*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
-*>                    (NRHS, N_ERR_BNDS)
+*>          ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
 *>     For each right-hand side, this array contains information about
 *>     various error bounds and condition numbers corresponding to the
 *>     componentwise relative error, which is defined as follows:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
      $                                RTHRESH, DZ_UB, IGNORE_CWISE,
      $                                INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
index 07b5e9f..9078409 100644 (file)
 *>
 *> \param[out] TAUQ
 *> \verbatim
-*>          TAUQ is COMPLEX*16 array dimension (NB)
+*>          TAUQ is COMPLEX*16 array, dimension (NB)
 *>          The scalar factors of the elementary reflectors which
 *>          represent the unitary matrix Q. See Further Details.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
       SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
      $                   LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDX, LDY, M, N, NB
index 5698ba0..8bad4ab 100644 (file)
 *  ===========
 *
 *       SUBROUTINE ZLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER    UPLO
-*       INTEGER      J1, M, NB, LDA, LDH, INFO
+*       INTEGER      J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER      IPIV( * )
 *>          WORK is COMPLEX*16 workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16HEcomputational
 *
 *  =====================================================================
       SUBROUTINE ZLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                      H, LDH, WORK, INFO )
+     $                      H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER    UPLO
-      INTEGER      M, NB, J1, LDA, LDH, INFO
+      INTEGER      M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER      IPIV( * )
       PARAMETER    ( ZERO = (0.0D+0, 0.0D+0), ONE = (1.0D+0, 0.0D+0) )
 *
 *     .. Local Scalars ..
-      INTEGER      J, K, K1, I1, I2
+      INTEGER      J, K, K1, I1, I2, MJ
       COMPLEX*16   PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL     LSAME, ILAENV, IZAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL     XERBLA
+      EXTERNAL     ZGEMM, ZGEMV, ZAXPY, ZLACGV, ZCOPY, ZSCAL, ZSWAP,
+     $             ZLASET, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC    DBLE, DCONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
 *        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
 *         where H(J:N, J) has been initialized to be A(J, J:N)
 *           first column
 *
             CALL ZLACGV( J-K1, A( 1, J ), 1 )
-            CALL ZGEMV( 'No transpose', M-J+1, J-K1,
+            CALL ZGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
 *
 *        Copy H(i:n, i) into WORK
 *
-         CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL ZCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
 *            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
 *
             ALPHA = -DCONJG( A( K-1, J ) )
-            CALL ZAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL ZAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                END IF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
                CALL ZLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
 *        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
 *         where H(J:N, J) has been initialized to be A(J:N, J)
 *           first column
 *
             CALL ZLACGV( J-K1, A( J, 1 ), LDA )
-            CALL ZGEMV( 'No transpose', M-J+1, J-K1,
+            CALL ZGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
 *
 *        Copy H(J:N, J) into WORK
 *
-         CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL ZCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -DCONJG( A( J, K-1 ) )
-            CALL ZAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL ZAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
                CALL ZLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (J.EQ.M)
-     $          .AND. (INFO.EQ.0) ) INFO = J
          END IF
          J = J + 1
          GO TO 30
index 6ad6cc5..ed5845b 100644 (file)
 *>
 *> \param[out] IWORK
 *> \verbatim
-*>          IWORK is INTEGER array.
-*>         The dimension must be at least 3 * N
+*>          IWORK is INTEGER array, dimension (3*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
      $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
index 372b382..409ebe3 100644 (file)
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension at least
-*>         (N * NRHS).
+*>          WORK is COMPLEX*16 array, dimension (N * NRHS)
 *> \endverbatim
 *>
 *> \param[out] RWORK
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
       SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
      $                   RANK, WORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 8068114..0e0b0a1 100644 (file)
@@ -23,7 +23,7 @@
 *>
 *>                    SIDE = 'L'     SIDE = 'R'
 *>    TRANS = 'N':      Q * C          C * Q
-*>    TRANS = 'T':      Q**T * C       C * Q**T
+*>    TRANS = 'C':      Q**H * C       C * Q**H
 *>    where Q is a real orthogonal matrix defined as the product of blocked
 *>    elementary reflectors computed by short wide LQ
 *>    factorization (ZLASWLQ)
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**T from the Left;
-*>          = 'R': apply Q or Q**T from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'T':  Transpose, apply Q**T.
+*>          = 'C':  Conjugate Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >=0.
+*>          The number of rows of the matrix C.  M >=0.
 *> \endverbatim
 *>
 *> \param[in] N
 *>
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,K)
+*>          A is COMPLEX*16 array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
 *>          The i-th row must contain the vector which defines the blocked
 *>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          DLASWLQ in the first k rows of its array argument A.
+*>          ZLASWLQ in the first k rows of its array argument A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          C is COMPLEX*16 array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
       SUBROUTINE ZLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $    LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
-      INTEGER           INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC, LW
+      INTEGER           INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC
 *     ..
 *     .. Array Arguments ..
       COMPLEX*16        A( LDA, * ), WORK( * ), C(LDC, * ),
 *     ..
 *     .. Local Scalars ..
       LOGICAL    LEFT, RIGHT, TRAN, NOTRAN, LQUERY
-      INTEGER    I, II, KK, CTR
+      INTEGER    I, II, KK, LW, CTR
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
index 855083a..1ee7324 100644 (file)
@@ -23,7 +23,7 @@
 *>
 *>                 SIDE = 'L'     SIDE = 'R'
 *> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**C * C       C * Q**C
+*> TRANS = 'C':      Q**H * C       C * Q**H
 *>      where Q is a real orthogonal matrix defined as the product
 *>      of blocked elementary reflectors computed by tall skinny
 *>      QR factorization (ZLATSQR)
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**T from the Left;
-*>          = 'R': apply Q or Q**T from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Conjugate Transpose, apply Q**C.
+*>          = 'C':  Conjugate Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
@@ -81,7 +81,7 @@
 *>          N >= NB >= 1.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,K)
 *>          The i-th column must contain the vector which defines the
 *> \verbatim
 *>          C is COMPLEX*16 array, dimension (LDC,N)
 *>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
 *> \param[in] LDC
       SUBROUTINE ZLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T,
      $        LDT, C, LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER         SIDE, TRANS
index f945672..03afb87 100644 (file)
 *
 *> \param[in] N
 *> \verbatim
-*>          N is integer
+*>          N is INTEGER
 *>              Order of the matrix H. N must be either 2 or 3.
 *> \endverbatim
 *>
 *> \param[in] H
 *> \verbatim
-*>          H is COMPLEX*16 array of dimension (LDH,N)
+*>          H is COMPLEX*16 array, dimension (LDH,N)
 *>              The 2-by-2 or 3-by-3 matrix H in (*).
 *> \endverbatim
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>              The leading dimension of H as declared in
 *>              the calling procedure.  LDH.GE.N
 *> \endverbatim
@@ -81,7 +81,7 @@
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is COMPLEX*16 array of dimension N
+*>          V is COMPLEX*16 array, dimension (N)
 *>              A scalar multiple of the first column of the
 *>              matrix K in (*).
 *> \endverbatim
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       COMPLEX*16         S1, S2
index d8396d2..e6e2ea4 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SH
 *> \verbatim
-*>          SH is COMPLEX*16 array, dimension KBOT
+*>          SH is COMPLEX*16 array, dimension (KBOT)
 *>          On output, approximate eigenvalues that may
 *>          be used for shifts are stored in SH(KBOT-ND-NS+1)
 *>          through SR(KBOT-ND).  Converged eigenvalues are
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
      $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
      $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
index 402644f..64ab59f 100644 (file)
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
+*>          LDH is INTEGER
 *>          Leading dimension of H just as declared in the calling
 *>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
+*>          LDZ is INTEGER
 *>          The leading dimension of Z just as declared in the
 *>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
 *> \param[out] NS
 *> \verbatim
-*>          NS is integer
+*>          NS is INTEGER
 *>          The number of unconverged (ie approximate) eigenvalues
 *>          returned in SR and SI that may be used as shifts by the
 *>          calling subroutine.
 *>
 *> \param[out] ND
 *> \verbatim
-*>          ND is integer
+*>          ND is INTEGER
 *>          The number of converged eigenvalues uncovered by this
 *>          subroutine.
 *> \endverbatim
 *>
 *> \param[out] SH
 *> \verbatim
-*>          SH is COMPLEX*16 array, dimension KBOT
+*>          SH is COMPLEX*16 array, dimension (KBOT)
 *>          On output, approximate eigenvalues that may
 *>          be used for shifts are stored in SH(KBOT-ND-NS+1)
 *>          through SR(KBOT-ND).  Converged eigenvalues are
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>          The leading dimension of V just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>          The number of columns of T.  NH.GE.NW.
 *> \endverbatim
 *>
 *>
 *> \param[in] LDT
 *> \verbatim
-*>          LDT is integer
+*>          LDT is INTEGER
 *>          The leading dimension of T just as declared in the
 *>          calling subroutine.  NW .LE. LDT
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
+*>          NV is INTEGER
 *>          The number of rows of work array WV available for
 *>          workspace.  NV.GE.NW.
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
+*>          LDWV is INTEGER
 *>          The leading dimension of W just as declared in the
 *>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
 *>          On exit, WORK(1) is set to an estimate of the optimal value
 *>          of LWORK for the given values of N, NW, KTOP and KBOT.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
-*>          LWORK is integer
+*>          LWORK is INTEGER
 *>          The dimension of the work array WORK.  LWORK = 2*NW
 *>          suffices, but greater efficiency may result from larger
 *>          values of LWORK.
      $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
      $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 3e0392c..0dfbce8 100644 (file)
 *
 *> \param[in] WANTT
 *> \verbatim
-*>          WANTT is logical scalar
+*>          WANTT is LOGICAL
 *>             WANTT = .true. if the triangular Schur factor
 *>             is being computed.  WANTT is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] WANTZ
 *> \verbatim
-*>          WANTZ is logical scalar
+*>          WANTZ is LOGICAL
 *>             WANTZ = .true. if the unitary Schur factor is being
 *>             computed.  WANTZ is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] KACC22
 *> \verbatim
-*>          KACC22 is integer with value 0, 1, or 2.
+*>          KACC22 is INTEGER with value 0, 1, or 2.
 *>             Specifies the computation mode of far-from-diagonal
 *>             orthogonal updates.
 *>        = 0: ZLAQR5 does not accumulate reflections and does not
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
+*>          N is INTEGER
 *>             N is the order of the Hessenberg matrix H upon which this
 *>             subroutine operates.
 *> \endverbatim
 *>
 *> \param[in] KTOP
 *> \verbatim
-*>          KTOP is integer scalar
+*>          KTOP is INTEGER
 *> \endverbatim
 *>
 *> \param[in] KBOT
 *> \verbatim
-*>          KBOT is integer scalar
+*>          KBOT is INTEGER
 *>             These are the first and last rows and columns of an
 *>             isolated diagonal block upon which the QR sweep is to be
 *>             applied. It is assumed without a check that
 *>
 *> \param[in] NSHFTS
 *> \verbatim
-*>          NSHFTS is integer scalar
+*>          NSHFTS is INTEGER
 *>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
 *>             must be positive and even.
 *> \endverbatim
 *>
 *> \param[in,out] S
 *> \verbatim
-*>          S is COMPLEX*16 array of size (NSHFTS)
+*>          S is COMPLEX*16 array, dimension (NSHFTS)
 *>             S contains the shifts of origin that define the multi-
 *>             shift QR sweep.  On output S may be reordered.
 *> \endverbatim
 *>
 *> \param[in,out] H
 *> \verbatim
-*>          H is COMPLEX*16 array of size (LDH,N)
+*>          H is COMPLEX*16 array, dimension (LDH,N)
 *>             On input H contains a Hessenberg matrix.  On output a
 *>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
 *>             to the isolated diagonal block in rows and columns KTOP
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer scalar
+*>          LDH is INTEGER
 *>             LDH is the leading dimension of H just as declared in the
 *>             calling procedure.  LDH.GE.MAX(1,N).
 *> \endverbatim
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is COMPLEX*16 array of size (LDZ,IHIZ)
+*>          Z is COMPLEX*16 array, dimension (LDZ,IHIZ)
 *>             If WANTZ = .TRUE., then the QR Sweep unitary
 *>             similarity transformation is accumulated into
 *>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer scalar
+*>          LDZ is INTEGER
 *>             LDA is the leading dimension of Z just as declared in
 *>             the calling procedure. LDZ.GE.N.
 *> \endverbatim
 *>
 *> \param[out] V
 *> \verbatim
-*>          V is COMPLEX*16 array of size (LDV,NSHFTS/2)
+*>          V is COMPLEX*16 array, dimension (LDV,NSHFTS/2)
 *> \endverbatim
 *>
 *> \param[in] LDV
 *> \verbatim
-*>          LDV is integer scalar
+*>          LDV is INTEGER
 *>             LDV is the leading dimension of V as declared in the
 *>             calling procedure.  LDV.GE.3.
 *> \endverbatim
 *>
 *> \param[out] U
 *> \verbatim
-*>          U is COMPLEX*16 array of size
-*>             (LDU,3*NSHFTS-3)
+*>          U is COMPLEX*16 array, dimension (LDU,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDU
 *> \verbatim
-*>          LDU is integer scalar
+*>          LDU is INTEGER
 *>             LDU is the leading dimension of U just as declared in the
 *>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
-*>          NH is integer scalar
+*>          NH is INTEGER
 *>             NH is the number of columns in array WH available for
 *>             workspace. NH.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WH
 *> \verbatim
-*>          WH is COMPLEX*16 array of size (LDWH,NH)
+*>          WH is COMPLEX*16 array, dimension (LDWH,NH)
 *> \endverbatim
 *>
 *> \param[in] LDWH
 *> \verbatim
-*>          LDWH is integer scalar
+*>          LDWH is INTEGER
 *>             Leading dimension of WH just as declared in the
 *>             calling procedure.  LDWH.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer scalar
+*>          NV is INTEGER
 *>             NV is the number of rows in WV agailable for workspace.
 *>             NV.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WV
 *> \verbatim
-*>          WV is COMPLEX*16 array of size
-*>             (LDWV,3*NSHFTS-3)
+*>          WV is COMPLEX*16 array, dimension (LDWV,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer scalar
+*>          LDWV is INTEGER
 *>             LDWV is the leading dimension of WV as declared in the
 *>             in the calling subroutine.  LDWV.GE.NV.
 *> \endverbatim
      $                   H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
      $                   WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 76ca452..081d391 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             BETA = BETA*RSAFMN
             ALPHI = ALPHI*RSAFMN
             ALPHR = ALPHR*RSAFMN
-            IF( ABS( BETA ).LT.SAFMIN .AND. KNT .LT. 1000)
+            IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SAFMIN
index 32e55ea..c9e55a5 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZLARFGP( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
             BETA = BETA*BIGNUM
             ALPHI = ALPHI*BIGNUM
             ALPHR = ALPHR*BIGNUM
-            IF( ABS( BETA ).LT.SMLNUM .AND. KNT .LT. 1000)
+            IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) )
      $         GO TO 10
 *
 *           New BETA is at most 1, at least SMLNUM
index c765681..67a6758 100644 (file)
      $                   IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
 *     ..
 
       INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
+*
 *     The first N entries of WORK are reserved for the eigenvalues
       INDLD = N+1
       INDLLD= 2*N+1
index cd7bcc3..24dd41d 100644 (file)
@@ -55,7 +55,7 @@
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the elements on and bleow the diagonal
+*>          On exit, the elements on and below the diagonal
 *>          of the array contain the N-by-N lower triangular matrix L;
 *>          the elements above the diagonal represent Q by the rows
 *>          of blocked V (see Further Details).
       SUBROUTINE ZLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK,
      $                  INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER           INFO, LDA, M, N, MB, NB, LWORK, LDT
index 81ceba2..13c0f9b 100644 (file)
 *> \verbatim
 *>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
 *>          The vector of pivot indices. Only the elements in positions
-*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
-*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*>          K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed.
+*>          IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be
+*>          interchanged.
 *> \endverbatim
 *>
 *> \param[in] INCX
 *> \verbatim
 *>          INCX is INTEGER
-*>          The increment between successive values of IPIV.  If IPIV
+*>          The increment between successive values of IPIV. If INCX
 *>          is negative, the pivots are applied in reverse order.
 *> \endverbatim
 *
@@ -98,7 +99,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, K1, K2, LDA, N
 *     ..
 *     .. Executable Statements ..
 *
-*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
+*     Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows
+*     K1 through K2.
 *
       IF( INCX.GT.0 ) THEN
          IX0 = K1
index 7ac4ff3..f321b72 100644 (file)
 *  ===========
 *
 *       SUBROUTINE ZLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-*                             H, LDH, WORK, INFO )
+*                             H, LDH, WORK )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            J1, M, NB, LDA, LDH, INFO
+*       INTEGER            J1, M, NB, LDA, LDH
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IPIV( * )
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] IPIV
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
+*>          IPIV is INTEGER array, dimension (M)
 *>          Details of the row and column interchanges,
 *>          the row and column k were interchanged with the row and
 *>          column IPIV(k).
 *>          WORK is COMPLEX*16 workspace, dimension (M).
 *> \endverbatim
 *>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
-*> \endverbatim
 *
 *  Authors:
 *  ========
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  =====================================================================
       SUBROUTINE ZLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV,
-     $                         H, LDH, WORK, INFO )
+     $                         H, LDH, WORK )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            M, NB, J1, LDA, LDH, INFO
+      INTEGER            M, NB, J1, LDA, LDH
 *     ..
 *     .. Array Arguments ..
       INTEGER            IPIV( * )
       PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
 *
 *     .. Local Scalars ..
-      INTEGER            J, K, K1, I1, I2
+      INTEGER            J, K, K1, I1, I2, MJ
       COMPLEX*16         PIV, ALPHA
 *     ..
 *     .. External Functions ..
       EXTERNAL           LSAME, ILAENV, IZAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           ZGEMV, ZAXPY, ZSCAL, ZCOPY, ZSWAP, ZLASET,
+     $                   XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
       J = 1
 *
 *     K1 is the first column of the panel to be factorized
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J),
-*         where H(J:N, J) has been initialized to be A(J, J:N)
+*        H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J),
+*         where H(J:M, J) has been initialized to be A(J, J:M)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL ZGEMV( 'No transpose', M-J+1, J-K1,
+            CALL ZGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( 1, J ), 1,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(i:n, i) into WORK
+*        Copy H(i:M, i) into WORK
 *
-         CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL ZCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J-1, J:N) * T(J-1,J),
-*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N)
+*           Compute WORK := WORK - L(J-1, J:M) * T(J-1,J),
+*            where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M)
 *
             ALPHA = -A( K-1, J )
-            CALL ZAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
+            CALL ZAXPY( MJ, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L(J, (J+1):N)
-*            where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N)
+*           Compute WORK(2:M) = T(J, J) L(J, (J+1):M)
+*            where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( K, J )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = IZAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1, I1+1:N) with A(I1+1:N, I2)
+*              Swap A(I1, I1+1:M) with A(I1+1:M, I2)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL ZSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA,
      $                              A( J1+I1, I2 ), 1 )
 *
-*              Swap A(I1, I2+1:N) with A(I2, I2+1:N)
+*              Swap A(I1, I2+1:M) with A(I2, I2+1:M)
 *
                CALL ZSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA,
      $                           A( J1+I2-1, I2+1 ), LDA )
 *           Set A(J, J+1) = T(J, J+1)
 *
             A( K, J+1 ) = WORK( 2 )
-            IF( (A( K, J ).EQ.ZERO ) .AND.
-     $        ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN
-                IF(INFO .EQ. 0) THEN
-                    INFO = J
-                ENDIF
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J:N, J),
+*              Copy A(J+1:M, J+1) into H(J:M, J),
 *
                CALL ZCOPY( M-J, A( K+1, J+1 ), LDA,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( K, J+1 ).NE.ZERO ) THEN
                ALPHA = ONE / A( K, J+1 )
                CALL ZLASET( 'Full', 1, M-J-1, ZERO, ZERO,
      $                      A( K, J+2 ), LDA)
             END IF
-         ELSE
-            IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 10
 *         > for the rest of the columns, J1 is 2, and J1+J-1 is J+1,
 *
          K = J1+J-1
+         IF( J.EQ.M ) THEN
+*
+*            Only need to compute T(J, J)
+*
+             MJ = 1
+         ELSE
+             MJ = M-J+1
+         END IF
 *
-*        H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T,
-*         where H(J:N, J) has been initialized to be A(J:N, J)
+*        H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T,
+*         where H(J:M, J) has been initialized to be A(J:M, J)
 *
          IF( K.GT.2 ) THEN
 *
 *         > for the rest of the columns, K is J+1, skipping only the
 *           first column
 *
-            CALL ZGEMV( 'No transpose', M-J+1, J-K1,
+            CALL ZGEMV( 'No transpose', MJ, J-K1,
      $                 -ONE, H( J, K1 ), LDH,
      $                       A( J, 1 ), LDA,
      $                  ONE, H( J, J ), 1 )
          END IF
 *
-*        Copy H(J:N, J) into WORK
+*        Copy H(J:M, J) into WORK
 *
-         CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 )
+         CALL ZCOPY( MJ, H( J, J ), 1, WORK( 1 ), 1 )
 *
          IF( J.GT.K1 ) THEN
 *
-*           Compute WORK := WORK - L(J:N, J-1) * T(J-1,J),
+*           Compute WORK := WORK - L(J:M, J-1) * T(J-1,J),
 *            where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1)
 *
             ALPHA = -A( J, K-1 )
-            CALL ZAXPY( M-J+1, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
+            CALL ZAXPY( MJ, ALPHA, A( J, K-2 ), 1, WORK( 1 ), 1 )
          END IF
 *
 *        Set A(J, J) = T(J, J)
 *
          IF( J.LT.M ) THEN
 *
-*           Compute WORK(2:N) = T(J, J) L((J+1):N, J)
-*            where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J)
+*           Compute WORK(2:M) = T(J, J) L((J+1):M, J)
+*            where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J)
 *
             IF( K.GT.1 ) THEN
                ALPHA = -A( J, K )
      $                                 WORK( 2 ), 1 )
             ENDIF
 *
-*           Find max(|WORK(2:n)|)
+*           Find max(|WORK(2:M)|)
 *
             I2 = IZAMAX( M-J, WORK( 2 ), 1 ) + 1
             PIV = WORK( I2 )
                WORK( I2 ) = WORK( I1 )
                WORK( I1 ) = PIV
 *
-*              Swap A(I1+1:N, I1) with A(I2, I1+1:N)
+*              Swap A(I1+1:M, I1) with A(I2, I1+1:M)
 *
                I1 = I1+J-1
                I2 = I2+J-1
                CALL ZSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1,
      $                              A( I2, J1+I1 ), LDA )
 *
-*              Swap A(I2+1:N, I1) with A(I2+1:N, I2)
+*              Swap A(I2+1:M, I1) with A(I2+1:M, I2)
 *
                CALL ZSWAP( M-I2, A( I2+1, J1+I1-1 ), 1,
      $                           A( I2+1, J1+I2-1 ), 1 )
 *           Set A(J+1, J) = T(J+1, J)
 *
             A( J+1, K ) = WORK( 2 )
-            IF( (A( J, K ).EQ.ZERO) .AND.
-     $        ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN
-                IF (INFO .EQ. 0)
-     $              INFO = J
-            END IF
 *
             IF( J.LT.NB ) THEN
 *
-*              Copy A(J+1:N, J+1) into H(J+1:N, J),
+*              Copy A(J+1:M, J+1) into H(J+1:M, J),
 *
                CALL ZCOPY( M-J, A( J+1, K+1 ), 1,
      $                          H( J+1, J+1 ), 1 )
             END IF
 *
-*           Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1),
-*            where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1)
+*           Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1),
+*            where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1)
 *
             IF( A( J+1, K ).NE.ZERO ) THEN
                ALPHA = ONE / A( J+1, K )
                CALL ZLASET( 'Full', M-J-1, 1, ZERO, ZERO,
      $                      A( J+2, K ), LDA )
             END IF
-         ELSE
-            IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN
-               INFO = J
-            END IF
          END IF
          J = J + 1
          GO TO 30
index ef2d67c..c9d672a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
       SUBROUTINE ZLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
      $                   SCALE, CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
      $                   ZDOTU, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTBSV
+      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTBSV, DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
index d652338..ac148ca 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
       SUBROUTINE ZLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
      $                   CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
      $                   ZDOTU, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTPSV
+      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTPSV, DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
index 36ddba9..f06ac4a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERauxiliary
 *
       SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
      $                   CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
      $                   ZDOTU, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV
+      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV, DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
index 7809372..b6be431 100644 (file)
 *>
 *> \param[out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array,
-*>                                         dimension (LRWORK)
+*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
 *>          On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
       SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
      $                   LRWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPZ
index 71f304c..5ad9810 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $           ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $           LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 681c87a..ac7552a 100644 (file)
 *>
 *> \param[out] ISUPPZ
 *> \verbatim
-*>          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*>          ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th computed eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
      $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index f279f3c..8568459 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND,
      $                     WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 5bd9319..b26bfd6 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZSYCONVF( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE ZSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE ZSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index daddd26..5c36f4b 100644 (file)
@@ -18,7 +18,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZSYCONVF_ROOK( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*       SUBROUTINE ZSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE ZSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
index 715f32b..1cf4119 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  =====================================================================
       SUBROUTINE ZSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
       EXTERNAL           DLAMCH, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
+      EXTERNAL           ZLASSQ, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DIMAG, INT, LOG, MAX, MIN, SQRT
index c650bed..10693c7 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYsolve
 *
       SUBROUTINE ZSYSV_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                     LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK driver routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           ILAENV, LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZSYTRF, ZSYTRS, ZSYTRS2
+      EXTERNAL           XERBLA, ZSYTRF_AA, ZSYTRS_AA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/zsysv_aa_2stage.f b/lapack-netlib/SRC/zsysv_aa_2stage.f
new file mode 100644 (file)
index 0000000..fcf9bc8
--- /dev/null
@@ -0,0 +1,276 @@
+*> \brief <b> ZSYSV_AA_2STAGE computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZSYSV_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsysv_aasen_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsysv_aasen_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsysv_aasen_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+*                                  IPIV, IPIV2, B, LDB, WORK, LWORK,
+*                                  INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, *), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZSYSV_AA_2STAGE computes the solution to a complex system of
+*> linear equations
+*>    A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Aasen's 2-stage algorithm is used to factor A as
+*>    A = U * T * U**H,  if UPLO = 'U', or
+*>    A = L * T * L**H,  if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is symmetric and band. The matrix T is
+*> then LU-factored with partial pivoting. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX*16 array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16SYcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZSYSV_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                            IPIV, IPIV2, B, LDB, WORK, LWORK,
+     $                            INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LDB, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            LWKOPT
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZSYTRF_AA_2STAGE,
+     $                   ZSYTRS_AA_2STAGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         CALL ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, -1, IPIV,
+     $                          IPIV2, WORK, -1, INFO )
+         LWKOPT = INT( WORK(1) )
+         IF( LTB.LT.INT( TB(1) ) .AND. .NOT.TQUERY ) THEN
+            INFO = -7
+         ELSE IF( LWORK.LT.LWKOPT .AND. .NOT.WQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSYSV_AA_2STAGE', -INFO )
+         RETURN
+      ELSE IF( WQUERY .OR. TQUERY ) THEN
+         RETURN
+      END IF
+*
+*
+*     Compute the factorization A = U*T*U**H or A = L*T*L**H.
+*
+      CALL ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV, IPIV2,
+     $                       WORK, LWORK, INFO )
+      IF( INFO.EQ.0 ) THEN
+*
+*        Solve the system A*X = B, overwriting B with X.
+*
+         CALL ZSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV,
+     $                          IPIV2, B, LDB, INFO )
+*
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+*
+*     End of ZSYSV_AA_2STAGE
+*
+      END
index 02f8cdd..b25b1fb 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
-*>                has been completed, but the block diagonal matrix D is
-*>                exactly singular, and division by zero will occur if it
-*>                is used to solve a system of equations.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  =====================================================================
       SUBROUTINE ZSYTRF_AA( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
 *
 *     .. Local Scalars ..
       LOGICAL            LQUERY, UPPER
-      INTEGER            J, LWKOPT, IINFO
+      INTEGER            J, LWKOPT
       INTEGER            NB, MJ, NJ, K1, K2, J1, J2, J3, JB
       COMPLEX*16         ALPHA
 *     ..
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           ZLASYF_AA, ZGEMM, ZGEMV, ZSCAL, ZCOPY,
+     $                   ZSWAP, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *
 *     Determine the block size
 *
-      NB = ILAENV( 1, 'ZSYTRF', UPLO, N, -1, -1, -1 )
+      NB = ILAENV( 1, 'ZSYTRF_AA', UPLO, N, -1, -1, -1 )
 *
 *     Test the input parameters.
 *
       ENDIF
       IPIV( 1 ) = 1
       IF ( N.EQ.1 ) THEN
-         IF ( A( 1, 1 ).EQ.ZERO ) THEN
-            INFO = 1
-         END IF
          RETURN
       END IF
 *
-*     Adjubst block size based on the workspace size
+*     Adjust block size based on the workspace size
 *
       IF( LWORK.LT.((1+NB)*N) ) THEN
          NB = ( LWORK-N ) / N
 *
          CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                   A( MAX(1, J), J+1 ), LDA,
-     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ),
-     $                      IINFO )
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-             INFO = IINFO+J
-         ENDIF
+     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
 *
          CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB,
      $                   A( J+1, MAX(1, J) ), LDA,
-     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO)
-         IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN
-            INFO = IINFO+J
-         ENDIF
+     $                   IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) )
 *
 *        Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot)
 *
diff --git a/lapack-netlib/SRC/zsytrf_aa_2stage.f b/lapack-netlib/SRC/zsytrf_aa_2stage.f
new file mode 100644 (file)
index 0000000..1f91672
--- /dev/null
@@ -0,0 +1,668 @@
+*> \brief \b ZSYTRF_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZSYTRF_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/csytrf_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+*                                   IPIV2, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, LDA, LTB, LWORK, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), WORK( * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZSYTRF_AA_2STAGE computes the factorization of a complex symmetric matrix A
+*> using the Aasen's algorithm.  The form of the factorization is
+*>
+*>    A = U*T*U**T  or  A = L*T*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and T is a complex symmetric band matrix with the
+*> bandwidth of NB (NB is internally selected and stored in TB( 1 ), and T is 
+*> LU factorized with partial pivoting).
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, L is stored below (or above) the subdiaonal blocks,
+*>          when UPLO  is 'L' (or 'U').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX*16 array, dimension (LTB)
+*>          On exit, details of the LU factorization of the band matrix.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N, internally
+*>          used to select NB such that LTB >= (3*NB+1)*N.
+*>
+*>          If LTB = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of LTB, 
+*>          returns this value as the first entry of TB, and
+*>          no error message related to LTB is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of A were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] IPIV2
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          On exit, it contains the details of the interchanges, i.e.,
+*>          the row and column k of T were interchanged with the
+*>          row and column IPIV(k).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 workspace of size LWORK
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          The size of WORK. LWORK >= N, internally used to select NB
+*>          such that LWORK >= N*NB.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the WORK array,
+*>          returns this value as the first entry of the WORK array, and
+*>          no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, band LU factorization failed on i-th column
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16SYcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZSYTRF_AA_2STAGE( UPLO, N, A, LDA, TB, LTB, IPIV,
+     $                             IPIV2, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, LDA, LTB, LWORK, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), TB( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*     .. Parameters ..
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                     CONE  = ( 1.0D+0, 0.0D+0 ) )
+*
+*     .. Local Scalars ..
+      LOGICAL            UPPER, TQUERY, WQUERY
+      INTEGER            I, J, K, I1, I2, TD
+      INTEGER            LDTB, NB, KB, JB, NT, IINFO
+      COMPLEX*16         PIV
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZCOPY, ZGBTRF, ZGEMM, ZGETRF,  
+     $                   ZLACPY, ZLASET, ZLASWP, ZTRSM, ZSWAP 
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      WQUERY = ( LWORK.EQ.-1 )
+      TQUERY = ( LTB.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF ( LTB .LT. 4*N .AND. .NOT.TQUERY ) THEN
+         INFO = -6
+      ELSE IF ( LWORK .LT. N .AND. .NOT.WQUERY ) THEN
+         INFO = -10
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSYTRF_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Answer the query
+*
+      NB = ILAENV( 1, 'ZSYTRF_AA_2STAGE', UPLO, N, -1, -1, -1 )
+      IF( INFO.EQ.0 ) THEN
+         IF( TQUERY ) THEN
+            TB( 1 ) = (3*NB+1)*N
+         END IF
+         IF( WQUERY ) THEN
+            WORK( 1 ) = N*NB
+         END IF
+      END IF
+      IF( TQUERY .OR. WQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return
+*
+      IF ( N.EQ.0 ) THEN
+         RETURN
+      ENDIF
+*
+*     Determine the number of the block size
+*
+      LDTB = LTB/N
+      IF( LDTB .LT. 3*NB+1 ) THEN
+         NB = (LDTB-1)/3
+      END IF
+      IF( LWORK .LT. NB*N ) THEN
+         NB = LWORK/N
+      END IF
+*
+*     Determine the number of the block columns
+*
+      NT = (N+NB-1)/NB
+      TD = 2*NB
+      KB = MIN(NB, N)
+*
+*     Initialize vectors/matrices
+*
+      DO J = 1, KB
+         IPIV( J ) = J
+      END DO
+*
+*     Save NB
+*
+      TB( 1 ) = NB
+*
+      IF( UPPER ) THEN
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the upper triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*U(I,J) + T(I+1,I)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                           A( (I-1)*NB+1, J*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*U(I-1,J) + T(I,I)*U(I,J) + T(I,I+1)*U(I+1,J)
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                           A( (I-2)*NB+1, J*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL ZLACPY( 'Upper', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = U(1:J,J)'*H(1:J)             
+               CALL ZGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -CONE, A( 1, J*NB+1 ), LDA,
+     $                       WORK( NB+1 ), N,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += U(J,J)'*T(J,J-1)*U(J-1,J)
+               CALL ZGEMM( 'Transpose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 CONE,  A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 CZERO, WORK( 1 ), N )
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, NB,
+     $                -CONE, WORK( 1 ), N,
+     $                       A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+     $                = TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+               END DO
+            END DO
+            IF( J.GT.0 ) THEN 
+c               CALL CHEGST( 1, 'Upper', KB, 
+c     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1, 
+c     $                      A( (J-1)*NB+1, J*NB+1 ), LDA, IINFO )
+               CALL ZTRSM( 'L', 'U', 'T', 'N', KB, KB, CONE,
+     $                     A( (J-1)*NB+1, J*NB+1 ), LDA, 
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+               CALL ZTRSM( 'R', 'U', 'N', 'N', KB, KB, CONE,
+     $                     A( (J-1)*NB+1, J*NB+1 ), LDA, 
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                       KB, KB, KB,
+     $                       CONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                              A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                       CZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                      KB, KB, NB+KB,
+     $                      CONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                             A( (J-2)*NB+1, J*NB+1 ), LDA,
+     $                      CZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL ZGEMM( 'Transpose', 'NoTranspose',
+     $                    NB, N-(J+1)*NB, J*NB,
+     $                    -CONE, WORK( NB+1 ), N,
+     $                           A( 1, (J+1)*NB+1 ), LDA,
+     $                     CONE, A( J*NB+1, (J+1)*NB+1 ), LDA )
+               END IF
+*
+*              Copy panel to workspace to call ZGETRF
+*
+               DO K = 1, NB
+                   CALL ZCOPY( N-(J+1)*NB,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA,
+     $                         WORK( 1+(K-1)*N ), 1 )
+               END DO
+*
+*              Factorize panel
+*
+               CALL ZGETRF( N-(J+1)*NB, NB, 
+     $                      WORK, N,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*
+*              Copy panel back
+*
+               DO K = 1, NB
+                   CALL ZCOPY( N-(J+1)*NB,
+     $                         WORK( 1+(K-1)*N ), 1,
+     $                         A( J*NB+K, (J+1)*NB+1 ), LDA )
+               END DO
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL ZLASET( 'Full', KB, NB, CZERO, CZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL ZLACPY( 'Upper', KB, NB,
+     $                      WORK, N,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL ZTRSM( 'R', 'U', 'N', 'U', KB, NB, CONE,
+     $                        A( (J-1)*NB+1, J*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J,J+1) into T(J+1, J), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB )
+     $                  = TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL ZLASET( 'Lower', KB, NB, CZERO, CONE, 
+     $                      A( J*NB+1, (J+1)*NB+1), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL ZSWAP( K-1, A( (J+1)*NB+1, I1 ), 1, 
+     $                                A( (J+1)*NB+1, I2 ), 1 )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL ZSWAP( I2-I1-1, A( I1, I1+1 ), LDA,
+     $                                    A( I1+1, I2 ), 1 )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL ZSWAP( N-I2, A( I1, I2+1 ), LDA,
+     $                                 A( I2, I2+1 ), LDA ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL ZSWAP( J*NB, A( 1, I1 ), 1,
+     $                                    A( 1, I2 ), 1 )
+                     END IF
+                  ENDIF   
+               END DO   
+            END IF
+         END DO
+      ELSE
+*
+*        .....................................................
+*        Factorize A as L*D*L**T using the lower triangle of A
+*        .....................................................
+*
+         DO J = 0, NT-1
+*         
+*           Generate Jth column of W and H
+*
+            KB = MIN(NB, N-J*NB)
+            DO I = 1, J-1
+               IF( I.EQ.1 ) THEN
+*                  H(I,J) = T(I,I)*L(J,I)' + T(I+1,I)'*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = NB+KB
+                  ELSE
+                     JB = 2*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    CONE, TB( TD+1 + (I*NB)*LDTB ), LDTB-1,
+     $                          A( J*NB+1, (I-1)*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               ELSE
+*                 H(I,J) = T(I,I-1)*L(J,I-1)' + T(I,I)*L(J,I)' + T(I,I+1)*L(J,I+1)'
+                  IF( I .EQ. (J-1) ) THEN
+                     JB = 2*NB+KB
+                  ELSE
+                     JB = 3*NB
+                  END IF
+                  CALL ZGEMM( 'NoTranspose', 'Transpose',
+     $                    NB, KB, JB,
+     $                    CONE,  TB( TD+NB+1 + ((I-1)*NB)*LDTB ),
+     $                       LDTB-1,
+     $                           A( J*NB+1, (I-2)*NB+1 ), LDA,
+     $                    CZERO, WORK( I*NB+1 ), N )
+               END IF
+            END DO
+*         
+*           Compute T(J,J)
+*     
+            CALL ZLACPY( 'Lower', KB, KB, A( J*NB+1, J*NB+1 ), LDA,
+     $                   TB( TD+1 + (J*NB)*LDTB ), LDTB-1 ) 
+            IF( J.GT.1 ) THEN
+*              T(J,J) = L(J,1:J)*H(1:J)             
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, KB, (J-1)*NB,
+     $                -CONE, A( J*NB+1, 1 ), LDA,
+     $                       WORK( NB+1 ), N,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+*              T(J,J) += L(J,J)*T(J,J-1)*L(J,J-1)'
+               CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                 KB, NB, KB,
+     $                 CONE,  A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + ((J-1)*NB)*LDTB ), LDTB-1,
+     $                 CZERO, WORK( 1 ), N )
+               CALL ZGEMM( 'NoTranspose', 'Transpose',
+     $                 KB, KB, NB,
+     $                -CONE, WORK( 1 ), N,
+     $                       A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                 CONE, TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Expand T(J,J) into full format
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+            IF( J.GT.0 ) THEN 
+c               CALL CHEGST( 1, 'Lower', KB, 
+c     $                      TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+c     $                      A( J*NB+1, (J-1)*NB+1 ), LDA, IINFO )
+               CALL ZTRSM( 'L', 'L', 'N', 'N', KB, KB, CONE,
+     $                     A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+               CALL ZTRSM( 'R', 'L', 'T', 'N', KB, KB, CONE,
+     $                     A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                     TB( TD+1 + (J*NB)*LDTB ), LDTB-1 )
+            END IF
+*
+*           Symmetrize T(J,J)
+*
+            DO I = 1, KB
+               DO K = I+1, KB
+                  TB( TD-(K-(I+1)) + (J*NB+K-1)*LDTB )
+     $                = TB( TD+(K-I)+1 + (J*NB+I-1)*LDTB )
+               END DO
+            END DO
+*
+            IF( J.LT.NT-1 ) THEN
+               IF( J.GT.0 ) THEN
+*
+*                 Compute H(J,J)
+*
+                  IF( J.EQ.1 ) THEN
+                     CALL ZGEMM( 'NoTranspose', 'Transpose',
+     $                       KB, KB, KB,
+     $                       CONE,  TB( TD+1 + (J*NB)*LDTB ), LDTB-1,
+     $                              A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                       CZERO, WORK( J*NB+1 ), N )
+                  ELSE
+                     CALL ZGEMM( 'NoTranspose', 'Transpose',
+     $                      KB, KB, NB+KB,
+     $                      CONE, TB( TD+NB+1 + ((J-1)*NB)*LDTB ),
+     $                         LDTB-1,
+     $                             A( J*NB+1, (J-2)*NB+1 ), LDA,
+     $                      CZERO, WORK( J*NB+1 ), N )
+                  END IF
+*
+*                 Update with the previous column
+*
+                  CALL ZGEMM( 'NoTranspose', 'NoTranspose',
+     $                    N-(J+1)*NB, NB, J*NB,
+     $                    -CONE, A( (J+1)*NB+1, 1 ), LDA,
+     $                           WORK( NB+1 ), N,
+     $                     CONE, A( (J+1)*NB+1, J*NB+1 ), LDA )
+               END IF
+*
+*              Factorize panel
+*
+               CALL ZGETRF( N-(J+1)*NB, NB, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      IPIV( (J+1)*NB+1 ), IINFO )
+c               IF (IINFO.NE.0 .AND. INFO.EQ.0) THEN
+c                  INFO = IINFO+(J+1)*NB
+c               END IF
+*         
+*              Compute T(J+1, J), zero out for GEMM update
+*     
+               KB = MIN(NB, N-(J+1)*NB)
+               CALL ZLASET( 'Full', KB, NB, CZERO, CZERO, 
+     $                      TB( TD+NB+1 + (J*NB)*LDTB), LDTB-1 )
+               CALL ZLACPY( 'Upper', KB, NB,
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA,
+     $                      TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               IF( J.GT.0 ) THEN 
+                  CALL ZTRSM( 'R', 'L', 'T', 'U', KB, NB, CONE,
+     $                        A( J*NB+1, (J-1)*NB+1 ), LDA,
+     $                        TB( TD+NB+1 + (J*NB)*LDTB ), LDTB-1 )
+               END IF
+*
+*              Copy T(J+1,J) into T(J, J+1), both upper/lower for GEMM
+*              updates
+*
+               DO K = 1, NB
+                  DO I = 1, KB
+                     TB( TD-NB+K-I+1 + (J*NB+NB+I-1)*LDTB ) =
+     $                  TB( TD+NB+I-K+1 + (J*NB+K-1)*LDTB )
+                  END DO
+               END DO
+               CALL ZLASET( 'Upper', KB, NB, CZERO, CONE, 
+     $                      A( (J+1)*NB+1, J*NB+1 ), LDA )
+*              
+*              Apply pivots to trailing submatrix of A
+*     
+               DO K = 1, KB
+*                 > Adjust ipiv               
+                  IPIV( (J+1)*NB+K ) = IPIV( (J+1)*NB+K ) + (J+1)*NB
+*                  
+                  I1 = (J+1)*NB+K
+                  I2 = IPIV( (J+1)*NB+K )
+                  IF( I1.NE.I2 ) THEN 
+*                    > Apply pivots to previous columns of L
+                     CALL ZSWAP( K-1, A( I1, (J+1)*NB+1 ), LDA, 
+     $                                A( I2, (J+1)*NB+1 ), LDA )
+*                    > Swap A(I1+1:M, I1) with A(I2, I1+1:M)               
+                     CALL ZSWAP( I2-I1-1, A( I1+1, I1 ), 1,
+     $                                    A( I2, I1+1 ), LDA )
+*                    > Swap A(I2+1:M, I1) with A(I2+1:M, I2)
+                     CALL ZSWAP( N-I2, A( I2+1, I1 ), 1,
+     $                                 A( I2+1, I2 ), 1 ) 
+*                    > Swap A(I1, I1) with A(I2, I2)
+                     PIV = A( I1, I1 )
+                     A( I1, I1 ) = A( I2, I2 )
+                     A( I2, I2 ) = PIV
+*                    > Apply pivots to previous columns of L
+                     IF( J.GT.0 ) THEN
+                        CALL ZSWAP( J*NB, A( I1, 1 ), LDA,
+     $                                    A( I2, 1 ), LDA )
+                     END IF
+                  ENDIF   
+               END DO   
+*         
+*              Apply pivots to previous columns of L
+*         
+c               CALL ZLASWP( J*NB, A( 1, 1 ), LDA, 
+c     $                     (J+1)*NB+1, (J+1)*NB+KB, IPIV, 1 )
+            END IF
+         END DO
+      END IF
+*
+*     Factor the band matrix
+      CALL ZGBTRF( N, N, NB, NB, TB, LDTB, IPIV2, INFO )
+*
+*     End of ZSYTRF_AA_2STAGE
+*
+      END
index 69ae389..d5aabd4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  =====================================================================
       SUBROUTINE ZSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZSYTRI, ZSYTRI2X
+      EXTERNAL           ZSYTRI, ZSYTRI2X, XERBLA
 *     ..
 *     .. Executable Statements ..
 *
index a8e068d..4feb4d5 100644 (file)
@@ -87,7 +87,7 @@
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N+NNB+1,NNB+3)
+*>          WORK is COMPLEX*16 array, dimension (N+NB+1,NB+3)
 *> \endverbatim
 *>
 *> \param[in] NB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  =====================================================================
       SUBROUTINE ZSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 99d771a..dc38e85 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  November 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZSYTRI_3X
+      EXTERNAL           ZSYTRI_3X, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
index 7f999e0..a943929 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *  ==================
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
 *  =====================================================================
       SUBROUTINE ZSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index dab3613..6736875 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16SYcomputational
 *
 *>
 *> \verbatim
 *>
-*>  December 2016,  Igor Kozachenko,
+*>  June 2017,  Igor Kozachenko,
 *>                  Computer Science Division,
 *>                  University of California, Berkeley
 *>
       SUBROUTINE ZSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB,
      $                     INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index b3c9b9e..e62e9e4 100644 (file)
@@ -66,7 +66,7 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          Details of factors computed by ZSYTRF_AA.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16SYcomputational
 *
       SUBROUTINE ZSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                      WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGTSV, ZSWAP, ZTRSM, XERBLA
+      EXTERNAL           ZGTSV, ZSWAP, ZLACPY, ZTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
diff --git a/lapack-netlib/SRC/zsytrs_aa_2stage.f b/lapack-netlib/SRC/zsytrs_aa_2stage.f
new file mode 100644 (file)
index 0000000..c5d8947
--- /dev/null
@@ -0,0 +1,281 @@
+*> \brief \b ZSYTRS_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZSYTRS_AA_2STAGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsytrs_aa_2stage.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsytrs_aa_2stage.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsytrs_aa_2stage.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*      SUBROUTINE ZSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB, IPIV, 
+*                                   IPIV2, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), IPIV2( * )
+*       COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, * )
+*       ..
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZSYTRS_AA_2STAGE solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A using the factorization A = U*T*U**T or
+*> A = L*T*L**T computed by ZSYTRF_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*T*U**T;
+*>          = 'L':  Lower triangular, form is A = L*T*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          Details of factors computed by ZSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] TB
+*> \verbatim
+*>          TB is COMPLEX*16 array, dimension (LTB)
+*>          Details of factors computed by ZSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] LTB
+*> \verbatim
+*>          The size of the array TB. LTB >= 4*N.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          ZSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in] IPIV2
+*> \verbatim
+*>          IPIV2 is INTEGER array, dimension (N)
+*>          Details of the interchanges as computed by
+*>          ZSYTRF_AA_2STAGE.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16SYcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZSYTRS_AA_2STAGE( UPLO, N, NRHS, A, LDA, TB, LTB,
+     $                             IPIV, IPIV2, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            N, NRHS, LDA, LTB, LDB, INFO
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), IPIV2( * )
+      COMPLEX*16         A( LDA, * ), TB( * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE  = ( 1.0E+0, 0.0E+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            LDTB, NB
+      LOGICAL            UPPER
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGBTRS, ZLASWP, ZTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LTB.LT.( 4*N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -11
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSYTRS_AA_2STAGE', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+*     Read NB and compute LDTB
+*
+      NB = INT( TB( 1 ) )
+      LDTB = LTB/N
+*
+      IF( UPPER ) THEN
+*
+*        Solve A*X = B, where A = U*T*U**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (U**T \P**T * B) -> B    [ (U**T \P**T * B) ]
+*
+            CALL ZTRSM( 'L', 'U', 'T', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (U**T \P**T * B) ]
+*
+         CALL ZGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (U \ B) -> B   [ U \ (T \ (U**T \P**T * B) ) ]
+*
+            CALL ZTRSM( 'L', 'U', 'N', 'U', N-NB, NRHS, ONE, A(1, NB+1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (U \ (T \ (U**T \P**T * B) )) ]
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+*
+      ELSE
+*
+*        Solve A*X = B, where A = L*T*L**T.
+*
+         IF( N.GT.NB ) THEN
+*
+*           Pivot, P**T * B
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, 1 )
+*
+*           Compute (L \P**T * B) -> B    [ (L \P**T * B) ]
+*
+            CALL ZTRSM( 'L', 'L', 'N', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                 LDA, B(NB+1, 1), LDB)
+*
+         END IF
+*
+*        Compute T \ B -> B   [ T \ (L \P**T * B) ]
+*
+         CALL ZGBTRS( 'N', N, NB, NB, NRHS, TB, LDTB, IPIV2, B, LDB,
+     $               INFO)
+         IF( N.GT.NB ) THEN
+*
+*           Compute (L**T \ B) -> B   [ L**T \ (T \ (L \P**T * B) ) ]
+*
+            CALL ZTRSM( 'L', 'L', 'T', 'U', N-NB, NRHS, ONE, A(NB+1, 1),
+     $                  LDA, B(NB+1, 1), LDB)
+*
+*           Pivot, P * B  [ P * (L**T \ (T \ (L \P**T * B) )) ]
+*
+            CALL ZLASWP( NRHS, B, LDB, NB+1, N, IPIV, -1 )
+*
+         END IF
+      END IF
+*
+      RETURN
+*
+*     End of ZSYTRS_AA_2STAGE
+*
+      END
index 26b83de..ba80d71 100644 (file)
@@ -76,7 +76,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 arrays, dimensions (LDA,N)
+*>          A is COMPLEX*16 array, dimensions (LDA,N)
 *>          On entry, the matrix A in the pair (A, B).
 *>          On exit, the updated matrix A.
 *> \endverbatim
@@ -89,7 +89,7 @@
 *>
 *> \param[in,out] B
 *> \verbatim
-*>          B is COMPLEX*16 arrays, dimensions (LDB,N)
+*>          B is COMPLEX*16 array, dimensions (LDB,N)
 *>          On entry, the matrix B in the pair (A, B).
 *>          On exit, the updated matrix B.
 *> \endverbatim
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is COMPLEX*16 array, dimension (LDZ,N)
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
 *>          If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
 *>          the updated matrix Q.
 *>          Not referenced if WANTQ = .FALSE..
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEauxiliary
 *
       SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, J1, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK auxiliary routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index cb7b522..7eac54c 100644 (file)
 *>
 *> \param[in,out] Q
 *> \verbatim
-*>          Q is COMPLEX*16 array, dimension (LDZ,N)
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
 *>          On entry, if WANTQ = .TRUE., the unitary matrix Q.
 *>          On exit, the updated matrix Q.
 *>          If WANTQ = .FALSE., Q is not referenced.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16GEcomputational
 *
       SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, IFST, ILST, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
index 8561f23..cb4afd5 100644 (file)
@@ -72,7 +72,7 @@
 *
 *> \param[in] IJOB
 *> \verbatim
-*>          IJOB is integer
+*>          IJOB is INTEGER
 *>          Specifies whether condition numbers are required for the
 *>          cluster of eigenvalues (PL and PR) or the deflating subspaces
 *>          (Difu and Difl):
      $                   ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
      $                   WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2016
index 2874020..bbf0010 100644 (file)
@@ -73,8 +73,8 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the lower triangular N-by-N matrix A.
+*>          A is COMPLEX*16 array, dimension (LDA,M)
+*>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
 *> \endverbatim
@@ -82,7 +82,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ] [ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>          [ B ] = [ B1 ] [ B2 ]
 *>                   [ B1 ]  <- M-by-(N-L) rectangular
-*>                   [ B2 ]  <-     M-by-L upper trapezoidal.
+*>                   [ B2 ]  <-     M-by-L lower trapezoidal.
 *>
 *>  The lower trapezoidal matrix B2 consists of the first L columns of a
-*>  N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
 *>  B is rectangular M-by-N; if M=L=N, B is lower triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th row
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>            [ C ] = [ A ] [ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>            [ W ] = [ I ] [ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
       SUBROUTINE ZTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER     INFO, LDA, LDB, LDT, N, M, L, MB
index 733f9dc..9fecfdd 100644 (file)
@@ -65,7 +65,7 @@
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          A is COMPLEX*16 array, dimension (LDA,M)
 *>          On entry, the lower triangular M-by-M matrix A.
 *>          On exit, the elements on and below the diagonal of the array
 *>          contain the lower triangular matrix L.
@@ -74,7 +74,7 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>               C = [ A ][ B ]
 *>
 *>
-*>  where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal
+*>  where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L
 *>  upper trapezoidal matrix B2:
 *>
 *>  above the diagonal (of A) in the M-by-(M+N) input matrix C
 *>
 *>               C = [ A ][ B ]
-*>                   [ A ]  <- lower triangular N-by-N
+*>                   [ A ]  <- lower triangular M-by-M
 *>                   [ B ]  <- M-by-N pentagonal
 *>
 *>  so that W can be represented as
 *>
 *>               W = [ I ][ V ]
-*>                   [ I ]  <- identity, N-by-N
+*>                   [ I ]  <- identity, M-by-M
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
 *  =====================================================================
       SUBROUTINE ZTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER        INFO, LDA, LDB, LDT, N, M, L
index f9540e1..6a67e44 100644 (file)
@@ -6,7 +6,7 @@
 *            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPMQRT + dependencies
+*> Download ZTPMLQT + dependencies
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztpmlqt.f">
 *> [TGZ]</a>
 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztpmlqt.f">
@@ -36,9 +36,9 @@
 *>
 *> \verbatim
 *>
-*> ZTPMQRT applies a complex orthogonal matrix Q obtained from a
-*> "triangular-pentagonal" real block reflector H to a general
-*> real matrix C, which consists of two blocks A and B.
+*> ZTPMLQT applies a complex orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" complex block reflector H to a general
+*> complex matrix C, which consists of two blocks A and B.
 *> \endverbatim
 *
 *  Arguments:
 *> \param[in] SIDE
 *> \verbatim
 *>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**C from the Left;
-*>          = 'R': apply Q or Q**C from the Right.
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Transpose, apply Q**C.
+*>          = 'C':  Transpose, apply Q**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *>          (LDA,K) if SIDE = 'R'
 *>          On entry, the K-by-N or M-by-K matrix A.
 *>          On exit, A is overwritten by the corresponding block of
-*>          Q*C or Q**C*C or C*Q or C*Q**C.  See Further Details.
+*>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *>          B is COMPLEX*16 array, dimension (LDB,N)
 *>          On entry, the M-by-N matrix B.
 *>          On exit, B is overwritten by the corresponding block of
-*>          Q*C or Q**C*C or C*Q or C*Q**C.  See Further Details.
+*>          Q*C or Q**H*C or C*Q or C*Q**H.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup doubleOTHERcomputational
 *
 *>
 *>  If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
 *>
-*>  If TRANS='C' and SIDE='L', C is on exit replaced with Q**C * C.
+*>  If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
 *>
 *>  If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
 *>
-*>  If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**C.
+*>  If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
 *> \endverbatim
 *>
 *  =====================================================================
       SUBROUTINE ZTPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
index a1b53a3..aca7ff0 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
       SUBROUTINE ZTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           ZTPRFB, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
index 678cf94..ea925dd 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
       SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
      $                   LDVR, MM, M, WORK, RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
       EXTERNAL           LSAME, IZAMAX, DLAMCH, DZASUM
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS
+      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS, DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX
index ef83311..36f7d82 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @precisions fortran z -> c
 *
      $                    LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO)
       IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS,
-     $                   ZGEMM, DLABAD, ZLASET
+     $                   ZGEMM, DLABAD, ZLASET, ZLACPY
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, CONJG, AIMAG, MAX
index 07a76c1..97a42a5 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
      $                   LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, JOB
       EXTERNAL           LSAME, IZAMAX, DLAMCH, DZNRM2, ZDOTC
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLACPY, ZLATRS, ZTREXC
+      EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLACPY, ZLATRS, ZTREXC,
+     $                   DLABAD
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DIMAG, MAX
index 9ec0977..039d160 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE ZUNBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 8fa7308..8bfca46 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE ZUNBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, ZSCAL, XERBLA
+      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, ZSCAL, ZLACGV,
+     $                   XERBLA
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DZNRM2
index 737c9a7..523aee5 100644 (file)
@@ -32,7 +32,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE ZUNBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI,
      $                    TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, XERBLA
+      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, ZLACGV, XERBLA
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DZNRM2
index 9bb0c9b..026f5a5 100644 (file)
@@ -33,7 +33,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                    TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK,
      $                    INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
       LOGICAL            LQUERY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, ZSCAL, XERBLA
+      EXTERNAL           ZLARF, ZLARFGP, ZUNBDB5, ZDROT, ZSCAL, ZLACGV,
+     $                   XERBLA
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DZNRM2
index 0e2678b..be708b7 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE ZUNBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 42a3cf8..c4ccbfb 100644 (file)
@@ -31,7 +31,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
       SUBROUTINE ZUNBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2,
      $                    LDQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 77a83c0..db53f93 100644 (file)
 *>
 *> \param[out] U1
 *> \verbatim
-*>          U1 is COMPLEX*16 array, dimension (P)
+*>          U1 is COMPLEX*16 array, dimension (LDU1,P)
 *>          If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
 *> \endverbatim
 *>
 *>
 *> \param[out] U2
 *> \verbatim
-*>          U2 is COMPLEX*16 array, dimension (M-P)
+*>          U2 is COMPLEX*16 array, dimension (LDU2,M-P)
 *>          If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
 *>          matrix U2.
 *> \endverbatim
 *>
 *> \param[out] V1T
 *> \verbatim
-*>          V1T is COMPLEX*16 array, dimension (Q)
+*>          V1T is COMPLEX*16 array, dimension (LDV1T,Q)
 *>          If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
 *>          matrix V1**H.
 *> \endverbatim
 *>
 *> \param[out] V2T
 *> \verbatim
-*>          V2T is COMPLEX*16 array, dimension (M-Q)
+*>          V2T is COMPLEX*16 array, dimension (LDV2T,M-Q)
 *>          If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
 *>          matrix V2**H.
 *> \endverbatim
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16OTHERcomputational
 *
      $                             LDV2T, WORK, LWORK, RWORK, LRWORK,
      $                             IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
index 630a593..56285a1 100644 (file)
@@ -39,7 +39,7 @@
 *
 *
 *> \par Purpose:
-*> =============
+*  =============
 *>
 *>\verbatim
 *>
      $                       LDV1T, WORK, LWORK, RWORK, LRWORK, IWORK,
      $                       INFO )
 *
-*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     July 2012
index 468d7d8..f612e8f 100644 (file)
@@ -52,8 +52,8 @@
 *>  N2-by-N2 upper triangular matrix.
 *> \endverbatim
 *
-*  Arguments
-*  =========
+*  Arguments:
+*  ==========
 *
 *> \param[in] SIDE
 *> \verbatim
       SUBROUTINE ZUNM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.6.0) --
+*  -- LAPACK computational routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2015
index 19fffcd..20fd25b 100644 (file)
@@ -3,34 +3,13 @@
 #  The test files are organized as follows:
 #
 #     AEIGTST -- Auxiliary test routines used in all precisions
-#     SCIGTST -- Auxiliary test routines used in REAL and COMPLEX
-#     DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and
-#                COMPLEX*16
+#     SCIGTST -- Auxiliary test routines used in single precision
+#     DZIGTST -- Auxiliary test routines used in double precision
 #     SEIGTST -- Single precision real test routines
 #     CEIGTST -- Single precision complex test routines
 #     DEIGTST -- Double precision real test routines
 #     ZEIGTST -- Double precision complex test routines
 #
-#  Test programs can be generated for all or some of the four different
-#  precisions.  Enter make followed by one or more of the data types
-#  desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates all four test programs.
-#  The executable files are called
-#       xeigtsts, xeigtstd, xeigtstc, and xeigtstz
-#  and are created in the next higher directory level.
-#
-#  To remove the object files after the executable files have been
-#  created, enter
-#       make clean
-#  On some systems, you can force the source files to be recompiled by
-#  entering (for example)
-#       make single FRC=FRC
-#
 ########################################################################
 
 set(AEIGTST
@@ -119,25 +98,21 @@ set(ZEIGTST zchkee.f
 
 macro(add_eig_executable name)
   add_executable(${name} ${ARGN})
-  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
+  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
 endmacro()
 
 if(BUILD_SINGLE)
-add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}
-  ${SECOND_SRC})
+add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST})
 endif()
 
 if(BUILD_COMPLEX)
-add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST}
-  ${SECOND_SRC})
+add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST})
 endif()
 
 if(BUILD_DOUBLE)
-add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST}
-  ${DSECOND_SRC})
+add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST})
 endif()
 
 if(BUILD_COMPLEX16)
-add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST}
-  ${DSECOND_SRC})
+add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST})
 endif()
index eef087d..7804612 100644 (file)
@@ -5,9 +5,8 @@ include ../../make.inc
 #  The test files are organized as follows:
 #
 #     AEIGTST -- Auxiliary test routines used in all precisions
-#     SCIGTST -- Auxiliary test routines used in REAL and COMPLEX
-#     DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and
-#                COMPLEX*16
+#     SCIGTST -- Auxiliary test routines used in single precision
+#     DZIGTST -- Auxiliary test routines used in double precision
 #     SEIGTST -- Single precision real test routines
 #     CEIGTST -- Single precision complex test routines
 #     DEIGTST -- Double precision real test routines
@@ -24,11 +23,10 @@ include ../../make.inc
 #  without any arguments creates all four test programs.
 #  The executable files are called
 #       xeigtsts, xeigtstd, xeigtstc, and xeigtstz
-#  and are created in the next higher directory level.
 #
 #  To remove the object files after the executable files have been
 #  created, enter
-#       make clean
+#       make cleanobj
 #  On some systems, you can force the source files to be recompiled by
 #  entering (for example)
 #       make single FRC=FRC
@@ -121,30 +119,22 @@ ZEIGTST = zchkee.o \
 
 all: single complex double complex16
 
-single: ../xeigtsts
-complex: ../xeigtstc
-double: ../xeigtstd
-complex16: ../xeigtstz
+single: xeigtsts
+complex: xeigtstc
+double: xeigtstd
+complex16: xeigtstz
 
-../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ \
-       $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \
-       ../../$(LAPACKLIB) $(BLASLIB)
+xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ \
-       $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \
-       ../../$(LAPACKLIB) $(BLASLIB)
+xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ \
-       $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \
-       ../../$(LAPACKLIB) $(BLASLIB)
+xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ \
-       $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \
-       ../../$(LAPACKLIB) $(BLASLIB)
+xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 $(AEIGTST): $(FRC)
 $(SCIGTST): $(FRC)
@@ -157,8 +147,11 @@ $(ZEIGTST): $(FRC)
 FRC:
        @FRC=$(FRC)
 
-clean:
+clean: cleanobj cleanexe
+cleanobj:
        rm -f *.o
+cleanexe:
+       rm -f xeigtst*
 
 schkee.o: schkee.f
        $(FORTRAN) $(DRVOPTS) -c -o $@ $<
index 975217f..61537f4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_eig
 *
      $                   D2, D3, U, LDU, WORK, LWORK, RWORK, RESULT, 
      $                   INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SLASUM, XERBLA, CHBT21, CHBTRD, CLACPY, CLASET,
-     $                   CLATMR, CLATMS, CHBTRD_HB2ST, CSTEQR
+     $                   CLATMR, CLATMS, CHETRD_HB2ST, CSTEQR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, REAL, CONJG, MAX, MIN, SQRT
index 12a27e5..095bd78 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_eig
 *
      $                   LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
      $                   IWORK, LIWORK, RESULT, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
      $                   CHET22, CHPEV, CHPEVD, CHPEVX, CLACPY, CLASET,
      $                   CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE,
      $                   CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE,
-     $                   CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB, 
-     $                   CHETRD_SB2ST, CLATMR, CLATMS
+     $                   CHBEVX_2STAGE, CLATMR, CLATMS
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, REAL, INT, LOG, MAX, MIN, SQRT
index 10b2de4..4aa5aeb 100644 (file)
@@ -27,8 +27,8 @@
 *> CHPEV, CHPEVX, CHPEVD, and CSTEDC.
 *> CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE,
 *> CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE,
-*> CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB,
-*> CHETRD_SB2ST
+*> CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_HE2HB,
+*> CHETRD_HB2ST
 *> \endverbatim
 *
 *  Arguments:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_eig
 *
 *  =====================================================================
       SUBROUTINE CERRST( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
      $                   CUNGTR, CUNMTR, CUPGTR, CUPMTR,
      $                   CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE,
      $                   CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE,
-     $                   CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB,
-     $                   CHETRD_SB2ST
+     $                   CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_HE2HB,
+     $                   CHETRD_HB2ST
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
index f79585d..1b7f6b3 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_eig
 *
       SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
      $                   RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       REAL               ZERO, ONE
       PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
       COMPLEX            CONE
-      PARAMETER          ( CONE = 1.0E+0 )
+      PARAMETER          ( CONE = ( 1.0E+0, 0.0E+0 ) )
 *     ..
 *     .. Local Scalars ..
       INTEGER            J, N1, N2
 *     Exit with RESID = 1/EPS if ANORM = 0.
 *
       EPS = SLAMCH( 'Epsilon' )
-      ANORM = CLANGE( '1', N1, N2, A, LDA, RWORK )
+      ANORM = CLANGE( '1', M, N, A, LDA, RWORK )
       IF( ANORM.LE.ZERO ) THEN
          RESID = ONE / EPS
          RETURN
index 6cb6547..1143be8 100644 (file)
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_eig
 *
       SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 8cd1944..ee66f7e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_eig
 *
      $                   ISEED, THRESH, NOUNIT, A, LDA, SD, SE, D1,
      $                   D2, D3, U, LDU, WORK, LWORK, RESULT, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DLACPY, DLASET, DLASUM, DLATMR, DLATMS, DSBT21,
-     $                   DSBTRD, XERBLA, DSBTRD_SB2ST, DSTEQR
+     $                   DSBTRD, XERBLA, DSYTRD_SB2ST, DSTEQR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, MAX, MIN, SQRT
index c992b52..a0337ee 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_eig
 *
       SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
      $                   RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
 *     Exit with RESID = 1/EPS if ANORM = 0.
 *
       EPS = DLAMCH( 'Epsilon' )
-      ANORM = DLANGE( '1', N1, N2, A, LDA, RWORK )
+      ANORM = DLANGE( '1', M, N, A, LDA, RWORK )
       IF( ANORM.LE.ZERO ) THEN
          RESID = ONE / EPS
          RETURN
index 435f7d6..74b2279 100644 (file)
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_eig
 *
       SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 8b741a2..d99f52e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup OTHERauxiliary
 *
       INTEGER          FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
      $                 N4 )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*( * )    NAME, OPTS
@@ -251,6 +251,53 @@ C        ILAENV = 0
 *     End of ILAENV
 *
       END
+      INTEGER FUNCTION ILAENV2STAGE( ISPEC, NAME, OPTS, N1, N2,
+     $                               N3, N4 )
+*     .. Scalar Arguments ..
+      CHARACTER*( * )    NAME, OPTS
+      INTEGER            ISPEC, N1, N2, N3, N4
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local variables ..
+      INTEGER            IISPEC
+*     .. External Functions ..
+      INTEGER            IPARAM2STAGE
+      EXTERNAL           IPARAM2STAGE
+*     ..
+*     .. Arrays in Common ..
+      INTEGER            IPARMS( 100 )
+*     ..
+*     .. Common blocks ..
+      COMMON             / CLAENV / IPARMS
+*     ..
+*     .. Save statement ..
+      SAVE               / CLAENV /
+*     ..
+*     .. Executable Statements ..
+*
+      IF(( ISPEC.GE.1 ) .AND. (ISPEC.LE.5)) THEN
+*
+*     1 <= ISPEC <= 5: 2stage eigenvalues SVD routines. 
+*
+         IF( ISPEC.EQ.1 ) THEN
+             ILAENV2STAGE = IPARMS( 1 )
+         ELSE
+             IISPEC = 16 + ISPEC
+             ILAENV2STAGE = IPARAM2STAGE( IISPEC, NAME, OPTS,
+     $                                    N1, N2, N3, N4 ) 
+         ENDIF
+*
+      ELSE
+*
+*        Invalid value for ISPEC
+*
+         ILAENV2STAGE = -1
+      END IF
+*
+      RETURN
+      END
       INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
 *
       INTEGER            INMIN, INWIN, INIBL, ISHFTS, IACC22
index 07dfc83..07b6fa9 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_eig
 *
      $                   ISEED, THRESH, NOUNIT, A, LDA, SD, SE, D1,
      $                   D2, D3, U, LDU, WORK, LWORK, RESULT, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           SLACPY, SLASET, SLASUM, SLATMR, SLATMS, SSBT21,
-     $                   SSBTRD, XERBLA, SSBTRD_SB2ST, SSTEQR
+     $                   SSBTRD, XERBLA, SSYTRD_SB2ST, SSTEQR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, REAL, MAX, MIN, SQRT
index 5054686..a47b901 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_eig
 *
       SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
      $                   RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
 *     Exit with RESID = 1/EPS if ANORM = 0.
 *
       EPS = SLAMCH( 'Epsilon' )
-      ANORM = SLANGE( '1', N1, N2, A, LDA, RWORK )
+      ANORM = SLANGE( '1', M, N, A, LDA, RWORK )
       IF( ANORM.LE.ZERO ) THEN
          RESID = ONE / EPS
          RETURN
index e4a8159..1e73842 100644 (file)
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_eig
 *
       SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 88c0499..dbbb843 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_eig
 *
      $                   D2, D3, U, LDU, WORK, LWORK, RWORK, RESULT, 
      $                   INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
index dbf8d80..de072c9 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_eig
 *
      $                   LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
      $                   IWORK, LIWORK, RESULT, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
index 38fc857..b906c96 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_eig
 *
 *  =====================================================================
       SUBROUTINE ZERRST( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
index b157379..efea825 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_eig
 *
       SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
      $                   RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
       DOUBLE PRECISION   ZERO, ONE
       PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
       COMPLEX*16         CONE
-      PARAMETER          ( CONE = 1.0D+0 )
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
       INTEGER            J, N1, N2
 *     Exit with RESID = 1/EPS if ANORM = 0.
 *
       EPS = DLAMCH( 'Epsilon' )
-      ANORM = ZLANGE( '1', N1, N2, A, LDA, RWORK )
+      ANORM = ZLANGE( '1', M, N, A, LDA, RWORK )
       IF( ANORM.LE.ZERO ) THEN
          RESID = ONE / EPS
          RETURN
index 76bd2cb..f2fe47e 100644 (file)
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_eig
 *
       SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 715f32e..50ba8fc 100644 (file)
@@ -10,13 +10,16 @@ set(SLINTST schkaa.f
    schkeq.f schkgb.f schkge.f schkgt.f
    schklq.f schkpb.f schkpo.f schkps.f schkpp.f
    schkpt.f schkq3.f schkql.f schkqr.f schkrq.f
-   schksp.f schksy.f schksy_rook.f schksy_rk.f schksy_aa.f schktb.f schktp.f schktr.f
+   schksp.f schksy.f schksy_rook.f schksy_rk.f 
+   schksy_aa.f schksy_aa_2stage.f 
+   schktb.f schktp.f schktr.f
    schktz.f
    sdrvgt.f sdrvls.f sdrvpb.f
-   sdrvpp.f sdrvpt.f sdrvsp.f sdrvsy.f sdrvsy_rook.f sdrvsy_rk.f sdrvsy_aa.f
+   sdrvpp.f sdrvpt.f sdrvsp.f sdrvsy_rook.f sdrvsy_rk.f 
+   sdrvsy_aa.f sdrvsy_aa_2stage.f
    serrgt.f serrlq.f serrls.f
-   serrpo.f serrps.f serrql.f serrqp.f serrqr.f
-   serrrq.f serrsy.f serrtr.f serrtz.f serrvx.f
+   serrps.f serrql.f serrqp.f serrqr.f
+   serrrq.f serrtr.f serrtz.f
    sgbt01.f sgbt02.f sgbt05.f sgelqs.f sgeqls.f sgeqrs.f
    sgerqs.f sget01.f sget02.f
    sget03.f sget04.f sget06.f sget07.f sgtt01.f sgtt02.f
@@ -29,38 +32,48 @@ set(SLINTST schkaa.f
    sqrt01.f sqrt01p.f sqrt02.f sqrt03.f sqrt11.f sqrt12.f
    sqrt13.f sqrt14.f sqrt15.f sqrt16.f sqrt17.f
    srqt01.f srqt02.f srqt03.f srzt01.f srzt02.f
-   sspt01.f ssyt01.f ssyt01_rook.f ssyt01_3.f ssyt01_aa.f
+   sspt01.f ssyt01.f ssyt01_rook.f ssyt01_3.f 
+   ssyt01_aa.f
    stbt02.f stbt03.f stbt05.f stbt06.f stpt01.f
    stpt02.f stpt03.f stpt05.f stpt06.f strt01.f
    strt02.f strt03.f strt05.f strt06.f
-   sgennd.f
-   sqrt04.f sqrt05.f schkqrt.f serrqrt.f schkqrtp.f serrqrtp.f
+   sgennd.f sqrt04.f sqrt05.f schkqrt.f serrqrt.f schkqrtp.f serrqrtp.f
    schklqt.f schklqtp.f schktsqr.f
    serrlqt.f serrlqtp.f serrtsqr.f stsqr01.f slqt04.f slqt05.f)
 
-if(USEXBLAS)
-  list(APPEND SLINTST sdrvgex.f serrgex.f sdrvgbx.f sdrvpox.f sebchvxx.f)
+if(USE_XBLAS)
+  list(APPEND SLINTST sdrvgbx.f sdrvgex.f sdrvsyx.f sdrvpox.f
+                      serrvxx.f serrgex.f serrsyx.f serrpox.f
+                      sebchvxx.f)
 else()
-  list(APPEND SLINTST sdrvge.f serrge.f sdrvgb.f sdrvpo.f)
+  list(APPEND SLINTST sdrvgb.f sdrvge.f sdrvsy.f sdrvpo.f
+                      serrvx.f serrge.f serrsy.f serrpo.f)
 endif()
 
 set(CLINTST cchkaa.f
    cchkeq.f cchkgb.f cchkge.f cchkgt.f
-   cchkhe.f cchkhe_rook.f cchkhe_rk.f cchkhe_aa.f cchkhp.f cchklq.f cchkpb.f
+   cchkhe.f cchkhe_rook.f cchkhe_rk.f 
+   cchkhe_aa.f cchkhe_aa_2stage.f
+   cchkhp.f cchklq.f cchkpb.f
    cchkpo.f cchkps.f cchkpp.f cchkpt.f cchkq3.f cchkql.f
-   cchkqr.f cchkrq.f cchksp.f cchksy.f cchksy_rook.f cchksy_rk.f cchksy_aa.f cchktb.f
+   cchkqr.f cchkrq.f cchksp.f cchksy.f cchksy_rook.f cchksy_rk.f
+   cchksy_aa.f cchksy_aa_2stage.f
+   cchktb.f
    cchktp.f cchktr.f cchktz.f
-   cdrvgt.f cdrvhe.f cdrvhe_rook.f cdrvhe_rk.f cdrvhe_aa.f cdrvhp.f
+   cdrvgt.f cdrvhe_rook.f cdrvhe_rk.f 
+   cdrvhe_aa.f cdrvhe_aa_2stage.f cdrvsy_aa_2stage.f
+   cdrvhp.f
    cdrvls.f cdrvpb.f cdrvpp.f cdrvpt.f
-   cdrvsp.f cdrvsy.f cdrvsy_rook.f cdrvsy_rk.f cdrvsy_aa.f
-   cerrgt.f cerrhe.f cerrlq.f
+   cdrvsp.f cdrvsy_rook.f cdrvsy_rk.f 
+   cdrvsy_aa.f 
+   cerrgt.f cerrlq.f
    cerrls.f cerrps.f cerrql.f cerrqp.f
-   cerrqr.f cerrrq.f cerrsy.f cerrtr.f cerrtz.f
-   cerrvx.f
+   cerrqr.f cerrrq.f cerrtr.f cerrtz.f
    cgbt01.f cgbt02.f cgbt05.f cgelqs.f cgeqls.f cgeqrs.f
    cgerqs.f cget01.f cget02.f
    cget03.f cget04.f cget07.f cgtt01.f cgtt02.f
-   cgtt05.f chet01.f chet01_rook.f chet01_3.f chet01_aa.f
+   cgtt05.f chet01.f chet01_rook.f chet01_3.f
+   chet01_aa.f
    chpt01.f claipd.f claptm.f clarhs.f clatb4.f clatb5.f
    clatsp.f clatsy.f clattb.f clattp.f clattr.f
    clavhe.f clavhe_rook.f clavhp.f clavsp.f clavsy.f clavsy_rook.f clqt01.f
@@ -72,7 +85,9 @@ set(CLINTST cchkaa.f
    cqrt12.f cqrt13.f cqrt14.f cqrt15.f cqrt16.f
    cqrt17.f crqt01.f crqt02.f crqt03.f crzt01.f crzt02.f
    csbmv.f  cspt01.f
-   cspt02.f cspt03.f csyt01.f csyt01_rook.f csyt01_3.f csyt01_aa.f csyt02.f csyt03.f
+   cspt02.f cspt03.f csyt01.f csyt01_rook.f csyt01_3.f
+   csyt01_aa.f 
+   csyt02.f csyt03.f
    ctbt02.f ctbt03.f ctbt05.f ctbt06.f ctpt01.f
    ctpt02.f ctpt03.f ctpt05.f ctpt06.f ctrt01.f
    ctrt02.f ctrt03.f ctrt05.f ctrt06.f
@@ -81,24 +96,29 @@ set(CLINTST cchkaa.f
    cchklqt.f cchklqtp.f cchktsqr.f
    cerrlqt.f cerrlqtp.f cerrtsqr.f ctsqr01.f clqt04.f clqt05.f)
 
-if(USEXBLAS)
-  list(APPEND
-    CLINTST cdrvgex.f cdrvgbx.f cerrgex.f cdrvpox.f cerrpox.f cebchvxx.f)
+if(USE_XBLAS)
+  list(APPEND CLINTST cdrvgbx.f cdrvgex.f cdrvhex.f cdrvsyx.f cdrvpox.f
+                      cerrvxx.f cerrgex.f cerrhex.f cerrsyx.f cerrpox.f
+                      cebchvxx.f)
 else()
-  list(APPEND CLINTST cdrvge.f cdrvgb.f cerrge.f cdrvpo.f cerrpo.f)
+  list(APPEND CLINTST cdrvgb.f cdrvge.f cdrvhe.f cdrvsy.f cdrvpo.f
+                      cerrvx.f cerrge.f cerrhe.f cerrsy.f cerrpo.f)
 endif()
 
 set(DLINTST dchkaa.f
    dchkeq.f dchkgb.f dchkge.f dchkgt.f
    dchklq.f dchkpb.f dchkpo.f dchkps.f dchkpp.f
    dchkpt.f dchkq3.f dchkql.f dchkqr.f dchkrq.f
-   dchksp.f dchksy.f dchksy_rook.f dchksy_rk.f dchksy_aa.f dchktb.f dchktp.f dchktr.f
+   dchksp.f dchksy.f dchksy_rook.f dchksy_rk.f 
+   dchksy_aa.f dchksy_aa_2stage.f
+   dchktb.f dchktp.f dchktr.f
    dchktz.f
    ddrvgt.f ddrvls.f ddrvpb.f
-   ddrvpp.f ddrvpt.f ddrvsp.f ddrvsy.f ddrvsy_rook.f ddrvsy_rk.f ddrvsy_aa.f
+   ddrvpp.f ddrvpt.f ddrvsp.f ddrvsy_rook.f ddrvsy_rk.f 
+   ddrvsy_aa.f ddrvsy_aa_2stage.f
    derrgt.f derrlq.f derrls.f
    derrps.f derrql.f derrqp.f derrqr.f
-   derrrq.f derrsy.f derrtr.f derrtz.f derrvx.f
+   derrrq.f derrtr.f derrtz.f
    dgbt01.f dgbt02.f dgbt05.f dgelqs.f dgeqls.f dgeqrs.f
    dgerqs.f dget01.f dget02.f
    dget03.f dget04.f dget06.f dget07.f dgtt01.f dgtt02.f
@@ -111,7 +131,8 @@ set(DLINTST dchkaa.f
    dqrt01.f dqrt01p.f dqrt02.f dqrt03.f dqrt11.f dqrt12.f
    dqrt13.f dqrt14.f dqrt15.f dqrt16.f dqrt17.f
    drqt01.f drqt02.f drqt03.f drzt01.f drzt02.f
-   dspt01.f dsyt01.f dsyt01_rook.f dsyt01_3.f dsyt01_aa.f
+   dspt01.f dsyt01.f dsyt01_rook.f dsyt01_3.f
+   dsyt01_aa.f
    dtbt02.f dtbt03.f dtbt05.f dtbt06.f dtpt01.f
    dtpt02.f dtpt03.f dtpt05.f dtpt06.f dtrt01.f
    dtrt02.f dtrt03.f dtrt05.f dtrt06.f
@@ -120,31 +141,39 @@ set(DLINTST dchkaa.f
    dchklq.f dchklqt.f dchklqtp.f dchktsqr.f
    derrlqt.f derrlqtp.f derrtsqr.f dtsqr01.f dlqt04.f dlqt05.f)
 
-if(USEXBLAS)
-  list(APPEND
-    DLINTST ddrvgex.f ddrvgbx.f derrgex.f ddrvpox.f derrpox.f debchvxx.f)
+if(USE_XBLAS)
+  list(APPEND DLINTST ddrvgbx.f ddrvgex.f ddrvsyx.f ddrvpox.f
+                      derrvxx.f derrgex.f derrsyx.f derrpox.f
+                      debchvxx.f)
 else()
-  list(APPEND
-    DLINTST ddrvge.f ddrvgb.f derrge.f ddrvpo.f derrpo.f)
+  list(APPEND DLINTST ddrvgb.f ddrvge.f ddrvsy.f ddrvpo.f
+                      derrvx.f derrge.f derrsy.f derrpo.f)
 endif()
 
 set(ZLINTST zchkaa.f
    zchkeq.f zchkgb.f zchkge.f zchkgt.f
-   zchkhe.f zchkhe_rook.f zchkhe_rk.f zchkhe_aa.f zchkhp.f zchklq.f zchkpb.f
+   zchkhe.f zchkhe_rook.f zchkhe_rk.f 
+   zchkhe_aa.f zchkhe_aa_2stage.f
+   zchkhp.f zchklq.f zchkpb.f
    zchkpo.f zchkps.f zchkpp.f zchkpt.f zchkq3.f zchkql.f
-   zchkqr.f zchkrq.f zchksp.f zchksy.f zchksy_rook.f zchksy_rk.f zchksy_aa.f zchktb.f
+   zchkqr.f zchkrq.f zchksp.f zchksy.f zchksy_rook.f zchksy_rk.f
+   zchksy_aa.f  zchksy_aa_2stage.f
+   zchktb.f
    zchktp.f zchktr.f zchktz.f
-   zdrvgt.f zdrvhe.f zdrvhe_rook.f zdrvhe_rk.f zdrvhe_aa.f zdrvhp.f
+   zdrvgt.f zdrvhe_rook.f zdrvhe_rk.f 
+   zdrvhe_aa.f  zdrvhe_aa_2stage.f
+   zdrvhp.f
    zdrvls.f zdrvpb.f zdrvpp.f zdrvpt.f
-   zdrvsp.f zdrvsy.f zdrvsy_rook.f zdrvsy_rk.f zdrvsy_aa.f
-   zerrgt.f zerrhe.f zerrlq.f
+   zdrvsp.f zdrvsy_rook.f zdrvsy_rk.f 
+   zdrvsy_aa.f zdrvsy_aa_2stage.f 
+   zerrgt.f zerrlq.f
    zerrls.f zerrps.f zerrql.f zerrqp.f
-   zerrqr.f zerrrq.f zerrsy.f zerrtr.f zerrtz.f
-   zerrvx.f
+   zerrqr.f zerrrq.f zerrtr.f zerrtz.f
    zgbt01.f zgbt02.f zgbt05.f zgelqs.f zgeqls.f zgeqrs.f
    zgerqs.f zget01.f zget02.f
    zget03.f zget04.f zget07.f zgtt01.f zgtt02.f
-   zgtt05.f zhet01.f zhet01_rook.f zhet01_3.f zhet01_aa.f
+   zgtt05.f zhet01.f zhet01_rook.f zhet01_3.f
+   zhet01_aa.f
    zhpt01.f zlaipd.f zlaptm.f zlarhs.f zlatb4.f zlatb5.f
    zlatsp.f zlatsy.f zlattb.f zlattp.f zlattr.f
    zlavhe.f zlavhe_rook.f zlavhp.f zlavsp.f zlavsy.f zlavsy_rook.f zlqt01.f
@@ -156,7 +185,9 @@ set(ZLINTST zchkaa.f
    zqrt12.f zqrt13.f zqrt14.f zqrt15.f zqrt16.f
    zqrt17.f zrqt01.f zrqt02.f zrqt03.f zrzt01.f zrzt02.f
    zsbmv.f  zspt01.f
-   zspt02.f zspt03.f zsyt01.f zsyt01_rook.f zsyt01_3.f zsyt01_aa.f zsyt02.f zsyt03.f
+   zspt02.f zspt03.f zsyt01.f zsyt01_rook.f zsyt01_3.f
+   zsyt01_aa.f
+   zsyt02.f zsyt03.f
    ztbt02.f ztbt03.f ztbt05.f ztbt06.f ztpt01.f
    ztpt02.f ztpt03.f ztpt05.f ztpt06.f ztrt01.f
    ztrt02.f ztrt03.f ztrt05.f ztrt06.f
@@ -165,12 +196,13 @@ set(ZLINTST zchkaa.f
    zchklqt.f zchklqtp.f zchktsqr.f
    zerrlqt.f zerrlqtp.f zerrtsqr.f ztsqr01.f zlqt04.f zlqt05.f)
 
-if(USEXBLAS)
-  list(APPEND
-    ZLINTST zdrvgex.f zdrvgbx.f zerrgex.f zdrvpox.f zerrpox.f zebchvxx.f)
+if(USE_XBLAS)
+  list(APPEND ZLINTST zdrvgbx.f zdrvgex.f zdrvhex.f zdrvsyx.f zdrvpox.f
+                      zerrvxx.f zerrgex.f zerrhex.f zerrsyx.f zerrpox.f
+                      zebchvxx.f)
 else()
-  list(APPEND
-    ZLINTST zdrvge.f zdrvgb.f zerrge.f zdrvpo.f zerrpo.f)
+  list(APPEND ZLINTST zdrvgb.f zdrvge.f zdrvhe.f zdrvsy.f zdrvpo.f
+                      zerrvx.f zerrge.f zerrhe.f zerrsy.f zerrpo.f)
 endif()
 
 set(DSLINTST dchkab.f
@@ -203,33 +235,33 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerrr
 
 macro(add_lin_executable name)
   add_executable(${name} ${ARGN})
-  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES})
+  target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
 endmacro()
 
 if(BUILD_SINGLE)
-  add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC})
-  add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC})
+  add_lin_executable(xlintsts ${ALINTST} ${SLINTST} ${SCLNTST})
+  add_lin_executable(xlintstrfs ${SLINTSTRFP})
 endif()
 
 if(BUILD_DOUBLE)
-  add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST} ${DSECOND_SRC})
-  add_lin_executable(xlintstrfd ${DLINTSTRFP} ${DSECOND_SRC})
+  add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST})
+  add_lin_executable(xlintstrfd ${DLINTSTRFP})
 endif()
 
 if(BUILD_SINGLE AND BUILD_DOUBLE)
-  add_lin_executable(xlintstds ${DSLINTST} ${SECOND_SRC} ${DSECOND_SRC})
+  add_lin_executable(xlintstds ${DSLINTST})
 endif()
 
 if(BUILD_COMPLEX)
-  add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST} ${SECOND_SRC})
-  add_lin_executable(xlintstrfc ${CLINTSTRFP} ${SECOND_SRC})
+  add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST})
+  add_lin_executable(xlintstrfc ${CLINTSTRFP})
 endif()
 
 if(BUILD_COMPLEX16)
-  add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST} ${DSECOND_SRC})
-  add_lin_executable(xlintstrfz ${ZLINTSTRFP} ${DSECOND_SRC})
+  add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST})
+  add_lin_executable(xlintstrfz ${ZLINTSTRFP})
 endif()
 
 if(BUILD_COMPLEX AND BUILD_COMPLEX16)
-  add_lin_executable(xlintstzc ${ZCLINTST} ${SECOND_SRC} ${DSECOND_SRC})
+  add_lin_executable(xlintstzc ${ZCLINTST})
 endif()
index bd188b2..1a332f7 100644 (file)
@@ -7,10 +7,10 @@ include ../../make.inc
 #       ALINTST -- Auxiliary test routines
 #       SLINTST -- Single precision real test routines
 #       CLINTST -- Single precision complex test routines
-#       SCLNTST -- Single and Complex routines in common
+#       SCLNTST -- Single precision real and complex routines in common
 #       DLINTST -- Double precision real test routines
 #       ZLINTST -- Double precision complex test routines
-#       DZLNTST -- Double and Double Complex routines in common
+#       DZLNTST -- Double precision real and complex routines in common
 #
 #  Test programs can be generated for all or some of the four different
 #  precisions.  Enter make followed by one or more of the data types
@@ -22,12 +22,11 @@ include ../../make.inc
 #       make
 #  without any arguments creates all four test programs.
 #  The executable files are called
-#       xlintims, xlintimd, xlintimc, and xlintimz
-#  and are created in the next higher directory level.
+#       xlintsts, xlintstd, xlintstc, and xlintstz
 #
 #  To remove the object files after the executable files have been
 #  created, enter
-#       make clean
+#       make cleanobj
 #  On some systems, you can force the source files to be recompiled by
 #  entering (for example)
 #       make single FRC=FRC
@@ -51,10 +50,12 @@ SLINTST = schkaa.o \
    schkeq.o schkgb.o schkge.o schkgt.o \
    schklq.o schkpb.o schkpo.o schkps.o schkpp.o \
    schkpt.o schkq3.o schkql.o schkqr.o schkrq.o \
-   schksp.o schksy.o schksy_rook.o schksy_rk.o schksy_aa.o schktb.o schktp.o schktr.o \
+   schksp.o schksy.o schksy_rook.o schksy_rk.o  \
+   schksy_aa.o schksy_aa_2stage.o schktb.o schktp.o schktr.o \
    schktz.o \
    sdrvgt.o sdrvls.o sdrvpb.o \
-   sdrvpp.o sdrvpt.o sdrvsp.o sdrvsy_rook.o sdrvsy_rk.o  sdrvsy_aa.o \
+   sdrvpp.o sdrvpt.o sdrvsp.o sdrvsy_rook.o sdrvsy_rk.o \
+   sdrvsy_aa.o sdrvsy_aa_2stage.o \
    serrgt.o serrlq.o serrls.o \
    serrps.o serrql.o serrqp.o serrqr.o \
    serrrq.o serrtr.o serrtz.o \
@@ -79,30 +80,34 @@ SLINTST = schkaa.o \
    serrlqt.o serrlqtp.o serrtsqr.o stsqr01.o slqt04.o slqt05.o
 
 ifdef USEXBLAS
-SLINTST += serrvxx.o sdrvgex.o sdrvsyx.o serrgex.o sdrvgbx.o sdrvpox.o \
-           sebchvxx.o serrsyx.o serrpox.o
+SLINTST += sdrvgbx.o sdrvgex.o sdrvsyx.o sdrvpox.o \
+           serrvxx.o serrgex.o serrsyx.o serrpox.o \
+           sebchvxx.o
 else
-SLINTST += serrvx.o sdrvge.o sdrvsy.o serrge.o sdrvgb.o sdrvpo.o \
-           serrsy.o serrpo.o
+SLINTST += sdrvgb.o sdrvge.o sdrvsy.o sdrvpo.o \
+           serrvx.o serrge.o serrsy.o serrpo.o
 endif
 
 CLINTST = cchkaa.o \
    cchkeq.o cchkgb.o cchkge.o cchkgt.o \
-   cchkhe.o cchkhe_rook.o cchkhe_rk.o cchkhe_aa.o cchkhp.o cchklq.o cchkpb.o \
+   cchkhe.o cchkhe_rook.o cchkhe_rk.o  \
+   cchkhe_aa.o cchkhe_aa_2stage.o cchkhp.o cchklq.o cchkpb.o \
    cchkpo.o cchkps.o cchkpp.o cchkpt.o cchkq3.o cchkql.o \
-   cchkqr.o cchkrq.o cchksp.o cchksy.o cchksy_rook.o cchksy_rk.o cchksy_aa.o cchktb.o \
+   cchkqr.o cchkrq.o cchksp.o cchksy.o cchksy_rook.o cchksy_rk.o \
+   cchksy_aa.o cchksy_aa_2stage.o cchktb.o \
    cchktp.o cchktr.o cchktz.o \
    cdrvgt.o cdrvhe_rook.o cdrvhe_rk.o cdrvhe_aa.o cdrvhp.o \
+   cdrvhe_aa_2stage.o \
    cdrvls.o cdrvpb.o cdrvpp.o cdrvpt.o \
-   cdrvsp.o cdrvsy_rook.o cdrvsy_rk.o cdrvsy_aa.o \
+   cdrvsp.o cdrvsy_rook.o cdrvsy_rk.o cdrvsy_aa.o cdrvsy_aa_2stage.o \
    cerrgt.o cerrlq.o \
    cerrls.o cerrps.o cerrql.o cerrqp.o \
    cerrqr.o cerrrq.o cerrtr.o cerrtz.o \
    cgbt01.o cgbt02.o cgbt05.o cgelqs.o cgeqls.o cgeqrs.o \
    cgerqs.o cget01.o cget02.o \
    cget03.o cget04.o cget07.o cgtt01.o cgtt02.o \
-   cgtt05.o chet01.o chet01_rook.o chet01_3.o \
-   chet01_aa.o chpt01.o claipd.o claptm.o clarhs.o clatb4.o clatb5.o \
+   cgtt05.o chet01.o chet01_rook.o chet01_3.o chet01_aa.o \
+   chpt01.o claipd.o claptm.o clarhs.o clatb4.o clatb5.o \
    clatsp.o clatsy.o clattb.o clattp.o clattr.o \
    clavhe.o clavhe_rook.o clavhp.o clavsp.o clavsy.o clavsy_rook.o clqt01.o \
    clqt02.o clqt03.o cpbt01.o cpbt02.o cpbt05.o \
@@ -123,21 +128,24 @@ CLINTST = cchkaa.o \
    cerrlqt.o cerrlqtp.o cerrtsqr.o ctsqr01.o clqt04.o clqt05.o
 
 ifdef USEXBLAS
-CLINTST += cerrvxx.o cdrvgex.o cdrvsyx.o cdrvgbx.o cerrgex.o cdrvpox.o \
-           cdrvhex.o cerrpox.o cebchvxx.o cerrsyx.o cerrhex.o
+CLINTST += cdrvgbx.o cdrvgex.o cdrvhex.o cdrvsyx.o cdrvpox.o \
+           cerrvxx.o cerrgex.o cerrhex.o cerrsyx.o cerrpox.o \
+           cebchvxx.o
 else
-CLINTST += cerrvx.o cdrvge.o cdrvsy.o cdrvgb.o cerrge.o cdrvpo.o \
-           cdrvhe.o cerrpo.o cerrsy.o cerrhe.o
+CLINTST += cdrvgb.o cdrvge.o cdrvhe.o cdrvsy.o cdrvpo.o \
+           cerrvx.o cerrge.o cerrhe.o cerrsy.o cerrpo.o
 endif
 
 DLINTST = dchkaa.o \
    dchkeq.o dchkgb.o dchkge.o dchkgt.o \
    dchklq.o dchkpb.o dchkpo.o dchkps.o dchkpp.o \
    dchkpt.o dchkq3.o dchkql.o dchkqr.o dchkrq.o \
-   dchksp.o dchksy.o dchksy_rook.o dchksy_rk.o dchksy_aa.o dchktb.o dchktp.o dchktr.o \
+   dchksp.o dchksy.o dchksy_rook.o dchksy_rk.o  \
+   dchksy_aa.o dchksy_aa_2stage.o dchktb.o dchktp.o dchktr.o \
    dchktz.o \
    ddrvgt.o ddrvls.o ddrvpb.o \
-   ddrvpp.o ddrvpt.o ddrvsp.o ddrvsy_rook.o ddrvsy_rk.o ddrvsy_aa.o \
+   ddrvpp.o ddrvpt.o ddrvsp.o ddrvsy_rook.o ddrvsy_rk.o \
+   ddrvsy_aa.o ddrvsy_aa_2stage.o \
    derrgt.o derrlq.o derrls.o \
    derrps.o derrql.o derrqp.o derrqr.o \
    derrrq.o derrtr.o derrtz.o \
@@ -163,30 +171,33 @@ DLINTST = dchkaa.o \
    derrlqt.o derrlqtp.o derrtsqr.o dtsqr01.o dlqt04.o dlqt05.o
 
 ifdef USEXBLAS
-DLINTST += derrvxx.o ddrvgex.o ddrvsyx.o ddrvgbx.o derrgex.o ddrvpox.o derrpox.o \
-           debchvxx.o derrsyx.o
+DLINTST += ddrvgbx.o ddrvgex.o ddrvsyx.o ddrvpox.o \
+           derrvxx.o derrgex.o derrsyx.o derrpox.o \
+           debchvxx.o
 else
-DLINTST += derrvx.o ddrvge.o ddrvsy.o ddrvgb.o derrge.o ddrvpo.o derrpo.o \
-           derrsy.o
+DLINTST += ddrvgb.o ddrvge.o ddrvsy.o ddrvpo.o \
+           derrvx.o derrge.o derrsy.o derrpo.o
 endif
 
 ZLINTST = zchkaa.o \
    zchkeq.o zchkgb.o zchkge.o zchkgt.o \
-   zchkhe.o zchkhe_rook.o zchkhe_rk.o zchkhe_aa.o zchkhp.o zchklq.o zchkpb.o \
+   zchkhe.o zchkhe_rook.o zchkhe_rk.o zchkhe_aa.o zchkhe_aa_2stage.o \
+   zchkhp.o zchklq.o zchkpb.o \
    zchkpo.o zchkps.o zchkpp.o zchkpt.o zchkq3.o zchkql.o \
-   zchkqr.o zchkrq.o zchksp.o zchksy.o zchksy_rook.o zchksy_rk.o zchksy_aa.o zchktb.o \
+   zchkqr.o zchkrq.o zchksp.o zchksy.o zchksy_rook.o zchksy_rk.o \
+   zchksy_aa.o zchksy_aa_2stage.o zchktb.o \
    zchktp.o zchktr.o zchktz.o \
-   zdrvgt.o zdrvhe_rook.o zdrvhe_rk.o zdrvhe_aa.o zdrvhp.o \
+   zdrvgt.o zdrvhe_rook.o zdrvhe_rk.o zdrvhe_aa.o zdrvhe_aa_2stage.o zdrvhp.o \
    zdrvls.o zdrvpb.o zdrvpp.o zdrvpt.o \
-   zdrvsp.o zdrvsy_rook.o zdrvsy_rk.o zdrvsy_aa.o \
+   zdrvsp.o zdrvsy_rook.o zdrvsy_rk.o zdrvsy_aa.o zdrvsy_aa_2stage.o \
    zerrgt.o zerrlq.o \
    zerrls.o zerrps.o zerrql.o zerrqp.o \
    zerrqr.o zerrrq.o zerrtr.o zerrtz.o \
    zgbt01.o zgbt02.o zgbt05.o zgelqs.o zgeqls.o zgeqrs.o \
    zgerqs.o zget01.o zget02.o \
    zget03.o zget04.o zget07.o zgtt01.o zgtt02.o \
-   zgtt05.o zhet01.o zhet01_rook.o zhet01_3.o \
-   zhet01_aa.o zhpt01.o zlaipd.o zlaptm.o zlarhs.o zlatb4.o zlatb5.o \
+   zgtt05.o zhet01.o zhet01_rook.o zhet01_3.o zhet01_aa.o \
+   zhpt01.o zlaipd.o zlaptm.o zlarhs.o zlatb4.o zlatb5.o \
    zlatsp.o zlatsy.o zlattb.o zlattp.o zlattr.o \
    zlavhe.o zlavhe_rook.o zlavhp.o zlavsp.o zlavsy.o zlavsy_rook.o zlqt01.o \
    zlqt02.o zlqt03.o zpbt01.o zpbt02.o zpbt05.o \
@@ -207,11 +218,12 @@ ZLINTST = zchkaa.o \
    zerrlqt.o zerrlqtp.o zerrtsqr.o ztsqr01.o zlqt04.o zlqt05.o
 
 ifdef USEXBLAS
-ZLINTST += zerrvxx.o zdrvgex.o zdrvsyx.o zdrvgbx.o zerrgex.o zdrvpox.o zdrvhex.o \
-           zerrpox.o zebchvxx.o zerrsyx.o zerrhex.o
+ZLINTST += zdrvgbx.o zdrvgex.o zdrvhex.o zdrvsyx.o zdrvpox.o \
+           zerrvxx.o zerrgex.o zerrhex.o zerrsyx.o zerrpox.o \
+           zebchvxx.o
 else
-ZLINTST += zerrvx.o zdrvge.o zdrvsy.o zdrvgb.o zerrge.o zdrvpo.o \
-           zdrvhe.o zerrpo.o zerrsy.o zerrhe.o
+ZLINTST += zdrvgb.o zdrvge.o zdrvhe.o zdrvsy.o zdrvpo.o \
+           zerrvx.o zerrge.o zerrhe.o zerrsy.o zerrpo.o
 endif
 
 DSLINTST = dchkab.o \
@@ -244,55 +256,45 @@ ZLINTSTRFP = zchkrfp.o zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp
 
 all: single double complex complex16 proto-single proto-double proto-complex proto-complex16
 
-single: ../xlintsts
-double: ../xlintstd
-complex: ../xlintstc
-complex16: ../xlintstz
+single: xlintsts
+double: xlintstd
+complex: xlintstc
+complex16: xlintstz
 
-proto-single: ../xlintstrfs
-proto-double: ../xlintstds ../xlintstrfd
-proto-complex: ../xlintstrfc
-proto-complex16: ../xlintstzc ../xlintstrfz
+proto-single: xlintstrfs
+proto-double: xlintstds xlintstrfd
+proto-complex: xlintstrfc
+proto-complex16: xlintstzc xlintstrfz
 
-../xlintsts: $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(SCLNTST) $(SLINTST) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+xlintsts: $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstc: $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(SCLNTST) $(CLINTST) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+xlintstc: $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstd: $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $^ \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+xlintstd: $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstz: $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(DZLNTST) $(ZLINTST) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+xlintstz: $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstds: $(DSLINTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(DSLINTST) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstds: $(DSLINTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstzc: $(ZCLINTST) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZCLINTST) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstzc: $(ZCLINTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstrfs: $(SLINTSTRFP) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(SLINTSTRFP) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstrfs: $(SLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstrfd: $(DLINTSTRFP) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(DLINTSTRFP) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstrfd: $(DLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstrfc: $(CLINTSTRFP) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(CLINTSTRFP) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstrfc: $(CLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
-../xlintstrfz: $(ZLINTSTRFP) ../../$(LAPACKLIB)
-       $(LOADER) $(LOADOPTS) -o $@ $(ZLINTSTRFP) \
-       ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+xlintstrfz: $(ZLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB)
+       $(LOADER) $(LOADOPTS) -o $@ $^
 
 $(ALINTST): $(FRC)
 $(SCLNTST): $(FRC)
@@ -305,8 +307,11 @@ $(ZLINTST): $(FRC)
 FRC:
        @FRC=$(FRC)
 
-clean:
+clean: cleanobj cleanexe
+cleanobj:
        rm -f *.o
+cleanexe:
+       rm -f xlintst*
 
 schkaa.o: schkaa.f
        $(FORTRAN) $(DRVOPTS) -c -o $@ $<
index 9724618..d8d5060 100644 (file)
@@ -53,6 +53,9 @@
 *> CHR   10               List types on next line if 0 < NTYPES < 10
 *> CHK   10               List types on next line if 0 < NTYPES < 10
 *> CHA   10               List types on next line if 0 < NTYPES < 10
+*> CH2   10               List types on next line if 0 < NTYPES < 10
+*> CSA   11               List types on next line if 0 < NTYPES < 10
+*> CS2   11               List types on next line if 0 < NTYPES < 10
 *> CHP   10               List types on next line if 0 < NTYPES < 10
 *> CSY   11               List types on next line if 0 < NTYPES < 11
 *> CSK   11               List types on next line if 0 < NTYPES < 11
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
       PROGRAM CCHKAA
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *  =====================================================================
 *
 *
          IF( TSTCHK ) THEN
             CALL CCHKHE_AA( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS,
-     $                         NSVAL, THRESH, TSTERR, LDA,
+     $                      NSVAL, THRESH, TSTERR, LDA,
+     $                      A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                      B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                      WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL CDRVHE_AA( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                      LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                           B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                      WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9988 )PATH
+         END IF
+*
+      ELSE IF( LSAMEN( 2, C2, 'H2' ) ) THEN
+*
+*        H2:  Hermitian matrices,
+*             with partial (Aasen's) pivoting algorithm
+*
+         NTYPES = 10
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL CCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2,
+     $                         NNS, NSVAL, THRESH, TSTERR, LDA,
      $                         A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
      $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
      $                         WORK, RWORK, IWORK, NOUT )
          END IF
 *
          IF( TSTDRV ) THEN
-            CALL CDRVHE_AA( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+            CALL CDRVHE_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
      $                         LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
      $                              B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
      $                         WORK, RWORK, IWORK, NOUT )
             WRITE( NOUT, FMT = 9988 )PATH
          END IF
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        S2:  symmetric indefinite matrices with Aasen's algorithm
+*             2 stage
+*
+         NTYPES = 11
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL CCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS,
+     $                      NSVAL, THRESH, TSTERR, LDA,
+     $                      A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                      B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                      WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL CDRVSY_AA_2STAGE(
+     $                      DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                      LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                      B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK,
+     $                      RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9988 )PATH
+         END IF
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        SP:  symmetric indefinite packed matrices,
index cb1f07b..8dd551a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *
 *> \ingroup complex_lin
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       INTEGER      ISEED( 4 ), ISEEDY( 4 )
       REAL         RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      REAL         DGET06, CLANHE
-      EXTERNAL     DGET06, CLANHE
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL     ALAERH, ALAHD, ALASUM, XLAENV, CERRHE, CGET04,
-     $             ZHECON, CHERFS, CHET01_AA, CHETRF_AA, ZHETRI2,
-     $             CHETRS_AA, CLACPY, CLAIPD, CLARHS, CLATB4, 
-     $             CLATMS, CPOT02, ZPOT03, ZPOT05
+      EXTERNAL     ALAERH, ALAHD, ALASUM, XLAENV, CERRHE, CHET01_AA,
+     $             CHETRF_AA, CHETRS_AA, CLACPY, CLAIPD, CLARHS,
+     $             CLATB4, CLATMS, CPOT02
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC    REAL, IMAG, MAX, MIN
+      INTRINSIC    MAX, MIN
 *     ..
 *     .. Scalars in Common ..
       LOGICAL      LERR, OK
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from CHETRF and handle error.
 *
 *                    Check error code from CHETRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'CHETRS_AA', INFO, 0,
-     $                                UPLO, N, N, -1, -1, NRHS, IMAT,
-     $                                NFAIL, NERRS, NOUT )
-                     END IF
-*
-                     CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
-*
-*                    Compute the residual for the solution
-*
-                     CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
-*
-*                    Print information about the tests that did not pass
-*                    the threshold.
-*
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'CHETRS_AA', INFO, 0,
+     $                                   UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                   NFAIL, NERRS, NOUT )
                         END IF
-  120                CONTINUE
+                     ELSE
+                        CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/cchkhe_aa_2stage.f b/lapack-netlib/TESTING/LIN/cchkhe_aa_2stage.f
new file mode 100644 (file)
index 0000000..06b2134
--- /dev/null
@@ -0,0 +1,584 @@
+*> \brief \b CCHKHE_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE CCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL    TSTERR
+*       INTEGER    NN, NNB, NNS, NOUT
+*       REAL       THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL    DOTYPE( * )
+*       INTEGER    IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       REAL       RWORK( * )
+*       COMPLEX    A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $           WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CCHKSY_AA_2STAGE tests CHETRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is REAL array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*
+*> \ingroup complex_lin
+*
+*  =====================================================================
+      SUBROUTINE CCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NN, NNB, NNS, NMAX, NOUT
+      REAL               THRESH
+*     ..
+*     .. Array Arguments ..
+*
+      LOGICAL      DOTYPE( * )
+      INTEGER      IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      REAL         RWORK( * )
+      COMPLEX      A( * ), AFAC( * ), AINV( * ), B( * ),
+     $             WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      REAL         ZERO
+      PARAMETER    ( ZERO = 0.0E+0 )
+      COMPLEX      CZERO
+      PARAMETER    ( CZERO = ( 0.0E+0, 0.0E+0 ) )
+      INTEGER      NTYPES
+      PARAMETER    ( NTYPES = 10 )
+      INTEGER      NTESTS
+      PARAMETER    ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3        PATH, MATPATH
+      INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      REAL               ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      REAL               RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, CERRHE, CLACPY, 
+     $                   CLARHS, CLATB4, CLATMS, CPOT02, 
+     $                   CHETRF_AA_2STAGE, 
+     $                   CHETRS_AA_2STAGE, XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Complex precision'
+      PATH( 2: 3 ) = 'H2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Complex precision'
+      MATPATH( 2: 3 ) = 'HE'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL CERRHE( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with CLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL CLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with CLATMS.
+*
+               SRNAMT = 'CLATMS'
+               CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from CLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'CLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = CZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = CZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = CZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = CZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate test matrix A.
+*
+*
+*              Set the imaginary part of the diagonals.
+*
+               CALL CLAIPD( N, A, LDA+1, 0 )
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL CLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'CHETRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL CHETRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from CHETRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'CHETRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+*                   
+c                 NEED TO WRITE CHET01_AA_2STAGE
+c                  CALL CHET01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+c     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+c                  NT = 1
+                   NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'CLARHS'
+                     CALL CLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'CHETRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL CHETRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from CHETRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'CHETRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of CCHKSY_AA_2STAGE
+*
+      END
index 6e903eb..6a692f7 100644 (file)
@@ -59,7 +59,7 @@
 *  =====================================================================
       PROGRAM CCHKRFP
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
          STOP
       END IF
 *
-      IF( FATAL ) THEN
-         WRITE( NOUT, FMT = 9999 )
-         STOP
-      END IF
-*
 *     Calculate and print the machine dependent constants.
 *
       EPS = SLAMCH( 'Underflow threshold' )
index 33bbad1..3a38d87 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @generated from LIN/dchksy_aa.f, fortran d -> c, Wed Nov 16 21:34:18 2016
 *
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       INTEGER            ISEED( 4 ), ISEEDY( 4 )
       REAL               RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      REAL               DGET06, CLANSY
-      EXTERNAL           DGET06, CLANSY
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, CERRSY, CGET04, CLACPY,
-     $                   CLARHS, CLATB4, CLATMS, CSYT02, DSYT03, DSYT05,
-     $                   DSYCON, CSYRFS, CSYT01_AA, CSYTRF_AA,
-     $                   DSYTRI2, CSYTRS_AA, XLAENV
+      EXTERNAL           ALAERH, ALAHD, ALASUM, CERRSY, CLACPY, CLARHS,
+     $                   CLATB4, CLATMS, CSYT02, CSYT01_AA, CSYTRF_AA,
+     $                   CSYTRS_AA, XLAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from CSYTRF and handle error.
 *
 *                    Check error code from CSYTRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'CSYTRS_AA', INFO, 0,
-     $                               UPLO, N, N, -1, -1, NRHS, IMAT,
-     $                               NFAIL, NERRS, NOUT )
-                     END IF
-*
-                     CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'CSYTRS_AA', INFO, 0,
+     $                                  UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                  NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
 *
-*                    Compute the residual for the solution
+*                       Compute the residual for the solution
 *
-                     CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
+                        CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
 *
 *
-*                    Print information about the tests that did not pass
-*                    the threshold.
+*                       Print information about the tests that did not pass
+*                       the threshold.
 *
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
-                        END IF
-  120                CONTINUE
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/cchksy_aa_2stage.f b/lapack-netlib/TESTING/LIN/cchksy_aa_2stage.f
new file mode 100644 (file)
index 0000000..c17ae54
--- /dev/null
@@ -0,0 +1,573 @@
+*> \brief \b CCHKSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE CCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NNB, NNS, NOUT
+*       REAL               THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       REAL               RWORK( * )
+*       COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CCHKSY_AA_2STAGE tests CSYTRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is COMPLEX array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex_lin
+*
+*  =====================================================================
+      SUBROUTINE CCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NN, NNB, NNS, NMAX, NOUT
+      REAL               THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+      REAL               RWORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX            CZERO
+      PARAMETER          ( CZERO = ( 0.0E+0, 0.0E+0 ) )
+      INTEGER            NTYPES
+      PARAMETER          ( NTYPES = 10 )
+      INTEGER            NTESTS
+      PARAMETER          ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3        PATH, MATPATH
+      INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      REAL               ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      REAL               RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, CERRSY, CLACPY, CLARHS,
+     $                   CLATB4, CLATMS, CSYT02, CSYT01, 
+     $                   CSYTRF_AA_2STAGE, CSYTRS_AA_2STAGE,
+     $                   XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Complex precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Complex precision'
+      MATPATH( 2: 3 ) = 'SY'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL CERRSY( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with CLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL CLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with CLATMS.
+*
+               SRNAMT = 'CLATMS'
+               CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from CLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'CLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = CZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = CZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = CZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = CZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate the test matrix A.
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL CLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'CSYTRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL CSYTRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from CSYTRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'CSYTRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+c                  CALL CSYT01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+c     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+c                  NT = 1
+                  NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'CLARHS'
+                     CALL CLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'CSYTRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL CSYTRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from CSYTRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'CSYTRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of CCHKSY_AA_2STAGE
+*
+      END
index 6f6d758..d56aa45 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_lin
 *
      $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                         RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/cdrvhe_aa_2stage.f b/lapack-netlib/TESTING/LIN/cdrvhe_aa_2stage.f
new file mode 100644 (file)
index 0000000..32be41f
--- /dev/null
@@ -0,0 +1,490 @@
+*> \brief \b CDRVHE_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE CDRVHE_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       REAL               THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       REAL               RWORK( * )
+*       COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CDRVHE_AA_2STAGE tests the driver routine CHESV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex_lin
+*
+*  =====================================================================
+      SUBROUTINE CDRVHE_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      REAL               THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      REAL               RWORK( * )
+      COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      REAL               ONE, ZERO
+      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      REAL               ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      REAL               RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      REAL               CLANHE, SGET06
+      EXTERNAL           CLANHE, SGET06
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, CERRVX,
+     $                   CGET04, CLACPY, CLARHS, CLATB4, CLATMS,
+     $                   CHESV_AA_2STAGE, CPOT02,
+     $                   CHETRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Complex precision'
+      PATH( 2: 3 ) = 'H2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Complex precision'
+      MATPATH( 2: 3 ) = 'HE'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL CERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with CLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL CLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with CLATMS.
+*
+                  SRNAMT = 'CLATMS'
+                  CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from CLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'CLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = ZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = ZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = ZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = ZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'CLARHS'
+                  CALL CLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test CHESV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL CLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using CHESV_AA.
+*
+                     SRNAMT = 'CHESV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL CHESV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from CHESV_AA .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'CHESV_AA', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+c                     CALL CHET01_AA( UPLO, N, A, LDA, AFAC, LDA,
+c     $                                  IWORK, AINV, LDA, RWORK,
+c     $                                  RESULT( 2 ) )
+c                     NT = 2
+                                         NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'CHESV_AA ',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of CDRVHE_AA_2STAGE
+*
+      END
index b9b8e0f..2c2d9ab 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
      $                   NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
      $                   COPYB, C, S, COPYS, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       REAL               EPS, NORMA, NORMB, RCOND
 *     ..
 *     .. Local Arrays ..
-      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY
-      REAL               RESULT( NTESTS ), RWORKQUERY
-      COMPLEX            WORKQUERY
+      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWQ
+      REAL               RESULT( NTESTS ), RWQ
+      COMPLEX            WQ
 *     ..
 *     .. Allocatable Arrays ..
       COMPLEX, ALLOCATABLE :: WORK (:)
       M = MMAX
       N = NMAX
       NRHS = NSMAX
-      LDA = MAX( 1, M )
-      LDB = MAX( 1, M, N )
       MNMIN = MAX( MIN( M, N ), 1 )
 *
 *     Compute workspace needed for routines
 *     CQRT14, CQRT17 (two side cases), CQRT15 and CQRT12
 *
-      LWORK = MAX( ( M+N )*NRHS,
+      LWORK = MAX( 1, ( M+N )*NRHS,
      $      ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ),
      $      MAX( M+MNMIN, NRHS*MNMIN,2*N+M ),
      $      MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) )
+      LRWORK = 1
+      LIWORK = 1
+*
+*     Iterate through all test cases and compute necessary workspace
+*     sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines.
+*
+      DO IM = 1, NM
+         M = MVAL( IM )
+         LDA = MAX( 1, M )
+         DO IN = 1, NN
+            N = NVAL( IN )
+            MNMIN = MAX(MIN( M, N ),1)
+            LDB = MAX( 1, M, N )
+            DO INS = 1, NNS
+               NRHS = NSVAL( INS )
+               DO IRANK = 1, 2
+                  DO ISCALE = 1, 3
+                     ITYPE = ( IRANK-1 )*3 + ISCALE
+                     IF( DOTYPE( ITYPE ) ) THEN
+                        IF( IRANK.EQ.1 ) THEN
+                           DO ITRAN = 1, 2
+                              IF( ITRAN.EQ.1 ) THEN
+                                 TRANS = 'N'
+                              ELSE
+                                 TRANS = 'C'
+                              END IF
+*
+*                             Compute workspace needed for CGELS
+                              CALL CGELS( TRANS, M, N, NRHS, A, LDA,
+     $                                    B, LDB, WQ, -1, INFO )
+                              LWORK_CGELS = INT( WQ )
+*                             Compute workspace needed for CGETSLS
+                              CALL CGETSLS( TRANS, M, N, NRHS, A, LDA,
+     $                                      B, LDB, WQ, -1, INFO )
+                              LWORK_CGETSLS = INT( WQ )
+                           ENDDO
+                        END IF
+*                       Compute workspace needed for CGELSY
+                        CALL CGELSY( M, N, NRHS, A, LDA, B, LDB,
+     $                               IWQ, RCOND, CRANK, WQ, -1, RWORK,
+     $                               INFO )
+                        LWORK_CGELSY = INT( WQ )
+                        LRWORK_CGELSY = 2*N
+*                       Compute workspace needed for CGELSS
+                        CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1, RWORK, INFO )
+                        LWORK_CGELSS = INT( WQ )
+                        LRWORK_CGELSS = 5*MNMIN
+*                       Compute workspace needed for CGELSD
+                        CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1, RWQ, IWQ,
+     $                               INFO )
+                        LWORK_CGELSD = INT( WQ )
+                        LRWORK_CGELSD = INT( RWQ )
+*                       Compute LIWORK workspace needed for CGELSY and CGELSD
+                        LIWORK = MAX( LIWORK, N, IWQ )
+*                       Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD
+                        LRWORK = MAX( LRWORK, LRWORK_CGELSY,
+     $                                LRWORK_CGELSS, LRWORK_CGELSD )
+*                       Compute LWORK workspace needed for all functions
+                        LWORK = MAX( LWORK, LWORK_CGELS, LWORK_CGETSLS,
+     $                               LWORK_CGELSY, LWORK_CGELSS,
+     $                               LWORK_CGELSD )
+                     END IF
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDDO
+      ENDDO
 *
-*     Compute workspace needed for CGELS
-      CALL CGELS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $            WORKQUERY, -1, INFO )
-      LWORK_CGELS = INT( WORKQUERY )
-*     Compute workspace needed for CGETSLS
-      CALL CGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $              WORKQUERY, -1, INFO )
-      LWORK_CGETSLS = INT( WORKQUERY )
-*     Compute workspace needed for CGELSY
-      CALL CGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY,
-     $             RCOND, CRANK, WORKQUERY, -1, RWORK, INFO )
-      LWORK_CGELSY = INT( WORKQUERY )
-      LRWORK_CGELSY = 2*N
-*     Compute workspace needed for CGELSS
-      CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1, RWORK, INFO )
-      LWORK_CGELSS = INT( WORKQUERY )
-      LRWORK_CGELSS = 5*MNMIN
-*     Compute workspace needed for CGELSD
-      CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK,
-     $             WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO )
-      LWORK_CGELSD = INT( WORKQUERY )
-      LRWORK_CGELSD = INT( RWORKQUERY )
-*     Compute LIWORK workspace needed for CGELSY and CGELSD
-      LIWORK = MAX( 1, N, IWORKQUERY )
-*     Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD
-      LRWORK = MAX( 1, LRWORK_CGELSY, LRWORK_CGELSS, LRWORK_CGELSD )
-*     Compute LWORK workspace needed for all functions
-      LWORK = MAX( 1, LWORK, LWORK_CGELS, LWORK_CGETSLS, LWORK_CGELSY,
-     $             LWORK_CGELSS, LWORK_CGELSD )
       LWLSY = LWORK
 *
       ALLOCATE( WORK( LWORK ) )
index ca798e1..2c71d0f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
       SUBROUTINE CDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
      +                    S_WORK_CLANGE, C_WORK_CGEQRF, TAU )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, NN, NOUT
 *
                               IF ( IALPHA.EQ. 1) THEN
                                  ALPHA = ZERO
-                              ELSE IF ( IALPHA.EQ. 1) THEN
+                              ELSE IF ( IALPHA.EQ. 2) THEN
                                  ALPHA = ONE
                               ELSE
                                  ALPHA = CLARND( 4, ISEED )
index 9f33b04..d3e6a39 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
       SUBROUTINE CDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
      +                    LDA, S_WORK_CLANGE )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDC, NN, NOUT
                         IF ( IALPHA.EQ. 1) THEN
                            ALPHA = ZERO
                            BETA = ZERO
-                        ELSE IF ( IALPHA.EQ. 1) THEN
+                        ELSE IF ( IALPHA.EQ. 2) THEN
                            ALPHA = ONE
                            BETA = ZERO
-                        ELSE IF ( IALPHA.EQ. 1) THEN
+                        ELSE IF ( IALPHA.EQ. 3) THEN
                            ALPHA = ZERO
                            BETA = ONE
                         ELSE
index b1a5f11..a9e53de 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @generated from LIN/ddrvsy_aa.f, fortran d -> c, Thu Nov 17 12:14:51 2016
 *
      $                      NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                      RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       EXTERNAL           DGET06, CLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALADHD, ALAERH, ALASVM, DERRVX, CGET04, CLACPY,
-     $                   CLARHS, CLASET, CLATB4, CLATMS, CSYT02, DSYT05,
+      EXTERNAL           ALADHD, ALAERH, ALASVM, CERRVX, CGET04, CLACPY,
+     $                   CLARHS, CLASET, CLATB4, CLATMS, CSYT02,
      $                   CSYSV_AA, CSYT01_AA, CSYTRF_AA, XLAENV
 *     ..
 *     .. Scalars in Common ..
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/cdrvsy_aa_2stage.f b/lapack-netlib/TESTING/LIN/cdrvsy_aa_2stage.f
new file mode 100644 (file)
index 0000000..2b766bc
--- /dev/null
@@ -0,0 +1,490 @@
+*> \brief \b CDRVSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE CDRVSY_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       REAL               THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       REAL               RWORK( * )
+*       COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> CDRVSY_AA_2STAGE tests the driver routine CSYSV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is COMPLEX array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex_lin
+*
+*  =====================================================================
+      SUBROUTINE CDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      REAL               THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      REAL               RWORK( * )
+      COMPLEX            A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX            CZERO
+      PARAMETER          ( CZERO = ( 0.0E+0, 0.0E+0 ) )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      REAL               ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      REAL               RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      COMPLEX            CLANSY, SGET06
+      EXTERNAL           CLANSY, SGET06
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, CERRVX,
+     $                   CGET04, CLACPY, CLARHS, CLATB4, CLATMS,
+     $                   CSYSV_AA_2STAGE, CSYT01_AA, CSYT02,
+     $                   CSYTRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Complex precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Complex precision'
+      MATPATH( 2: 3 ) = 'SY'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL CERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with CLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL CLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with CLATMS.
+*
+                  SRNAMT = 'CLATMS'
+                  CALL CLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from CLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'CLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = CZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = CZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = CZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = CZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = CZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = CZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'CLARHS'
+                  CALL CLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test CSYSV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL CLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using CSYSV_AA.
+*
+                     SRNAMT = 'CSYSV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL CSYSV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from CSYSV_AA .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'CSYSV_AA', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+c                     CALL CSY01_AA( UPLO, N, A, LDA, AFAC, LDA,
+c     $                                  IWORK, AINV, LDA, RWORK,
+c     $                                  RESULT( 2 ) )
+c                     NT = 2
+                     NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'CSYSV_AA_2STAGE ',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of SDRVSY_AA_2STAGE
+*
+      END
index 535707f..9e8daa2 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
       SUBROUTINE CERRHE( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -94,6 +94,7 @@
      $                   CHETRI_3, CHETRI_3X, CHETRI_ROOK, CHETRI2,
      $                   CHETRI2X, CHETRS, CHETRS_3, CHETRS_ROOK,
      $                   CHETRS_AA, CHKXER, CHPCON, CHPRFS, CHPTRF,
+     $                   CHETRF_AA_2STAGE, CHETRS_AA_2STAGE,
      $                   CHPTRI, CHPTRS
 *     ..
 *     .. Scalars in Common ..
          CALL CHECON_3( 'U', 1, A, 1, E, IP, -1.0E0, RCOND, W, INFO)
          CALL CHKXER( 'CHECON_3', INFOT, NOUT, LERR, OK )
 *
-      ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
+      ELSE IF( LSAMEN( 2, C2, 'HA' ) ) THEN
 *
 *        Test error exits of the routines that use factorization
 *        of a Hermitian indefinite matrix with Aasen's algorithm.
          CALL CHETRF_AA( 'U', 2, A, 1, IP, W, 4, INFO )
          CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
          INFOT = 7
-         CALL CHETRF_AA( 'U', 0, A, 1, IP, W, 0, INFO )
+         CALL CHETRF_AA( 'U', 2, A, 2, IP, W, 0, INFO )
          CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
          INFOT = 7
-         CALL CHETRF_AA( 'U', 0, A, 1, IP, W, -2, INFO )
+         CALL CHETRF_AA( 'U', 2, A, 2, IP, W, -2, INFO )
          CALL CHKXER( 'CHETRF_AA', INFOT, NOUT, LERR, OK )
 *
 *        CHETRS_AA
          CALL CHETRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
          CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
          INFOT = 10
-         CALL CHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, 0, INFO )
+         CALL CHETRS_AA( 'U', 2, 1, A, 2, IP, B, 2, W, 0, INFO )
          CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
          INFOT = 10
-         CALL CHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
+         CALL CHETRS_AA( 'U', 2, 1, A, 2, IP, B, 2, W, -2, INFO )
          CALL CHKXER( 'CHETRS_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'H2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        CHETRF_AA_2STAGE
+*
+         SRNAMT = 'CHETRF_AA_2STAGE'
+         INFOT = 1
+         CALL CHETRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'CHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CHETRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL CHETRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL CHETRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL CHETRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'CHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        CHETRS_AA_2STAGE
+*
+         SRNAMT = 'CHETRS_AA_2STAGE'
+         INFOT = 1
+         CALL CHETRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CHETRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL CHETRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL CHETRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL CHETRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL CHETRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CHETRS_AA_STAGE', INFOT, NOUT, LERR, OK )
+*
 *        Test error exits of the routines that use factorization
 *        of a Hermitian indefinite packed matrix with patrial
 *        (Bunch-Kaufman) diagonal pivoting method.
index 90d6be9..17c9f36 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
       SUBROUTINE CERRSY( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
          CALL CSYTRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
          CALL CHKXER( 'CSYTRS_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        CSYTRF_AA_2STAGE
+*
+         SRNAMT = 'CSYTRF_AA_2STAGE'
+         INFOT = 1
+         CALL CSYTRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'CSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CSYTRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL CSYTRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL CSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'CSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL CSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'CSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        CHETRS_AA_2STAGE
+*
+         SRNAMT = 'CSYTRS_AA_2STAGE'
+         INFOT = 1
+         CALL CSYTRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CSYTRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL CSYTRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL CSYTRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL CSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL CSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'CSYTRS_AA_STAGE', INFOT, NOUT, LERR, OK )
+*
       END IF
 *
 *     Print a summary line.
index 2bddd2b..d2d3d2a 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
       SUBROUTINE CERRVX( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -94,7 +94,7 @@
      $                   CHPSV, CHPSVX, CPBSV, CPBSVX, CPOSV, CPOSVX,
      $                   CPPSV, CPPSVX, CPTSV, CPTSVX, CSPSV, CSPSVX,
      $                   CSYSV, CSYSV_AA, CSYSV_RK, CSYSV_ROOK,
-     $                   CSYSVX
+     $                   CSYSVX, CSYSV_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
          CALL CHESV_AA( 'U', 2, 0, A, 2, IP, B, 1, W, 1, INFO )
          CALL CHKXER( 'CHESV_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'H2' ) ) THEN
+*
+*        CHESV_AASEN_2STAGE
+*
+         SRNAMT = 'CHESV_AA_2STAGE'
+         INFOT = 1
+         CALL CHESV_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CHESV_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL CHESV_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL CHESV_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL CHESV_AA_2STAGE( 'U', 2, 1, A, 2, A, 2, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL CHESV_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP, B, 2,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        CSYSV_AASEN_2STAGE
+*
+         SRNAMT = 'CSYSV_AA_2STAGE'
+         INFOT = 1
+         CALL CSYSV_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL CSYSV_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL CSYSV_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL CSYSV_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL CSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 2, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL CSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP, B, 2,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'CSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
 *
 *        CHPSV
index 3e08c09..a1b63ae 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
       SUBROUTINE CHET01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 86a44e3..cca9ddb 100644 (file)
 *       LOGICAL            LERR, OK
 *       CHARACTER*(*)      SRNAMT
 *       INTEGER            INFOT, NOUT
-*       ..
-*       .. Intrinsic Functions ..
-*       INTRINSIC          LEN_TRIM
-*       ..
-*       .. Executable Statements ..
-*       IF( .NOT.LERR ) THEN
-*          WRITE( NOUT, FMT = 9999 )INFOT,
-*      $        SRNAMT( 1:LEN_TRIM( SRNAMT ) )
-*          OK = .FALSE.
-*       END IF
-*       LERR = .FALSE.
-*       RETURN
-*
-*  9999 FORMAT( ' *** Illegal value of parameter number ', I2,
-*      $      ' not detected by ', A6, ' ***' )
-*
-*       End of CHKXER.
-*
-*       END
+*
 *
 *> \par Purpose:
 *  =============
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
       SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
 *
-*  -- LAPACK test routine (input) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            LERR, OK
index 0ce9eb1..f88491a 100644 (file)
@@ -8,11 +8,11 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+*       SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
 *            INFO, PATH)
 *
 *       .. Scalar Arguments ..
-*       INTEGER T, N, NRHS, LDA, LDX, LDB, INFO
+*       INTEGER N, NRHS, LDA, LDX, LDB, INFO
 *       .. Array Arguments ..
 *       REAL WORK(N)
 *       COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
@@ -56,7 +56,7 @@
 *>
 *> \param[in] NRHS
 *> \verbatim
-*>          NRHS is NRHS
+*>          NRHS is INTEGER
 *>          The requested number of right-hand sides.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
 *  =====================================================================
-      SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+      SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
      $     INFO, PATH)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
-      INTEGER T, N, NRHS, LDA, LDX, LDB, INFO
+      INTEGER N, NRHS, LDA, LDX, LDB, INFO
 *     .. Array Arguments ..
       REAL WORK(N)
       COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
       END DO
 *
 *     Generate the scaled Hilbert matrix in A
-*     If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i*
+*     If we are testing SY routines, take
+*          D1_i = D2_i, else, D1_i = D2_i*
       IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
          DO J = 1, N
             DO I = 1, N
          WORK(J) = (  ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1)  )
      $        * (N +J -1)
       END DO
-*
-*     If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i*
+
+*     If we are testing SY routines,
+*            take D1_i = D2_i, else, D1_i = D2_i*
       IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
          DO J = 1, NRHS
             DO I = 1, N
index ddf5706..8b2b31b 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0: successful exit
-*>          < 0: if INFO = -k, the k-th argument had an illegal value
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
       SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 9d4ed77..3f0f532 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex_lin
 *
       SUBROUTINE CSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 4be10b3..c5fd7af 100644 (file)
@@ -53,6 +53,7 @@
 *> DSR   10               List types on next line if 0 < NTYPES < 10
 *> DSK   10               List types on next line if 0 < NTYPES < 10
 *> DSA   10               List types on next line if 0 < NTYPES < 10
+*> DS2   10               List types on next line if 0 < NTYPES < 10
 *> DSP   10               List types on next line if 0 < NTYPES < 10
 *> DTR   18               List types on next line if 0 < NTYPES < 18
 *> DTP   18               List types on next line if 0 < NTYPES < 18
 *  =====================================================================
       PROGRAM DCHKAA
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
      $                   RANKVAL( MAXIN ), PIV( NMAX )
       DOUBLE PRECISION   A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ),
      $                   E( NMAX ), RWORK( 5*NMAX+2*MAXRHS ),
-     $                   S( 2*NMAX ), WORK( NMAX, NMAX+MAXRHS+30 )
+     $                   S( 2*NMAX ), WORK( NMAX, 3*NMAX+MAXRHS+30 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME, LSAMEN
          END IF
 *
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        SA:  symmetric indefinite matrices,
+*             with partial (Aasen's) pivoting algorithm
+*
+         NTYPES = 10
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL DCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2,
+     $                         NNS, NSVAL, THRESH, TSTERR, LDA,
+     $                         A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL DDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9988 )PATH
+         END IF
+*
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        SP:  symmetric indefinite packed matrices,
index 42ebc96..75940af 100644 (file)
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
      $                     NBVAL, NOUT )
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DOUBLE PRECISION   RESULT( NTESTS )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT04
+      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT05
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
index d6c50fb..cf59e88 100644 (file)
@@ -59,7 +59,7 @@
 *  =====================================================================
       PROGRAM DCHKRFP
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
          STOP
       END IF
 *
-      IF( FATAL ) THEN
-         WRITE( NOUT, FMT = 9999 )
-         STOP
-      END IF
-*
 *     Calculate and print the machine dependent constants.
 *
       EPS = DLAMCH( 'Underflow threshold' )
index 53d7db6..8974cde 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @precisions fortran d -> z c
 *
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       INTEGER            ISEED( 4 ), ISEEDY( 4 )
       DOUBLE PRECISION   RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DGET06, DLANSY
-      EXTERNAL           DGET06, DLANSY
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRSY, DGET04, DLACPY,
-     $                   DLARHS, DLATB4, DLATMS, DPOT02, DPOT03, DPOT05,
-     $                   DSYCON, DSYRFS, DSYT01_AA, DSYTRF_AA,
-     $                   DSYTRI2, DSYTRS_AA, XLAENV
+      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRSY, DLACPY, DLARHS,
+     $                   DLATB4, DLATMS, DPOT02, DSYT01_AA, DSYTRF_AA,
+     $                   DSYTRS_AA, XLAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from DSYTRF and handle error.
 *
 *                    Check error code from DSYTRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'DSYTRS_AA', INFO, 0,
-     $                               UPLO, N, N, -1, -1, NRHS, IMAT,
-     $                               NFAIL, NERRS, NOUT )
-                     END IF
-*
-                     CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'DSYTRS_AA', INFO, 0,
+     $                                  UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                  NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
 *
-*                    Compute the residual for the solution
+*                       Compute the residual for the solution
 *
-                     CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
+                        CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
 *
 *
-*                    Print information about the tests that did not pass
-*                    the threshold.
+*                       Print information about the tests that did not pass
+*                       the threshold.
 *
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
-                        END IF
-  120                CONTINUE
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/dchksy_aa_2stage.f b/lapack-netlib/TESTING/LIN/dchksy_aa_2stage.f
new file mode 100644 (file)
index 0000000..5698bcf
--- /dev/null
@@ -0,0 +1,572 @@
+*> \brief \b DCHKSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE DCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NNB, NNS, NOUT
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       DOUBLE PRECISION   A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DCHKSY_AA_2STAGE tests DSYTRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*  @precisions fortran d -> z c
+*
+*> \ingroup double_lin
+*
+*  =====================================================================
+      SUBROUTINE DCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NN, NNB, NNS, NMAX, NOUT
+      DOUBLE PRECISION   THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      DOUBLE PRECISION   A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      INTEGER            NTYPES
+      PARAMETER          ( NTYPES = 10 )
+      INTEGER            NTESTS
+      PARAMETER          ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3        PATH, MATPATH
+      INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRSY, DLACPY, DLARHS,
+     $                   DLATB4, DLATMS, DPOT02, DSYTRF_AA_2STAGE
+     $                   DSYTRS_AA_2STAGE, XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Double precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Double precision'
+      MATPATH( 2: 3 ) = 'SY'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL DERRSY( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with DLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL DLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with DLATMS.
+*
+               SRNAMT = 'DLATMS'
+               CALL DLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from DLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'DLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = ZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = ZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = ZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = ZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = ZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = ZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate the test matrix A.
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL DLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'DSYTRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL DSYTRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from DSYTRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'DSYTRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+c                  CALL DSYT01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+c     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+c                  NT = 1
+                  NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'DLARHS'
+                     CALL DLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL DLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'DSYTRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL DSYTRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from DSYTRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'DSYTRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of DCHKSY_AA_2STAGE
+*
+      END
index 5d190e1..2f49755 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
      $                   NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
      $                   COPYB, C, S, COPYS, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DOUBLE PRECISION   EPS, NORMA, NORMB, RCOND
 *     ..
 *     .. Local Arrays ..
-      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY
-      DOUBLE PRECISION   RESULT( NTESTS ), WORKQUERY
+      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWQ
+      DOUBLE PRECISION   RESULT( NTESTS ), WQ
 *     ..
 *     .. Allocatable Arrays ..
       DOUBLE PRECISION, ALLOCATABLE :: WORK (:)
       M = MMAX
       N = NMAX
       NRHS = NSMAX
-      LDA = MAX( 1, M )
-      LDB = MAX( 1, M, N )
       MNMIN = MAX( MIN( M, N ), 1 )
 *
 *     Compute workspace needed for routines
 *     DQRT14, DQRT17 (two side cases), DQRT15 and DQRT12
 *
-      LWORK = MAX( ( M+N )*NRHS,
+      LWORK = MAX( 1, ( M+N )*NRHS,
      $      ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ),
      $      MAX( M+MNMIN, NRHS*MNMIN,2*N+M ),
      $      MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) )
+      LIWORK = 1
+*
+*     Iterate through all test cases and compute necessary workspace
+*     sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines.
+*
+      DO IM = 1, NM
+         M = MVAL( IM )
+         LDA = MAX( 1, M )
+         DO IN = 1, NN
+            N = NVAL( IN )
+            MNMIN = MAX(MIN( M, N ),1)
+            LDB = MAX( 1, M, N )
+            DO INS = 1, NNS
+               NRHS = NSVAL( INS )
+               DO IRANK = 1, 2
+                  DO ISCALE = 1, 3
+                     ITYPE = ( IRANK-1 )*3 + ISCALE
+                     IF( DOTYPE( ITYPE ) ) THEN
+                        IF( IRANK.EQ.1 ) THEN
+                           DO ITRAN = 1, 2
+                              IF( ITRAN.EQ.1 ) THEN
+                                 TRANS = 'N'
+                              ELSE
+                                 TRANS = 'T'
+                              END IF
+*
+*                             Compute workspace needed for DGELS
+                              CALL DGELS( TRANS, M, N, NRHS, A, LDA,
+     $                                    B, LDB, WQ, -1, INFO )
+                              LWORK_DGELS = INT ( WQ )
+*                             Compute workspace needed for DGETSLS
+                              CALL DGETSLS( TRANS, M, N, NRHS, A, LDA,
+     $                                      B, LDB, WQ, -1, INFO )
+                              LWORK_DGETSLS = INT( WQ )
+                           ENDDO
+                        END IF
+*                       Compute workspace needed for DGELSY
+                        CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ,
+     $                               RCOND, CRANK, WQ, -1, INFO )
+                        LWORK_DGELSY = INT( WQ )
+*                       Compute workspace needed for DGELSS
+                        CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1 , INFO )
+                        LWORK_DGELSS = INT( WQ )
+*                       Compute workspace needed for DGELSD
+                        CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1, IWQ, INFO )
+                        LWORK_DGELSD = INT( WQ )
+*                       Compute LIWORK workspace needed for DGELSY and DGELSD
+                        LIWORK = MAX( LIWORK, N, IWQ )
+*                       Compute LWORK workspace needed for all functions
+                        LWORK = MAX( LWORK, LWORK_DGELS, LWORK_DGETSLS,
+     $                               LWORK_DGELSY, LWORK_DGELSS,
+     $                               LWORK_DGELSD )
+                     END IF
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDDO
+      ENDDO
 *
-*     Compute workspace needed for DGELS
-      CALL DGELS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $            WORKQUERY, -1, INFO )
-      LWORK_DGELS = INT ( WORKQUERY )
-*     Compute workspace needed for DGETSLS
-      CALL DGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $              WORKQUERY, -1, INFO )
-      LWORK_DGETSLS = INT( WORKQUERY )
-*     Compute workspace needed for DGELSY
-      CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY,
-     $             RCOND, CRANK, WORKQUERY, -1, INFO )
-      LWORK_DGELSY = INT( WORKQUERY )
-*     Compute workspace needed for DGELSS
-      CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1 , INFO )
-      LWORK_DGELSS = INT( WORKQUERY )
-*     Compute workspace needed for DGELSD
-      CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO )
-      LWORK_DGELSD = INT( WORKQUERY )
-*     Compute LIWORK workspace needed for DGELSY and DGELSD
-      LIWORK = MAX( 1, N, IWORKQUERY )
-*     Compute LWORK workspace needed for all functions
-      LWORK = MAX( 1, LWORK, LWORK_DGELS, LWORK_DGETSLS, LWORK_DGELSY,
-     $             LWORK_DGELSS, LWORK_DGELSD )
       LWLSY = LWORK
 *
       ALLOCATE( WORK( LWORK ) )
index c00aac1..59d2918 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
       SUBROUTINE DDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
      +                    D_WORK_DLANGE, D_WORK_DGEQRF, TAU )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, NN, NOUT
 *
                               IF ( IALPHA.EQ. 1) THEN
                                  ALPHA = ZERO
-                              ELSE IF ( IALPHA.EQ. 1) THEN
+                              ELSE IF ( IALPHA.EQ. 2) THEN
                                  ALPHA = ONE
                               ELSE
                                  ALPHA = DLARND( 2, ISEED )
index af39303..cf1b638 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *  @precisions fortran d -> z c
 *
      $                      NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                      RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           ALADHD, ALAERH, ALASVM, DERRVX, DGET04, DLACPY,
-     $                   DLARHS, DLASET, DLATB4, DLATMS, DPOT02, DPOT05,
+     $                   DLARHS, DLASET, DLATB4, DLATMS, DPOT02,
      $                   DSYSV_AA, DSYT01_AA, DSYTRF_AA, XLAENV
 *     ..
 *     .. Scalars in Common ..
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/ddrvsy_aa_2stage.f b/lapack-netlib/TESTING/LIN/ddrvsy_aa_2stage.f
new file mode 100644 (file)
index 0000000..0be321e
--- /dev/null
@@ -0,0 +1,490 @@
+*> \brief \b DDRVSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE DDRVSY_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       DOUBLE PRECISION   A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DDRVSY_AA_2STAGE tests the driver routine DSYSV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup double_lin
+*
+*  =====================================================================
+      SUBROUTINE DDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      DOUBLE PRECISION               THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      DOUBLE PRECISION   RWORK( * )
+      DOUBLE PRECISION   A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLANSY, SGET06
+      EXTERNAL           DLANSY, SGET06
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, DERRVX,
+     $                   DGET04, DLACPY, DLARHS, DLATB4, DLATMS,
+     $                   DSYSV_AA_2STAGE, CHET01_AA, DPOT02,
+     $                   DSYTRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Double precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Double precision'
+      MATPATH( 2: 3 ) = 'SY'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL DERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with DLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL DLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with DLATMS.
+*
+                  SRNAMT = 'DLATMS'
+                  CALL DLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from DLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'DLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = ZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = ZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = ZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = ZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'DLARHS'
+                  CALL DLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test DSYSV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL DLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL DLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using DSYSV_AA.
+*
+                     SRNAMT = 'DSYSV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL DSYSV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from DSYSV_AA .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'DSYSV_AA', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+c                     CALL CHET01_AA( UPLO, N, A, LDA, AFAC, LDA,
+c     $                                  IWORK, AINV, LDA, RWORK,
+c     $                                  RESULT( 2 ) )
+c                     NT = 2
+                     NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'DSYSV_AA ',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of DDRVSY_AA_2STAGE
+*
+      END
index d7d00fa..b511cdc 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_lin
 *
 *  =====================================================================
       SUBROUTINE DERRSY( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -93,7 +93,7 @@
      $                   DSYTRF_RK, DSYTRF_ROOK, DSYTRF_AA, DSYTRI,
      $                   DSYTRI_3, DSYTRI_3X, DSYTRI_ROOK, DSYTRI2,
      $                   DSYTRI2X, DSYTRS, DSYTRS_3, DSYTRS_ROOK,
-     $                   DSYTRS_AA
+     $                   DSYTRS_AA, DSYTRF_AA_2STAGE, DSYTRS_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
          CALL DSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, -2, INFO )
          CALL CHKXER( 'DSYTRS_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        DSYTRF_AA_2STAGE
+*
+         SRNAMT = 'DSYTRF_AA_2STAGE'
+         INFOT = 1
+         CALL DSYTRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'DSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL DSYTRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'DSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL DSYTRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'DSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL DSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'DSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL DSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'DSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        DSYTRS_AA_2STAGE
+*
+         SRNAMT = 'DSYTRS_AA_2STAGE'
+         INFOT = 1
+         CALL DSYTRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL DSYTRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL DSYTRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL DSYTRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL DSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL DSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'DSYTRS_AA_STAGE', INFOT, NOUT, LERR, OK )
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        Test error exits of the routines that use factorization
index 58f270c..3a4a6b7 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_lin
 *
 *  =====================================================================
       SUBROUTINE DERRVX( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -91,7 +91,8 @@
       EXTERNAL           CHKXER, DGBSV, DGBSVX, DGESV, DGESVX, DGTSV,
      $                   DGTSVX, DPBSV, DPBSVX, DPOSV, DPOSVX, DPPSV,
      $                   DPPSVX, DPTSV, DPTSVX, DSPSV, DSPSVX, DSYSV,
-     $                   DSYSV_AA, DSYSV_RK, DSYSV_ROOK, DSYSVX
+     $                   DSYSV_AA, DSYSV_RK, DSYSV_ROOK, DSYSVX,
+     $                   DSYSV_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
         CALL DSYSV_AA( 'U', 2, 0, A, 2, IP, B, 1, W, 1, INFO )
         CALL CHKXER( 'DSYSV_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        DSYSV_AASEN_2STAGE
+*
+         SRNAMT = 'DSYSV_AA_2STAGE'
+         INFOT = 1
+         CALL DSYSV_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP, B, 1, 
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL DSYSV_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP, B, 1, 
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL DSYSV_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP, B, 1, 
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL DSYSV_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL DSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 2, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL DSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP, B, 2,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'DSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        DSPSV
index a1989d5..e115e33 100644 (file)
@@ -8,7 +8,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*       SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
 *       .. Scalar Arguments ..
 *       INTEGER N, NRHS, LDA, LDX, LDB, INFO
@@ -53,7 +53,7 @@
 *>
 *> \param[in] NRHS
 *> \verbatim
-*>          NRHS is NRHS
+*>          NRHS is INTEGER
 *>          The requested number of right-hand sides.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
 *  =====================================================================
-      SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+      SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
       INTEGER TM, TI, R
       INTEGER M
       INTEGER I, J
-      COMPLEX*16 TMP
 *     ..
 *     .. Parameters ..
 *     NMAX_EXACT   the largest dimension where the generated data is
 *
 *     Generate matrix B as simply the first NRHS columns of M * the
 *     identity.
-      TMP = DBLE(M)
-      CALL DLASET('Full', N, NRHS, 0.0D+0, TMP, B, LDB)
-*
+      CALL DLASET('Full', N, NRHS, 0.0D+0, DBLE(M), B, LDB)
+
 *     Generate the true solutions in X.  Because B = the first NRHS
 *     columns of M*I, the true solutions are just the first NRHS columns
 *     of the inverse Hilbert matrix.
index 5eabb05..a12425e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
       SUBROUTINE DSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 657128b..5f7f291 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup aux_lin
 *
       INTEGER          FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
      $                 N4 )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*( * )    NAME, OPTS
@@ -244,3 +244,50 @@ C        ILAENV = 0
 *     End of ILAENV
 *
       END
+      INTEGER FUNCTION ILAENV2STAGE( ISPEC, NAME, OPTS, N1, N2,
+     $                               N3, N4 )
+*     .. Scalar Arguments ..
+      CHARACTER*( * )    NAME, OPTS
+      INTEGER            ISPEC, N1, N2, N3, N4
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local variables ..
+      INTEGER            IISPEC
+*     .. External Functions ..
+      INTEGER            IPARAM2STAGE
+      EXTERNAL           IPARAM2STAGE
+*     ..
+*     .. Arrays in Common ..
+      INTEGER            IPARMS( 100 )
+*     ..
+*     .. Common blocks ..
+      COMMON             / CLAENV / IPARMS
+*     ..
+*     .. Save statement ..
+      SAVE               / CLAENV /
+*     ..
+*     .. Executable Statements ..
+*
+      IF(( ISPEC.GE.1 ) .AND. (ISPEC.LE.5)) THEN
+*
+*     1 <= ISPEC <= 5: 2stage eigenvalues SVD routines. 
+*
+         IF( ISPEC.EQ.1 ) THEN
+             ILAENV2STAGE = IPARMS( 1 )
+         ELSE
+             IISPEC = 16 + ISPEC
+             ILAENV2STAGE = IPARAM2STAGE( IISPEC, NAME, OPTS,
+     $                                    N1, N2, N3, N4 ) 
+         ENDIF
+*
+      ELSE
+*
+*        Invalid value for ISPEC
+*
+         ILAENV2STAGE = -1
+      END IF
+*
+      RETURN
+      END
index bbee97b..33b109a 100644 (file)
@@ -53,6 +53,7 @@
 *> SSR   10               List types on next line if 0 < NTYPES < 10
 *> SSK   10               List types on next line if 0 < NTYPES < 10
 *> SSA   10               List types on next line if 0 < NTYPES < 10
+*> SS2   10               List types on next line if 0 < NTYPES < 10
 *> SSP   10               List types on next line if 0 < NTYPES < 10
 *> STR   18               List types on next line if 0 < NTYPES < 18
 *> STP   18               List types on next line if 0 < NTYPES < 18
 *  =====================================================================
       PROGRAM SCHKAA
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
      $                   SCHKTP, SCHKTR, SCHKTZ, SDRVGB, SDRVGE, SDRVGT,
      $                   SDRVLS, SDRVPB, SDRVPO, SDRVPP, SDRVPT, SDRVSP,
      $                   SDRVSY, SDRVSY_ROOK, SDRVSY_RK, SDRVSY_AA,
-     $                   ILAVER, SCHKLQTP, SCHKQRT, SCHKQRTP
+     $                   ILAVER, SCHKLQTP, SCHKQRT, SCHKQRTP,
+     $                   SCHKLQT, SCHKTSQR
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
            WRITE( NOUT, FMT = 9988 )PATH
         END IF
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        SA:  symmetric indefinite matrices,
+*             with partial (Aasen's) pivoting algorithm
+*
+         NTYPES = 10
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL SCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2,
+     $                         NNS, NSVAL, THRESH, TSTERR, LDA,
+     $                         A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL SDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+        ELSE
+           WRITE( NOUT, FMT = 9988 )PATH
+        END IF
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        SP:  symmetric indefinite packed matrices,
index 183882e..dbb44e0 100644 (file)
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
      $                     NBVAL, NOUT )
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       REAL               RESULT( NTESTS )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT04
+      EXTERNAL           ALAERH, ALAHD, ALASUM, SERRLQTP, SLQT05
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
index 8a6915d..32bae3b 100644 (file)
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_lin
 *
      $                     NBVAL, NOUT )
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       REAL               RESULT( NTESTS )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, SERRQRTP
+      EXTERNAL           ALAERH, ALAHD, ALASUM, SERRQRTP, SQRT05
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
index 75d19e3..066bca6 100644 (file)
@@ -59,7 +59,7 @@
 *  =====================================================================
       PROGRAM SCHKRFP
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
          STOP
       END IF
 *
-      IF( FATAL ) THEN
-         WRITE( NOUT, FMT = 9999 )
-         STOP
-      END IF
-*
 *     Calculate and print the machine dependent constants.
 *
       EPS = SLAMCH( 'Underflow threshold' )
index 35b1d95..93be3bd 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
-*
-*  @precisions fortran d -> z c
+*> \date November 2017
 *
 *> \ingroup real_lin
 *
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       INTEGER      ISEED( 4 ), ISEEDY( 4 )
       REAL         RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      REAL         DGET06, SLANSY
-      EXTERNAL     DGET06, SLANSY
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL     ALAERH, ALAHD, ALASUM, SERRSY, SGET04, SLACPY,
-     $             SLARHS, SLATB4, SLATMS, SPOT02, DPOT03, DPOT05,
-     $             DSYCON, SSYRFS, SSYT01_AA, SSYTRF_AA,
-     $             DSYTRI2, SSYTRS_AA, XLAENV
+      EXTERNAL           ALAERH, ALAHD, ALASUM, SERRSY, SLACPY, SLARHS,
+     $                   SLATB4, SLATMS, SPOT02, SSYT01_AA, SSYTRF_AA,
+     $                   SSYTRS_AA, XLAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC    MAX, MIN
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from SSYTRF and handle error.
 *
 *                    Check error code from SSYTRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'SSYTRS_AA', INFO, 0,
-     $                               UPLO, N, N, -1, -1, NRHS, IMAT,
-     $                               NFAIL, NERRS, NOUT )
-                     END IF
-*
-                     CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'SSYTRS_AA', INFO, 0,
+     $                                  UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                  NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                              )
 *
-*                    Compute the residual for the solution
+*                       Compute the residual for the solution
 *
-                     CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
+                        CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
 *
 *
 *                    Print information about the tests that did not pass
 *                    the threshold.
 *
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
-                        END IF
-  120                CONTINUE
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/schksy_aa_2stage.f b/lapack-netlib/TESTING/LIN/schksy_aa_2stage.f
new file mode 100644 (file)
index 0000000..7cdcc91
--- /dev/null
@@ -0,0 +1,572 @@
+*> \brief \b SCHKSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE SCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL    TSTERR
+*       INTEGER    NMAX, NN, NNB, NNS, NOUT
+*       REAL       THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL    DOTYPE( * )
+*       INTEGER    IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       REAL       A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $           RWORK( * ), WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> SCHKSY_AA_2STAGE tests SSYTRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is REAL array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is REAL array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is REAL array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup real_lin
+*
+*  =====================================================================
+      SUBROUTINE SCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL      TSTERR
+      INTEGER      NN, NNB, NNS, NMAX, NOUT
+      REAL         THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL      DOTYPE( * )
+      INTEGER      IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      REAL         A( * ), AFAC( * ), AINV( * ), B( * ),
+     $             RWORK( * ), WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      REAL         ZERO
+      PARAMETER    ( ZERO = 0.0E+0 )
+      INTEGER      NTYPES
+      PARAMETER    ( NTYPES = 10 )
+      INTEGER      NTESTS
+      PARAMETER    ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL      ZEROT
+      CHARACTER    DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3  PATH, MATPATH
+      INTEGER      I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $             IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $             N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      REAL         ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER    UPLOS( 2 )
+      INTEGER      ISEED( 4 ), ISEEDY( 4 )
+      REAL         RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, SERRSY, SLACPY, SLARHS,
+     $                   SLATB4, SLATMS, SPOT02, SSYT01_AA, 
+     $                   SSYTRF_AA_2STAGE, SSYTRS_AA_2STAGE,
+     $                   XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC    MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL      LERR, OK
+      CHARACTER*32 SRNAMT
+      INTEGER      INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON       / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON       / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA         ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA         UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Single precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Single precision'
+      MATPATH( 2: 3 ) = 'SY'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL SERRSY( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with SLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL SLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with SLATMS.
+*
+               SRNAMT = 'SLATMS'
+               CALL SLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from SLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'SLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = ZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = ZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = ZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = ZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = ZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = ZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate the test matrix A.
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL SLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'SSYTRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL SSYTRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from SSYTRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'SSYTRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+*                  CALL SSYT01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+*     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+*                  NT = 1
+                   NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'SLARHS'
+                     CALL SLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL SLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'SSYTRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL SSYTRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from SSYTRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'SSYTRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                              )
+*
+*                       Compute the residual for the solution
+*
+                        CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of DCHKSY_AA_2STAGE
+*
+      END
index 22416ca..5456150 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_lin
 *
      $                      THRESH, TSTERR, NMAX, A, AFAC, E, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       CHARACTER          DIST, TYPE, UPLO, XTYPE
       CHARACTER*3        PATH, MATPATH
       INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
-     $                   ITEMP, IUPLO, IZERO, J, K, KL, KU, LDA, LWORK,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK,
      $                   MODE, N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN,
      $                   NT
       REAL               ALPHA, ANORM, CNDNUM, CONST, STEMP, SING_MAX,
 *     ..
 *     .. Local Arrays ..
       CHARACTER          UPLOS( 2 )
-      INTEGER            IDUMMY( 1 ), ISEED( 4 ), ISEEDY( 4 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
       REAL               BLOCK( 2, 2 ), SDUMMY( 1 ), RESULT( NTESTS )
 *     ..
 *     .. External Functions ..
index c408a9b..2cf3439 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_lin
 *
      $                   NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
      $                   COPYB, C, S, COPYS, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       REAL               EPS, NORMA, NORMB, RCOND
 *     ..
 *     .. Local Arrays ..
-      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY
-      REAL               RESULT( NTESTS ), WORKQUERY
+      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWQ
+      REAL               RESULT( NTESTS ), WQ
 *     ..
 *     .. Allocatable Arrays ..
       REAL, ALLOCATABLE :: WORK (:)
       EXTERNAL           ALAERH, ALAHD, ALASVM, SAXPY, SERRLS, SGELS,
      $                   SGELSD, SGELSS, SGELSY, SGEMM, SLACPY,
      $                   SLARNV, SQRT13, SQRT15, SQRT16, SSCAL,
-     $                   XLAENV
+     $                   XLAENV, SGETSLS
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, LOG, MAX, MIN, REAL, SQRT
       M = MMAX
       N = NMAX
       NRHS = NSMAX
-      LDA = MAX( 1, M )
-      LDB = MAX( 1, M, N )
       MNMIN = MAX( MIN( M, N ), 1 )
 *
 *     Compute workspace needed for routines
 *     SQRT14, SQRT17 (two side cases), SQRT15 and SQRT12
 *
-      LWORK = MAX( ( M+N )*NRHS,
+      LWORK = MAX( 1, ( M+N )*NRHS,
      $      ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ),
      $      MAX( M+MNMIN, NRHS*MNMIN,2*N+M ),
      $      MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) )
+      LIWORK = 1
+*
+*     Iterate through all test cases and compute necessary workspace
+*     sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines.
+*
+      DO IM = 1, NM
+         M = MVAL( IM )
+         LDA = MAX( 1, M )
+         DO IN = 1, NN
+            N = NVAL( IN )
+            MNMIN = MAX(MIN( M, N ),1)
+            LDB = MAX( 1, M, N )
+            DO INS = 1, NNS
+               NRHS = NSVAL( INS )
+               DO IRANK = 1, 2
+                  DO ISCALE = 1, 3
+                     ITYPE = ( IRANK-1 )*3 + ISCALE
+                     IF( DOTYPE( ITYPE ) ) THEN
+                        IF( IRANK.EQ.1 ) THEN
+                           DO ITRAN = 1, 2
+                              IF( ITRAN.EQ.1 ) THEN
+                                 TRANS = 'N'
+                              ELSE
+                                 TRANS = 'T'
+                              END IF
+*
+*                             Compute workspace needed for SGELS
+                              CALL SGELS( TRANS, M, N, NRHS, A, LDA,
+     $                                    B, LDB, WQ, -1, INFO )
+                              LWORK_SGELS = INT ( WQ )
+*                             Compute workspace needed for SGETSLS
+                              CALL SGETSLS( TRANS, M, N, NRHS, A, LDA,
+     $                                      B, LDB, WQ, -1, INFO )
+                              LWORK_SGETSLS = INT( WQ )
+                           ENDDO
+                        END IF
+*                       Compute workspace needed for SGELSY
+                        CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ,
+     $                               RCOND, CRANK, WQ, -1, INFO )
+                        LWORK_SGELSY = INT( WQ )
+*                       Compute workspace needed for SGELSS
+                        CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1 , INFO )
+                        LWORK_SGELSS = INT( WQ )
+*                       Compute workspace needed for SGELSD
+                        CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1, IWQ, INFO )
+                        LWORK_SGELSD = INT( WQ )
+*                       Compute LIWORK workspace needed for SGELSY and SGELSD
+                        LIWORK = MAX( LIWORK, N, IWQ )
+*                       Compute LWORK workspace needed for all functions
+                        LWORK = MAX( LWORK, LWORK_SGELS, LWORK_SGETSLS,
+     $                               LWORK_SGELSY, LWORK_SGELSS,
+     $                               LWORK_SGELSD )
+                     END IF
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDDO
+      ENDDO
 *
-*     Compute workspace needed for SGELS
-      CALL SGELS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $            WORKQUERY, -1, INFO )
-      LWORK_SGELS = INT ( WORKQUERY )
-*     Compute workspace needed for SGETSLS
-      CALL SGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $              WORKQUERY, -1, INFO )
-      LWORK_SGETSLS = INT( WORKQUERY )
-*     Compute workspace needed for SGELSY
-      CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY,
-     $             RCOND, CRANK, WORKQUERY, -1, INFO )
-      LWORK_SGELSY = INT( WORKQUERY )
-*     Compute workspace needed for SGELSS
-      CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1 , INFO )
-      LWORK_SGELSS = INT( WORKQUERY )
-*     Compute workspace needed for SGELSD
-      CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO )
-      LWORK_SGELSD = INT( WORKQUERY )
-*     Compute LIWORK workspace needed for SGELSY and SGELSD
-      LIWORK = MAX( 1, N, IWORKQUERY )
-*     Compute LWORK workspace needed for all functions
-      LWORK = MAX( 1, LWORK, LWORK_SGELS, LWORK_SGETSLS, LWORK_SGELSY,
-     $             LWORK_SGELSS, LWORK_SGELSD )
       LWLSY = LWORK
 *
       ALLOCATE( WORK( LWORK ) )
index 33ac108..aa8e4f1 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_lin
 *
       SUBROUTINE SDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
      +                    S_WORK_SLANGE, S_WORK_SGEQRF, TAU )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, NN, NOUT
 *
                               IF ( IALPHA.EQ. 1) THEN
                                  ALPHA = ZERO
-                              ELSE IF ( IALPHA.EQ. 1) THEN
+                              ELSE IF ( IALPHA.EQ. 2) THEN
                                  ALPHA = ONE
                               ELSE
                                  ALPHA = SLARND( 2, ISEED )
index 8e5686f..e4357c4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup real_lin
 *
      $                      NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                      RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           ALADHD, ALAERH, ALASVM, SERRVX, SGET04, SLACPY,
-     $                   SLARHS, SLASET, SLATB4, SLATMS, SPOT02, DPOT05,
+     $                   SLARHS, SLASET, SLATB4, SLATMS, SPOT02,
      $                   SSYSV_AA, SSYT01_AA, SSYTRF_AA, XLAENV
 *     ..
 *     .. Scalars in Common ..
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/sdrvsy_aa_2stage.f b/lapack-netlib/TESTING/LIN/sdrvsy_aa_2stage.f
new file mode 100644 (file)
index 0000000..d8d9dc0
--- /dev/null
@@ -0,0 +1,490 @@
+*> \brief \b SDRVSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE SDRVSY_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       REAL               THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       REAL               RWORK( * )
+*       REAL               A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> SDRVSY_AA_2STAGE tests the driver routine SSYSV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is REAL
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is REAL array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup real_lin
+*
+*  =====================================================================
+      SUBROUTINE SDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      REAL               THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      REAL               RWORK( * )
+      REAL               A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      REAL               ONE, ZERO
+      PARAMETER          ( ONE = 1.0E+0, ZERO = 0.0E+0 )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      REAL               ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      REAL               RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      REAL               SLANSY, SGET06
+      EXTERNAL           SLANSY, SGET06
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, SERRVX,
+     $                   CGET04, SLACPY, SLARHS, SLATB4, SLATMS,
+     $                   SSYSV_AA_2STAGE, SSYT01_AA, SPOT02,
+     $                   SSYTRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Single precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Single precision'
+      MATPATH( 2: 3 ) = 'SY'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL SERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with SLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL SLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with SLATMS.
+*
+                  SRNAMT = 'SLATMS'
+                  CALL SLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from SLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'SLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = ZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = ZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = ZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = ZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'SLARHS'
+                  CALL SLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test SSYSV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL SLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL SLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using SSYSV_AA.
+*
+                     SRNAMT = 'SSYSV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL SSYSV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from SSYSV_AA .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'SSYSV_AA', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+c                     CALL SSY01_AA( UPLO, N, A, LDA, AFAC, LDA,
+c     $                                  IWORK, AINV, LDA, RWORK,
+c     $                                  RESULT( 2 ) )
+c                     NT = 2
+                     NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'SSYSV_AA ',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of SDRVSY_AA_2STAGE
+*
+      END
index ce6975d..fe9af2f 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_lin
 *
 *  =====================================================================
       SUBROUTINE SERRSY( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -92,8 +92,8 @@
      $                   SSYTF2_RK, SSYTF2_ROOK, SSYTRF, SSYTRF_RK,
      $                   SSYTRF_ROOK, SSYTRI, SSYTF2, SSYTRI_3,
      $                   SSYTRI_3X, SSYTRI_ROOK, SSYTRF_AA, SSYTRI2, 
-     $                   SYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK,
-     $                   SSYTRS_AA
+     $                   SSYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK,
+     $                   SSYTRS_AA, SSYTRF_AA_2STAGE, SSYTRS_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
          INFOT = 10
          CALL SSYTRS_AA( 'U', 0, 1, A, 2, IP, B, 1, W, -2, INFO )
          CALL CHKXER( 'SSYTRS_AA', INFOT, NOUT, LERR, OK )
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        SSYTRF_AA_2STAGE
+*
+         SRNAMT = 'SSYTRF_AA_2STAGE'
+         INFOT = 1
+         CALL SSYTRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'SSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL SSYTRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'SSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL SSYTRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'SSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL SSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'SSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL SSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'SSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        SSYTRS_AA_2STAGE
+*
+         SRNAMT = 'SSYTRS_AA_2STAGE'
+         INFOT = 1
+         CALL SSYTRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL SSYTRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL SSYTRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL SSYTRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL SSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL SSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'SSYTRS_AA_STAGE', INFOT, NOUT, LERR, OK )
 *
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
index 3317e84..a63ed38 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup single_lin
 *
 *  =====================================================================
       SUBROUTINE SERRVX( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -91,7 +91,8 @@
       EXTERNAL           CHKXER, SGBSV, SGBSVX, SGESV, SGESVX, SGTSV,
      $                   SGTSVX, SPBSV, SPBSVX, SPOSV, SPOSVX, SPPSV,
      $                   SPPSVX, SPTSV, SPTSVX, SSPSV, SSPSVX, SSYSV,
-     $                   SSYSV_AA, SSYSV_RK, SSYSV_ROOK, SSYSVX
+     $                   SSYSV_AA, SSYSV_RK, SSYSV_ROOK, SSYSVX,
+     $                   SSYSV_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
          CALL SSYSV_AA( 'U', 2, 0, A, 2, IP, B, 1, W, 1, INFO )
          CALL CHKXER( 'SSYSV_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        DSYSV_AASEN_2STAGE
+*
+         SRNAMT = 'SSYSV_AA_2STAGE'
+         INFOT = 1
+         CALL SSYSV_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL SSYSV_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL SSYSV_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL SSYSV_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL SSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 2, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL SSYSV_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP, B, 2,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'SSYSV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        SSPSV
index be7af41..7944f0e 100644 (file)
@@ -8,7 +8,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*       SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
 *       .. Scalar Arguments ..
 *       INTEGER N, NRHS, LDA, LDX, LDB, INFO
@@ -53,7 +53,7 @@
 *>
 *> \param[in] NRHS
 *> \verbatim
-*>          NRHS is NRHS
+*>          NRHS is INTEGER
 *>          The requested number of right-hand sides.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_lin
 *
 *  =====================================================================
-      SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+      SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
index d86caca..d0fb6de 100644 (file)
@@ -74,7 +74,7 @@
       SUBROUTINE SQRT04(M,N,NB,RESULT)
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
 *     .. Local Arrays ..
       INTEGER            ISEED( 4 )
 *     ..
+*     .. External Subroutine ..
+      EXTERNAL SGEMM, SLACPY, SLARNV, SGEMQRT, SLASET, SGEQRT, SSYRK
+*     ..
 *     .. External Functions ..
       REAL SLAMCH
       REAL SLANGE, SLANSY
index 705d289..0c1d527 100644 (file)
@@ -81,7 +81,7 @@
       SUBROUTINE SQRT05(M,N,L,NB,RESULT)
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
 *     .. Local Arrays ..
       INTEGER            ISEED( 4 )
 *     ..
+*     .. External Subroutine ..
+      EXTERNAL SGEMM, SLARNV, STPMQRT, STPQRT, SGEMQRT, SSYRK, SLACPY,
+     $         SLASET
+*     ..
 *     .. External Functions ..
       REAL SLAMCH
       REAL SLANGE, SLANSY
index f370962..11ddea4 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup single_lin
 *
       SUBROUTINE SSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index eecdf8a..c0fee71 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *
 *> \ingroup real_lin
       SUBROUTINE SSYT01_AA( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C,
      $                      LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
       EXTERNAL           LSAME, SLAMCH, SLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           SLASET, SLAVSY
+      EXTERNAL           SLASET, SLAVSY, SSWAP, STRMM, SLACPY
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DBLE
index 5146766..d2be252 100644 (file)
@@ -53,6 +53,9 @@
 *> ZHR   10               List types on next line if 0 < NTYPES < 10
 *> ZHK   10               List types on next line if 0 < NTYPES < 10
 *> ZHA   10               List types on next line if 0 < NTYPES < 10
+*> ZH2   10               List types on next line if 0 < NTYPES < 10
+*> ZSA   11               List types on next line if 0 < NTYPES < 10
+*> ZS2   11               List types on next line if 0 < NTYPES < 10
 *> ZHP   10               List types on next line if 0 < NTYPES < 10
 *> ZSY   11               List types on next line if 0 < NTYPES < 11
 *> ZSR   11               List types on next line if 0 < NTYPES < 11
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
 *  =====================================================================
       PROGRAM ZCHKAA
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *  =====================================================================
 *
      $                   ZCHKSY_ROOK, ZCHKSY_RK, ZCHKSY_AA, ZCHKTB,
      $                   ZCHKTP, ZCHKTR, ZCHKTZ, ZDRVGB, ZDRVGE, ZDRVGT,
      $                   ZDRVHE, ZDRVHE_ROOK, ZDRVHE_RK, ZDRVHE_AA,
-     $                   ZDRVHP, ZDRVLS, ZDRVPB, ZDRVPO, ZDRVPP, ZDRVPT,
-     $                   ZDRVSP, ZDRVSY, ZDRVSY_ROOK, ZDRVSY_RK,
-     $                   ZDRVSY_AA, ILAVER, ZCHKQRT, ZCHKQRTP, ZCHKLQT,
-     $                   ZCHKLQTP, ZCHKTSQR
+     $                   ZDRVHE_AA_2STAGE, ZDRVHP, ZDRVLS, ZDRVPB, 
+     $                   ZDRVPO, ZDRVPP, ZDRVPT, ZDRVSP, ZDRVSY,
+     $                   ZDRVSY_ROOK, ZDRVSY_RK, ZDRVSY_AA,
+     $                   ZDRVSY_AA_2STAGE, ILAVER, ZCHKQRT, ZCHKQRTP,
+     $                   ZCHKLQT, ZCHKLQTP, ZCHKTSQR
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
 *
       ELSE IF( LSAMEN( 2, C2, 'HA' ) ) THEN
 *
-*        HA:  Hermitian indefinite matrices,
-*             with partial (Aasen's) pivoting algorithm
+*        HA:  Hermitian matrices,
+*             Aasen Algorithm
 *
          NTYPES = 10
          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
             WRITE( NOUT, FMT = 9988 )PATH
          END IF
 *
+      ELSE IF( LSAMEN( 2, C2, 'H2' ) ) THEN
+*
+*        H2:  Hermitian matrices,
+*             with partial (Aasen's) pivoting algorithm
+*
+         NTYPES = 10
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL ZCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2,
+     $                         NNS, NSVAL, THRESH, TSTERR, LDA,
+     $                         A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                         B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL ZDRVHE_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                              B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                         WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9988 )PATH
+         END IF
+*
+*
       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
 *
 *        HP:  Hermitian indefinite packed matrices
 *
       ELSE IF( LSAMEN( 2, C2, 'SA' ) ) THEN
 *
-*        SK:  symmetric indefinite matrices,
-*             with bounded Bunch-Kaufman (rook) pivoting algorithm,
-*             differnet matrix storage format than SR path version.
+*        SA:  symmetric indefinite matrices with Aasen's algorithm,
 *
          NTYPES = 11
          CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
             WRITE( NOUT, FMT = 9988 )PATH
          END IF
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        S2:  symmetric indefinite matrices with Aasen's algorithm
+*             2 stage
+*
+         NTYPES = 11
+         CALL ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+         IF( TSTCHK ) THEN
+            CALL ZCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB2, NBVAL2, NNS,
+     $                      NSVAL, THRESH, TSTERR, LDA,
+     $                      A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                      B( 1, 1 ), B( 1, 2 ), B( 1, 3 ),
+     $                      WORK, RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9989 )PATH
+         END IF
+*
+         IF( TSTDRV ) THEN
+            CALL ZDRVSY_AA_2STAGE(
+     $                      DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                      LDA, A( 1, 1 ), A( 1, 2 ), A( 1, 3 ),
+     $                      B( 1, 1 ), B( 1, 2 ), B( 1, 3 ), WORK,
+     $                      RWORK, IWORK, NOUT )
+         ELSE
+            WRITE( NOUT, FMT = 9988 )PATH
+         END IF
+*
       ELSE IF( LSAMEN( 2, C2, 'SP' ) ) THEN
 *
 *        SP:  symmetric indefinite packed matrices,
index 36125cc..4100801 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *
 *> \ingroup complex16_lin
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       INTEGER            ISEED( 4 ), ISEEDY( 4 )
       DOUBLE PRECISION   RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DGET06, ZLANHE
-      EXTERNAL           DGET06, ZLANHE
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, XLAENV, ZERRHE, ZGET04,
-     $                   ZHECON, ZHERFS, ZHET01_AA, ZHETRF_AA, ZHETRI2,
-     $                   ZHETRS_AA, ZLACPY, ZLAIPD, ZLARHS, ZLATB4,
-     $                   ZLATMS, ZPOT02, ZPOT03, ZPOT05
+      EXTERNAL           ALAERH, ALAHD, ALASUM, XLAENV, ZERRHE,
+     $                   ZHET01_AA, ZHETRF_AA, ZHETRS_AA, ZLACPY,
+     $                   ZLAIPD, ZLARHS, ZLATB4, ZLATMS, ZPOT02
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from ZHETRF and handle error.
 *
 *                    Check error code from ZHETRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'ZHETRS', INFO, 0, UPLO, N,
-     $                                N, -1, -1, NRHS, IMAT, NFAIL,
-     $                                NERRS, NOUT )
-                     END IF
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'ZHETRS_AA', INFO, 0,
+     $                                  UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                  NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
 *
-                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                        CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
 *
-*                    Compute the residual for the solution
+*                       Compute the residual for the solution
 *
-                     CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
+                        CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
 *
-*                    Print information about the tests that did not pass
-*                    the threshold.
+*                       Print information about the tests that did not pass
+*                       the threshold.
 *
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
-                        END IF
-  120                CONTINUE
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/zchkhe_aa_2stage.f b/lapack-netlib/TESTING/LIN/zchkhe_aa_2stage.f
new file mode 100644 (file)
index 0000000..43c5435
--- /dev/null
@@ -0,0 +1,580 @@
+*> \brief \b ZCHKHE_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NNB, NNS, NOUT
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZCHKSY_AA_2STAGE tests ZHETRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16_lin
+*
+*  =====================================================================
+      SUBROUTINE ZCHKHE_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NN, NNB, NNS, NMAX, NOUT
+      DOUBLE PRECISION   THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO
+      PARAMETER          ( ZERO = 0.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+      INTEGER            NTYPES
+      PARAMETER          ( NTYPES = 10 )
+      INTEGER            NTESTS
+      PARAMETER          ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3        PATH, MATPATH
+      INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, ZERRHE, ZLACPY, 
+     $                   ZLARHS, ZLATB4, ZLATMS, ZPOT02, 
+     $                   ZHETRF_AA_2STAGE, ZHETRS_AA_2STAGE,
+     $                   XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Zomplex precision'
+      PATH( 2: 3 ) = 'H2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Zomplex precision'
+      MATPATH( 2: 3 ) = 'HE'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL ZERRHE( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with ZLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL ZLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with ZLATMS.
+*
+               SRNAMT = 'ZLATMS'
+               CALL ZLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from ZLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'ZLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = CZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = CZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = CZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = CZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate test matrix A.
+*
+*
+*              Set the imaginary part of the diagonals.
+*
+               CALL ZLAIPD( N, A, LDA+1, 0 )
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL ZLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'ZHETRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL ZHETRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from CHETRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'ZHETRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+*                 NEED TO CREATE ZHET01_AA_2STAGE
+*                  CALL ZHET01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+*     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+*                  NT = 1
+                  NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'ZLARHS'
+                     CALL ZLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'ZHETRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL ZHETRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from ZHETRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'ZHETRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+*
+                        CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of ZCHKSY_AA_2STAGE
+*
+      END
index 27586a4..ba5fd61 100644 (file)
@@ -59,7 +59,7 @@
 *  =====================================================================
       PROGRAM ZCHKRFP
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
          STOP
       END IF
 *
-      IF( FATAL ) THEN
-         WRITE( NOUT, FMT = 9999 )
-         STOP
-      END IF
-*
 *     Calculate and print the machine dependent constants.
 *
       EPS = DLAMCH( 'Underflow threshold' )
index 465f06d..186a5b3 100644 (file)
 *       .. Scalar Arguments ..
 *       LOGICAL            TSTERR
 *       INTEGER            NMAX, NN, NNB, NNS, NOUT
-*       COMPLEX*16         THRESH
+*       DOUBLE PRECISION   THRESH
 *       ..
 *       .. Array Arguments ..
 *       LOGICAL            DOTYPE( * )
 *       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
 *       COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
-*      $                   RWORK( * ), WORK( * ), X( * ), XACT( * )
+*      $                   WORK( * ), X( * ), XACT( * )
 *       ..
 *
 *
@@ -82,7 +83,7 @@
 *>
 *> \param[in] THRESH
 *> \verbatim
-*>          THRESH is COMPLEX*16
+*>          THRESH is DOUBLE PRECISION
 *>          The threshold value for the test ratios.  A result is
 *>          included in the output file if RESULT >= THRESH.  To have
 *>          every test ratio printed, use THRESH = 0.
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
-*
-*  @generated from LIN/dchksy_aa.f, fortran d -> z, Wed Nov 16 21:34:18 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
      $                      THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
      $                      X, XACT, WORK, RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
       IMPLICIT NONE
 *
       DOUBLE PRECISION   ZERO
       PARAMETER          ( ZERO = 0.0D+0 )
       COMPLEX*16         CZERO
-      PARAMETER          ( CZERO = 0.0E+0 )
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
       INTEGER            NTYPES
       PARAMETER          ( NTYPES = 10 )
       INTEGER            NTESTS
       INTEGER            ISEED( 4 ), ISEEDY( 4 )
       DOUBLE PRECISION   RESULT( NTESTS )
 *     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DGET06, ZLANSY
-      EXTERNAL           DGET06, ZLANSY
-*     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, ZERRSY, ZGET04, ZLACPY,
-     $                   ZLARHS, ZLATB4, ZLATMS, ZSYT02, DSYT03, DSYT05,
-     $                   DSYCON, ZSYRFS, ZSYT01_AA, ZSYTRF_AA,
-     $                   DSYTRI2, ZSYTRS_AA, XLAENV
+      EXTERNAL           ALAERH, ALAHD, ALASUM, ZERRSY, ZLACPY, ZLARHS,
+     $                   ZLATB4, ZLATMS, ZSYT02, ZSYT01_AA, ZSYTRF_AA,
+     $                   ZSYTRS_AA, XLAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *                 Adjust the expected value of INFO to account for
 *                 pivoting.
 *
-                  IF( IZERO.GT.0 ) THEN
-                     J = 1
-                     K = IZERO
-  100                CONTINUE
-                     IF( J.EQ.K ) THEN
-                        K = IWORK( J )
-                     ELSE IF( IWORK( J ).EQ.K ) THEN
-                        K = J
-                     END IF
-                     IF( J.LT.K ) THEN
-                        J = J + 1
-                        GO TO 100
-                     END IF
-                  ELSE
+c                  IF( IZERO.GT.0 ) THEN
+c                     J = 1
+c                     K = IZERO
+c  100                CONTINUE
+c                     IF( J.EQ.K ) THEN
+c                        K = IWORK( J )
+c                     ELSE IF( IWORK( J ).EQ.K ) THEN
+c                        K = J
+c                     END IF
+c                     IF( J.LT.K ) THEN
+c                        J = J + 1
+c                        GO TO 100
+c                     END IF
+c                  ELSE
                      K = 0
-                  END IF
+c                  END IF
 *
 *                 Check error code from ZSYTRF and handle error.
 *
 *                    Check error code from ZSYTRS and handle error.
 *
                      IF( INFO.NE.0 ) THEN
-                        CALL ALAERH( PATH, 'ZSYTRS_AA', INFO, 0,
-     $                               UPLO, N, N, -1, -1, NRHS, IMAT,
-     $                               NFAIL, NERRS, NOUT )
-                     END IF
-*
-                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'ZSYTRS_AA', INFO, 0,
+     $                                  UPLO, N, N, -1, -1, NRHS, IMAT,
+     $                                  NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
 *
-*                    Compute the residual for the solution
+*                       Compute the residual for the solution
 *
-                     CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
-     $                            LDA, RWORK, RESULT( 2 ) )
+                        CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
 *
 *
-*                    Print information about the tests that did not pass
-*                    the threshold.
+*                       Print information about the tests that did not pass
+*                       the threshold.
 *
-                     DO 120 K = 2, 2
-                        IF( RESULT( K ).GE.THRESH ) THEN
-                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
-     $                        CALL ALAHD( NOUT, PATH )
-                           WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
-     $                        IMAT, K, RESULT( K )
-                           NFAIL = NFAIL + 1
-                        END IF
-  120                CONTINUE
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
                      NRUN = NRUN + 1
 *
 *                 End do for each value of NRHS in NSVAL.
diff --git a/lapack-netlib/TESTING/LIN/zchksy_aa_2stage.f b/lapack-netlib/TESTING/LIN/zchksy_aa_2stage.f
new file mode 100644 (file)
index 0000000..d4d8c29
--- /dev/null
@@ -0,0 +1,573 @@
+*> \brief \b ZCHKSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, 
+*                             NNS, NSVAL, THRESH, TSTERR, NMAX, A,
+*                             AFAC, AINV, B, X, XACT, WORK, RWORK,
+*                             IWORK, NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NNB, NNS, NOUT
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZCHKSY_AA_2STAGE tests ZSYTRF_AA_2STAGE, -TRS_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*>          NNB is INTEGER
+*>          The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*>          NBVAL is INTEGER array, dimension (NBVAL)
+*>          The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*>          NNS is INTEGER
+*>          The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*>          NSVAL is INTEGER array, dimension (NNS)
+*>          The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*>          where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is COMPLEX*16 array, dimension (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16_lin
+*
+*  =====================================================================
+      SUBROUTINE ZCHKSY_AA_2STAGE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS,
+     $                      NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV,
+     $                      B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+      IMPLICIT NONE
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NN, NNB, NNS, NMAX, NOUT
+      DOUBLE PRECISION   THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+      INTEGER            NTYPES
+      PARAMETER          ( NTYPES = 10 )
+      INTEGER            NTESTS
+      PARAMETER          ( NTESTS = 9 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, TYPE, UPLO, XTYPE
+      CHARACTER*3        PATH, MATPATH
+      INTEGER            I, I1, I2, IMAT, IN, INB, INFO, IOFF, IRHS,
+     $                   IUPLO, IZERO, J, K, KL, KU, LDA, LWORK, MODE,
+     $                   N, NB, NERRS, NFAIL, NIMAT, NRHS, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALAERH, ALAHD, ALASUM, CERRSY, ZLACPY, ZLARHS,
+     $                   CLATB4, ZLATMS, ZSYT02, ZSYT01, 
+     $                   ZSYTRF_AA_2STAGE, ZSYTRS_AA_2STAGE,
+     $                   XLAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Zomplex precision'
+      PATH( 2: 3 ) = 'S2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Zomplex precision'
+      MATPATH( 2: 3 ) = 'SY'
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL ZERRSY( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the minimum block size for which the block routine should
+*     be used, which will be later returned by ILAENV
+*
+      CALL XLAENV( 2, 2 )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         IF( N .GT. NMAX ) THEN
+            NFAIL = NFAIL + 1
+            WRITE(NOUT, 9995) 'M ', N, NMAX
+            GO TO 180
+         END IF
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         IZERO = 0
+*
+*        Do for each value of matrix type IMAT
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*
+*              Set up parameters with ZLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+               CALL ZLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU,
+     $                      ANORM, MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with ZLATMS.
+*
+               SRNAMT = 'ZLATMS'
+               CALL ZLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                      CNDNUM, ANORM, KL, KU, UPLO, A, LDA, WORK,
+     $                      INFO )
+*
+*              Check error code from ZLATMS and handle error.
+*
+               IF( INFO.NE.0 ) THEN
+                  CALL ALAERH( PATH, 'ZLATMS', INFO, 0, UPLO, N, N, -1,
+     $                         -1, -1, IMAT, NFAIL, NERRS, NOUT )
+*
+*                    Skip all tests for this generated matrix
+*
+                  GO TO 160
+               END IF
+*
+*              For matrix types 3-6, zero one or more rows and
+*              columns of the matrix to test that INFO is returned
+*              correctly.
+*
+               IF( ZEROT ) THEN
+                  IF( IMAT.EQ.3 ) THEN
+                     IZERO = 1
+                  ELSE IF( IMAT.EQ.4 ) THEN
+                     IZERO = N
+                  ELSE
+                     IZERO = N / 2 + 1
+                  END IF
+*
+                  IF( IMAT.LT.6 ) THEN
+*
+*                    Set row and column IZERO to zero.
+*
+                     IF( IUPLO.EQ.1 ) THEN
+                        IOFF = ( IZERO-1 )*LDA
+                        DO 20 I = 1, IZERO - 1
+                           A( IOFF+I ) = CZERO
+   20                   CONTINUE
+                        IOFF = IOFF + IZERO
+                        DO 30 I = IZERO, N
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   30                   CONTINUE
+                     ELSE
+                        IOFF = IZERO
+                        DO 40 I = 1, IZERO - 1
+                           A( IOFF ) = CZERO
+                           IOFF = IOFF + LDA
+   40                   CONTINUE
+                        IOFF = IOFF - IZERO
+                        DO 50 I = IZERO, N
+                           A( IOFF+I ) = CZERO
+   50                   CONTINUE
+                     END IF
+                  ELSE
+                     IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 70 J = 1, N
+                           I2 = MIN( J, IZERO )
+                           DO 60 I = 1, I2
+                              A( IOFF+I ) = CZERO
+   60                      CONTINUE
+                           IOFF = IOFF + LDA
+   70                   CONTINUE
+                        IZERO = 1
+                     ELSE
+*
+*                       Set the last IZERO rows and columns to zero.
+*
+                        IOFF = 0
+                        DO 90 J = 1, N
+                           I1 = MAX( J, IZERO )
+                           DO 80 I = I1, N
+                              A( IOFF+I ) = CZERO
+   80                      CONTINUE
+                           IOFF = IOFF + LDA
+   90                   CONTINUE
+                     END IF
+                  END IF
+               ELSE
+                  IZERO = 0
+               END IF
+*
+*              End generate the test matrix A.
+*
+*              Do for each value of NB in NBVAL
+*
+               DO 150 INB = 1, NNB
+*
+*                 Set the optimal blocksize, which will be later
+*                 returned by ILAENV.
+*
+                  NB = NBVAL( INB )
+                  CALL XLAENV( 1, NB )
+*
+*                 Copy the test matrix A into matrix AFAC which
+*                 will be factorized in place. This is needed to
+*                 preserve the test matrix A for subsequent tests.
+*
+                  CALL ZLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+*
+*                 Compute the L*D*L**T or U*D*U**T factorization of the
+*                 matrix. IWORK stores details of the interchanges and
+*                 the block structure of D. AINV is a work array for
+*                 block factorization, LWORK is the length of AINV.
+*
+                  SRNAMT = 'ZSYTRF_AA_2STAGE'
+                  LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                  CALL ZSYTRF_AA_2STAGE( UPLO, N, AFAC, LDA, 
+     $                                   AINV, (3*NB+1)*N, 
+     $                                   IWORK, IWORK( 1+N ),
+     $                                   WORK, LWORK,
+     $                                   INFO )
+*
+*                 Adjust the expected value of INFO to account for
+*                 pivoting.
+*
+                  IF( IZERO.GT.0 ) THEN
+                     J = 1
+                     K = IZERO
+  100                CONTINUE
+                     IF( J.EQ.K ) THEN
+                        K = IWORK( J )
+                     ELSE IF( IWORK( J ).EQ.K ) THEN
+                        K = J
+                     END IF
+                     IF( J.LT.K ) THEN
+                        J = J + 1
+                        GO TO 100
+                     END IF
+                  ELSE
+                     K = 0
+                  END IF
+*
+*                 Check error code from ZSYTRF and handle error.
+*
+                  IF( INFO.NE.K ) THEN
+                     CALL ALAERH( PATH, 'ZSYTRF_AA_2STAGE', INFO, K,
+     $                            UPLO, N, N, -1, -1, NB, IMAT, NFAIL,
+     $                            NERRS, NOUT )
+                  END IF
+*
+*+    TEST 1
+*                 Reconstruct matrix from factors and compute residual.
+*
+c                  CALL ZSYT01_AA( UPLO, N, A, LDA, AFAC, LDA, IWORK,
+c     $                            AINV, LDA, RWORK, RESULT( 1 ) )
+c                  NT = 1
+                  NT = 0
+*
+*
+*                 Print information about the tests that did not pass
+*                 the threshold.
+*
+                  DO 110 K = 1, NT
+                     IF( RESULT( K ).GE.THRESH ) THEN
+                        IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                     CALL ALAHD( NOUT, PATH )
+                        WRITE( NOUT, FMT = 9999 )UPLO, N, NB, IMAT, K,
+     $                     RESULT( K )
+                        NFAIL = NFAIL + 1
+                     END IF
+  110             CONTINUE
+                  NRUN = NRUN + NT
+*
+*                 Skip solver test if INFO is not 0.
+*
+                  IF( INFO.NE.0 ) THEN
+                     GO TO 140
+                  END IF
+*
+*                 Do for each value of NRHS in NSVAL.
+*
+                  DO 130 IRHS = 1, NNS
+                     NRHS = NSVAL( IRHS )
+*
+*+    TEST 2 (Using TRS)
+*                 Solve and compute residual for  A * X = B.
+*
+*                    Choose a set of NRHS random solution vectors
+*                    stored in XACT and set up the right hand side B
+*
+                     SRNAMT = 'ZLARHS'
+                     CALL ZLARHS( MATPATH, XTYPE, UPLO, ' ', N, N,
+     $                            KL, KU, NRHS, A, LDA, XACT, LDA,
+     $                            B, LDA, ISEED, INFO )
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+                     SRNAMT = 'ZSYTRS_AA_2STAGE'
+                     LWORK = MAX( 1, 3*N-2 )
+                     CALL ZSYTRS_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                            AINV, (3*NB+1)*N, IWORK, IWORK( 1+N ),
+     $                            X, LDA, INFO )
+*
+*                    Check error code from ZSYTRS and handle error.
+*
+                     IF( INFO.NE.0 ) THEN
+                        IF( IZERO.EQ.0 ) THEN
+                           CALL ALAERH( PATH, 'ZSYTRS_AA_2STAGE',
+     $                                  INFO, 0, UPLO, N, N, -1, -1,
+     $                                  NRHS, IMAT, NFAIL, NERRS, NOUT )
+                        END IF
+                     ELSE
+                        CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA
+     $                               )
+*
+*                       Compute the residual for the solution
+*
+                        CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA,
+     $                               WORK, LDA, RWORK, RESULT( 2 ) )
+*
+*
+*                       Print information about the tests that did not pass
+*                       the threshold.
+*
+                        DO 120 K = 2, 2
+                           IF( RESULT( K ).GE.THRESH ) THEN
+                              IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                           CALL ALAHD( NOUT, PATH )
+                              WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS,
+     $                           IMAT, K, RESULT( K )
+                              NFAIL = NFAIL + 1
+                           END IF
+  120                   CONTINUE
+                     END IF
+                     NRUN = NRUN + 1
+*
+*                 End do for each value of NRHS in NSVAL.
+*
+  130             CONTINUE
+  140             CONTINUE
+  150          CONTINUE
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASUM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NB =', I4, ', type ',
+     $      I2, ', test ', I2, ', ratio =', G12.5 )
+ 9998 FORMAT( ' UPLO = ''', A1, ''', N =', I5, ', NRHS=', I3, ', type ',
+     $      I2, ', test(', I2, ') =', G12.5 )
+ 9995 FORMAT( ' Invalid input value: ', A4, '=', I6, '; must be <=',
+     $      I6 )
+      RETURN
+*
+*     End of ZCHKSY_AA_2STAGE
+*
+      END
index 2361609..e6e6ac5 100644 (file)
@@ -94,7 +94,7 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup double_lin
 *
      $                     NBVAL, NOUT )
       IMPLICIT NONE
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DOUBLE PRECISION   RESULT( NTESTS )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALAERH, ALAHD, ALASUM, DERRTSQR,
-     $                   DTSQR01, XLAENV
+      EXTERNAL           ALAERH, ALAHD, ALASUM, ZERRTSQR,
+     $                   ZTSQR01, XLAENV
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC  MAX, MIN
index 87ebdaa..326627e 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
      $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                         RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/zdrvhe_aa_2stage.f b/lapack-netlib/TESTING/LIN/zdrvhe_aa_2stage.f
new file mode 100644 (file)
index 0000000..655a8c7
--- /dev/null
@@ -0,0 +1,491 @@
+*> \brief \b ZDRVHE_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZDRVHE_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZDRVHE_AA_2STAGE tests the driver routine ZHESV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16_lin
+*
+*  =====================================================================
+      SUBROUTINE ZDRVHE_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      DOUBLE PRECISION   THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DGET06, ZLANHE
+      EXTERNAL           DGET06, ZLANHE
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, ZERRVX,
+     $                   ZGET04, ZLACPY, ZLARHS, ZLATB4, ZLATMS,
+     $                   ZHESV_AA_2STAGE, ZHET01_AA, ZPOT02,
+     $                   ZHETRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Zomplex precision'
+      PATH( 2: 3 ) = 'H2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Zomplex precision'
+      MATPATH( 2: 3 ) = 'HE'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL ZERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with ZLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL ZLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with ZLATMS.
+*
+                  SRNAMT = 'ZLATMS'
+                  CALL ZLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from ZLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'ZLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = ZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = ZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = ZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = ZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = ZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'ZLARHS'
+                  CALL ZLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test ZHESV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL ZLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using ZHESV_AA.
+*
+                     SRNAMT = 'ZHESV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL ZHESV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from ZHESV_AA .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'ZHESV_AA', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+*                    NEED TO CREATE ZHET01_AA_2STAGE
+*                     CALL ZHET01_AA( UPLO, N, A, LDA, AFAC, LDA,
+*     $                                  IWORK, AINV, LDA, RWORK,
+*     $                                  RESULT( 2 ) )
+*                     NT = 2
+                     NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'ZHESV_AA_2STAGE',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of ZDRVHE_AA_2STAGE
+*
+      END
index c9485e4..681852b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
      $                   NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
      $                   COPYB, C, S, COPYS, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       DOUBLE PRECISION   EPS, NORMA, NORMB, RCOND
 *     ..
 *     .. Local Arrays ..
-      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY
-      DOUBLE PRECISION   RESULT( NTESTS ), RWORKQUERY
-      COMPLEX*16         WORKQUERY
+      INTEGER            ISEED( 4 ), ISEEDY( 4 ), IWQ
+      DOUBLE PRECISION   RESULT( NTESTS ), RWQ
+      COMPLEX*16         WQ
 *     ..
 *     .. Allocatable Arrays ..
       COMPLEX*16, ALLOCATABLE :: WORK (:)
       M = MMAX
       N = NMAX
       NRHS = NSMAX
-      LDA = MAX( 1, M )
-      LDB = MAX( 1, M, N )
       MNMIN = MAX( MIN( M, N ), 1 )
 *
 *     Compute workspace needed for routines
 *     ZQRT14, ZQRT17 (two side cases), ZQRT15 and ZQRT12
 *
-      LWORK = MAX( ( M+N )*NRHS,
+      LWORK = MAX( 1, ( M+N )*NRHS,
      $      ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ),
      $      MAX( M+MNMIN, NRHS*MNMIN,2*N+M ),
      $      MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) )
+      LRWORK = 1
+      LIWORK = 1
+*
+*     Iterate through all test cases and compute necessary workspace
+*     sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines.
+*
+      DO IM = 1, NM
+         M = MVAL( IM )
+         LDA = MAX( 1, M )
+         DO IN = 1, NN
+            N = NVAL( IN )
+            MNMIN = MAX(MIN( M, N ),1)
+            LDB = MAX( 1, M, N )
+            DO INS = 1, NNS
+               NRHS = NSVAL( INS )
+               DO IRANK = 1, 2
+                  DO ISCALE = 1, 3
+                     ITYPE = ( IRANK-1 )*3 + ISCALE
+                     IF( DOTYPE( ITYPE ) ) THEN
+                        IF( IRANK.EQ.1 ) THEN
+                           DO ITRAN = 1, 2
+                              IF( ITRAN.EQ.1 ) THEN
+                                 TRANS = 'N'
+                              ELSE
+                                 TRANS = 'C'
+                              END IF
+*
+*                             Compute workspace needed for ZGELS
+                              CALL ZGELS( TRANS, M, N, NRHS, A, LDA,
+     $                                    B, LDB, WQ, -1, INFO )
+                              LWORK_ZGELS = INT ( WQ )
+*                             Compute workspace needed for ZGETSLS
+                              CALL ZGETSLS( TRANS, M, N, NRHS, A, LDA,
+     $                                      B, LDB, WQ, -1, INFO )
+                              LWORK_ZGETSLS = INT( WQ )
+                           ENDDO
+                        END IF
+*                       Compute workspace needed for ZGELSY
+                        CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ,
+     $                               RCOND, CRANK, WQ, -1, RWORK, INFO )
+                        LWORK_ZGELSY = INT( WQ )
+                        LRWORK_ZGELSY = 2*N
+*                       Compute workspace needed for ZGELSS
+                        CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1 , RWORK,
+     $                               INFO )
+                        LWORK_ZGELSS = INT( WQ )
+                        LRWORK_ZGELSS = 5*MNMIN
+*                       Compute workspace needed for ZGELSD
+                        CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S,
+     $                               RCOND, CRANK, WQ, -1, RWQ, IWQ,
+     $                               INFO )
+                        LWORK_ZGELSD = INT( WQ )
+                        LRWORK_ZGELSD = INT( RWQ )
+*                       Compute LIWORK workspace needed for ZGELSY and ZGELSD
+                        LIWORK = MAX( LIWORK, N, IWQ )
+*                       Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD
+                        LRWORK = MAX( LRWORK, LRWORK_ZGELSY,
+     $                                LRWORK_ZGELSS, LRWORK_ZGELSD )
+*                       Compute LWORK workspace needed for all functions
+                        LWORK = MAX( LWORK, LWORK_ZGELS, LWORK_ZGETSLS,
+     $                               LWORK_ZGELSY, LWORK_ZGELSS,
+     $                               LWORK_ZGELSD )
+                     END IF
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDDO
+      ENDDO
 *
-*     Compute workspace needed for ZGELS
-      CALL ZGELS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $            WORKQUERY, -1, INFO )
-      LWORK_ZGELS = INT ( WORKQUERY )
-*     Compute workspace needed for ZGETSLS
-      CALL ZGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB,
-     $              WORKQUERY, -1, INFO )
-      LWORK_ZGETSLS = INT( WORKQUERY )
-*     Compute workspace needed for ZGELSY
-      CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY,
-     $             RCOND, CRANK, WORKQUERY, -1, RWORK, INFO )
-      LWORK_ZGELSY = INT( WORKQUERY )
-      LRWORK_ZGELSY = 2*N
-*     Compute workspace needed for ZGELSS
-      CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S,
-     $             RCOND, CRANK, WORKQUERY, -1 , RWORK, INFO )
-      LWORK_ZGELSS = INT( WORKQUERY )
-      LRWORK_ZGELSS = 5*MNMIN
-*     Compute workspace needed for ZGELSD
-      CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK,
-     $             WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO )
-      LWORK_ZGELSD = INT( WORKQUERY )
-      LRWORK_ZGELSD = INT( RWORKQUERY )
-*     Compute LIWORK workspace needed for ZGELSY and ZGELSD
-      LIWORK = MAX( 1, N, IWORKQUERY )
-*     Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD
-      LRWORK = MAX( 1, LRWORK_ZGELSY, LRWORK_ZGELSS, LRWORK_ZGELSD )
-*     Compute LWORK workspace needed for all functions
-      LWORK = MAX( 1, LWORK, LWORK_ZGELS, LWORK_ZGETSLS, LWORK_ZGELSY,
-     $             LWORK_ZGELSS, LWORK_ZGELSD )
       LWLSY = LWORK
 *
       ALLOCATE( WORK( LWORK ) )
index e596b0b..8bb9f2b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
       SUBROUTINE ZDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
      +                    D_WORK_ZLANGE, Z_WORK_ZGEQRF, TAU )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, NN, NOUT
 *
                               IF ( IALPHA.EQ. 1) THEN
                                  ALPHA = ZERO
-                              ELSE IF ( IALPHA.EQ. 1) THEN
+                              ELSE IF ( IALPHA.EQ. 2) THEN
                                  ALPHA = ONE
                               ELSE
                                  ALPHA = ZLARND( 4, ISEED )
index 93e866b..c264355 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
       SUBROUTINE ZDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
      +                    LDA, D_WORK_ZLANGE )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDC, NN, NOUT
                         IF ( IALPHA.EQ. 1) THEN
                            ALPHA = ZERO
                            BETA = ZERO
-                        ELSE IF ( IALPHA.EQ. 1) THEN
+                        ELSE IF ( IALPHA.EQ. 2) THEN
                            ALPHA = ONE
                            BETA = ZERO
-                        ELSE IF ( IALPHA.EQ. 1) THEN
+                        ELSE IF ( IALPHA.EQ. 3) THEN
                            ALPHA = ZERO
                            BETA = ONE
                         ELSE
index 7b96267..ae4c8a5 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
-*
-*  @generated from LIN/ddrvsy_aa.f, fortran d -> z, Thu Nov 17 12:14:51 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
      $                      NMAX, A, AFAC, AINV, B, X, XACT, WORK,
      $                      RWORK, IWORK, NOUT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       LOGICAL            TSTERR
       EXTERNAL           DGET06, ZLANSY
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ALADHD, ALAERH, ALASVM, DERRVX, ZGET04, ZLACPY,
-     $                   ZLARHS, ZLASET, ZLATB4, ZLATMS, ZSYT02, DSYT05,
+      EXTERNAL           ALADHD, ALAERH, ALASVM, ZERRVX, ZGET04, ZLACPY,
+     $                   ZLARHS, ZLASET, ZLATB4, ZLATMS, ZSYT02,
      $                   ZSYSV_AA, ZSYT01_AA, ZSYTRF_AA, XLAENV
 *     ..
 *     .. Scalars in Common ..
       DO 10 I = 1, 4
          ISEED( I ) = ISEEDY( I )
    10 CONTINUE
-      LWORK = MAX( 2*NMAX, NMAX*NRHS )
 *
 *     Test the error exits
 *
 *
       DO 180 IN = 1, NN
          N = NVAL( IN )
+         LWORK = MAX( 3*N-2, N*(1+NB) )
+         LWORK = MAX( LWORK, 1 )
          LDA = MAX( N, 1 )
          XTYPE = 'N'
          NIMAT = NTYPES
diff --git a/lapack-netlib/TESTING/LIN/zdrvsy_aa_2stage.f b/lapack-netlib/TESTING/LIN/zdrvsy_aa_2stage.f
new file mode 100644 (file)
index 0000000..d93e445
--- /dev/null
@@ -0,0 +1,492 @@
+*> \brief \b ZDRVSY_AA_2STAGE
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZDRVSY_AA_2STAGE(
+*                             DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+*                             A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+*                             NOUT )
+*
+*       .. Scalar Arguments ..
+*       LOGICAL            TSTERR
+*       INTEGER            NMAX, NN, NOUT, NRHS
+*       DOUBLE PRECISION   THRESH
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            DOTYPE( * )
+*       INTEGER            IWORK( * ), NVAL( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+*      $                   WORK( * ), X( * ), XACT( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZDRVSY_AA_2STAGE tests the driver routine ZSYSV_AA_2STAGE.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*>          DOTYPE is LOGICAL array, dimension (NTYPES)
+*>          The matrix types to be used for testing.  Matrices of type j
+*>          (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*>          .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*>          NN is INTEGER
+*>          The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*>          NVAL is INTEGER array, dimension (NN)
+*>          The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand side vectors to be generated for
+*>          each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*>          THRESH is DOUBLE PRECISION
+*>          The threshold value for the test ratios.  A result is
+*>          included in the output file if RESULT >= THRESH.  To have
+*>          every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*>          TSTERR is LOGICAL
+*>          Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*>          NMAX is INTEGER
+*>          The maximum value permitted for N, used in dimensioning the
+*>          work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*>          AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*>          AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*>          XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is COMPLEX*16 array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*>          NOUT is INTEGER
+*>          The unit number for output.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2017
+*
+*> \ingroup complex16_lin
+*
+*  =====================================================================
+      SUBROUTINE ZDRVSY_AA_2STAGE(
+     $                         DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR,
+     $                         NMAX, A, AFAC, AINV, B, X, XACT, WORK,
+     $                         RWORK, IWORK, NOUT )
+*
+*  -- LAPACK test routine (version 3.8.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     November 2017
+*
+*     .. Scalar Arguments ..
+      LOGICAL            TSTERR
+      INTEGER            NMAX, NN, NOUT, NRHS
+      DOUBLE PRECISION   THRESH
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            DOTYPE( * )
+      INTEGER            IWORK( * ), NVAL( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( * ), AFAC( * ), AINV( * ), B( * ),
+     $                   WORK( * ), X( * ), XACT( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO
+      PARAMETER          ( ZERO = 0.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+      INTEGER            NTYPES, NTESTS
+      PARAMETER          ( NTYPES = 10, NTESTS = 3 )
+      INTEGER            NFACT
+      PARAMETER          ( NFACT = 2 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ZEROT
+      CHARACTER          DIST, FACT, TYPE, UPLO, XTYPE
+      CHARACTER*3        MATPATH, PATH
+      INTEGER            I, I1, I2, IFACT, IMAT, IN, INFO, IOFF, IUPLO,
+     $                   IZERO, J, K, KL, KU, LDA, LWORK, MODE, N,
+     $                   NB, NBMIN, NERRS, NFAIL, NIMAT, NRUN, NT
+      DOUBLE PRECISION   ANORM, CNDNUM
+*     ..
+*     .. Local Arrays ..
+      CHARACTER          FACTS( NFACT ), UPLOS( 2 )
+      INTEGER            ISEED( 4 ), ISEEDY( 4 )
+      DOUBLE PRECISION   RESULT( NTESTS )
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DGET06, ZLANSY
+      EXTERNAL           DGET06, ZLANSY
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ALADHD, ALAERH, ALASVM, XLAENV, ZERRVX,
+     $                   ZGET04, ZLACPY, ZLARHS, ZLATB4, ZLATMS,
+     $                   ZSYSV_AA_2STAGE, ZSYT01_AA, ZSYT02,
+     $                   ZSYTRF_AA_2STAGE
+*     ..
+*     .. Scalars in Common ..
+      LOGICAL            LERR, OK
+      CHARACTER*32       SRNAMT
+      INTEGER            INFOT, NUNIT
+*     ..
+*     .. Common blocks ..
+      COMMON             / INFOC / INFOT, NUNIT, OK, LERR
+      COMMON             / SRNAMC / SRNAMT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CMPLX, MAX, MIN
+*     ..
+*     .. Data statements ..
+      DATA               ISEEDY / 1988, 1989, 1990, 1991 /
+      DATA               UPLOS / 'U', 'L' / , FACTS / 'F', 'N' /
+*     ..
+*     .. Executable Statements ..
+*
+*     Initialize constants and the random number seed.
+*
+*     Test path
+*
+      PATH( 1: 1 ) = 'Zomplex precision'
+      PATH( 2: 3 ) = 'H2'
+*
+*     Path to generate matrices
+*
+      MATPATH( 1: 1 ) = 'Zomplex precision'
+      MATPATH( 2: 3 ) = 'SY'
+*
+      NRUN = 0
+      NFAIL = 0
+      NERRS = 0
+      DO 10 I = 1, 4
+         ISEED( I ) = ISEEDY( I )
+   10 CONTINUE
+*
+*     Test the error exits
+*
+      IF( TSTERR )
+     $   CALL ZERRVX( PATH, NOUT )
+      INFOT = 0
+*
+*     Set the block size and minimum block size for testing.
+*
+      NB = 1
+      NBMIN = 2
+      CALL XLAENV( 1, NB )
+      CALL XLAENV( 2, NBMIN )
+*
+*     Do for each value of N in NVAL
+*
+      DO 180 IN = 1, NN
+         N = NVAL( IN )
+         LDA = MAX( N, 1 )
+         XTYPE = 'N'
+         NIMAT = NTYPES
+         IF( N.LE.0 )
+     $      NIMAT = 1
+*
+         DO 170 IMAT = 1, NIMAT
+*
+*           Do the tests only if DOTYPE( IMAT ) is true.
+*
+            IF( .NOT.DOTYPE( IMAT ) )
+     $         GO TO 170
+*
+*           Skip types 3, 4, 5, or 6 if the matrix size is too small.
+*
+            ZEROT = IMAT.GE.3 .AND. IMAT.LE.6
+            IF( ZEROT .AND. N.LT.IMAT-2 )
+     $         GO TO 170
+*
+*           Do first for UPLO = 'U', then for UPLO = 'L'
+*
+            DO 160 IUPLO = 1, 2
+               UPLO = UPLOS( IUPLO )
+*
+*              Begin generate the test matrix A.
+*
+*              Set up parameters with ZLATB4 for the matrix generator
+*              based on the type of matrix to be generated.
+*
+              CALL ZLATB4( MATPATH, IMAT, N, N, TYPE, KL, KU, ANORM,
+     $                         MODE, CNDNUM, DIST )
+*
+*              Generate a matrix with ZLATMS.
+*
+                  SRNAMT = 'ZLATMS'
+                  CALL ZLATMS( N, N, DIST, ISEED, TYPE, RWORK, MODE,
+     $                         CNDNUM, ANORM, KL, KU, UPLO, A, LDA,
+     $                         WORK, INFO )
+*
+*                 Check error code from ZLATMS and handle error.
+*
+                  IF( INFO.NE.0 ) THEN
+                     CALL ALAERH( PATH, 'ZLATMS', INFO, 0, UPLO, N, N,
+     $                            -1, -1, -1, IMAT, NFAIL, NERRS, NOUT )
+                     GO TO 160
+                  END IF
+*
+*                 For types 3-6, zero one or more rows and columns of
+*                 the matrix to test that INFO is returned correctly.
+*
+                  IF( ZEROT ) THEN
+                     IF( IMAT.EQ.3 ) THEN
+                        IZERO = 1
+                     ELSE IF( IMAT.EQ.4 ) THEN
+                        IZERO = N
+                     ELSE
+                        IZERO = N / 2 + 1
+                     END IF
+*
+                     IF( IMAT.LT.6 ) THEN
+*
+*                       Set row and column IZERO to zero.
+*
+                        IF( IUPLO.EQ.1 ) THEN
+                           IOFF = ( IZERO-1 )*LDA
+                           DO 20 I = 1, IZERO - 1
+                              A( IOFF+I ) = CZERO
+   20                      CONTINUE
+                           IOFF = IOFF + IZERO
+                           DO 30 I = IZERO, N
+                              A( IOFF ) = CZERO
+                              IOFF = IOFF + LDA
+   30                      CONTINUE
+                        ELSE
+                           IOFF = IZERO
+                           DO 40 I = 1, IZERO - 1
+                              A( IOFF ) = CZERO
+                              IOFF = IOFF + LDA
+   40                      CONTINUE
+                           IOFF = IOFF - IZERO
+                           DO 50 I = IZERO, N
+                              A( IOFF+I ) = CZERO
+   50                      CONTINUE
+                        END IF
+                     ELSE
+                        IOFF = 0
+                        IF( IUPLO.EQ.1 ) THEN
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           DO 70 J = 1, N
+                              I2 = MIN( J, IZERO )
+                              DO 60 I = 1, I2
+                                 A( IOFF+I ) = CZERO
+   60                         CONTINUE
+                              IOFF = IOFF + LDA
+   70                      CONTINUE
+                           IZERO = 1
+                        ELSE
+*
+*                       Set the first IZERO rows and columns to zero.
+*
+                           IOFF = 0
+                           DO 90 J = 1, N
+                              I1 = MAX( J, IZERO )
+                              DO 80 I = I1, N
+                                 A( IOFF+I ) = CZERO
+   80                         CONTINUE
+                              IOFF = IOFF + LDA
+   90                      CONTINUE
+                        END IF
+                     END IF
+                  ELSE
+                     IZERO = 0
+                  END IF
+*
+*                 End generate the test matrix A.
+*
+*
+               DO 150 IFACT = 1, NFACT
+*
+*                 Do first for FACT = 'F', then for other values.
+*
+                  FACT = FACTS( IFACT )
+*
+*                 Form an exact solution and set the right hand side.
+*
+                  SRNAMT = 'ZLARHS'
+                  CALL ZLARHS( MATPATH, XTYPE, UPLO, ' ', N, N, KL, KU,
+     $                         NRHS, A, LDA, XACT, LDA, B, LDA, ISEED,
+     $                         INFO )
+                  XTYPE = 'C'
+*
+*                 --- Test ZSYSV_AA_2STAGE  ---
+*
+                  IF( IFACT.EQ.2 ) THEN
+                     CALL ZLACPY( UPLO, N, N, A, LDA, AFAC, LDA )
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, X, LDA )
+*
+*                    Factor the matrix and solve the system using ZSYSV_AA.
+*
+                     SRNAMT = 'ZSYSV_AA_2STAGE '
+                     LWORK = MIN(N*NB, 3*NMAX*NMAX)
+                     CALL ZSYSV_AA_2STAGE( UPLO, N, NRHS, AFAC, LDA,
+     $                                 AINV, (3*NB+1)*N, 
+     $                                 IWORK, IWORK( 1+N ),
+     $                                 X, LDA, WORK, LWORK, INFO )
+*
+*                    Adjust the expected value of INFO to account for
+*                    pivoting.
+*
+                     IF( IZERO.GT.0 ) THEN
+                        J = 1
+                        K = IZERO
+  100                   CONTINUE
+                        IF( J.EQ.K ) THEN
+                           K = IWORK( J )
+                        ELSE IF( IWORK( J ).EQ.K ) THEN
+                           K = J
+                        END IF
+                        IF( J.LT.K ) THEN
+                           J = J + 1
+                           GO TO 100
+                        END IF
+                     ELSE
+                        K = 0
+                     END IF
+*
+*                    Check error code from ZSYSV_AA_2STAGE .
+*
+                     IF( INFO.NE.K ) THEN
+                        CALL ALAERH( PATH, 'ZSYSV_AA_2STAGE', INFO, K,
+     $                               UPLO, N, N, -1, -1, NRHS,
+     $                               IMAT, NFAIL, NERRS, NOUT )
+                        GO TO 120
+                     ELSE IF( INFO.NE.0 ) THEN
+                        GO TO 120
+                     END IF
+*
+*                    Compute residual of the computed solution.
+*
+                     CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA )
+                     CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK,
+     $                            LDA, RWORK, RESULT( 1 ) )
+*
+*                    Reconstruct matrix from factors and compute
+*                    residual.
+*
+c                     CALL ZSY01_AA( UPLO, N, A, LDA, AFAC, LDA,
+c     $                                  IWORK, AINV, LDA, RWORK,
+c     $                                  RESULT( 2 ) )
+c                     NT = 2
+                     NT = 1
+*
+*                    Print information about the tests that did not pass
+*                    the threshold.
+*
+                     DO 110 K = 1, NT
+                        IF( RESULT( K ).GE.THRESH ) THEN
+                           IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 )
+     $                        CALL ALADHD( NOUT, PATH )
+                           WRITE( NOUT, FMT = 9999 )'ZSYSV_AA_2STAGE ',
+     $                         UPLO, N, IMAT, K, RESULT( K )
+                           NFAIL = NFAIL + 1
+                        END IF
+  110                CONTINUE
+                     NRUN = NRUN + NT
+  120                CONTINUE
+                  END IF
+*
+  150          CONTINUE
+*
+  160       CONTINUE
+  170    CONTINUE
+  180 CONTINUE
+*
+*     Print a summary of the results.
+*
+      CALL ALASVM( PATH, NOUT, NFAIL, NRUN, NERRS )
+*
+ 9999 FORMAT( 1X, A, ', UPLO=''', A1, ''', N =', I5, ', type ', I2,
+     $      ', test ', I2, ', ratio =', G12.5 )
+      RETURN
+*
+*     End of ZDRVSY_AA_2STAGE
+*
+      END
index 5f1465b..5b2f30b 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
 *  =====================================================================
       SUBROUTINE ZERRHE( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
 *     .. External Subroutines ..
       EXTERNAL           ALAESM, CHKXER, ZHECON, ZHECON_3, ZHECON_ROOK,
      $                   ZHERFS, ZHETF2, ZHETF2_RK, ZHETF2_ROOK, ZHETRF,
-     $                   ZHETRF_RK, ZHETRF_ROOK, ZHETRF_AA, ZHETRI,
+     $                   ZHETRF_RK, ZHETRF_ROOK, ZHETRF_AA, 
+     $                   ZHETRF_AA_2STAGE, ZHETRI,
      $                   ZHETRI_3, ZHETRI_3X, ZHETRI_ROOK, ZHETRI2,
      $                   ZHETRI2X, ZHETRS, ZHETRS_3, ZHETRS_ROOK,
-     $                   ZHETRS_AA, ZHPCON, ZHPRFS, ZHPTRF, ZHPTRI,
-     $                   ZHPTRS
+     $                   ZHETRS_AA, ZHETRS_AA_2STAGE, ZHPCON, ZHPRFS,
+     $                   ZHPTRF, ZHPTRI, ZHPTRS
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
          INFOT = 10
          CALL ZHETRS_AA( 'U', 0, 1, A, 1, IP, B, 1, W, -2, INFO )
          CALL CHKXER( 'ZHETRS_AA', INFOT, NOUT, LERR, OK )
+*        
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        ZHETRF_AA_2STAGE
+*
+         SRNAMT = 'ZHETRF_AA_2STAGE'
+         INFOT = 1
+         CALL ZHETRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'ZHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL ZHETRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL ZHETRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL ZHETRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL ZHETRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'ZHETRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        ZHETRS_AA_2STAGE
+*
+         SRNAMT = 'ZHETRS_AA_2STAGE'
+         INFOT = 1
+         CALL ZHETRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL ZHETRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL ZHETRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL ZHETRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL ZHETRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL ZHETRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZHETRS_AA_STAGE', INFOT, NOUT, LERR, OK )
 *
       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
 *
index 4179e98..642d748 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
 *  =====================================================================
       SUBROUTINE ZERRSY( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -91,7 +91,7 @@
      $                   ZSPTRS, ZSYCON, ZSYCON_3, ZSYCON_ROOK, ZSYRFS,
      $                   ZSYTF2, ZSYTF2_RK, ZSYTF2_ROOK, ZSYTRF,
      $                   ZSYTRF_RK, ZSYTRF_ROOK, ZSYTRI, ZSYTRI_3,
-     $                   ZSYTRI_3X, ZSYTRI_ROOK, ZSYTRI2, ZSYTRI2Z,
+     $                   ZSYTRI_3X, ZSYTRI_ROOK, ZSYTRI2, ZSYTRI2X,
      $                   ZSYTRS, ZSYTRS_3, ZSYTRS_ROOK
 *     ..
 *     .. Scalars in Common ..
          CALL ZSYTRS_AA( 'U', 2, 1, A, 2, IP, B, 1, W, 1, INFO )
          CALL CHKXER( 'ZSYTRS_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'S2' ) ) THEN
+*
+*        Test error exits of the routines that use factorization
+*        of a symmetric indefinite matrix with Aasen's algorithm.
+*
+*        ZSYTRF_AA_2STAGE
+*
+         SRNAMT = 'ZSYTRF_AA_2STAGE'
+         INFOT = 1
+         CALL ZSYTRF_AA_2STAGE( '/', 0, A, 1, A, 1, IP, IP, W, 1,
+     $                          INFO )
+         CALL CHKXER( 'ZSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL ZSYTRF_AA_2STAGE( 'U', -1, A, 1, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 4
+         CALL ZSYTRF_AA_2STAGE( 'U', 2, A, 1, A, 2, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 6
+         CALL ZSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 1, IP, IP, W, 1,
+     $                           INFO )
+         CALL CHKXER( 'ZSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 10
+         CALL ZSYTRF_AA_2STAGE( 'U', 2, A, 2, A, 8, IP, IP, W, 0,
+     $                           INFO )
+         CALL CHKXER( 'ZSYTRF_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
+*        CHETRS_AA_2STAGE
+*
+         SRNAMT = 'ZSYTRS_AA_2STAGE'
+         INFOT = 1
+         CALL ZSYTRS_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL ZSYTRS_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL ZSYTRS_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL ZSYTRS_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL ZSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL ZSYTRS_AA_2STAGE( 'U', 2, 1, A, 2, A, 8, IP, IP,
+     $                          B, 1, INFO )
+         CALL CHKXER( 'ZSYTRS_AA_STAGE', INFOT, NOUT, LERR, OK )
+*
       END IF
 *
 *     Print a summary line.
index 6d64a9e..29ba744 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_lin
 *
 *  =====================================================================
       SUBROUTINE ZERRVX( PATH, NUNIT )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER*3        PATH
@@ -94,7 +94,7 @@
      $                   ZHPSV, ZHPSVX, ZPBSV, ZPBSVX, ZPOSV, ZPOSVX,
      $                   ZPPSV, ZPPSVX, ZPTSV, ZPTSVX, ZSPSV, ZSPSVX,
      $                   ZSYSV, ZSYSV_AA, ZSYSV_RK, ZSYSV_ROOK,
-     $                   ZSYSVX
+     $                   ZSYSVX, ZSYSV_AA_2STAGE
 *     ..
 *     .. Scalars in Common ..
       LOGICAL            LERR, OK
         CALL ZHESV_AA( 'U', 2, 0, A, 2, IP, B, 1, W, 1, INFO )
         CALL CHKXER( 'ZHESV_AA', INFOT, NOUT, LERR, OK )
 *
+      ELSE IF( LSAMEN( 2, C2, 'H2' ) ) THEN
+*
+*        CHESV_AASEN_2STAGE
+*
+         SRNAMT = 'ZHESV_AA_2STAGE'
+         INFOT = 1
+         CALL ZHESV_AA_2STAGE( '/', 0, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 2
+         CALL ZHESV_AA_2STAGE( 'U', -1, 0, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 3
+         CALL ZHESV_AA_2STAGE( 'U', 0, -1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 5
+         CALL ZHESV_AA_2STAGE( 'U', 2, 1, A, 1, A, 1, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 11
+         CALL ZHESV_AA_2STAGE( 'U', 2, 1, A, 2, A, 2, IP, IP, B, 1,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+         INFOT = 7
+         CALL ZHESV_AA_2STAGE( 'U', 2, 1, A, 2, A, 1, IP, IP, B, 2,
+     $                         W, 1, INFO )
+         CALL CHKXER( 'ZHESV_AA_2STAGE', INFOT, NOUT, LERR, OK )
+*
       ELSE IF( LSAMEN( 2, C2, 'HP' ) ) THEN
 *
 *        ZHPSV
index 3499868..ba99550 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
       SUBROUTINE ZHET01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 98c0303..a6dc79b 100644 (file)
@@ -8,7 +8,7 @@
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+*       SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
 *            INFO, PATH)
 *
 *       .. Scalar Arguments ..
@@ -56,7 +56,7 @@
 *>
 *> \param[in] NRHS
 *> \verbatim
-*>          NRHS is NRHS
+*>          NRHS is INTEGER
 *>          The requested number of right-hand sides.
 *> \endverbatim
 *>
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
 *  =====================================================================
-      SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+      SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
      $     INFO, PATH)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
       END DO
 *
 *     Generate the scaled Hilbert matrix in A
-*     If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i*
+*     If we are testing SY routines,
+*        take D1_i = D2_i, else, D1_i = D2_i*
       IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
          DO J = 1, N
             DO I = 1, N
          WORK(J) = (  ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1)  )
      $        * (N +J -1)
       END DO
-*
-*     If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i*
+
+*     If we are testing SY routines,
+*           take D1_i = D2_i, else, D1_i = D2_i*
       IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
          DO J = 1, NRHS
             DO I = 1, N
index a2f5f9b..9d14528 100644 (file)
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0: successful exit
-*>          < 0: if INFO = -k, the k-th argument had an illegal value
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
       SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
      $                   A, LDA, X, LDX, B, LDB, ISEED, INFO )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS, UPLO, XTYPE
index 8922940..8106a61 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date June 2017
 *
 *> \ingroup complex16_lin
 *
       SUBROUTINE ZSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C,
      $                     LDC, RWORK, RESID )
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.7.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     June 2017
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
index 09b6e3b..bc986da 100644 (file)
@@ -2,74 +2,51 @@
 #  This is the makefile to create a library of the test matrix
 #  generators used in LAPACK.  The files are organized as follows:
 #
-#     SCATGEN  -- Auxiliary routines called from both REAL and COMPLEX
-#     DZATGEN  -- Auxiliary routines called from both DOUBLE PRECISION
-#                 and COMPLEX*16
+#     SCATGEN  -- Auxiliary routines called from single precision
+#     DZATGEN  -- Auxiliary routines called from double precision
 #     SMATGEN  -- Single precision real matrix generation routines
 #     CMATGEN  -- Single precision complex matrix generation routines
 #     DMATGEN  -- Double precision real matrix generation routines
 #     ZMATGEN  -- Double precision complex matrix generation routines
 #
-#  The library can be set up to include routines for any combination
-#  of the four precisions.  To create or add to the library, enter make
-#  followed by one or more of the precisions desired.  Some examples:
-#       make single
-#       make single complex
-#       make single double complex complex16
-#  Alternatively, the command
-#       make
-#  without any arguments creates a library of all four precisions.
-#  The library is called
-#       tmglib.a
-#  and is created at the LAPACK directory level.
-#
-#  To remove the object files after the library is created, enter
-#       make clean
-#  On some systems, you can force the source files to be recompiled by
-#  entering (for example)
-#       make single FRC=FRC
-#
 #######################################################################
 
-set(SCATGEN slatm1.f slaran.f slarnd.f)
+set(SCATGEN slatm1.f slatm7.f slaran.f slarnd.f)
 
 set(SMATGEN slatms.f slatme.f slatmr.f slatmt.f
    slagge.f slagsy.f slakf2.f slarge.f slaror.f slarot.f slatm2.f
-   slatm3.f slatm5.f slatm6.f slatm7.f slahilb.f)
+   slatm3.f slatm5.f slatm6.f slahilb.f)
 
 set(CMATGEN clatms.f clatme.f clatmr.f clatmt.f
    clagge.f claghe.f clagsy.f clakf2.f clarge.f claror.f clarot.f
-   clatm1.f clarnd.f clatm2.f clatm3.f clatm5.f clatm6.f clahilb.f slatm7.f)
+   clatm1.f clarnd.f clatm2.f clatm3.f clatm5.f clatm6.f clahilb.f)
 
-set(DZATGEN dlatm1.f dlaran.f dlarnd.f)
+set(DZATGEN dlatm1.f dlatm7.f dlaran.f dlarnd.f)
 
 set(DMATGEN dlatms.f dlatme.f dlatmr.f dlatmt.f
    dlagge.f dlagsy.f dlakf2.f dlarge.f dlaror.f dlarot.f dlatm2.f
-   dlatm3.f dlatm5.f dlatm6.f dlatm7.f dlahilb.f)
+   dlatm3.f dlatm5.f dlatm6.f dlahilb.f)
 
 set(ZMATGEN zlatms.f zlatme.f zlatmr.f zlatmt.f
   zlagge.f zlaghe.f zlagsy.f zlakf2.f zlarge.f zlaror.f zlarot.f
-  zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f dlatm7.f)
+  zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f)
 
+
+set(SOURCES)
 if(BUILD_SINGLE)
-  set(ALLOBJ ${SMATGEN} ${SCATGEN})
+  list(APPEND SOURCES ${SMATGEN} ${SCATGEN})
 endif()
 if(BUILD_DOUBLE)
-  set(ALLOBJ ${ALLOBJ} ${DMATGEN} ${DZATGEN})
+  list(APPEND SOURCES ${DMATGEN} ${DZATGEN})
 endif()
 if(BUILD_COMPLEX)
-  set(ALLOBJ ${ALLOBJ} ${CMATGEN} ${SCATGEN})
+  list(APPEND SOURCES ${CMATGEN} ${SCATGEN})
 endif()
 if(BUILD_COMPLEX16)
-  set(ALLOBJ ${ALLOBJ} ${ZMATGEN} ${DZATGEN})
+  list(APPEND SOURCES ${ZMATGEN} ${DZATGEN})
 endif()
+list(REMOVE_DUPLICATES SOURCES)
 
-if(NOT ALLOBJ)
-  set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN}
-    ${DZATGEN})
-else()
-  list(REMOVE_DUPLICATES ALLOBJ)
-endif()
-add_library(tmglib ${ALLOBJ})
-target_link_libraries(tmglib ${LAPACK_LIBRARIES})
+add_library(tmglib ${SOURCES})
+target_link_libraries(tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
 lapack_install_library(tmglib)
index 34a6ff0..e20004c 100644 (file)
@@ -4,9 +4,8 @@ include ../../make.inc
 #  This is the makefile to create a library of the test matrix
 #  generators used in LAPACK.  The files are organized as follows:
 #
-#     SCATGEN  -- Auxiliary routines called from both REAL and COMPLEX
-#     DZATGEN  -- Auxiliary routines called from both DOUBLE PRECISION
-#                 and COMPLEX*16
+#     SCATGEN  -- Auxiliary routines called from single precision
+#     DZATGEN  -- Auxiliary routines called from double precision
 #     SMATGEN  -- Single precision real matrix generation routines
 #     CMATGEN  -- Single precision complex matrix generation routines
 #     DMATGEN  -- Double precision real matrix generation routines
@@ -26,28 +25,28 @@ include ../../make.inc
 #  and is created at the LAPACK directory level.
 #
 #  To remove the object files after the library is created, enter
-#       make clean
+#       make cleanobj
 #  On some systems, you can force the source files to be recompiled by
 #  entering (for example)
 #       make single FRC=FRC
 #
 #######################################################################
 
-SCATGEN = slatm1.o slaran.o slarnd.o
+SCATGEN = slatm1.o slatm7.o slaran.o slarnd.o
 
 SMATGEN = slatms.o slatme.o slatmr.o slatmt.o \
    slagge.o slagsy.o slakf2.o slarge.o slaror.o slarot.o slatm2.o \
-   slatm3.o slatm5.o slatm6.o slatm7.o slahilb.o
+   slatm3.o slatm5.o slatm6.o slahilb.o
 
 CMATGEN = clatms.o clatme.o clatmr.o clatmt.o \
    clagge.o claghe.o clagsy.o clakf2.o clarge.o claror.o clarot.o \
    clatm1.o clarnd.o clatm2.o clatm3.o clatm5.o clatm6.o clahilb.o
 
-DZATGEN = dlatm1.o dlaran.o dlarnd.o
+DZATGEN = dlatm1.o dlatm7.o dlaran.o dlarnd.o
 
 DMATGEN = dlatms.o dlatme.o dlatmr.o dlatmt.o \
    dlagge.o dlagsy.o dlakf2.o dlarge.o dlaror.o dlarot.o dlatm2.o \
-   dlatm3.o dlatm5.o dlatm6.o dlatm7.o dlahilb.o
+   dlatm3.o dlatm5.o dlatm6.o dlahilb.o
 
 ZMATGEN = zlatms.o zlatme.o zlatmr.o zlatmt.o \
    zlagge.o zlaghe.o zlagsy.o zlakf2.o zlarge.o zlaror.o zlarot.o \
@@ -59,23 +58,23 @@ ALLOBJ = $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN) $(ZMATGEN) \
        $(DZATGEN)
 
 ../../$(TMGLIB): $(ALLOBJ)
-       $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ)
+       $(ARCH) $(ARCHFLAGS) $@ $^
        $(RANLIB) $@
 
 single: $(SMATGEN) $(SCATGEN)
-       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(SMATGEN) $(SCATGEN)
+       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^
        $(RANLIB) ../../$(TMGLIB)
 
 complex: $(CMATGEN) $(SCATGEN)
-       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(CMATGEN) $(SCATGEN)
+       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^
        $(RANLIB) ../../$(TMGLIB)
 
 double: $(DMATGEN) $(DZATGEN)
-       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(DMATGEN) $(DZATGEN)
+       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^
        $(RANLIB) ../../$(TMGLIB)
 
 complex16: $(ZMATGEN) $(DZATGEN)
-       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(ZMATGEN) $(DZATGEN)
+       $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^
        $(RANLIB) ../../$(TMGLIB)
 
 $(SCATGEN): $(FRC)
@@ -88,8 +87,11 @@ $(ZMATGEN): $(FRC)
 FRC:
        @FRC=$(FRC)
 
-clean:
+clean: cleanobj #cleanlib
+cleanobj:
        rm -f *.o
+cleanlib:
+       rm -f ../../$(TMGLIB)
 
 .f.o:
        $(FORTRAN) $(OPTS) -c -o $@ $<
index 612c6c6..1390287 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex_matgen
 *
       SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
      $     INFO, PATH)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
       INTEGER I, J
       COMPLEX TMP
       CHARACTER*2 C2
-
+*     ..
 *     .. Parameters ..
 *     NMAX_EXACT   the largest dimension where the generated data is
 *                  exact.
 *     ??? complex uses how many bits ???
       INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D
       PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8)
-
+*
 *     d's are generated from random permuation of those eight elements.
       COMPLEX D1(8), D2(8), INVD1(8), INVD2(8)
       DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/
      $     (-.5,-.5),(.5,-.5),(.5,.5)/
       DATA INVD2 /(-1,0),(0,1),(-.5,-.5),(0,-1),(1,0),
      $     (-.5,.5),(.5,.5),(.5,-.5)/
-
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL XERBLA
 *     ..
 *     .. External Functions
       EXTERNAL CLASET, LSAMEN
       IF (N .GT. NMAX_EXACT) THEN
          INFO = 1
       END IF
-
+*
 *     Compute M = the LCM of the integers [1, 2*N-1].  The largest
 *     reasonable N is small enough that integers suffice (up to N = 11).
       M = 1
          END DO
          M = (M / TI) * I
       END DO
-
+*
 *     Generate the scaled Hilbert matrix in A
 *     If we are testing SY routines, take
 *          D1_i = D2_i, else, D1_i = D2_i*
             END DO
          END DO
       END IF
-
+*
 *     Generate matrix B as simply the first NRHS columns of M * the
 *     identity.
       TMP = REAL(M)
       CALL CLASET('Full', N, NRHS, (0.0,0.0), TMP, B, LDB)
-
+*
 *     Generate the true solutions in X.  Because B = the first NRHS
 *     columns of M*I, the true solutions are just the first NRHS columns
 *     of the inverse Hilbert matrix.
index 7b2bada..5d0351f 100644 (file)
@@ -1,4 +1,4 @@
-C> \brief \b DLAHILB
+*> \brief \b DLAHILB
 *
 *  =========== DOCUMENTATION ===========
 *
@@ -117,17 +117,17 @@ C> \brief \b DLAHILB
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup double_matgen
 *
 *  =====================================================================
       SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
@@ -140,7 +140,7 @@ C> \brief \b DLAHILB
       INTEGER TM, TI, R
       INTEGER M
       INTEGER I, J
-
+*     ..
 *     .. Parameters ..
 *     NMAX_EXACT   the largest dimension where the generated data is
 *                  exact.
@@ -148,7 +148,9 @@ C> \brief \b DLAHILB
 *                  a small componentwise relative error.
       INTEGER NMAX_EXACT, NMAX_APPROX
       PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11)
-
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL XERBLA
 *     ..
 *     .. External Functions
       EXTERNAL DLASET
@@ -177,7 +179,7 @@ C> \brief \b DLAHILB
       IF (N .GT. NMAX_EXACT) THEN
          INFO = 1
       END IF
-
+*
 *     Compute M = the LCM of the integers [1, 2*N-1].  The largest
 *     reasonable N is small enough that integers suffice (up to N = 11).
       M = 1
@@ -192,14 +194,14 @@ C> \brief \b DLAHILB
          END DO
          M = (M / TI) * I
       END DO
-
+*
 *     Generate the scaled Hilbert matrix in A
       DO J = 1, N
          DO I = 1, N
             A(I, J) = DBLE(M) / (I + J - 1)
          END DO
       END DO
-
+*
 *     Generate matrix B as simply the first NRHS columns of M * the
 *     identity.
       CALL DLASET('Full', N, NRHS, 0.0D+0, DBLE(M), B, LDB)
@@ -212,12 +214,12 @@ C> \brief \b DLAHILB
          WORK(J) = (  ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1)  )
      $        * (N +J -1)
       END DO
-
+*
       DO J = 1, NRHS
          DO I = 1, N
             X(I, J) = (WORK(I)*WORK(J)) / (I + J - 1)
          END DO
       END DO
-
+*
       END
 
index 170cce6..cb92db6 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup real_matgen
 *
 *  =====================================================================
       SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
       INTEGER TM, TI, R
       INTEGER M
       INTEGER I, J
-
+*     ..
 *     .. Parameters ..
 *     NMAX_EXACT   the largest dimension where the generated data is
 *                  exact.
 *                  a small componentwise relative error.
       INTEGER NMAX_EXACT, NMAX_APPROX
       PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11)
-
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL XERBLA
 *     ..
 *     .. External Functions
       EXTERNAL SLASET
       IF (N .GT. NMAX_EXACT) THEN
          INFO = 1
       END IF
-
+*
 *     Compute M = the LCM of the integers [1, 2*N-1].  The largest
 *     reasonable N is small enough that integers suffice (up to N = 11).
       M = 1
          END DO
          M = (M / TI) * I
       END DO
-
+*
 *     Generate the scaled Hilbert matrix in A
       DO J = 1, N
          DO I = 1, N
             A(I, J) = REAL(M) / (I + J - 1)
          END DO
       END DO
-
+*
 *     Generate matrix B as simply the first NRHS columns of M * the
 *     identity.
       CALL SLASET('Full', N, NRHS, 0.0, REAL(M), B, LDB)
-
+*
 *     Generate the true solutions in X.  Because B = the first NRHS
 *     columns of M*I, the true solutions are just the first NRHS columns
 *     of the inverse Hilbert matrix.
          WORK(J) = (  ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1)  )
      $        * (N +J -1)
       END DO
-
+*
       DO J = 1, NRHS
          DO I = 1, N
             X(I, J) = (WORK(I)*WORK(J)) / (I + J - 1)
          END DO
       END DO
-
+*
       END
 
index 8921092..4305793 100644 (file)
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date December 2016
+*> \date November 2017
 *
 *> \ingroup complex16_matgen
 *
       SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
      $     INFO, PATH)
 *
-*  -- LAPACK test routine (version 3.7.0) --
+*  -- LAPACK test routine (version 3.8.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     December 2016
+*     November 2017
 *
 *     .. Scalar Arguments ..
       INTEGER N, NRHS, LDA, LDX, LDB, INFO
       INTEGER I, J
       COMPLEX*16 TMP
       CHARACTER*2 C2
-
+*     ..
 *     .. Parameters ..
 *     NMAX_EXACT   the largest dimension where the generated data is
 *                  exact.
 *     ??? complex uses how many bits ???
       INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D
       PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8)
-
+*
 *     d's are generated from random permuation of those eight elements.
       COMPLEX*16 d1(8), d2(8), invd1(8), invd2(8)
       DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/
       DATA INVD2 /(-1,0),(0,1),(-.5,-.5),(0,-1),(1,0),
      $     (-.5,.5),(.5,.5),(.5,-.5)/
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL XERBLA
+*     ..
 *     .. External Functions
       EXTERNAL ZLASET, LSAMEN
       INTRINSIC DBLE
       IF (N .GT. NMAX_EXACT) THEN
          INFO = 1
       END IF
-
+*
 *     Compute M = the LCM of the integers [1, 2*N-1].  The largest
 *     reasonable N is small enough that integers suffice (up to N = 11).
       M = 1
          END DO
          M = (M / TI) * I
       END DO
-
+*
 *     Generate the scaled Hilbert matrix in A
 *     If we are testing SY routines,
 *        take D1_i = D2_i, else, D1_i = D2_i*
             END DO
          END DO
       END IF
-
+*
 *     Generate matrix B as simply the first NRHS columns of M * the
 *     identity.
       TMP = DBLE(M)
       CALL ZLASET('Full', N, NRHS, (0.0D+0,0.0D+0), TMP, B, LDB)
-
+*
 *     Generate the true solutions in X.  Because B = the first NRHS
 *     columns of M*I, the true solutions are just the first NRHS columns
 *     of the inverse Hilbert matrix.
index dfb5fc1..8b883c0 100644 (file)
 #  The executable files are called:
 #       xlintsts, xlintstd, xlintstc, and xlintstz for LIN
 #       xeigtsts, xeigtstd, xeigtstc, and xeigtstz for EIG
-#  and exist in the current directory level.
 #
 #  To remove the output files after the tests have been run, enter
-#       make clean
+#       make cleantest
 #
 #  To re-run specific tests after a make, enter (for example):
 #       'rm ssvd.out; make'  or:
 
 include ../make.inc
 
-ifneq ($(strip $(VARLIB)),)
-    LAPACKLIB := $(VARLIB) ../$(LAPACKLIB)
-endif
-
-
 all: single complex double complex16 singleproto doubleproto complexproto complex16proto
 
 SEIGTST= snep.out \
@@ -157,443 +151,441 @@ complex16proto: $(ZLINTSTPROTO)
 #
 # ======== SINGLE LIN TESTS ===========================
 
-stest.out: stest.in xlintsts
+stest.out: stest.in LIN/xlintsts
        @echo Testing REAL LAPACK linear equation routines
-       ./xlintsts < stest.in > $@ 2>&1
+       ./LIN/xlintsts < $< > $@ 2>&1
 #
 # ======== COMPLEX LIN TESTS ==========================
 
-ctest.out: ctest.in xlintstc
+ctest.out: ctest.in LIN/xlintstc
        @echo Testing COMPLEX LAPACK linear equation routines
-       ./xlintstc < ctest.in > $@ 2>&1
+       ./LIN/xlintstc < $< > $@ 2>&1
 #
 # ======== DOUBLE LIN TESTS ===========================
 
-dtest.out: dtest.in xlintstd
+dtest.out: dtest.in LIN/xlintstd
        @echo Testing DOUBLE PRECISION LAPACK linear equation routines
-       ./xlintstd < dtest.in > $@ 2>&1
+       ./LIN/xlintstd < $< > $@ 2>&1
 #
 # ======== COMPLEX16 LIN TESTS ========================
 
-ztest.out: ztest.in xlintstz
+ztest.out: ztest.in LIN/xlintstz
        @echo Testing COMPLEX16 LAPACK linear equation routines
-       ./xlintstz < ztest.in > $@ 2>&1
+       ./LIN/xlintstz < $< > $@ 2>&1
 #
 # ======== SINGLE-DOUBLE PROTO LIN TESTS ==============
 
-dstest.out: dstest.in xlintstds
+dstest.out: dstest.in LIN/xlintstds
        @echo Testing SINGLE-DOUBLE PRECISION LAPACK prototype linear equation routines
-       ./xlintstds < dstest.in > $@ 2>&1
+       ./LIN/xlintstds < $< > $@ 2>&1
 #
 # ======== COMPLEX-COMPLEX16 LIN TESTS ========================
 
-zctest.out: zctest.in xlintstzc
+zctest.out: zctest.in LIN/xlintstzc
        @echo Testing COMPLEX-COMPLEX16 LAPACK prototype linear equation routines
-       ./xlintstzc < zctest.in > $@ 2>&1
+       ./LIN/xlintstzc < $< > $@ 2>&1
 #
 # ======== SINGLE RFP LIN TESTS ========================
 
-stest_rfp.out: stest_rfp.in xlintstrfs
+stest_rfp.out: stest_rfp.in LIN/xlintstrfs
        @echo Testing REAL LAPACK RFP prototype linear equation routines
-       ./xlintstrfs < stest_rfp.in > $@ 2>&1
+       ./LIN/xlintstrfs < $< > $@ 2>&1
 #
 # ======== COMPLEX16 RFP LIN TESTS ========================
 
-dtest_rfp.out: dtest_rfp.in xlintstrfd
+dtest_rfp.out: dtest_rfp.in LIN/xlintstrfd
        @echo Testing DOUBLE PRECISION LAPACK RFP prototype linear equation routines
-       ./xlintstrfd < dtest_rfp.in > $@ 2>&1
+       ./LIN/xlintstrfd < $< > $@ 2>&1
 #
 # ======== COMPLEX16 RFP LIN TESTS ========================
 
-ctest_rfp.out: ctest_rfp.in xlintstrfc
+ctest_rfp.out: ctest_rfp.in LIN/xlintstrfc
        @echo Testing COMPLEX LAPACK RFP prototype linear equation routines
-       ./xlintstrfc < ctest_rfp.in > $@ 2>&1
+       ./LIN/xlintstrfc < $< > $@ 2>&1
 #
 # ======== COMPLEX16 RFP LIN TESTS ========================
 
-ztest_rfp.out: ztest_rfp.in xlintstrfz
+ztest_rfp.out: ztest_rfp.in LIN/xlintstrfz
        @echo Testing COMPLEX16 LAPACK RFP prototype linear equation routines
-       ./xlintstrfz < ztest_rfp.in > $@ 2>&1
+       ./LIN/xlintstrfz < $< > $@ 2>&1
 #
 #
 # ======== SINGLE EIG TESTS ===========================
 #
 
-snep.out: nep.in xeigtsts
+snep.out: nep.in EIG/xeigtsts
        @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines
-       ./xeigtsts < nep.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-ssep.out: sep.in xeigtsts
+ssep.out: sep.in EIG/xeigtsts
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtsts < sep.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sse2.out: se2.in xeigtsts
+sse2.out: se2.in EIG/xeigtsts
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtsts < se2.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-ssvd.out: svd.in xeigtsts
+ssvd.out: svd.in EIG/xeigtsts
        @echo SVD: Testing Singular Value Decomposition routines
-       ./xeigtsts < svd.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sec.out: sec.in xeigtsts
+sec.out: sec.in EIG/xeigtsts
        @echo SEC: Testing REAL Eigen Condition Routines
-       ./xeigtsts < sec.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sed.out: sed.in xeigtsts
+sed.out: sed.in EIG/xeigtsts
        @echo SEV: Testing REAL Nonsymmetric Eigenvalue Driver
-       ./xeigtsts < sed.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgg.out: sgg.in xeigtsts
+sgg.out: sgg.in EIG/xeigtsts
        @echo SGG: Testing REAL Nonsymmetric Generalized Eigenvalue Problem routines
-       ./xeigtsts < sgg.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgd.out: sgd.in xeigtsts
+sgd.out: sgd.in EIG/xeigtsts
        @echo SGD: Testing REAL Nonsymmetric Generalized Eigenvalue Problem driver routines
-       ./xeigtsts < sgd.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-ssb.out: ssb.in xeigtsts
+ssb.out: ssb.in EIG/xeigtsts
        @echo SSB: Testing REAL Symmetric Eigenvalue Problem routines
-       ./xeigtsts < ssb.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-ssg.out: ssg.in xeigtsts
+ssg.out: ssg.in EIG/xeigtsts
        @echo SSG: Testing REAL Symmetric Generalized Eigenvalue Problem routines
-       ./xeigtsts < ssg.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sbal.out: sbal.in xeigtsts
+sbal.out: sbal.in EIG/xeigtsts
        @echo SGEBAL: Testing the balancing of a REAL general matrix
-       ./xeigtsts < sbal.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sbak.out: sbak.in xeigtsts
+sbak.out: sbak.in EIG/xeigtsts
        @echo SGEBAK: Testing the back transformation of a REAL balanced matrix
-       ./xeigtsts < sbak.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgbal.out: sgbal.in xeigtsts
+sgbal.out: sgbal.in EIG/xeigtsts
        @echo SGGBAL: Testing the balancing of a pair of REAL general matrices
-       ./xeigtsts < sgbal.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgbak.out: sgbak.in xeigtsts
+sgbak.out: sgbak.in EIG/xeigtsts
        @echo SGGBAK: Testing the back transformation of a pair of REAL balanced matrices
-       ./xeigtsts < sgbak.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sbb.out: sbb.in xeigtsts
+sbb.out: sbb.in EIG/xeigtsts
        @echo SBB: Testing banded Singular Value Decomposition routines
-       ./xeigtsts < sbb.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sglm.out: glm.in xeigtsts
+sglm.out: glm.in EIG/xeigtsts
        @echo GLM: Testing Generalized Linear Regression Model routines
-       ./xeigtsts < glm.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgqr.out: gqr.in xeigtsts
+sgqr.out: gqr.in EIG/xeigtsts
        @echo GQR: Testing Generalized QR and RQ factorization routines
-       ./xeigtsts < gqr.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-sgsv.out: gsv.in xeigtsts
+sgsv.out: gsv.in EIG/xeigtsts
        @echo GSV: Testing Generalized Singular Value Decomposition routines
-       ./xeigtsts < gsv.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-scsd.out: csd.in xeigtsts
+scsd.out: csd.in EIG/xeigtsts
        @echo CSD: Testing CS Decomposition routines
-       ./xeigtsts < csd.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 
-slse.out: lse.in xeigtsts
+slse.out: lse.in EIG/xeigtsts
        @echo LSE: Testing Constrained Linear Least Squares routines
-       ./xeigtsts < lse.in > $@ 2>&1
+       ./EIG/xeigtsts < $< > $@ 2>&1
 #
 # ======== COMPLEX EIG TESTS ===========================
 
-cnep.out: nep.in xeigtstc
+cnep.out: nep.in EIG/xeigtstc
        @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines
-       ./xeigtstc < nep.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-csep.out: sep.in xeigtstc
+csep.out: sep.in EIG/xeigtstc
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstc < sep.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cse2.out: se2.in xeigtstc
+cse2.out: se2.in EIG/xeigtstc
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstc < se2.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-csvd.out: svd.in xeigtstc
+csvd.out: svd.in EIG/xeigtstc
        @echo SVD: Testing Singular Value Decomposition routines
-       ./xeigtstc < svd.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cec.out: cec.in xeigtstc
+cec.out: cec.in EIG/xeigtstc
        @echo CEC: Testing COMPLEX Eigen Condition Routines
-       ./xeigtstc < cec.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-ced.out: ced.in xeigtstc
+ced.out: ced.in EIG/xeigtstc
        @echo CES: Testing COMPLEX Nonsymmetric Schur Form Driver
-       ./xeigtstc < ced.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgg.out: cgg.in xeigtstc
+cgg.out: cgg.in EIG/xeigtstc
        @echo CGG: Testing COMPLEX Nonsymmetric Generalized Eigenvalue Problem routines
-       ./xeigtstc < cgg.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgd.out: cgd.in xeigtstc
+cgd.out: cgd.in EIG/xeigtstc
        @echo CGD: Testing COMPLEX Nonsymmetric Generalized Eigenvalue Problem driver routines
-       ./xeigtstc < cgd.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-csb.out: csb.in xeigtstc
+csb.out: csb.in EIG/xeigtstc
        @echo CHB: Testing Hermitian Eigenvalue Problem routines
-       ./xeigtstc < csb.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-csg.out: csg.in xeigtstc
+csg.out: csg.in EIG/xeigtstc
        @echo CSG: Testing Symmetric Generalized Eigenvalue Problem routines
-       ./xeigtstc < csg.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cbal.out: cbal.in xeigtstc
+cbal.out: cbal.in EIG/xeigtstc
        @echo CGEBAL: Testing the balancing of a COMPLEX general matrix
-       ./xeigtstc < cbal.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cbak.out: cbak.in xeigtstc
+cbak.out: cbak.in EIG/xeigtstc
        @echo CGEBAK: Testing the back transformation of a COMPLEX balanced matrix
-       ./xeigtstc < cbak.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgbal.out: cgbal.in xeigtstc
+cgbal.out: cgbal.in EIG/xeigtstc
        @echo CGGBAL: Testing the balancing of a pair of COMPLEX general matrices
-       ./xeigtstc < cgbal.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgbak.out: cgbak.in xeigtstc
+cgbak.out: cgbak.in EIG/xeigtstc
        @echo CGGBAK: Testing the back transformation of a pair of COMPLEX balanced matrices
-       ./xeigtstc < cgbak.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cbb.out: cbb.in xeigtstc
+cbb.out: cbb.in EIG/xeigtstc
        @echo CBB: Testing banded Singular Value Decomposition routines
-       ./xeigtstc < cbb.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cglm.out: glm.in xeigtstc
+cglm.out: glm.in EIG/xeigtstc
        @echo GLM: Testing Generalized Linear Regression Model routines
-       ./xeigtstc < glm.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgqr.out: gqr.in xeigtstc
+cgqr.out: gqr.in EIG/xeigtstc
        @echo GQR: Testing Generalized QR and RQ factorization routines
-       ./xeigtstc < gqr.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-cgsv.out: gsv.in xeigtstc
+cgsv.out: gsv.in EIG/xeigtstc
        @echo GSV: Testing Generalized Singular Value Decomposition routines
-       ./xeigtstc < gsv.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-ccsd.out: csd.in xeigtstc
+ccsd.out: csd.in EIG/xeigtstc
        @echo CSD: Testing CS Decomposition routines
-       ./xeigtstc < csd.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 
-clse.out: lse.in xeigtstc
+clse.out: lse.in EIG/xeigtstc
        @echo LSE: Testing Constrained Linear Least Squares routines
-       ./xeigtstc < lse.in > $@ 2>&1
+       ./EIG/xeigtstc < $< > $@ 2>&1
 #
 # ======== DOUBLE EIG TESTS ===========================
 
-dnep.out: nep.in xeigtstd
+dnep.out: nep.in EIG/xeigtstd
        @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines
-       ./xeigtstd < nep.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dsep.out: sep.in xeigtstd
+dsep.out: sep.in EIG/xeigtstd
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstd < sep.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dse2.out: se2.in xeigtstd
+dse2.out: se2.in EIG/xeigtstd
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstd < se2.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dsvd.out: svd.in xeigtstd
+dsvd.out: svd.in EIG/xeigtstd
        @echo SVD: Testing Singular Value Decomposition routines
-       ./xeigtstd < svd.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dec.out: dec.in xeigtstd
+dec.out: dec.in EIG/xeigtstd
        @echo DEC: Testing DOUBLE PRECISION Eigen Condition Routines
-       ./xeigtstd < dec.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-ded.out: ded.in xeigtstd
+ded.out: ded.in EIG/xeigtstd
        @echo DEV: Testing DOUBLE PRECISION Nonsymmetric Eigenvalue Driver
-       ./xeigtstd < ded.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgg.out: dgg.in xeigtstd
+dgg.out: dgg.in EIG/xeigtstd
        @echo DGG: Testing DOUBLE PRECISION Nonsymmetric Generalized Eigenvalue Problem routines
-       ./xeigtstd < dgg.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgd.out: dgd.in xeigtstd
+dgd.out: dgd.in EIG/xeigtstd
        @echo DGD: Testing DOUBLE PRECISION Nonsymmetric Generalized Eigenvalue Problem driver routines
-       ./xeigtstd < dgd.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dsb.out: dsb.in xeigtstd
+dsb.out: dsb.in EIG/xeigtstd
        @echo DSB: Testing DOUBLE PRECISION Symmetric Eigenvalue Problem routines
-       ./xeigtstd < dsb.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dsg.out: dsg.in xeigtstd
+dsg.out: dsg.in EIG/xeigtstd
        @echo DSG: Testing DOUBLE PRECISION Symmetric Generalized Eigenvalue Problem routines
-       ./xeigtstd < dsg.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dbal.out: dbal.in xeigtstd
+dbal.out: dbal.in EIG/xeigtstd
        @echo DGEBAL: Testing the balancing of a DOUBLE PRECISION general matrix
-       ./xeigtstd < dbal.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dbak.out: dbak.in xeigtstd
+dbak.out: dbak.in EIG/xeigtstd
        @echo DGEBAK: Testing the back transformation of a DOUBLE PRECISION balanced matrix
-       ./xeigtstd < dbak.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgbal.out: dgbal.in xeigtstd
+dgbal.out: dgbal.in EIG/xeigtstd
        @echo DGGBAL: Testing the balancing of a pair of DOUBLE PRECISION general matrices
-       ./xeigtstd < dgbal.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgbak.out: dgbak.in xeigtstd
+dgbak.out: dgbak.in EIG/xeigtstd
        @echo DGGBAK: Testing the back transformation of a pair of DOUBLE PRECISION balanced matrices
-       ./xeigtstd < dgbak.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dbb.out: dbb.in xeigtstd
+dbb.out: dbb.in EIG/xeigtstd
        @echo DBB: Testing banded Singular Value Decomposition routines
-       ./xeigtstd < dbb.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dglm.out: glm.in xeigtstd
+dglm.out: glm.in EIG/xeigtstd
        @echo GLM: Testing Generalized Linear Regression Model routines
-       ./xeigtstd < glm.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgqr.out: gqr.in xeigtstd
+dgqr.out: gqr.in EIG/xeigtstd
        @echo GQR: Testing Generalized QR and RQ factorization routines
-       ./xeigtstd < gqr.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dgsv.out: gsv.in xeigtstd
+dgsv.out: gsv.in EIG/xeigtstd
        @echo GSV: Testing Generalized Singular Value Decomposition routines
-       ./xeigtstd < gsv.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dcsd.out: csd.in xeigtstd
+dcsd.out: csd.in EIG/xeigtstd
        @echo CSD: Testing CS Decomposition routines
-       ./xeigtstd < csd.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 
-dlse.out: lse.in xeigtstd
+dlse.out: lse.in EIG/xeigtstd
        @echo LSE: Testing Constrained Linear Least Squares routines
-       ./xeigtstd < lse.in > $@ 2>&1
+       ./EIG/xeigtstd < $< > $@ 2>&1
 #
 # ======== COMPLEX16 EIG TESTS ===========================
 
-znep.out: nep.in xeigtstz
+znep.out: nep.in EIG/xeigtstz
        @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines
-       ./xeigtstz < nep.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zsep.out: sep.in xeigtstz
+zsep.out: sep.in EIG/xeigtstz
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstz < sep.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zse2.out: se2.in xeigtstz
+zse2.out: se2.in EIG/xeigtstz
        @echo SEP: Testing Symmetric Eigenvalue Problem routines
-       ./xeigtstz < se2.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zsvd.out: svd.in xeigtstz
+zsvd.out: svd.in EIG/xeigtstz
        @echo SVD: Testing Singular Value Decomposition routines
-       ./xeigtstz < svd.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zec.out: zec.in xeigtstz
+zec.out: zec.in EIG/xeigtstz
        @echo ZEC: Testing COMPLEX16 Eigen Condition Routines
-       ./xeigtstz < zec.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zed.out: zed.in xeigtstz
+zed.out: zed.in EIG/xeigtstz
        @echo ZES: Testing COMPLEX16 Nonsymmetric Schur Form Driver
-       ./xeigtstz < zed.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgg.out: zgg.in xeigtstz
+zgg.out: zgg.in EIG/xeigtstz
        @echo ZGG: Testing COMPLEX16 Nonsymmetric Generalized Eigenvalue Problem routines
-       ./xeigtstz < zgg.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgd.out: zgd.in xeigtstz
+zgd.out: zgd.in EIG/xeigtstz
        @echo ZGD: Testing COMPLEX16 Nonsymmetric Generalized Eigenvalue Problem driver routines
-       ./xeigtstz < zgd.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zsb.out: zsb.in xeigtstz
+zsb.out: zsb.in EIG/xeigtstz
        @echo ZHB: Testing Hermitian Eigenvalue Problem routines
-       ./xeigtstz < zsb.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zsg.out: zsg.in xeigtstz
+zsg.out: zsg.in EIG/xeigtstz
        @echo ZSG: Testing Symmetric Generalized Eigenvalue Problem routines
-       ./xeigtstz < zsg.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zbal.out: zbal.in xeigtstz
+zbal.out: zbal.in EIG/xeigtstz
        @echo ZGEBAL: Testing the balancing of a COMPLEX16 general matrix
-       ./xeigtstz < zbal.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zbak.out: zbak.in xeigtstz
+zbak.out: zbak.in EIG/xeigtstz
        @echo ZGEBAK: Testing the back transformation of a COMPLEX16 balanced matrix
-       ./xeigtstz < zbak.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgbal.out: zgbal.in xeigtstz
+zgbal.out: zgbal.in EIG/xeigtstz
        @echo ZGGBAL: Testing the balancing of a pair of COMPLEX general matrices
-       ./xeigtstz < zgbal.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgbak.out: zgbak.in xeigtstz
+zgbak.out: zgbak.in EIG/xeigtstz
        @echo ZGGBAK: Testing the back transformation of a pair of COMPLEX16 balanced matrices
-       ./xeigtstz < zgbak.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zbb.out: zbb.in xeigtstz
+zbb.out: zbb.in EIG/xeigtstz
        @echo ZBB: Testing banded Singular Value Decomposition routines
-       ./xeigtstz < zbb.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zglm.out: glm.in xeigtstz
+zglm.out: glm.in EIG/xeigtstz
        @echo GLM: Testing Generalized Linear Regression Model routines
-       ./xeigtstz < glm.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgqr.out: gqr.in xeigtstz
+zgqr.out: gqr.in EIG/xeigtstz
        @echo GQR: Testing Generalized QR and RQ factorization routines
-       ./xeigtstz < gqr.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zgsv.out: gsv.in xeigtstz
+zgsv.out: gsv.in EIG/xeigtstz
        @echo GSV: Testing Generalized Singular Value Decomposition routines
-       ./xeigtstz < gsv.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zcsd.out: csd.in xeigtstz
+zcsd.out: csd.in EIG/xeigtstz
        @echo CSD: Testing CS Decomposition routines
-       ./xeigtstz < csd.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 
-zlse.out: lse.in xeigtstz
+zlse.out: lse.in EIG/xeigtstz
        @echo LSE: Testing Constrained Linear Least Squares routines
-       ./xeigtstz < lse.in > $@ 2>&1
+       ./EIG/xeigtstz < $< > $@ 2>&1
 # ==============================================================================
 
-xlintsts: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) single
+LIN/xlintsts: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintsts
 
-xlintstc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) complex
+LIN/xlintstc: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstc
 
-xlintstd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) double
+LIN/xlintstd: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstd
 
-xlintstz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) complex16
+LIN/xlintstz: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstz
 
-xlintstrfs: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-single
+LIN/xlintstrfs: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstrfs
 
-xlintstrfc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-complex
+LIN/xlintstrfc: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstrfc
 
-xlintstrfd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-double
+LIN/xlintstrfd: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstrfd
 
-xlintstrfz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-complex16
+LIN/xlintstrfz: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstrfz
 
-xlintstds: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-double
+LIN/xlintstds: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstds
 
-xlintstzc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC)
-       cd LIN ; $(MAKE) proto-complex16
+LIN/xlintstzc: $(FRCLIN) $(FRC)
+       $(MAKE) -C LIN xlintstzc
 
-xeigtsts: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC)
-       cd EIG ; $(MAKE) single
+EIG/xeigtsts: $(FRCEIG) $(FRC)
+       $(MAKE) -C EIG xeigtsts
 
-xeigtstc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC)
-       cd EIG ; $(MAKE) complex
+EIG/xeigtstc: $(FRCEIG) $(FRC)
+       $(MAKE) -C EIG xeigtstc
 
-xeigtstd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC)
-       cd EIG ; $(MAKE) double
+EIG/xeigtstd: $(FRCEIG) $(FRC)
+       $(MAKE) -C EIG xeigtstd
 
-xeigtstz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC)
-       cd EIG ; $(MAKE) complex16
+EIG/xeigtstz: $(FRCEIG) $(FRC)
+       $(MAKE) -C EIG xeigtstz
 
-clean:
+clean: cleantest
+cleantest:
        rm -f *.out core
 
-cleanup:
-       rm -f x* *.out core
-
 FRCLIN:
        @FRCLIN=$(FRCLIN)
 
index c5ed21f..2f3853a 100644 (file)
@@ -26,6 +26,9 @@ CHE   10               List types on next line if 0 < NTYPES < 10
 CHR   10               List types on next line if 0 < NTYPES < 10
 CHK   10               List types on next line if 0 < NTYPES < 10
 CHA   10               List types on next line if 0 < NTYPES < 10
+CH2   10               List types on next line if 0 < NTYPES < 10
+CSA   11               List types on next line if 0 < NTYPES < 10
+CS2   11               List types on next line if 0 < NTYPES < 10
 CHP   10               List types on next line if 0 < NTYPES < 10
 CSY   11               List types on next line if 0 < NTYPES < 11
 CSR   11               List types on next line if 0 < NTYPES < 11
index 94268a1..c00fe3e 100644 (file)
@@ -87,13 +87,13 @@ DBL:  Tests DGEBAL
   0.0000D+00  0.8192D+04  0.0000D+00  0.0000D+00  0.8000D+01
 
    1   5
-  1.0000D+00     0.0000D-03     0.0000D-03     0.0000D-03   250.0000D-03
+  1.0000D+00     0.0000D-03     0.0000D-03     0.0000D-03     2.0000D+00
   0.0000D-03     2.0000D+00     1.0240D+03    16.0000D+00    16.0000D+00
-  256.0000D-03     1.0000D-03     4.0000D+00     0.0000D-03     2.0480D+03
+  3.2000D-02     1.0000D-03     4.0000D+00     0.0000D-03     2.0480D+03
   0.0000D-03   250.0000D-03    16.0000D+00     4.0000D+00     4.0000D+00
   0.0000D-03     2.0480D+03     0.0000D-03     0.0000D-03     8.0000D+00
 
-  64.0000D+00  500.0000D-03  62.5000D-03  4.0000D+00  2.0000D+00
+  8.0000D+00  500.0000D-03  62.5000D-03  4.0000D+00  2.0000D+00
 
   4
   0.1000D+01  0.1000D+07  0.1000D+07  0.1000D+07
@@ -167,15 +167,15 @@ DBL:  Tests DGEBAL
   0.0000D+00  0.8000D+01  0.0000D+00  0.4000D-02  0.1250D+00 -0.2000D+00 0.3000D+01
 
   2   5
-  6.4000D+01   2.5000D-01   5.00000D-01   0.0000D+00   0.0000D+00   1.0000D+00  -2.0000D+00
-  0.0000D+00   4.0000D+00   2.00000D+00   4.0960D+00   1.6000D+00   0.0000D+00   1.0240D+01
-  0.0000D+00   5.0000D-01   3.00000D+00   4.0960D+00   1.0000D+00   0.0000D+00  -6.4000D+00
-  0.0000D+00   1.0000D+00  -3.90625D+00   1.0000D+00  -3.1250D+00   0.0000D+00   8.0000D+00
-  0.0000D+00  -2.0000D+00   4.00000D+00   1.6000D+00   2.0000D+00  -8.0000D+00   8.0000D+00
+  6.4000D+01   1.0000D+00   5.00000D-01   0.0000D+00   0.0000D+00   1.0000D+00  -2.0000D+00
+  0.0000D+00   4.0000D+00   5.00000D-01   1.0240D+00   8.0000D-01   0.0000D+00   2.5600D+00
+  0.0000D+00   2.0000D+00   3.00000D+00   4.0960D+00   2.0000D+00   0.0000D+00  -6.4000D+00
+  0.0000D+00   4.0000D+00  -3.90625D+00   1.0000D+00  -6.2500D+00   0.0000D+00   8.0000D+00
+  0.0000D+00  -4.0000D+00   2.00000D+00   8.0000D-01   2.0000D+00  -4.0000D+00   4.0000D+00
   0.0000D+00   0.0000D+00   0.00000D+00   0.0000D+00   0.0000D+00   6.0000D+00   1.0000D+00
   0.0000D+00   0.0000D+00   0.00000D+00   0.0000D+00   0.0000D+00   0.0000D+00   0.0000D+00
 
-  3.0000D+00  1.953125D-03  3.1250D-02  3.2000D+01  2.5000D-01  1.0000D+00 6.0000D+00
+  3.0000D+00  7.812500D-03  3.1250D-02  3.2000D+01  5.0000D-01  1.0000D+00 6.0000D+00
 
   5
   0.1000D+04  0.2000D+01  0.3000D+01  0.4000D+01  0.5000D+06
@@ -185,13 +185,13 @@ DBL:  Tests DGEBAL
   0.6000D+01  0.2000D+03  0.1000D+01  0.6000D+03  0.3000D+01
 
   1   5
-  1.0000D+03   3.1250D-02   3.7500D-01   6.2500D-02   3.90625D+03
-  5.7600D+02   0.0000D+00   1.6000D-03   1.0000D+00   1.5000D+00
-  0.0000D+00  -3.7500D+01   2.0000D+00   1.2500D-01   6.2500D-02
-  5.7600D+02   2.0000D-03   8.0000D+00   1.0000D+00  -5.0000D+02
-  7.6800D+02   4.0000D+02   1.6000D+01   1.2000D+03   3.0000D+00
+  1.0000D+03     3.1250D-02     3.7500D-01     3.1250D-02     1.95312500D+03
+  5.7600D+02     0.0000D+00     1.6000D-03     5.0000D-01     7.50000000D-01
+  0.0000D+00    -3.7500D+01     2.0000D+00     6.2500D-02     3.12500000D-02
+  1.1520D+03     4.0000D-03     1.6000D+01     1.0000D+00    -5.00000000D+02
+  1.5360D+03     8.0000D+02     3.2000D+01     1.2000D+03     3.00000000D+00
 
-  1.2800D+02  2.0000D+00  1.6000D+01  2.0000D+00  1.0000D+00
+  3.2000D+01  5.0000D-01   4.0000D+00   2.5000D-01  1.2500D-01
 
   6
   1.0000D+00  1.0000D+120 0.0000D+00  0.0000D+00  0.0000D+00 0.0000D+00
@@ -202,14 +202,13 @@ DBL:  Tests DGEBAL
   0.0000D+00  0.0000D+00  0.0000D+00  0.0000D+00  1.0000D-120 1.0000D+00
 
    1   6
-   1.000000000000000000D+00  6.344854593289122931D+03  0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00
-   1.576080247855779135D-04  1.000000000000000000D+00  6.344854593289122931D+03  0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00
-   0.000000000000000000D+00  1.576080247855779135D-04  1.000000000000000000D+00  3.172427296644561466D+03  0.000000000000000000D+00  0.000000000000000000D+00
-   0.000000000000000000D+00  0.000000000000000000D+00  3.152160495711558270D-04  1.000000000000000000D+00  1.586213648322280733D+03  0.000000000000000000D+00
-   0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00  6.304320991423116539D-04  1.000000000000000000D+00  1.586213648322280733D+03
-   0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00  0.000000000000000000D+00  6.304320991423116539D-04  1.000000000000000000D+00
-
-  2.494800386918399765D+291  1.582914569427869018D+175  1.004336277661868922D+59  3.186183822264904554D-58  5.053968264940243633D-175  8.016673440035891112D-292
-
+0.10000000000000000000D+01 0.63448545932891229313D+04 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00
+0.15760802478557791348D-03 0.10000000000000000000D+01 0.63448545932891229313D+04 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00
+0.00000000000000000000D+00 0.15760802478557791348D-03 0.10000000000000000000D+01 0.31724272966445614657D+04 0.00000000000000000000D+00 0.00000000000000000000D+00
+0.00000000000000000000D+00 0.00000000000000000000D+00 0.31521604957115582695D-03 0.10000000000000000000D+01 0.15862136483222807328D+04 0.00000000000000000000D+00
+0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.63043209914231165391D-03 0.10000000000000000000D+01 0.79310682416114036641D+03
+0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.12608641982846233078D-02 0.10000000000000000000D+01
+
+  2.494800386918399765D+291  1.582914569427869018D+175  1.004336277661868922D+59  3.186183822264904554D-58  5.053968264940243633D-175  0.40083367200179455560D-291;
 
 0
index d05a27c..a7a16ee 100644 (file)
@@ -26,6 +26,7 @@ DSY   10               List types on next line if 0 < NTYPES < 10
 DSR   10               List types on next line if 0 < NTYPES < 10
 DSK   10               List types on next line if 0 < NTYPES < 10
 DSA   10               List types on next line if 0 < NTYPES < 10
+DS2   10               List types on next line if 0 < NTYPES < 10
 DSP   10               List types on next line if 0 < NTYPES < 10
 DTR   18               List types on next line if 0 < NTYPES < 18
 DTP   18               List types on next line if 0 < NTYPES < 18
index 30f1c47..d320470 100644 (file)
@@ -26,6 +26,7 @@ SSY   10               List types on next line if 0 < NTYPES < 10
 SSR   10               List types on next line if 0 < NTYPES < 10
 SSK   10               List types on next line if 0 < NTYPES < 10
 SSA   10               List types on next line if 0 < NTYPES < 10
+SS2   10               List types on next line if 0 < NTYPES < 10
 SSP   10               List types on next line if 0 < NTYPES < 10
 STR   18               List types on next line if 0 < NTYPES < 18
 STP   18               List types on next line if 0 < NTYPES < 18
index aba4a3d..5202539 100644 (file)
@@ -26,6 +26,9 @@ ZHE   10               List types on next line if 0 < NTYPES < 10
 ZHR   10               List types on next line if 0 < NTYPES < 10
 ZHK   10               List types on next line if 0 < NTYPES < 10
 ZHA   10               List types on next line if 0 < NTYPES < 10
+ZH2   10               List types on next line if 0 < NTYPES < 10
+ZSA   11               List types on next line if 0 < NTYPES < 10
+ZS2   11               List types on next line if 0 < NTYPES < 10
 ZHP   10               List types on next line if 0 < NTYPES < 10
 ZSY   11               List types on next line if 0 < NTYPES < 11
 ZSR   11               List types on next line if 0 < NTYPES < 11
diff --git a/lapack-netlib/appveyor.yml b/lapack-netlib/appveyor.yml
new file mode 100644 (file)
index 0000000..7fc3fbd
--- /dev/null
@@ -0,0 +1,64 @@
+# Windows testing.
+# Syntax for this file:
+# http://www.appveyor.com/docs/appveyor-yml
+
+shallow_clone: true
+
+platform: x64
+
+cache:
+  - x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
+  - i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
+
+environment:
+  CTEST_OUTPUT_ON_FAILURE: 1
+  matrix:
+  - MINGW_DIR: mingw64
+    MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download
+    MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
+  - MINGW_DIR: mingw32
+    MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
+    MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
+
+install:
+  - if not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
+  - 7z x -y "%MINGW_ARCHIVE%" > nul
+  # CMake refuses to generate MinGW Makefiles if sh.exe is in the Path
+  - ps: Get-Command sh.exe -All | Remove-Item
+
+build_script:
+  - echo "NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%"
+  - set PATH=%CD%\%MINGW_DIR%\bin;%PATH%
+  - g++ --version
+  - mingw32-make --version
+  - cmake --version
+  - if "%APPVEYOR_REPO_TAG%"=="true" (set CMAKE_BUILD_TYPE=Release) else (set CMAKE_BUILD_TYPE=Debug)
+  - set SRC_DIR=%CD%
+  - echo %SRC_DIR%
+  - set BLD_DIR=%SRC_DIR%\..\lapack-appveyor-bld
+  - set INST_DIR=%SRC_DIR%\..\lapack-appveyor-install
+  - mkdir -p %BLD_DIR%
+  - cd %BLD_DIR%
+    # See issue #17 on github dashboard.  Once resolved, use -DCBLAS=ON
+    #  - cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DLAPACKE=ON ${SRC_DIR}
+  - cmake
+    -G "MinGW Makefiles"
+    -DBUILDNAME:STRING="appveyor-%MINGW_DIR%-%APPVEYOR_REPO_BRANCH%"
+    -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%
+    -DCMAKE_INSTALL_PREFIX=%INST_DIR%
+    -DCBLAS:BOOL=ON
+    -DLAPACKE:BOOL=ON
+    -DBUILD_TESTING=ON
+    -DLAPACKE_WITH_TMG:BOOL=ON
+    %SRC_DIR%
+  - mingw32-make -j%NUMBER_OF_PROCESSORS%
+
+test_script:
+  - ctest -D ExperimentalStart
+  - ctest -D ExperimentalConfigure
+  - ctest -D ExperimentalBuild -j%NUMBER_OF_PROCESSORS%
+  - ctest -D ExperimentalTest --schedule-random -j%NUMBER_OF_PROCESSORS% --output-on-failure --timeout 100 -E "CBLAS\-.*cblat1"
+  - ctest -D ExperimentalSubmit
+
+after_test:
+  - mingw32-make install -j%NUMBER_OF_PROCESSORS%
index 878efc2..316c871 100644 (file)
@@ -1,9 +1,9 @@
-prefix=@prefix@
-libdir=@libdir@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: LAPACK
 Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
 Version: @LAPACK_VERSION@
 URL: http://www.netlib.org/lapack/
 Libs: -L${libdir} -llapack
-Requires: blas
+Requires.private: blas
index 70783fe..3c91748 100755 (executable)
@@ -232,12 +232,12 @@ for dtype in range_prec:
     letter+"bb","glm","gqr",
     "gsv","csd","lse",
     letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"),
-    ("Nonsymmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem 2 stage", "Singular Value Decomposition",
-    "Eigen Condition","Nonsymmetric Eigenvalue","Nonsymmetric Generalized Eigenvalue Problem",
-    "Nonsymmetric Generalized Eigenvalue Problem driver", "Symmetric Eigenvalue Problem", "Symmetric Eigenvalue Generalized Problem",
-    "Banded Singular Value Decomposition routines", "Generalized Linear Regression Model routines", "Generalized QR and RQ factorization routines",
-    "Generalized Singular Value Decomposition routines", "CS Decomposition routines", "Constrained Linear Least Squares routines",
-    "Linear Equation routines", "Mixed Precision linear equation routines","RFP linear equation routines"),
+    ("Nonsymmetric-Eigenvalue-Problem", "Symmetric-Eigenvalue-Problem", "Symmetric-Eigenvalue-Problem-2-stage", "Singular-Value-Decomposition",
+    "Eigen-Condition","Nonsymmetric-Eigenvalue","Nonsymmetric-Generalized-Eigenvalue-Problem",
+    "Nonsymmetric-Generalized-Eigenvalue-Problem-driver", "Symmetric-Eigenvalue-Problem", "Symmetric-Eigenvalue-Generalized-Problem",
+    "Banded-Singular-Value-Decomposition-routines", "Generalized-Linear-Regression-Model-routines", "Generalized-QR-and-RQ-factorization-routines",
+    "Generalized-Singular-Value-Decomposition-routines", "CS-Decomposition-routines", "Constrained-Linear-Least-Squares-routines",
+    "Linear-Equation-routines", "Mixed-Precision-linear-equation-routines","RFP-linear-equation-routines"),
     (letter+"nep", letter+"sep", letter+"se2", letter+"svd",
     letter+"ec",letter+"ed",letter+"gg",
     letter+"gd",letter+"sb",letter+"sg",
@@ -268,7 +268,7 @@ for dtype in range_prec:
                 # EIG TESTS
                 cmdbase="xeigtst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
         if (not just_errors and not short_summary):
-            print("-->  Testing "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]")
+            print("Testing "+name+" "+dtests[1][dtest]+"-"+cmdbase, end=' ')
         # Run the process: either to read the file or run the LAPACK testing
         nb_test = run_summary_test(f, cmdbase, short_summary)
         list_results[0][dtype]+=nb_test[0]
@@ -279,13 +279,13 @@ for dtype in range_prec:
 
         if (not short_summary):
             if (nb_test[0]>0 and just_errors==0):
-                print("-->  Tests passed: "+str(nb_test[0]))
+                print("passed: "+str(nb_test[0]))
             if (nb_test[1]>0):
-                print("-->  Tests failing to pass the threshold: "+str(nb_test[1]))
+                print("failing to pass the threshold: "+str(nb_test[1]))
             if (nb_test[2]>0):
-                print("-->  Illegal Error: "+str(nb_test[2]))
+                print("Illegal Error: "+str(nb_test[2]))
             if (nb_test[3]>0):
-                print("-->  Info Error: "+str(nb_test[3]))
+                print("Info Error: "+str(nb_test[3]))
             if (got_error>0 and just_errors==1):
                 print("ERROR IS LOCATED IN "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]")
                 print("")
index 7f66018..d780c3a 100644 (file)
@@ -1,75 +1,79 @@
 ####################################################################
 #  LAPACK make include file.                                       #
-#  LAPACK, Version 3.7.0                                           #
-#  December 2016                                                   #
+#  LAPACK, Version 3.8.0                                           #
+#  November 2017                                                   #
 ####################################################################
-#
+
 SHELL = /bin/sh
+
+#  CC is the C compiler, normally invoked with options CFLAGS.
 #
-#  Modify the FORTRAN and OPTS definitions to refer to the
-#  compiler and desired compiler options for your machine.  NOOPT
-#  refers to the compiler options desired when NO OPTIMIZATION is
-#  selected.  Define LOADER and LOADOPTS to refer to the loader and
-#  desired load options for your machine.
+CC     = gcc
+CFLAGS = -O3
+
+#  Modify the FORTRAN and OPTS definitions to refer to the compiler
+#  and desired compiler options for your machine.  NOOPT refers to
+#  the compiler options desired when NO OPTIMIZATION is selected.
 #
 #  Note: During a regular execution, LAPACK might create NaN and Inf
 #  and handle these quantities appropriately. As a consequence, one
 #  should not compile LAPACK with flags such as -ffpe-trap=overflow.
 #
-FORTRAN  = gfortran
-OPTS     = -O2 -frecursive
-DRVOPTS  = $(OPTS)
-NOOPT    = -O0 -frecursive
+FORTRAN = gfortran
+OPTS    = -O2 -frecursive
+DRVOPTS = $(OPTS)
+NOOPT   = -O0 -frecursive
+
+#  Define LOADER and LOADOPTS to refer to the loader and desired
+#  load options for your machine.
+#
 LOADER   = gfortran
 LOADOPTS =
-#
-#  Comment out the following line to include deprecated routines to the
-#  LAPACK library.
+
+#  The archiver and the flag(s) to use when building an archive
+#  (library).  If your system has no ranlib, set RANLIB = echo.
+#
+ARCH      = ar
+ARCHFLAGS = cr
+RANLIB    = ranlib
+
+#  Timer for the SECOND and DSECND routines
+#
+#  Default:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME
+#TIMER = EXT_ETIME
+#  For RS6K:  SECOND and DSECND will use a call to the
+#  EXTERNAL FUNCTION ETIME_
+#TIMER = EXT_ETIME_
+#  For gfortran compiler:  SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION ETIME
+TIMER = INT_ETIME
+#  If your Fortran compiler does not provide etime (like Nag Fortran
+#  Compiler, etc...) SECOND and DSECND will use a call to the
+#  INTERNAL FUNCTION CPU_TIME
+#TIMER = INT_CPU_TIME
+#  If none of these work, you can use the NONE value.
+#  In that case, SECOND and DSECND will always return 0.
+#TIMER = NONE
+
+#  Uncomment the following line to include deprecated routines in
+#  the LAPACK library.
 #
 #BUILD_DEPRECATED = Yes
+
+#  LAPACKE has the interface to some routines from tmglib.
+#  If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE.
 #
-# Timer for the SECOND and DSECND routines
-#
-# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
-# TIMER    = EXT_ETIME
-# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
-# TIMER    = EXT_ETIME_
-# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
-TIMER    = INT_ETIME
-# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
-# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
-# TIMER    = INT_CPU_TIME
-# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
-# TIMER     = NONE
-#
-#  Configuration LAPACKE: Native C interface to LAPACK
-#  To generate LAPACKE library: type 'make lapackelib'
-#  Configuration file: turned off (default)
-#  Complex types: C99 (default)
-#  Name pattern: mixed case (default)
-#  (64-bit) Data model: LP64 (default)
-#
-# CC is the C compiler, normally invoked with options CFLAGS.
-#
-CC = gcc
-CFLAGS = -O3
-#
-#  The archiver and the flag(s) to use when building archive (library)
-#  If you system has no ranlib, set RANLIB = echo.
-#
-ARCH     = ar
-ARCHFLAGS= cr
-RANLIB   = ranlib
-#
+#LAPACKE_WITH_TMG = Yes
+
 #  Location of the extended-precision BLAS (XBLAS) Fortran library
 #  used for building and testing extended-precision routines.  The
-#  relevant routines will be compiled and XBLAS will be linked only if
-#  USEXBLAS is defined.
-#
-# USEXBLAS    = Yes
-XBLASLIB     =
-# XBLASLIB    = -lxblas
+#  relevant routines will be compiled and XBLAS will be linked only
+#  if USEXBLAS is defined.
 #
+#USEXBLAS = Yes
+#XBLASLIB = -lxblas
+
 #  The location of the libraries to which you will link.  (The
 #  machine-specific, optimized BLAS library should be used whenever
 #  possible.)