├── CBLAS ├── src │ ├── cblas_globals.c │ ├── cblas_crotg.c │ ├── cblas_zrotg.c │ ├── scabs1sub.f │ ├── cblas_scabs1.c │ ├── cblas_dcabs1.c │ ├── cblas_srotg.c │ ├── dcabs1sub.f │ ├── cblas_drotg.c │ ├── cblas_srotmg.c │ ├── sasumsub.f │ ├── snrm2sub.f │ ├── cblas_drotmg.c │ ├── scasumsub.f │ ├── scnrm2sub.f │ ├── icamaxsub.f │ ├── isamaxsub.f │ ├── sdotsub.f │ ├── dasumsub.f │ ├── dnrm2sub.f │ ├── idamaxsub.f │ ├── izamaxsub.f │ ├── cdotcsub.f │ ├── cdotusub.f │ ├── dzasumsub.f │ ├── dznrm2sub.f │ ├── dsdotsub.f │ ├── sdsdotsub.f │ ├── ddotsub.f │ ├── zdotcsub.f │ ├── zdotusub.f │ ├── cblas_drotm.c │ ├── cblas_cscal.c │ ├── cblas_sscal.c │ ├── cblas_zscal.c │ ├── cblas_csscal.c │ ├── cblas_dscal.c │ ├── cblas_zdscal.c │ ├── cblas_csrot.c │ ├── cblas_zdrot.c │ ├── cblas_cswap.c │ ├── cblas_dasum.c │ ├── cblas_dnrm2.c │ ├── cblas_dswap.c │ ├── cblas_sasum.c │ ├── cblas_snrm2.c │ ├── cblas_sswap.c │ ├── cblas_zswap.c │ ├── cblas_ccopy.c │ ├── cblas_dcopy.c │ ├── cblas_dzasum.c │ ├── cblas_dznrm2.c │ ├── cblas_scasum.c │ ├── cblas_scnrm2.c │ ├── cblas_scopy.c │ ├── cblas_zcopy.c │ ├── cblas_srotm.c │ ├── cblas_caxpy.c │ ├── cblas_drot.c │ ├── cblas_zaxpy.c │ ├── cblas_daxpy.c │ ├── cblas_srot.c │ ├── cblas_caxpby.c │ ├── cblas_zaxpby.c │ ├── cblas_daxpby.c │ ├── cblas_saxpy.c │ ├── cblas_cdotu_sub.c │ ├── cblas_sdot.c │ ├── cblas_cdotc_sub.c │ ├── cblas_ddot.c │ ├── cblas_icamax.c │ ├── cblas_idamax.c │ ├── cblas_isamax.c │ ├── cblas_izamax.c │ ├── cblas_saxpby.c │ ├── cblas_zdotc_sub.c │ ├── cblas_zdotu_sub.c │ ├── cblas_dsdot.c │ ├── cblas_sdsdot.c │ ├── xerbla.c │ ├── cblas_sger.c │ ├── cblas_zgeru.c │ ├── cblas_cgeru.c │ ├── cblas_dger.c │ ├── cblas_dspr.c │ ├── cblas_sspr.c │ ├── cblas_ssyr.c │ ├── cblas_dsyr.c │ ├── cblas_dspr2.c │ ├── cblas_sspr2.c │ └── cblas_sspmv.c ├── include │ ├── CMakeLists.txt │ └── cblas_mangling_with_flags.h.in ├── cmake │ ├── cblas-config-version.cmake.in │ ├── cblas-config-build.cmake.in │ └── cblas-config-install.cmake.in ├── cblas.pc.in ├── examples │ ├── Makefile │ ├── CMakeLists.txt │ ├── cblas_example1.c │ └── cblas_example1_64.c ├── Makefile ├── testing │ ├── din3 │ ├── sin3 │ ├── cin3 │ ├── zin3 │ ├── auxiliary.c │ ├── din2 │ ├── sin2 │ ├── cin2 │ └── zin2 └── README ├── DOCS ├── lapack.png └── lapacke.pdf ├── TESTING ├── cdmd.in ├── ddmd.in ├── sdmd.in ├── zdmd.in ├── csb.in ├── dsb.in ├── ssb.in ├── zsb.in ├── gqr.in ├── lse.in ├── gsv.in ├── glm.in ├── stest_rfp.in ├── ctest_rfp.in ├── ztest_rfp.in ├── dtest_rfp.in ├── csd.in ├── cbb.in ├── dbb.in ├── sbb.in ├── zbb.in ├── csg.in ├── dsg.in ├── ssg.in ├── zsg.in ├── dstest.in ├── zctest.in ├── se2.in ├── sep.in ├── cgg.in ├── dgg.in ├── sgg.in ├── zgg.in ├── svd.in ├── nep.in ├── runtest.cmake ├── EIG │ ├── chkxer.f │ ├── slasum.f │ └── dlasum.f └── LIN │ └── chkxer.f ├── LAPACKE ├── mangling │ ├── CMakeLists.txt │ ├── Fintface.f │ └── Cintface.c ├── cmake │ ├── lapacke-config-version.cmake.in │ ├── lapacke-config-build.cmake.in │ └── lapacke-config-install.cmake.in ├── lapacke.pc.in ├── include │ ├── lapacke_mangling_with_flags.h.in │ └── CMakeLists.txt ├── example │ ├── lapacke_example_aux.h │ └── Makefile ├── src │ ├── lapacke_sorhr_col.c │ ├── lapacke_dorhr_col.c │ ├── lapacke_cunhr_col.c │ ├── lapacke_zunhr_col.c │ ├── lapacke_dlamch.c │ ├── lapacke_slamch.c │ ├── lapacke_dlamch_work.c │ ├── lapacke_slamch_work.c │ └── lapacke_slapy2_work.c ├── LICENSE └── utils │ └── lapacke_lsame.c ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ ├── help_wanted.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md └── SECURITY.md ├── BLAS ├── blas.pc.in ├── CMakeLists.txt ├── Makefile ├── TESTING │ ├── dblat3.in │ ├── sblat3.in │ ├── cblat3.in │ ├── zblat3.in │ ├── CMakeLists.txt │ ├── cblat2.in │ ├── zblat2.in │ ├── dblat2.in │ ├── sblat2.in │ └── Makefile └── SRC │ ├── scabs1.f │ └── dcabs1.f ├── lapack.pc.in ├── CMAKE ├── PreventInBuildInstalls.cmake ├── lapack-config-build.cmake.in ├── lapack-config-install.cmake.in ├── CheckTimeFunction.cmake ├── PreventInSourceBuilds.cmake └── CheckFortranTypeSizes.cmake ├── CTestConfig.cmake ├── .gitignore ├── .appveyor.yml ├── INSTALL ├── LAPACK_version.f ├── CMakeLists.txt ├── second_NONE.f ├── dsecnd_NONE.f ├── second_INT_CPU_TIME.f ├── dsecnd_INT_CPU_TIME.f ├── second_EXT_ETIME_.f ├── dsecnd_EXT_ETIME_.f ├── second_EXT_ETIME.f ├── second_INT_ETIME.f ├── dsecnd_EXT_ETIME.f ├── dsecnd_INT_ETIME.f └── ilaver.f ├── SRC ├── la_xisnan.F90 └── sisnan.f └── CTestCustom.cmake.in /CBLAS/src/cblas_globals.c: -------------------------------------------------------------------------------- 1 | int CBLAS_CallFromC=0; 2 | int RowMajorStrg=0; 3 | -------------------------------------------------------------------------------- /DOCS/lapack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reference-LAPACK/lapack/HEAD/DOCS/lapack.png -------------------------------------------------------------------------------- /DOCS/lapacke.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Reference-LAPACK/lapack/HEAD/DOCS/lapacke.pdf -------------------------------------------------------------------------------- /TESTING/cdmd.in: -------------------------------------------------------------------------------- 1 | 10 2 | 5 3 | 4 | 20 5 | 10 6 | 7 | 30 8 | 11 9 | 10 | 50 11 | 20 12 | -------------------------------------------------------------------------------- /TESTING/ddmd.in: -------------------------------------------------------------------------------- 1 | 10 2 | 5 3 | 4 | 20 5 | 10 6 | 7 | 30 8 | 11 9 | 10 | 50 11 | 20 12 | -------------------------------------------------------------------------------- /TESTING/sdmd.in: -------------------------------------------------------------------------------- 1 | 10 2 | 5 3 | 4 | 20 5 | 10 6 | 7 | 30 8 | 11 9 | 10 | 50 11 | 20 12 | -------------------------------------------------------------------------------- /TESTING/zdmd.in: -------------------------------------------------------------------------------- 1 | 10 2 | 5 3 | 4 | 20 5 | 10 6 | 7 | 30 8 | 11 9 | 10 | 50 11 | 20 12 | -------------------------------------------------------------------------------- /LAPACKE/mangling/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | project(MANGLING C Fortran) 3 | 4 | add_executable(xintface Fintface.f Cintface.c) 5 | -------------------------------------------------------------------------------- /LAPACKE/mangling/Fintface.f: -------------------------------------------------------------------------------- 1 | program intface 2 | external c_intface 3 | integer i 4 | 5 | call c_intface(i) 6 | 7 | stop 8 | end 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Request a feature 4 | title: '' 5 | labels: 'Type: Feature request' 6 | assignees: '' 7 | 8 | --- -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/help_wanted.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask a question related to the use of the package 4 | title: '' 5 | labels: 'Type: Question' 6 | assignees: '' 7 | 8 | --- -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Description** 2 | 3 | **Checklist** 4 | 5 | - [ ] The documentation has been updated. 6 | - [ ] If the PR solves a specific issue, it is set to be closed on merge. -------------------------------------------------------------------------------- /CBLAS/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CBLAS_INCLUDE cblas.h cblas_f77.h cblas_64.h) 2 | 3 | file(COPY ${CBLAS_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include) 4 | 5 | file(COPY cblas_test.h DESTINATION ${LAPACK_BINARY_DIR}/test_include) 6 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_crotg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_crotg.c 3 | * 4 | * The program is a C interface to crotg. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | void API_SUFFIX(cblas_crotg)(void *a, void *b, float *c, void *s) 10 | { 11 | F77_crotg(a,b,c,s); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zrotg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zrotg.c 3 | * 4 | * The program is a C interface to zrotg. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | void API_SUFFIX(cblas_zrotg)(void *a, void *b, double *c, void *s) 10 | { 11 | F77_zrotg(a,b,c,s); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /BLAS/blas.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: BLAS 5 | Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms 6 | Version: @LAPACK_VERSION@ 7 | URL: http://www.netlib.org/blas/ 8 | Libs: -L${libdir} -l@BLASLIB@ 9 | -------------------------------------------------------------------------------- /CBLAS/cmake/cblas-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@LAPACK_VERSION@") 2 | if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION}) 3 | set(PACKAGE_VERSION_COMPATIBLE 1) 4 | if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION}) 5 | set(PACKAGE_VERSION_EXACT 1) 6 | endif() 7 | endif() 8 | 9 | -------------------------------------------------------------------------------- /CBLAS/src/scabs1sub.f: -------------------------------------------------------------------------------- 1 | c scabs1.f 2 | c 3 | c The program is a fortran wrapper for scabs1. 4 | c 5 | subroutine scabs1sub(z, cabs1) 6 | implicit none 7 | c 8 | external scabs1 9 | complex z 10 | real scabs1, cabs1 11 | c 12 | cabs1=scabs1(z) 13 | return 14 | end 15 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_scabs1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_scabs1.c 3 | * 4 | * The program is a C interface to scabs1. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | float API_SUFFIX(cblas_scabs1)(const void *c) 10 | { 11 | float cabs1 = 0.0; 12 | F77_scabs1_sub(c, &cabs1); 13 | return cabs1; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /LAPACKE/cmake/lapacke-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | set(PACKAGE_VERSION "@LAPACK_VERSION@") 2 | if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION}) 3 | set(PACKAGE_VERSION_COMPATIBLE 1) 4 | if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION}) 5 | set(PACKAGE_VERSION_EXACT 1) 6 | endif() 7 | endif() 8 | 9 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dcabs1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_scabs1.c 3 | * 4 | * The program is a C interface to scabs1. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | double API_SUFFIX(cblas_dcabs1)(const void *c) 10 | { 11 | double cabs1 = 0.0; 12 | F77_dcabs1_sub(c, &cabs1); 13 | return cabs1; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_srotg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_srotg.c 3 | * 4 | * The program is a C interface to srotg. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_srotg)( float *a, float *b, float *c, float *s) 12 | { 13 | F77_srotg(a,b,c,s); 14 | } 15 | -------------------------------------------------------------------------------- /CBLAS/src/dcabs1sub.f: -------------------------------------------------------------------------------- 1 | c dcabs1.f 2 | c 3 | c The program is a fortran wrapper for dcabs1. 4 | c 5 | subroutine dcabs1sub(z, cabs1) 6 | implicit none 7 | c 8 | external dcabs1 9 | double complex z 10 | double precision dcabs1, cabs1 11 | c 12 | cabs1=dcabs1(z) 13 | return 14 | end 15 | -------------------------------------------------------------------------------- /lapack.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: LAPACK 5 | Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage 6 | Version: @LAPACK_VERSION@ 7 | URL: http://www.netlib.org/lapack/ 8 | Libs: -L${libdir} -l@LAPACKLIB@ 9 | Requires.private: @BLASLIB@ 10 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_drotg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_drotg.c 3 | * 4 | * The program is a C interface to drotg. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_drotg)( double *a, double *b, double *c, double *s) 12 | { 13 | F77_drotg(a,b,c,s); 14 | } 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'Type: Bug' 6 | assignees: '' 7 | 8 | --- 9 | **Description** 10 | 11 | **Checklist** 12 | 13 | - [ ] I've included a minimal example to reproduce the issue 14 | - [ ] I'd be willing to make a PR to solve this issue -------------------------------------------------------------------------------- /CMAKE/PreventInBuildInstalls.cmake: -------------------------------------------------------------------------------- 1 | string(TOLOWER "${CMAKE_INSTALL_PREFIX}" _PREFIX) 2 | string(TOLOWER "${ITK_BINARY_DIR}" _BUILD) 3 | if("${_PREFIX}" STREQUAL "${_BUILD}") 4 | message(FATAL_ERROR 5 | "The current CMAKE_INSTALL_PREFIX points at the build tree:\n" 6 | " ${CMAKE_INSTALL_PREFIX}\n" 7 | "This is not supported." 8 | ) 9 | endif() 10 | -------------------------------------------------------------------------------- /CBLAS/cblas.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: CBLAS 5 | Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms 6 | Version: @LAPACK_VERSION@ 7 | URL: http://www.netlib.org/blas/#_cblas 8 | Libs: -L${libdir} -l@CBLASLIB@ 9 | Cflags: -I${includedir} 10 | Requires.private: @BLASLIB@ 11 | -------------------------------------------------------------------------------- /LAPACKE/mangling/Cintface.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void c_intface_(int *i) 4 | { 5 | fprintf(stdout, "ADD_\n"); 6 | } 7 | 8 | void c_intface(int *i) 9 | { 10 | fprintf(stdout, "NOCHANGE\n"); 11 | } 12 | 13 | void c_intface__(int *i) 14 | { 15 | fprintf(stdout, "f77IsF2C\n"); 16 | } 17 | 18 | void C_INTFACE(int *i) 19 | { 20 | fprintf(stdout, "UPPER\n"); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_srotmg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_srotmg.c 3 | * 4 | * The program is a C interface to srotmg. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_srotmg)( float *d1, float *d2, float *b1, 12 | const float b2, float *p) 13 | { 14 | F77_srotmg(d1,d2,b1,&b2,p); 15 | } 16 | -------------------------------------------------------------------------------- /CBLAS/src/sasumsub.f: -------------------------------------------------------------------------------- 1 | c sasumsub.f 2 | c 3 | c The program is a fortran wrapper for sasum. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine sasumsub(n,x,incx,asum) 7 | implicit none 8 | c 9 | external sasum 10 | real sasum,asum 11 | integer n,incx 12 | real x(*) 13 | c 14 | asum=sasum(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/snrm2sub.f: -------------------------------------------------------------------------------- 1 | c snrm2sub.f 2 | c 3 | c The program is a fortran wrapper for snrm2. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine snrm2sub(n,x,incx,nrm2) 7 | implicit none 8 | c 9 | external snrm2 10 | real snrm2,nrm2 11 | integer n,incx 12 | real x(*) 13 | c 14 | nrm2=snrm2(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_drotmg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_drotmg.c 3 | * 4 | * The program is a C interface to drotmg. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_drotmg)( double *d1, double *d2, double *b1, 12 | const double b2, double *p) 13 | { 14 | F77_drotmg(d1,d2,b1,&b2,p); 15 | } 16 | -------------------------------------------------------------------------------- /LAPACKE/lapacke.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: LAPACKE 5 | Description: C Standard Interface to LAPACK Linear Algebra PACKage 6 | Version: @LAPACK_VERSION@ 7 | URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack 8 | Libs: -L${libdir} -l@LAPACKELIB@ 9 | Cflags: -I${includedir} 10 | Requires.private: @LAPACKLIB@ 11 | -------------------------------------------------------------------------------- /CBLAS/src/scasumsub.f: -------------------------------------------------------------------------------- 1 | c scasumsub.f 2 | c 3 | c The program is a fortran wrapper for scasum. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine scasumsub(n,x,incx,asum) 7 | implicit none 8 | c 9 | external scasum 10 | real scasum,asum 11 | integer n,incx 12 | complex x(*) 13 | c 14 | asum=scasum(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/scnrm2sub.f: -------------------------------------------------------------------------------- 1 | c scnrm2sub.f 2 | c 3 | c The program is a fortran wrapper for scnrm2. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine scnrm2sub(n,x,incx,nrm2) 7 | implicit none 8 | c 9 | external scnrm2 10 | real scnrm2,nrm2 11 | integer n,incx 12 | complex x(*) 13 | c 14 | nrm2=scnrm2(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/icamaxsub.f: -------------------------------------------------------------------------------- 1 | c icamaxsub.f 2 | c 3 | c The program is a fortran wrapper for icamax. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine icamaxsub(n,x,incx,iamax) 7 | implicit none 8 | c 9 | external icamax 10 | integer icamax,iamax 11 | integer n,incx 12 | complex x(*) 13 | c 14 | iamax=icamax(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/isamaxsub.f: -------------------------------------------------------------------------------- 1 | c isamaxsub.f 2 | c 3 | c The program is a fortran wrapper for isamax. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine isamaxsub(n,x,incx,iamax) 7 | implicit none 8 | c 9 | external isamax 10 | integer isamax,iamax 11 | integer n,incx 12 | real x(*) 13 | c 14 | iamax=isamax(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/sdotsub.f: -------------------------------------------------------------------------------- 1 | c sdotsub.f 2 | c 3 | c The program is a fortran wrapper for sdot. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine sdotsub(n,x,incx,y,incy,dot) 7 | implicit none 8 | c 9 | external sdot 10 | real sdot 11 | integer n,incx,incy 12 | real x(*),y(*),dot 13 | c 14 | dot=sdot(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/dasumsub.f: -------------------------------------------------------------------------------- 1 | c dasumsun.f 2 | c 3 | c The program is a fortran wrapper for dasum.. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine dasumsub(n,x,incx,asum) 7 | implicit none 8 | c 9 | external dasum 10 | double precision dasum,asum 11 | integer n,incx 12 | double precision x(*) 13 | c 14 | asum=dasum(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/dnrm2sub.f: -------------------------------------------------------------------------------- 1 | c dnrm2sub.f 2 | c 3 | c The program is a fortran wrapper for dnrm2. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine dnrm2sub(n,x,incx,nrm2) 7 | implicit none 8 | c 9 | external dnrm2 10 | double precision dnrm2,nrm2 11 | integer n,incx 12 | double precision x(*) 13 | c 14 | nrm2=dnrm2(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/idamaxsub.f: -------------------------------------------------------------------------------- 1 | c icamaxsub.f 2 | c 3 | c The program is a fortran wrapper for idamax. 4 | c Witten by Keita Teranishi. 2/22/1998 5 | c 6 | subroutine idamaxsub(n,x,incx,iamax) 7 | implicit none 8 | c 9 | external idamax 10 | integer idamax,iamax 11 | integer n,incx 12 | double precision x(*) 13 | c 14 | iamax=idamax(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/izamaxsub.f: -------------------------------------------------------------------------------- 1 | c izamaxsub.f 2 | c 3 | c The program is a fortran wrapper for izamax. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine izamaxsub(n,x,incx,iamax) 7 | implicit none 8 | c 9 | external izamax 10 | integer izamax,iamax 11 | integer n,incx 12 | double complex x(*) 13 | c 14 | iamax=izamax(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/cdotcsub.f: -------------------------------------------------------------------------------- 1 | c cdotcsub.f 2 | c 3 | c The program is a fortran wrapper for cdotc. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine cdotcsub(n,x,incx,y,incy,dotc) 7 | implicit none 8 | c 9 | external cdotc 10 | complex cdotc,dotc 11 | integer n,incx,incy 12 | complex x(*),y(*) 13 | c 14 | dotc=cdotc(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/cdotusub.f: -------------------------------------------------------------------------------- 1 | c cdotusub.f 2 | c 3 | c The program is a fortran wrapper for cdotu. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine cdotusub(n,x,incx,y,incy,dotu) 7 | implicit none 8 | c 9 | external cdotu 10 | complex cdotu,dotu 11 | integer n,incx,incy 12 | complex x(*),y(*) 13 | c 14 | dotu=cdotu(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/dzasumsub.f: -------------------------------------------------------------------------------- 1 | c dzasumsub.f 2 | c 3 | c The program is a fortran wrapper for dzasum. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine dzasumsub(n,x,incx,asum) 7 | implicit none 8 | c 9 | external dzasum 10 | double precision dzasum,asum 11 | integer n,incx 12 | double complex x(*) 13 | c 14 | asum=dzasum(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/dznrm2sub.f: -------------------------------------------------------------------------------- 1 | c dznrm2sub.f 2 | c 3 | c The program is a fortran wrapper for dznrm2. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine dznrm2sub(n,x,incx,nrm2) 7 | implicit none 8 | c 9 | external dznrm2 10 | double precision dznrm2,nrm2 11 | integer n,incx 12 | double complex x(*) 13 | c 14 | nrm2=dznrm2(n,x,incx) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/dsdotsub.f: -------------------------------------------------------------------------------- 1 | c dsdotsub.f 2 | c 3 | c The program is a fortran wrapper for dsdot. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine dsdotsub(n,x,incx,y,incy,dot) 7 | implicit none 8 | c 9 | external dsdot 10 | double precision dsdot,dot 11 | integer n,incx,incy 12 | real x(*),y(*) 13 | c 14 | dot=dsdot(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/sdsdotsub.f: -------------------------------------------------------------------------------- 1 | c sdsdotsub.f 2 | c 3 | c The program is a fortran wrapper for sdsdot. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine sdsdotsub(n,sb,x,incx,y,incy,dot) 7 | implicit none 8 | c 9 | external sdsdot 10 | real sb,sdsdot,dot 11 | integer n,incx,incy 12 | real x(*),y(*) 13 | c 14 | dot=sdsdot(n,sb,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/ddotsub.f: -------------------------------------------------------------------------------- 1 | c ddotsub.f 2 | c 3 | c The program is a fortran wrapper for ddot. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine ddotsub(n,x,incx,y,incy,dot) 7 | implicit none 8 | c 9 | external ddot 10 | double precision ddot 11 | integer n,incx,incy 12 | double precision x(*),y(*),dot 13 | c 14 | dot=ddot(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/zdotcsub.f: -------------------------------------------------------------------------------- 1 | c zdotcsub.f 2 | c 3 | c The program is a fortran wrapper for zdotc. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine zdotcsub(n,x,incx,y,incy,dotc) 7 | implicit none 8 | c 9 | external zdotc 10 | double complex zdotc,dotc 11 | integer n,incx,incy 12 | double complex x(*),y(*) 13 | c 14 | dotc=zdotc(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/zdotusub.f: -------------------------------------------------------------------------------- 1 | c zdotusub.f 2 | c 3 | c The program is a fortran wrapper for zdotu. 4 | c Witten by Keita Teranishi. 2/11/1998 5 | c 6 | subroutine zdotusub(n,x,incx,y,incy,dotu) 7 | implicit none 8 | c 9 | external zdotu 10 | double complex zdotu,dotu 11 | integer n,incx,incy 12 | double complex x(*),y(*) 13 | c 14 | dotu=zdotu(n,x,incx,y,incy) 15 | return 16 | end 17 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_drotm.c: -------------------------------------------------------------------------------- 1 | #include "cblas.h" 2 | #include "cblas_f77.h" 3 | void API_SUFFIX(cblas_drotm)( const CBLAS_INT N, double *X, const CBLAS_INT incX, double *Y, 4 | const CBLAS_INT incY, const double *P) 5 | { 6 | #ifdef F77_INT 7 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 8 | #else 9 | #define F77_N N 10 | #define F77_incX incX 11 | #define F77_incY incY 12 | #endif 13 | F77_drotm( &F77_N, X, &F77_incX, Y, &F77_incY, P); 14 | } 15 | -------------------------------------------------------------------------------- /TESTING/csb.in: -------------------------------------------------------------------------------- 1 | CHB: Data file for testing Hermitian Eigenvalue Problem routines 2 | 2 Number of values of N 3 | 5 20 Values of N (dimension) 4 | 5 Number of values of K 5 | 0 1 2 5 16 Values of K (band width) 6 | 20.0 Threshold value 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | CHB 15 10 | -------------------------------------------------------------------------------- /TESTING/dsb.in: -------------------------------------------------------------------------------- 1 | DSB: Data file for testing Symmetric Eigenvalue Problem routines 2 | 2 Number of values of N 3 | 5 20 Values of N (dimension) 4 | 5 Number of values of K 5 | 0 1 2 5 16 Values of K (band width) 6 | 20.0 Threshold value 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | DSB 15 10 | -------------------------------------------------------------------------------- /TESTING/ssb.in: -------------------------------------------------------------------------------- 1 | SSB: Data file for testing Symmetric Eigenvalue Problem routines 2 | 2 Number of values of N 3 | 5 20 Values of N (dimension) 4 | 5 Number of values of K 5 | 0 1 2 5 16 Values of K (band width) 6 | 20.0 Threshold value 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | SSB 15 10 | -------------------------------------------------------------------------------- /TESTING/zsb.in: -------------------------------------------------------------------------------- 1 | ZHB: Data file for testing Hermitian Eigenvalue Problem routines 2 | 2 Number of values of N 3 | 5 20 Values of N (dimension) 4 | 5 Number of values of K 5 | 0 1 2 5 16 Values of K (band width) 6 | 20.0 Threshold value 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | ZHB 15 10 | -------------------------------------------------------------------------------- /BLAS/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | enable_language(Fortran) 2 | 3 | # Check for any necessary platform specific compiler flags 4 | include(CheckLAPACKCompilerFlags) 5 | CheckLAPACKCompilerFlags() 6 | 7 | add_subdirectory(SRC) 8 | if(BUILD_TESTING) 9 | add_subdirectory(TESTING) 10 | endif() 11 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${BLASLIB}.pc @ONLY) 12 | install(FILES 13 | ${CMAKE_CURRENT_BINARY_DIR}/${BLASLIB}.pc 14 | DESTINATION ${PKG_CONFIG_DIR} 15 | COMPONENT Development 16 | ) 17 | -------------------------------------------------------------------------------- /TESTING/gqr.in: -------------------------------------------------------------------------------- 1 | GQR: Data file for testing Generalized QR and RQ routines 2 | 3 Number of values of M, P and N 3 | 0 3 10 Values of M 4 | 0 5 20 Values of P 5 | 0 3 30 Values of N 6 | 20.0 Threshold value of test ratio 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | GQR 8 List types on next line if 0 < NTYPES < 8 10 | -------------------------------------------------------------------------------- /CBLAS/cmake/cblas-config-build.cmake.in: -------------------------------------------------------------------------------- 1 | # Load the LAPACK package with which we were built. 2 | set(LAPACK_DIR "@LAPACK_BINARY_DIR@") 3 | find_package(LAPACK NO_MODULE) 4 | 5 | # Load lapack targets from the build tree, including lapacke targets. 6 | if(NOT TARGET lapacke) 7 | include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-targets.cmake") 8 | endif() 9 | 10 | # Report cblas header search locations from build tree. 11 | set(CBLAS_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include") 12 | 13 | # Report cblas libraries. 14 | set(CBLAS_LIBRARIES @CBLASLIB@) 15 | -------------------------------------------------------------------------------- /TESTING/lse.in: -------------------------------------------------------------------------------- 1 | LSE: Data file for testing Constrained Linear Least Squares routines 2 | 6 Number of values of M, P, and N 3 | 6 0 5 8 10 30 Values of M 4 | 0 5 5 5 8 20 Values of P 5 | 5 5 6 8 12 40 Values of N, note P<= N <= P+M 6 | 20.0 Threshold value of test ratio 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | LSE 8 List types on next line if 0 < NTYPES < 8 10 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_cscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_cscal.c 3 | * 4 | * The program is a C interface to cscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_cscal)( const CBLAS_INT N, const void *alpha, void *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_cscal( &F77_N, alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_sscal.c 3 | * 4 | * The program is a C interface to sscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_sscal)( const CBLAS_INT N, const float alpha, float *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_sscal( &F77_N, &alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zscal.c 3 | * 4 | * The program is a C interface to zscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zscal)( const CBLAS_INT N, const void *alpha, void *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_zscal( &F77_N, alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_csscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_csscal.c 3 | * 4 | * The program is a C interface to csscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_csscal)( const CBLAS_INT N, const float alpha, void *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_csscal( &F77_N, &alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dscal.c 3 | * 4 | * The program is a C interface to dscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_dscal)( const CBLAS_INT N, const double alpha, double *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_dscal( &F77_N, &alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zdscal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zdscal.c 3 | * 4 | * The program is a C interface to zdscal. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zdscal)( const CBLAS_INT N, const double alpha, void *X, 12 | const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #endif 20 | F77_zdscal( &F77_N, &alpha, X, &F77_incX); 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/examples/Makefile: -------------------------------------------------------------------------------- 1 | TOPSRCDIR = ../.. 2 | include $(TOPSRCDIR)/make.inc 3 | 4 | .SUFFIXES: .c .o 5 | .c.o: 6 | $(CC) $(CFLAGS) -I../include -c -o $@ $< 7 | 8 | .PHONY: all 9 | all: cblas_ex1 cblas_ex2 10 | 11 | cblas_ex1: cblas_example1.o $(CBLASLIB) $(BLASLIB) 12 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 13 | cblas_ex2: cblas_example2.o $(CBLASLIB) $(BLASLIB) 14 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 15 | 16 | .PHONY: clean cleanobj cleanexe 17 | clean: cleanobj cleanexe 18 | cleanobj: 19 | rm -f *.o 20 | cleanexe: 21 | rm -f cblas_ex1 cblas_ex2 22 | -------------------------------------------------------------------------------- /CBLAS/include/cblas_mangling_with_flags.h.in: -------------------------------------------------------------------------------- 1 | #ifndef F77_HEADER_INCLUDED 2 | #define F77_HEADER_INCLUDED 3 | 4 | #ifndef F77_GLOBAL 5 | #if defined(F77_GLOBAL_PATTERN_LC) || defined(ADD_) 6 | #define F77_GLOBAL(lcname,UCNAME) lcname##_ 7 | #elif defined(F77_GLOBAL_PATTERN_UC) || defined(UPPER) 8 | #define F77_GLOBAL(lcname,UCNAME) UCNAME 9 | #elif defined(F77_GLOBAL_PATTERN_MC) || defined(NOCHANGE) 10 | #define F77_GLOBAL(lcname,UCNAME) lcname 11 | #else 12 | #define F77_GLOBAL(lcname,UCNAME) lcname##_ 13 | #endif 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /TESTING/gsv.in: -------------------------------------------------------------------------------- 1 | GSV: Data file for testing Generalized SVD routines 2 | 8 Number of values of M, P, N 3 | 0 5 9 10 20 12 12 40 Values of M (row dimension) 4 | 4 0 12 14 10 10 20 15 Values of P (row dimension) 5 | 3 10 15 12 8 20 8 20 Values of N (column dimension) 6 | 20.0 Threshold value of test ratio 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | GSV 8 List types on next line if 0 < NTYPES < 8 10 | -------------------------------------------------------------------------------- /BLAS/Makefile: -------------------------------------------------------------------------------- 1 | TOPSRCDIR = .. 2 | include $(TOPSRCDIR)/make.inc 3 | 4 | .PHONY: all 5 | all: blas 6 | 7 | .PHONY: blas 8 | blas: 9 | $(MAKE) -C SRC 10 | 11 | .PHONY: blas_testing 12 | blas_testing: blas 13 | $(MAKE) -C TESTING run 14 | 15 | .PHONY: clean cleanobj cleanlib cleanexe cleantest 16 | clean: 17 | $(MAKE) -C SRC clean 18 | $(MAKE) -C TESTING clean 19 | cleanobj: 20 | $(MAKE) -C SRC cleanobj 21 | $(MAKE) -C TESTING cleanobj 22 | cleanlib: 23 | $(MAKE) -C SRC cleanlib 24 | cleanexe: 25 | $(MAKE) -C TESTING cleanexe 26 | cleantest: 27 | $(MAKE) -C TESTING cleantest 28 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_csrot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_csrot.c 3 | * 4 | * The program is a C interface to csrot. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | void API_SUFFIX(cblas_csrot)(const CBLAS_INT N, void *X, const CBLAS_INT incX, 10 | void *Y, const CBLAS_INT incY, const float c, const float s) 11 | { 12 | #ifdef F77_INT 13 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 14 | #else 15 | #define F77_N N 16 | #define F77_incX incX 17 | #define F77_incY incY 18 | #endif 19 | F77_csrot(&F77_N, X, &F77_incX, Y, &F77_incY, &c, &s); 20 | return; 21 | } 22 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zdrot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zdrot.c 3 | * 4 | * The program is a C interface to zdrot. 5 | * 6 | */ 7 | #include "cblas.h" 8 | #include "cblas_f77.h" 9 | void API_SUFFIX(cblas_zdrot)(const CBLAS_INT N, void *X, const CBLAS_INT incX, 10 | void *Y, const CBLAS_INT incY, const double c, const double s) 11 | { 12 | #ifdef F77_INT 13 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 14 | #else 15 | #define F77_N N 16 | #define F77_incX incX 17 | #define F77_incY incY 18 | #endif 19 | F77_zdrot(&F77_N, X, &F77_incX, Y, &F77_incY, &c, &s); 20 | return; 21 | } 22 | -------------------------------------------------------------------------------- /LAPACKE/include/lapacke_mangling_with_flags.h.in: -------------------------------------------------------------------------------- 1 | #ifndef LAPACK_HEADER_INCLUDED 2 | #define LAPACK_HEADER_INCLUDED 3 | 4 | #ifndef LAPACK_GLOBAL 5 | #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) 6 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 7 | #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) 8 | #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME 9 | #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) 10 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname 11 | #else 12 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 13 | #endif 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## # The following are required to uses Dart and the Cdash dashboard 5 | ## enable_testing() 6 | ## include(CTest) 7 | set(CTEST_PROJECT_NAME "LAPACK") 8 | set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") 9 | 10 | set(CTEST_DROP_METHOD "http") 11 | set(CTEST_DROP_SITE "my.cdash.org") 12 | set(CTEST_DROP_LOCATION "/submit.php?project=LAPACK") 13 | set(CTEST_DROP_SITE_CDASH TRUE) 14 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_cswap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_cswap.c 3 | * 4 | * The program is a C interface to cswap. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_cswap)( const CBLAS_INT N, void *X, const CBLAS_INT incX, void *Y, 12 | const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_cswap( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dasum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dasum.c 3 | * 4 | * The program is a C interface to dasum. 5 | * It calls the fortran wrapper before calling dasum. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_dasum)( const CBLAS_INT N, const double *X, const CBLAS_INT incX) 13 | { 14 | double asum; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_dasum_sub( &F77_N, X, &F77_incX, &asum); 22 | return asum; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dnrm2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dnrm2.c 3 | * 4 | * The program is a C interface to dnrm2. 5 | * It calls the fortranwrapper before calling dnrm2. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_dnrm2)( const CBLAS_INT N, const double *X, const CBLAS_INT incX) 13 | { 14 | double nrm2; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_dnrm2_sub( &F77_N, X, &F77_incX, &nrm2); 22 | return nrm2; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dswap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dswap.c 3 | * 4 | * The program is a C interface to dswap. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_dswap)( const CBLAS_INT N, double *X, const CBLAS_INT incX, double *Y, 12 | const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_dswap( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sasum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_sasum.c 3 | * 4 | * The program is a C interface to sasum. 5 | * It calls the fortran wrapper before calling sasum. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_sasum)( const CBLAS_INT N, const float *X, const CBLAS_INT incX) 13 | { 14 | float asum; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_sasum_sub( &F77_N, X, &F77_incX, &asum); 22 | return asum; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_snrm2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_snrm2.c 3 | * 4 | * The program is a C interface to snrm2. 5 | * It calls the fortran wrapper before calling snrm2. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_snrm2)( const CBLAS_INT N, const float *X, const CBLAS_INT incX) 13 | { 14 | float nrm2; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_snrm2_sub( &F77_N, X, &F77_incX, &nrm2); 22 | return nrm2; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sswap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_sswap.c 3 | * 4 | * The program is a C interface to sswap. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_sswap)( const CBLAS_INT N, float *X, const CBLAS_INT incX, float *Y, 12 | const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_sswap( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zswap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zswap.c 3 | * 4 | * The program is a C interface to zswap. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zswap)( const CBLAS_INT N, void *X, const CBLAS_INT incX, void *Y, 12 | const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_zswap( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /TESTING/glm.in: -------------------------------------------------------------------------------- 1 | GLM: Data file for testing Generalized Linear Regression Model routines 2 | 6 Number of values of M, P, and N 3 | 0 5 8 15 20 40 Values of M (row dimension) 4 | 9 0 15 12 15 30 Values of P (row dimension) 5 | 5 5 10 25 30 40 Values of N (col dimension), M <= N <= M+P 6 | 20.0 Threshold value of test ratio 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | GLM 8 List types on next line if 0 < NTYPES < 8 10 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_ccopy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_ccopy.c 3 | * 4 | * The program is a C interface to ccopy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_ccopy)( const CBLAS_INT N, const void *X, 12 | const CBLAS_INT incX, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_ccopy( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dcopy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dcopy.c 3 | * 4 | * The program is a C interface to dcopy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_dcopy)( const CBLAS_INT N, const double *X, 12 | const CBLAS_INT incX, double *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_dcopy( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dzasum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dzasum.c 3 | * 4 | * The program is a C interface to dzasum. 5 | * It calls the fortran wrapper before calling dzasum. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_dzasum)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | double asum; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_dzasum_sub( &F77_N, X, &F77_incX, &asum); 22 | return asum; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dznrm2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dznrm2.c 3 | * 4 | * The program is a C interface to dznrm2. 5 | * It calls the fortran wrapper before calling dznrm2. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_dznrm2)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | double nrm2; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_dznrm2_sub( &F77_N, X, &F77_incX, &nrm2); 22 | return nrm2; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_scasum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_scasum.c 3 | * 4 | * The program is a C interface to scasum. 5 | * It calls the fortran wrapper before calling scasum. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_scasum)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | float asum; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_scasum_sub( &F77_N, X, &F77_incX, &asum); 22 | return asum; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_scnrm2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_scnrm2.c 3 | * 4 | * The program is a C interface to scnrm2. 5 | * It calls the fortran wrapper before calling scnrm2. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_scnrm2)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | float nrm2; 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #endif 21 | F77_scnrm2_sub( &F77_N, X, &F77_incX, &nrm2); 22 | return nrm2; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_scopy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_scopy.c 3 | * 4 | * The program is a C interface to scopy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_scopy)( const CBLAS_INT N, const float *X, 12 | const CBLAS_INT incX, float *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_scopy( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zcopy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zcopy.c 3 | * 4 | * The program is a C interface to zcopy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zcopy)( const CBLAS_INT N, const void *X, 12 | const CBLAS_INT incX, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_zcopy( &F77_N, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_srotm.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_srotm.c 3 | * 4 | * The program is a C interface to srotm. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_srotm)( const CBLAS_INT N, float *X, const CBLAS_INT incX, float *Y, 12 | const CBLAS_INT incY, const float *P) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_srotm( &F77_N, X, &F77_incX, Y, &F77_incY, P); 22 | } 23 | -------------------------------------------------------------------------------- /TESTING/stest_rfp.in: -------------------------------------------------------------------------------- 1 | Data file for testing REAL LAPACK linear equation routines RFP format 2 | 9 Number of values of N (at most 9) 3 | 0 1 2 3 5 6 10 11 50 Values of N 4 | 3 Number of values of NRHS (at most 9) 5 | 1 2 15 Values of NRHS (number of right hand sides) 6 | 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 7 | 1 2 3 4 5 6 7 8 9 Matrix Types 8 | 30.0 Threshold value of test ratio 9 | T Put T to test the error exits 10 | -------------------------------------------------------------------------------- /TESTING/ctest_rfp.in: -------------------------------------------------------------------------------- 1 | Data file for testing COMPLEX LAPACK linear equation routines RFP format 2 | 9 Number of values of N (at most 9) 3 | 0 1 2 3 5 6 10 11 50 Values of N 4 | 3 Number of values of NRHS (at most 9) 5 | 1 2 15 Values of NRHS (number of right hand sides) 6 | 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 7 | 1 2 3 4 5 6 7 8 9 Matrix Types 8 | 30.0 Threshold value of test ratio 9 | T Put T to test the error exits 10 | -------------------------------------------------------------------------------- /TESTING/ztest_rfp.in: -------------------------------------------------------------------------------- 1 | Data file for testing COMPLEX*16 LAPACK linear equation routines RFP format 2 | 9 Number of values of N (at most 9) 3 | 0 1 2 3 5 6 10 11 50 Values of N 4 | 3 Number of values of NRHS (at most 9) 5 | 1 2 15 Values of NRHS (number of right hand sides) 6 | 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 7 | 1 2 3 4 5 6 7 8 9 Matrix Types 8 | 30.0 Threshold value of test ratio 9 | T Put T to test the error exits 10 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_caxpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_caxpy.c 3 | * 4 | * The program is a C interface to caxpy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_caxpy)( const CBLAS_INT N, const void *alpha, const void *X, 12 | const CBLAS_INT incX, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_caxpy( &F77_N, alpha, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_drot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_drot.c 3 | * 4 | * The program is a C interface to drot. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_drot)(const CBLAS_INT N, double *X, const CBLAS_INT incX, 12 | double *Y, const CBLAS_INT incY, const double c, const double s) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_drot(&F77_N, X, &F77_incX, Y, &F77_incY, &c, &s); 22 | return; 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zaxpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zaxpy.c 3 | * 4 | * The program is a C interface to zaxpy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zaxpy)( const CBLAS_INT N, const void *alpha, const void *X, 12 | const CBLAS_INT incX, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_zaxpy( &F77_N, alpha, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_daxpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_daxpy.c 3 | * 4 | * The program is a C interface to daxpy. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_daxpy)( const CBLAS_INT N, const double alpha, const double *X, 12 | const CBLAS_INT incX, double *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_daxpy( &F77_N, &alpha, X, &F77_incX, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_srot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_srot.c 3 | * 4 | * The program is a C interface to srot. 5 | * 6 | * Written by Keita Teranishi. 2/11/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_srot)( const CBLAS_INT N, float *X, const CBLAS_INT incX, float *Y, 12 | const CBLAS_INT incY, const float c, const float s) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_srot(&F77_N, X, &F77_incX, Y, &F77_incY, &c, &s); 22 | } 23 | -------------------------------------------------------------------------------- /TESTING/dtest_rfp.in: -------------------------------------------------------------------------------- 1 | Data file for testing DOUBLE PRECISION LAPACK linear equation routines RFP format 2 | 9 Number of values of N (at most 9) 3 | 0 1 2 3 5 6 10 11 50 Values of N 4 | 3 Number of values of NRHS (at most 9) 5 | 1 2 15 Values of NRHS (number of right hand sides) 6 | 9 Number of matrix types (list types on next line if 0 < NTYPES < 9) 7 | 1 2 3 4 5 6 7 8 9 Matrix Types 8 | 30.0 Threshold value of test ratio 9 | T Put T to test the error exits 10 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_caxpby.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_caxpby.c 3 | * 4 | * The program is a C interface to caxpby. 5 | * 6 | * Written by Martin Koehler. 08/26/2024 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_caxpby)( const CBLAS_INT N, const void *alpha, const void *X, 12 | const CBLAS_INT incX, const void *beta, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_caxpby( &F77_N, alpha, X, &F77_incX, beta, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zaxpby.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zaxpby.c 3 | * 4 | * The program is a C interface to zaxpby. 5 | * 6 | * Written by Martin Koehler, 08/26/2024 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_zaxpby)( const CBLAS_INT N, const void *alpha, const void *X, 12 | const CBLAS_INT incX, const void *beta, void *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_zaxpby( &F77_N, alpha, X, &F77_incX, beta, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_daxpby.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_daxpby.c 3 | * 4 | * The program is a C interface to daxpby. 5 | * 6 | * Written by Martin Koehler. 08/26/2024 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_daxpby)( const CBLAS_INT N, const double alpha, const double *X, 12 | const CBLAS_INT incX, const double beta, double *Y, const CBLAS_INT incY) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | #define F77_incY incY 20 | #endif 21 | F77_daxpby( &F77_N, &alpha, X, &F77_incX, &beta, Y, &F77_incY); 22 | } 23 | -------------------------------------------------------------------------------- /CMAKE/lapack-config-build.cmake.in: -------------------------------------------------------------------------------- 1 | # Load lapack targets from the build tree if necessary. 2 | set(_LAPACK_TARGET "@_lapack_config_build_guard_target@") 3 | if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}") 4 | include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-targets.cmake") 5 | endif() 6 | unset(_LAPACK_TARGET) 7 | 8 | # Hint for project building against lapack 9 | set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") 10 | 11 | # Report the blas and lapack raw or imported libraries. 12 | set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@") 13 | set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@") 14 | set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES}) 15 | -------------------------------------------------------------------------------- /LAPACKE/example/lapacke_example_aux.h: -------------------------------------------------------------------------------- 1 | #ifndef _LAPACKE_EXAMPLE_AUX_ 2 | #define _LAPACKE_EXAMPLE_AUX_ 3 | 4 | 5 | void print_matrix_rowmajor( char* desc, lapack_int m, lapack_int n, double* mat, lapack_int ldm ); 6 | void print_matrix_colmajor( char* desc, lapack_int m, lapack_int n, double* mat, lapack_int ldm ); 7 | void print_vector( char* desc, lapack_int n, lapack_int* vec ); 8 | 9 | void print_matrix_rowmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm ); 10 | void print_matrix_colmajor_64( char* desc, int64_t m, int64_t n, double* mat, int64_t ldm ); 11 | void print_vector_64( char* desc, int64_t n, int64_t* vec ); 12 | 13 | #endif /* _LAPACKE_EXAMPLE_AUX_*/ 14 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_saxpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_saxpy.c 3 | * 4 | * The program is a C interface to saxpy. 5 | * It calls the fortran wrapper before calling saxpy. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_saxpy)( const CBLAS_INT N, const float alpha, const float *X, 13 | const CBLAS_INT incX, float *Y, const CBLAS_INT incY) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_saxpy( &F77_N, &alpha, X, &F77_incX, Y, &F77_incY); 23 | } 24 | -------------------------------------------------------------------------------- /LAPACKE/cmake/lapacke-config-build.cmake.in: -------------------------------------------------------------------------------- 1 | # Load the LAPACK package with which we were built. 2 | set(LAPACK_DIR "@LAPACK_BINARY_DIR@") 3 | find_package(LAPACK NO_MODULE) 4 | 5 | # Load lapack targets from the build tree, including lapacke targets. 6 | if(NOT TARGET @LAPACKELIB@) 7 | include("@LAPACK_BINARY_DIR@/@LAPACKLIB@-targets.cmake") 8 | endif() 9 | 10 | # Hint for project building against lapack 11 | set(LAPACKE_Fortran_COMPILER_ID ${LAPACK_Fortran_COMPILER_ID}) 12 | 13 | # Report lapacke header search locations from build tree. 14 | set(LAPACKE_INCLUDE_DIRS "@LAPACK_BINARY_DIR@/include") 15 | 16 | # Report lapacke libraries. 17 | set(LAPACKE_LIBRARIES @LAPACKELIB@ ${LAPACK_LIBRARIES}) 18 | -------------------------------------------------------------------------------- /TESTING/csd.in: -------------------------------------------------------------------------------- 1 | CSD: Data file for testing CS decomposition routines 2 | 10 Number of values of M, P, Q 3 | 0 10 10 10 10 21 24 30 22 32 55 Values of M (row and column dimension of unitary matrix) 4 | 0 4 4 0 10 9 10 20 12 12 40 Values of P (row dimension of top-left block) 5 | 0 0 10 4 4 15 12 8 20 8 20 Values of Q (column dimension of top-left block) 6 | 30.0 Threshold value of test ratio 7 | T Put T to test the error exits 8 | 1 Code to interpret the seed 9 | CSD 4 List types on next line if 0 < NTYPES < 3 10 | -------------------------------------------------------------------------------- /TESTING/cbb.in: -------------------------------------------------------------------------------- 1 | CBB: Data file for testing banded Singular Value Decomposition routines 2 | 20 Number of values of M 3 | 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 10 10 16 16 Values of M 4 | 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 10 16 10 16 Values of N 5 | 5 Number of values of K 6 | 0 1 2 3 16 Values of K (band width) 7 | 2 Number of values of NRHS 8 | 1 2 Values of NRHS 9 | 20.0 Threshold value 10 | F Put T to test the error exits 11 | 1 Code to interpret the seed 12 | CBB 15 13 | -------------------------------------------------------------------------------- /TESTING/dbb.in: -------------------------------------------------------------------------------- 1 | DBB: Data file for testing banded Singular Value Decomposition routines 2 | 20 Number of values of M 3 | 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 10 10 16 16 Values of M 4 | 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 10 16 10 16 Values of N 5 | 5 Number of values of K 6 | 0 1 2 3 16 Values of K (band width) 7 | 2 Number of values of NRHS 8 | 1 2 Values of NRHS 9 | 20.0 Threshold value 10 | F Put T to test the error exits 11 | 1 Code to interpret the seed 12 | DBB 15 13 | -------------------------------------------------------------------------------- /TESTING/sbb.in: -------------------------------------------------------------------------------- 1 | SBB: Data file for testing banded Singular Value Decomposition routines 2 | 20 Number of values of M 3 | 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 10 10 16 16 Values of M 4 | 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 10 16 10 16 Values of N 5 | 5 Number of values of K 6 | 0 1 2 3 16 Values of K (band width) 7 | 2 Number of values of NRHS 8 | 1 2 Values of NRHS 9 | 20.0 Threshold value 10 | F Put T to test the error exits 11 | 1 Code to interpret the seed 12 | SBB 15 13 | -------------------------------------------------------------------------------- /TESTING/zbb.in: -------------------------------------------------------------------------------- 1 | ZBB: Data file for testing banded Singular Value Decomposition routines 2 | 20 Number of values of M 3 | 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 10 10 16 16 Values of M 4 | 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 10 16 10 16 Values of N 5 | 5 Number of values of K 6 | 0 1 2 3 16 Values of K (band width) 7 | 2 Number of values of NRHS 8 | 1 2 Values of NRHS 9 | 20.0 Threshold value 10 | F Put T to test the error exits 11 | 1 Code to interpret the seed 12 | ZBB 15 13 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_cdotu_sub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_cdotu_sub.c 3 | * 4 | * The program is a C interface to cdotu. 5 | * It calls the fortran wrapper before calling cdotu. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_cdotu_sub)( const CBLAS_INT N, const void *X, const CBLAS_INT incX, 13 | const void *Y, const CBLAS_INT incY, void *dotu) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_cdotu_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotu); 23 | return; 24 | } 25 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sdot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_sdot.c 3 | * 4 | * The program is a C interface to sdot. 5 | * It calls the fortran wrapper before calling sdot. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_sdot)( const CBLAS_INT N, const float *X, 13 | const CBLAS_INT incX, const float *Y, const CBLAS_INT incY) 14 | { 15 | float dot; 16 | #ifdef F77_INT 17 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_N N 20 | #define F77_incX incX 21 | #define F77_incY incY 22 | #endif 23 | F77_sdot_sub( &F77_N, X, &F77_incX, Y, &F77_incY, &dot); 24 | return dot; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_cdotc_sub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_cdotc_sub.c 3 | * 4 | * The program is a C interface to cdotc. 5 | * It calls the fortran wrapper before calling cdotc. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_cdotc_sub)( const CBLAS_INT N, const void *X, const CBLAS_INT incX, 13 | const void *Y, const CBLAS_INT incY, void *dotc) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_cdotc_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotc); 23 | return; 24 | } 25 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_ddot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_ddot.c 3 | * 4 | * The program is a C interface to ddot. 5 | * It calls the fortran wrapper before calling ddot. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_ddot)( const CBLAS_INT N, const double *X, 13 | const CBLAS_INT incX, const double *Y, const CBLAS_INT incY) 14 | { 15 | double dot; 16 | #ifdef F77_INT 17 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_N N 20 | #define F77_incX incX 21 | #define F77_incY incY 22 | #endif 23 | F77_ddot_sub( &F77_N, X, &F77_incX, Y, &F77_incY, &dot); 24 | return dot; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_icamax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_icamax.c 3 | * 4 | * The program is a C interface to icamax. 5 | * It calls the fortran wrapper before calling icamax. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | CBLAS_INDEX API_SUFFIX(cblas_icamax)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_iamax; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | CBLAS_INT F77_iamax; 20 | #endif 21 | F77_icamax_sub( &F77_N, X, &F77_incX, &F77_iamax ); 22 | return ( F77_iamax > 0 ) 23 | ? (CBLAS_INDEX)( F77_iamax-1 ) 24 | : (CBLAS_INDEX) 0; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_idamax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_idamax.c 3 | * 4 | * The program is a C interface to idamax. 5 | * It calls the fortran wrapper before calling idamax. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | CBLAS_INDEX API_SUFFIX(cblas_idamax)( const CBLAS_INT N, const double *X, const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_iamax; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | CBLAS_INT F77_iamax; 20 | #endif 21 | F77_idamax_sub( &F77_N, X, &F77_incX, &F77_iamax ); 22 | return ( F77_iamax > 0 ) 23 | ? (CBLAS_INDEX)( F77_iamax-1 ) 24 | : (CBLAS_INDEX) 0; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_isamax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_isamax.c 3 | * 4 | * The program is a C interface to isamax. 5 | * It calls the fortran wrapper before calling isamax. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | CBLAS_INDEX API_SUFFIX(cblas_isamax)( const CBLAS_INT N, const float *X, const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_iamax; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | CBLAS_INT F77_iamax; 20 | #endif 21 | F77_isamax_sub( &F77_N, X, &F77_incX, &F77_iamax ); 22 | return ( F77_iamax > 0 ) 23 | ? (CBLAS_INDEX)( F77_iamax-1 ) 24 | : (CBLAS_INDEX) 0; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_izamax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_izamax.c 3 | * 4 | * The program is a C interface to izamax. 5 | * It calls the fortran wrapper before calling izamax. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | CBLAS_INDEX API_SUFFIX(cblas_izamax)( const CBLAS_INT N, const void *X, const CBLAS_INT incX) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_N=N, F77_incX=incX, F77_iamax; 16 | #else 17 | #define F77_N N 18 | #define F77_incX incX 19 | CBLAS_INT F77_iamax; 20 | #endif 21 | F77_izamax_sub( &F77_N, X, &F77_incX, &F77_iamax ); 22 | return ( F77_iamax > 0 ) 23 | ? (CBLAS_INDEX)( F77_iamax-1 ) 24 | : (CBLAS_INDEX) 0; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_saxpby.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_saxpby.c 3 | * 4 | * The program is a C interface to saxpby. 5 | * It calls the fortran wrapper before calling saxpby. 6 | * 7 | * Written by Martin Koehler, 08/24/2024 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_saxpby)( const CBLAS_INT N, const float alpha, const float *X, 13 | const CBLAS_INT incX, const float beta, float *Y, const CBLAS_INT incY) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_saxpby( &F77_N, &alpha, X, &F77_incX, &beta, Y, &F77_incY); 23 | } 24 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zdotc_sub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zdotc_sub.c 3 | * 4 | * The program is a C interface to zdotc. 5 | * It calls the fortran wrapper before calling zdotc. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_zdotc_sub)( const CBLAS_INT N, const void *X, const CBLAS_INT incX, 13 | const void *Y, const CBLAS_INT incY, void *dotc) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_zdotc_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotc); 23 | return; 24 | } 25 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zdotu_sub.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zdotu_sub.c 3 | * 4 | * The program is a C interface to zdotu. 5 | * It calls the fortran wrapper before calling zdotu. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_zdotu_sub)( const CBLAS_INT N, const void *X, const CBLAS_INT incX, 13 | const void *Y, const CBLAS_INT incY, void *dotu) 14 | { 15 | #ifdef F77_INT 16 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 17 | #else 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #endif 22 | F77_zdotu_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotu); 23 | return; 24 | } 25 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dsdot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dsdot.c 3 | * 4 | * The program is a C interface to dsdot. 5 | * It calls fthe fortran wrapper before calling dsdot. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | double API_SUFFIX(cblas_dsdot)( const CBLAS_INT N, const float *X, 13 | const CBLAS_INT incX, const float *Y, const CBLAS_INT incY) 14 | { 15 | double dot; 16 | #ifdef F77_INT 17 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_N N 20 | #define F77_incX incX 21 | #define F77_incY incY 22 | #endif 23 | F77_dsdot_sub( &F77_N, X, &F77_incX, Y, &F77_incY, &dot); 24 | return dot; 25 | } 26 | -------------------------------------------------------------------------------- /CBLAS/cmake/cblas-config-install.cmake.in: -------------------------------------------------------------------------------- 1 | # Compute locations from /@{LIBRARY_DIR@/cmake/lapacke-/.cmake 2 | get_filename_component(_CBLAS_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 3 | 4 | # Load the LAPACK package with which we were built. 5 | set(LAPACK_DIR "@CMAKE_INSTALL_FULL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@") 6 | find_package(LAPACK NO_MODULE) 7 | 8 | # Load lapacke targets from the install tree. 9 | if(NOT TARGET @CBLASLIB@) 10 | include(${_CBLAS_SELF_DIR}/@CBLASLIB@-targets.cmake) 11 | endif() 12 | 13 | # Report lapacke header search locations. 14 | set(CBLAS_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) 15 | 16 | # Report lapacke libraries. 17 | set(CBLAS_LIBRARIES @CBLASLIB@) 18 | 19 | unset(_CBLAS_SELF_DIR) 20 | -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Security updates are applied only to the latest release. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. 10 | 11 | Please disclose it at [security advisory](https://github.com/Reference-LAPACK/lapack/security/advisories/new). 12 | 13 | This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. 14 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sdsdot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_sdsdot.c 3 | * 4 | * The program is a C interface to sdsdot. 5 | * It calls the fortran wrapper before calling sdsdot. 6 | * 7 | * Written by Keita Teranishi. 2/11/1998 8 | * 9 | */ 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | float API_SUFFIX(cblas_sdsdot)( const CBLAS_INT N, const float alpha, const float *X, 13 | const CBLAS_INT incX, const float *Y, const CBLAS_INT incY) 14 | { 15 | float dot; 16 | #ifdef F77_INT 17 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_N N 20 | #define F77_incX incX 21 | #define F77_incY incY 22 | #endif 23 | F77_sdsdot_sub( &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, &dot); 24 | return dot; 25 | } 26 | -------------------------------------------------------------------------------- /TESTING/csg.in: -------------------------------------------------------------------------------- 1 | CSG: Data file for testing Generalized Hermitian Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 3 Number of values of NB 5 | 1 3 20 Values of NB (blocksize) 6 | 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 1 1 Values of NX (crossover point) 8 | 20.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | CSG 21 14 | -------------------------------------------------------------------------------- /TESTING/dsg.in: -------------------------------------------------------------------------------- 1 | DSG: Data file for testing Generalized Symmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 3 Number of values of NB 5 | 1 3 20 Values of NB (blocksize) 6 | 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 1 1 Values of NX (crossover point) 8 | 20.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | DSG 21 14 | -------------------------------------------------------------------------------- /TESTING/ssg.in: -------------------------------------------------------------------------------- 1 | SSG: Data file for testing Generalized Symmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 3 Number of values of NB 5 | 1 3 20 Values of NB (blocksize) 6 | 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 1 1 Values of NX (crossover point) 8 | 20.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | SSG 21 14 | -------------------------------------------------------------------------------- /TESTING/zsg.in: -------------------------------------------------------------------------------- 1 | ZSG: Data file for testing Generalized Hermitian Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 3 Number of values of NB 5 | 1 3 20 Values of NB (blocksize) 6 | 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 1 1 Values of NX (crossover point) 8 | 20.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | ZSG 21 14 | -------------------------------------------------------------------------------- /TESTING/dstest.in: -------------------------------------------------------------------------------- 1 | Data file for testing DSGESV/DSPOSV LAPACK routines 2 | 11 Number of values of M 3 | 0 1 2 13 17 45 78 91 101 120 132 Values of M (row dimension) 4 | 4 Number of values of NRHS 5 | 1 2 15 16 Values of NRHS (number of right hand sides) 6 | 30.0 Threshold value of test ratio 7 | T Put T to test the driver routine 8 | T Put T to test the error exits 9 | DGE 11 Number of matrix types to be tested, list types on next line if 0 < NTYPES < 11 10 | DPO 9 Number of matrix types to be tested, list types on next line if 0 < NTYPES < 11 11 | -------------------------------------------------------------------------------- /TESTING/zctest.in: -------------------------------------------------------------------------------- 1 | Data file for testing ZCGESV/ZCPOSV LAPACK routines 2 | 11 Number of values of M 3 | 0 1 2 13 17 45 78 91 101 120 132 Values of M (row dimension) 4 | 4 Number of values of NRHS 5 | 1 2 15 16 Values of NRHS (number of right hand sides) 6 | 30.0 Threshold value of test ratio 7 | T Put T to test the driver routine 8 | T Put T to test the error exits 9 | ZGE 11 Number of matrix types to be tested, list types on next line if 0 < NTYPES < 11 10 | ZPO 9 Number of matrix types to be tested, list types on next line if 0 < NTYPES < 9 11 | -------------------------------------------------------------------------------- /TESTING/se2.in: -------------------------------------------------------------------------------- 1 | SE2: Data file for testing Symmetric Eigenvalue Problem routines 2 | 6 Number of values of N 3 | 0 1 2 3 5 20 Values of N (dimension) 4 | 5 Number of values of NB 5 | 1 3 3 3 10 Values of NB (blocksize) 6 | 2 2 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 0 5 9 1 Values of NX (crossover point) 8 | 50.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | SE2 20 14 | 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 15 | 16 | -------------------------------------------------------------------------------- /TESTING/sep.in: -------------------------------------------------------------------------------- 1 | SEP: Data file for testing Symmetric Eigenvalue Problem routines 2 | 6 Number of values of N 3 | 0 1 2 3 5 20 Values of N (dimension) 4 | 5 Number of values of NB 5 | 1 3 3 3 10 Values of NB (blocksize) 6 | 2 2 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 0 5 9 1 Values of NX (crossover point) 8 | 50.0 Threshold value 9 | T Put T to test the LAPACK routines 10 | T Put T to test the driver routines 11 | T Put T to test the error exits 12 | 1 Code to interpret the seed 13 | SEP 20 14 | 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 15 | 16 | -------------------------------------------------------------------------------- /CMAKE/lapack-config-install.cmake.in: -------------------------------------------------------------------------------- 1 | # Compute locations from /lib/cmake/lapack-/.cmake 2 | get_filename_component(_LAPACK_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 3 | 4 | # Load lapack targets from the install tree if necessary. 5 | set(_LAPACK_TARGET "@_lapack_config_install_guard_target@") 6 | if(_LAPACK_TARGET AND NOT TARGET "${_LAPACK_TARGET}") 7 | include("${_LAPACK_SELF_DIR}/@LAPACKLIB@-targets.cmake") 8 | endif() 9 | unset(_LAPACK_TARGET) 10 | 11 | # Hint for project building against lapack 12 | set(LAPACK_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") 13 | 14 | # Report the blas and lapack raw or imported libraries. 15 | set(LAPACK_blas_LIBRARIES "@BLAS_LIBRARIES@") 16 | set(LAPACK_lapack_LIBRARIES "@LAPACK_LIBRARIES@") 17 | set(LAPACK_LIBRARIES ${LAPACK_blas_LIBRARIES} ${LAPACK_lapack_LIBRARIES}) 18 | 19 | unset(_LAPACK_SELF_DIR) 20 | -------------------------------------------------------------------------------- /LAPACKE/cmake/lapacke-config-install.cmake.in: -------------------------------------------------------------------------------- 1 | # Compute locations from /@{LIBRARY_DIR@/cmake/lapacke-/.cmake 2 | get_filename_component(_LAPACKE_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 3 | 4 | # Load the LAPACK package with which we were built. 5 | set(LAPACK_DIR "@CMAKE_INSTALL_FULL_LIBDIR@/cmake/@LAPACKLIB@-@LAPACK_VERSION@") 6 | find_package(LAPACK NO_MODULE) 7 | 8 | # Load lapacke targets from the install tree. 9 | if(NOT TARGET @LAPACKELIB@) 10 | include(${_LAPACKE_SELF_DIR}/@LAPACKELIB@-targets.cmake) 11 | endif() 12 | 13 | # Hint for project building against lapack 14 | set(LAPACKE_Fortran_COMPILER_ID ${LAPACK_Fortran_COMPILER_ID}) 15 | 16 | # Report lapacke header search locations. 17 | set(LAPACKE_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) 18 | 19 | # Report lapacke libraries. 20 | set(LAPACKE_LIBRARIES @LAPACKELIB@ ${LAPACK_LIBRARIES}) 21 | 22 | unset(_LAPACKE_SELF_DIR) 23 | -------------------------------------------------------------------------------- /CBLAS/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(xexample1_CBLAS cblas_example1.c) 2 | add_executable(xexample2_CBLAS cblas_example2.c) 3 | 4 | target_link_libraries(xexample1_CBLAS ${CBLASLIB}) 5 | target_link_libraries(xexample2_CBLAS ${CBLASLIB} ${BLAS_LIBRARIES}) 6 | 7 | add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS) 8 | add_test(example2_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample2_CBLAS) 9 | 10 | if(BUILD_INDEX64_EXT_API) 11 | add_executable(xexample1_64_CBLAS cblas_example1_64.c) 12 | add_executable(xexample2_64_CBLAS cblas_example2_64.c) 13 | 14 | target_link_libraries(xexample1_64_CBLAS ${CBLASLIB}) 15 | target_link_libraries(xexample2_64_CBLAS ${CBLASLIB} ${BLAS_LIBRARIES}) 16 | 17 | add_test(example1_64_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_64_CBLAS) 18 | add_test(example2_64_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample2_64_CBLAS) 19 | endif() 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore objects and archives, anywhere in the tree. 2 | *.[oa] 3 | 4 | # test in INSTALL 5 | INSTALL/test* 6 | 7 | # local make.inc 8 | make.inc 9 | 10 | # BLAS testing 11 | BLAS/TESTING/*.out 12 | BLAS/TESTING/x* 13 | 14 | # CBLAS 15 | CBLAS/include/cblas_mangling.h 16 | 17 | # CBLAS testing 18 | CBLAS/testing/*.out 19 | CBLAS/testing/x* 20 | 21 | # CBLAS examples 22 | CBLAS/examples/cblas_ex1 23 | CBLAS/examples/cblas_ex2 24 | 25 | # LAPACK testing 26 | TESTING/LIN/xlintst* 27 | TESTING/EIG/xeigtst* 28 | TESTING/EIG/xdmd* 29 | TESTING/*.out 30 | TESTING/*.txt 31 | !TESTING/CMakeLists.txt 32 | TESTING/x* 33 | 34 | # LAPACKE example 35 | LAPACKE/example/xexample* 36 | 37 | # SED 38 | SRC/*-e 39 | LAPACKE/src/*-e 40 | build* 41 | 42 | # DOCS documentation 43 | DOCS/man 44 | DOCS/explore-html 45 | output_err 46 | 47 | # Mod files from compilation in SRC 48 | SRC/la_constants.mod 49 | SRC/la_xisnan.mod 50 | -------------------------------------------------------------------------------- /CBLAS/Makefile: -------------------------------------------------------------------------------- 1 | TOPSRCDIR = .. 2 | include $(TOPSRCDIR)/make.inc 3 | 4 | .PHONY: all 5 | all: cblas 6 | 7 | .PHONY: cblas 8 | cblas: include/cblas_mangling.h 9 | $(MAKE) -C src 10 | 11 | include/cblas_mangling.h: include/cblas_mangling_with_flags.h.in 12 | cp include/cblas_mangling_with_flags.h.in $@ 13 | 14 | .PHONY: cblas_testing 15 | cblas_testing: cblas 16 | $(MAKE) -C testing run 17 | 18 | .PHONY: cblas_example 19 | cblas_example: cblas 20 | $(MAKE) -C examples 21 | 22 | .PHONY: clean cleanobj cleanlib cleanexe cleantest 23 | clean: 24 | $(MAKE) -C src clean 25 | $(MAKE) -C testing clean 26 | $(MAKE) -C examples clean 27 | cleanobj: 28 | $(MAKE) -C src cleanobj 29 | $(MAKE) -C testing cleanobj 30 | $(MAKE) -C examples cleanobj 31 | cleanlib: 32 | $(MAKE) -C src cleanlib 33 | cleanexe: 34 | $(MAKE) -C testing cleanexe 35 | $(MAKE) -C examples cleanexe 36 | cleantest: 37 | $(MAKE) -C testing cleantest 38 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_sorhr_col.c: -------------------------------------------------------------------------------- 1 | #include "lapacke_utils.h" 2 | 3 | lapack_int API_SUFFIX(LAPACKE_sorhr_col)( int matrix_layout, lapack_int m, lapack_int n, 4 | lapack_int nb, float* a, 5 | lapack_int lda, float* t, 6 | lapack_int ldt, float* d) 7 | { 8 | lapack_int info = 0; 9 | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { 10 | API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sorhr_col", -1 ); 11 | return -1; 12 | } 13 | #ifndef LAPACK_DISABLE_NAN_CHECK 14 | if( LAPACKE_get_nancheck() ) { 15 | /* Optionally check input matrices for NaNs */ 16 | if( API_SUFFIX(LAPACKE_sge_nancheck)( matrix_layout, m, n, a, lda ) ) { 17 | return -5; 18 | } 19 | } 20 | #endif 21 | /* Call middle-level interface */ 22 | info = API_SUFFIX(LAPACKE_sorhr_col_work)( matrix_layout, m, n, nb, a, lda, t, ldt, d ); 23 | return info; 24 | } 25 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_dorhr_col.c: -------------------------------------------------------------------------------- 1 | #include "lapacke_utils.h" 2 | 3 | lapack_int API_SUFFIX(LAPACKE_dorhr_col)( int matrix_layout, lapack_int m, lapack_int n, 4 | lapack_int nb, double* a, 5 | lapack_int lda, double* t, 6 | lapack_int ldt, double* d) 7 | { 8 | lapack_int info = 0; 9 | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { 10 | API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dorhr_col", -1 ); 11 | return -1; 12 | } 13 | #ifndef LAPACK_DISABLE_NAN_CHECK 14 | if( LAPACKE_get_nancheck() ) { 15 | /* Optionally check input matrices for NaNs */ 16 | if( API_SUFFIX(LAPACKE_dge_nancheck)( matrix_layout, m, n, a, lda ) ) { 17 | return -5; 18 | } 19 | } 20 | #endif 21 | /* Call middle-level interface */ 22 | info = API_SUFFIX(LAPACKE_dorhr_col_work)( matrix_layout, m, n, nb, a, lda, t, ldt, d ); 23 | return info; 24 | } 25 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_cunhr_col.c: -------------------------------------------------------------------------------- 1 | #include "lapacke_utils.h" 2 | 3 | lapack_int API_SUFFIX(LAPACKE_cunhr_col)( int matrix_layout, lapack_int m, lapack_int n, 4 | lapack_int nb, lapack_complex_float* a, 5 | lapack_int lda, lapack_complex_float* t, 6 | lapack_int ldt, lapack_complex_float* d) 7 | { 8 | lapack_int info = 0; 9 | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { 10 | API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cunhr_col", -1 ); 11 | return -1; 12 | } 13 | #ifndef LAPACK_DISABLE_NAN_CHECK 14 | if( LAPACKE_get_nancheck() ) { 15 | /* Optionally check input matrices for NaNs */ 16 | if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, a, lda ) ) { 17 | return -5; 18 | } 19 | } 20 | #endif 21 | /* Call middle-level interface */ 22 | info = API_SUFFIX(LAPACKE_cunhr_col_work)( matrix_layout, m, n, nb, a, lda, t, ldt, d ); 23 | return info; 24 | } 25 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_zunhr_col.c: -------------------------------------------------------------------------------- 1 | #include "lapacke_utils.h" 2 | 3 | lapack_int API_SUFFIX(LAPACKE_zunhr_col)( int matrix_layout, lapack_int m, lapack_int n, 4 | lapack_int nb, lapack_complex_double* a, 5 | lapack_int lda, lapack_complex_double* t, 6 | lapack_int ldt, lapack_complex_double* d) 7 | { 8 | lapack_int info = 0; 9 | if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { 10 | API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zunhr_col", -1 ); 11 | return -1; 12 | } 13 | #ifndef LAPACK_DISABLE_NAN_CHECK 14 | if( LAPACKE_get_nancheck() ) { 15 | /* Optionally check input matrices for NaNs */ 16 | if( API_SUFFIX(LAPACKE_zge_nancheck)( matrix_layout, m, n, a, lda ) ) { 17 | return -5; 18 | } 19 | } 20 | #endif 21 | /* Call middle-level interface */ 22 | info = API_SUFFIX(LAPACKE_zunhr_col_work)( matrix_layout, m, n, nb, a, lda, t, ldt, d ); 23 | return info; 24 | } 25 | -------------------------------------------------------------------------------- /TESTING/cgg.in: -------------------------------------------------------------------------------- 1 | CGG: Data file for testing Nonsymmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 4 Number of parameter values 5 | 1 1 2 2 Values of NB (blocksize) 6 | 40 40 2 2 Values of NBMIN (minimum blocksize) 7 | 2 4 2 4 Values of NSHIFT (no. of shifts) 8 | 40 40 2 2 Values of MAXB (multishift crossover pt) 9 | 1 2 1 2 Values of IACC22 (struct. matrix mult.) 10 | 40 40 2 2 Values of NBCOL (minimum col. dimension) 11 | 20.0 Threshold value 12 | T Put T to test the LAPACK routines 13 | F Put T to test the driver routines 14 | T Put T to test the error exits 15 | 1 Code to interpret the seed 16 | CGG 26 17 | -------------------------------------------------------------------------------- /TESTING/dgg.in: -------------------------------------------------------------------------------- 1 | DGG: Data file for testing Nonsymmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 4 Number of parameter values 5 | 1 1 2 2 Values of NB (blocksize) 6 | 40 40 2 2 Values of NBMIN (minimum blocksize) 7 | 2 4 2 4 Values of NSHIFT (no. of shifts) 8 | 40 40 2 2 Values of MAXB (multishift crossover pt) 9 | 1 2 1 2 Values of IACC22 (struct. matrix mult.) 10 | 40 40 2 2 Values of NBCOL (minimum col. dimension) 11 | 20.0 Threshold value 12 | T Put T to test the LAPACK routines 13 | F Put T to test the driver routines 14 | T Put T to test the error exits 15 | 1 Code to interpret the seed 16 | DGG 26 17 | -------------------------------------------------------------------------------- /TESTING/sgg.in: -------------------------------------------------------------------------------- 1 | SGG: Data file for testing Nonsymmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 4 Number of parameter values 5 | 1 1 2 2 Values of NB (blocksize) 6 | 40 40 2 2 Values of NBMIN (minimum blocksize) 7 | 2 4 2 4 Values of NSHIFT (no. of shifts) 8 | 40 40 2 2 Values of MAXB (multishift crossover pt) 9 | 1 2 1 2 Values of IACC22 (struct. matrix mult.) 10 | 40 40 2 2 Values of NBCOL (minimum col. dimension) 11 | 20.0 Threshold value 12 | T Put T to test the LAPACK routines 13 | F Put T to test the driver routines 14 | T Put T to test the error exits 15 | 1 Code to interpret the seed 16 | SGG 26 17 | -------------------------------------------------------------------------------- /TESTING/zgg.in: -------------------------------------------------------------------------------- 1 | ZGG: Data file for testing Nonsymmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 4 Number of parameter values 5 | 1 1 2 2 Values of NB (blocksize) 6 | 40 40 2 2 Values of NBMIN (minimum blocksize) 7 | 2 4 2 4 Values of NSHIFT (no. of shifts) 8 | 40 40 2 2 Values of MAXB (multishift crossover pt) 9 | 1 2 1 2 Values of IACC22 (struct. matrix mult.) 10 | 40 40 2 2 Values of NBCOL (minimum col. dimension) 11 | 20.0 Threshold value 12 | T Put T to test the LAPACK routines 13 | F Put T to test the driver routines 14 | T Put T to test the error exits 15 | 1 Code to interpret the seed 16 | ZGG 26 17 | -------------------------------------------------------------------------------- /CBLAS/testing/din3: -------------------------------------------------------------------------------- 1 | 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 1 2 3 5 7 9 VALUES OF N 10 | 3 NUMBER OF VALUES OF ALPHA 11 | 0.0 1.0 0.7 VALUES OF ALPHA 12 | 3 NUMBER OF VALUES OF BETA 13 | 0.0 1.0 1.3 VALUES OF BETA 14 | cblas_dgemm T PUT F FOR NO TEST. SAME COLUMNS. 15 | cblas_dsymm T PUT F FOR NO TEST. SAME COLUMNS. 16 | cblas_dtrmm T PUT F FOR NO TEST. SAME COLUMNS. 17 | cblas_dtrsm T PUT F FOR NO TEST. SAME COLUMNS. 18 | cblas_dsyrk T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_dsyr2k T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_dgemmtr T PUT F FOR NO TEST. SAME COLUMNS. 21 | -------------------------------------------------------------------------------- /CBLAS/testing/sin3: -------------------------------------------------------------------------------- 1 | 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 3 NUMBER OF VALUES OF ALPHA 11 | 0.0 1.0 0.7 VALUES OF ALPHA 12 | 3 NUMBER OF VALUES OF BETA 13 | 0.0 1.0 1.3 VALUES OF BETA 14 | cblas_sgemm T PUT F FOR NO TEST. SAME COLUMNS. 15 | cblas_ssymm T PUT F FOR NO TEST. SAME COLUMNS. 16 | cblas_strmm T PUT F FOR NO TEST. SAME COLUMNS. 17 | cblas_strsm T PUT F FOR NO TEST. SAME COLUMNS. 18 | cblas_ssyrk T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_ssyr2k T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_sgemmtr T PUT F FOR NO TEST. SAME COLUMNS. 21 | -------------------------------------------------------------------------------- /TESTING/svd.in: -------------------------------------------------------------------------------- 1 | SVD: Data file for testing Singular Value Decomposition routines 2 | 19 Number of values of M 3 | 0 0 0 1 1 1 2 2 3 3 3 10 10 16 16 30 30 40 40 Values of M 4 | 0 1 3 0 1 2 0 1 0 1 3 10 16 10 16 30 40 30 40 Values of N 5 | 5 Number of parameter values 6 | 1 3 3 3 20 Values of NB (blocksize) 7 | 2 2 2 2 2 Values of NBMIN (minimum blocksize) 8 | 1 0 5 9 1 Values of NX (crossover point) 9 | 2 0 2 2 2 Values of NRHS 10 | 50.0 Threshold value 11 | T Put T to test the LAPACK routines 12 | T Put T to test the driver routines 13 | T Put T to test the error exits 14 | 1 Code to interpret the seed 15 | SVD 16 16 | -------------------------------------------------------------------------------- /.appveyor.yml: -------------------------------------------------------------------------------- 1 | image: 2 | - Visual Studio 2017 3 | 4 | configuration: Release 5 | clone_depth: 3 6 | 7 | matrix: 8 | fast_finish: false 9 | 10 | skip_commits: 11 | # Add [av skip] to commit messages 12 | message: /\[av skip\]/ 13 | 14 | environment: 15 | global: 16 | CONDA_INSTALL_LOCN: C:\\Miniconda37-x64 17 | CTEST_OUTPUT_ON_FAILURE: 1 18 | 19 | install: 20 | - call %CONDA_INSTALL_LOCN%\Scripts\activate.bat 21 | # - conda config --set auto_update_conda false 22 | - conda install -c conda-forge --yes --quiet flang=11.0.1 jom 23 | - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 24 | - set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%" 25 | - set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%" 26 | 27 | before_build: 28 | - ps: if (-Not (Test-Path .\build)) { mkdir build } 29 | - cd build 30 | - cmake -G "NMake Makefiles JOM" -DCMAKE_Fortran_COMPILER=flang -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON .. 31 | 32 | build_script: 33 | - cmake --build . 34 | 35 | test_script: 36 | - ctest -j2 --output-on-failure 37 | -------------------------------------------------------------------------------- /LAPACKE/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LAPACKE_INCLUDE lapack.h) 2 | IF(LAPACKE) 3 | list(APPEND LAPACKE_INCLUDE lapacke.h lapacke_config.h lapacke_utils.h) 4 | endif() 5 | 6 | file(COPY ${LAPACKE_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include) 7 | 8 | # Create a header file lapacke_mangling.h for the routines called in my C programs 9 | include(CheckLanguage) 10 | check_language(Fortran) 11 | check_language(C) 12 | if(CMAKE_Fortran_COMPILER AND CMAKE_C_COMPILER) 13 | enable_language(Fortran) 14 | enable_language(C) 15 | include(FortranCInterface) 16 | ## Ensure that the fortran compiler and c compiler specified are compatible 17 | FortranCInterface_VERIFY() 18 | FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/lapacke_mangling.h 19 | MACRO_NAMESPACE "LAPACK_" 20 | SYMBOL_NAMESPACE "LAPACK_") 21 | endif() 22 | if(NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND) 23 | message(WARNING "Reverting to pre-defined include/lapacke_mangling.h") 24 | configure_file(lapacke_mangling_with_flags.h.in 25 | ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h) 26 | endif() -------------------------------------------------------------------------------- /INSTALL/LAPACK_version.f: -------------------------------------------------------------------------------- 1 | *> \brief \b LAPACK_VERSION 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * PROGRAM LAPACK_VERSION 12 | * 13 | * Authors: 14 | * ======== 15 | * 16 | *> \author Univ. of Tennessee 17 | *> \author Univ. of California Berkeley 18 | *> \author Univ. of Colorado Denver 19 | *> \author NAG Ltd. 20 | * 21 | *> \ingroup auxOTHERauxiliary 22 | * 23 | * ===================================================================== 24 | PROGRAM LAPACK_VERSION 25 | IMPLICIT NONE 26 | * 27 | * -- LAPACK auxiliary routine -- 28 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 29 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 30 | * 31 | INTEGER MAJOR, MINOR, PATCH 32 | * .. 33 | * .. External Subroutines .. 34 | EXTERNAL ILAVER 35 | * 36 | CALL ILAVER ( MAJOR, MINOR, PATCH ) 37 | WRITE(*,*) "LAPACK ",MAJOR,".",MINOR,".",PATCH 38 | * 39 | END 40 | -------------------------------------------------------------------------------- /LAPACKE/example/Makefile: -------------------------------------------------------------------------------- 1 | TOPSRCDIR = ../.. 2 | include $(TOPSRCDIR)/make.inc 3 | 4 | .SUFFIXES: .c .o 5 | .c.o: 6 | $(CC) $(CFLAGS) -I. -I../include -c -o $@ $< 7 | 8 | .PHONY: all 9 | all: xexample_DGESV_rowmajor \ 10 | xexample_DGESV_colmajor \ 11 | xexample_DGELS_rowmajor \ 12 | xexample_DGELS_colmajor 13 | 14 | LIBRARIES = $(LAPACKELIB) $(LAPACKLIB) $(BLASLIB) 15 | 16 | # Double Precision Examples 17 | xexample_DGESV_rowmajor: example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES) 18 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 19 | ./$@ 20 | 21 | xexample_DGESV_colmajor: example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES) 22 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 23 | ./$@ 24 | 25 | xexample_DGELS_rowmajor: example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES) 26 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 27 | ./$@ 28 | 29 | xexample_DGELS_colmajor: example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES) 30 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 31 | ./$@ 32 | 33 | .PHONY: clean cleanobj cleanexe 34 | clean: cleanobj cleanexe 35 | cleanobj: 36 | rm -f *.o 37 | cleanexe: 38 | rm -f x* 39 | -------------------------------------------------------------------------------- /BLAS/TESTING/dblat3.in: -------------------------------------------------------------------------------- 1 | 'dblat3.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 3 NUMBER OF VALUES OF ALPHA 12 | 0.0 1.0 0.7 VALUES OF ALPHA 13 | 3 NUMBER OF VALUES OF BETA 14 | 0.0 1.0 1.3 VALUES OF BETA 15 | DGEMM T PUT F FOR NO TEST. SAME COLUMNS. 16 | DSYMM T PUT F FOR NO TEST. SAME COLUMNS. 17 | DTRMM T PUT F FOR NO TEST. SAME COLUMNS. 18 | DTRSM T PUT F FOR NO TEST. SAME COLUMNS. 19 | DSYRK T PUT F FOR NO TEST. SAME COLUMNS. 20 | DSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 21 | DGEMMTR T PUT F FOR NO TEST. SAME COLUMNS. 22 | DSKEWSYMM T PUT F FOR NO TEST. SAME COLUMNS. 23 | DSKEWSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 24 | -------------------------------------------------------------------------------- /BLAS/TESTING/sblat3.in: -------------------------------------------------------------------------------- 1 | 'sblat3.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 3 NUMBER OF VALUES OF ALPHA 12 | 0.0 1.0 0.7 VALUES OF ALPHA 13 | 3 NUMBER OF VALUES OF BETA 14 | 0.0 1.0 1.3 VALUES OF BETA 15 | SGEMM T PUT F FOR NO TEST. SAME COLUMNS. 16 | SSYMM T PUT F FOR NO TEST. SAME COLUMNS. 17 | STRMM T PUT F FOR NO TEST. SAME COLUMNS. 18 | STRSM T PUT F FOR NO TEST. SAME COLUMNS. 19 | SSYRK T PUT F FOR NO TEST. SAME COLUMNS. 20 | SSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 21 | SGEMMTR T PUT F FOR NO TEST. SAME COLUMNS. 22 | SSKEWSYMM T PUT F FOR NO TEST. SAME COLUMNS. 23 | SSKEWSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 24 | -------------------------------------------------------------------------------- /CBLAS/src/xerbla.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "cblas.h" 4 | #include "cblas_f77.h" 5 | 6 | #define XerblaStrLen 6 7 | #define XerblaStrLen1 7 8 | 9 | void 10 | #ifdef HAS_ATTRIBUTE_WEAK_SUPPORT 11 | __attribute__((weak)) 12 | #endif 13 | F77_xerbla_base 14 | #ifdef F77_CHAR 15 | (F77_CHAR F77_srname, void *vinfo 16 | #else 17 | (char *srname, void *vinfo 18 | #endif 19 | #ifdef BLAS_FORTRAN_STRLEN_END 20 | , FORTRAN_STRLEN len 21 | #endif 22 | ) 23 | { 24 | #ifdef F77_CHAR 25 | char *srname; 26 | #endif 27 | 28 | char rout[] = {'c','b','l','a','s','_','\0','\0','\0','\0','\0','\0','\0'}; 29 | 30 | int *info=vinfo; 31 | int i; 32 | 33 | extern int CBLAS_CallFromC; 34 | 35 | #ifdef F77_CHAR 36 | srname = F2C_STR(F77_srname, XerblaStrLen); 37 | #endif 38 | 39 | if (CBLAS_CallFromC) 40 | { 41 | for(i=0; i != XerblaStrLen; i++) rout[i+6] = tolower(srname[i]); 42 | rout[XerblaStrLen+6] = '\0'; 43 | API_SUFFIX(cblas_xerbla)(*info+1,rout,""); 44 | } 45 | else 46 | { 47 | fprintf(stderr, "Parameter %d to routine %s was incorrect\n", 48 | *info, srname); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /TESTING/nep.in: -------------------------------------------------------------------------------- 1 | NEP: Data file for testing Nonsymmetric Eigenvalue Problem routines 2 | 7 Number of values of N 3 | 0 1 2 3 5 10 16 Values of N (dimension) 4 | 5 Number of values of NB, NBMIN, NX, INMIN, IN WIN, INIBL, ISHFTS, and IACC22 5 | 1 3 3 3 20 Values of NB (blocksize) 6 | 2 2 2 2 2 Values of NBMIN (minimum blocksize) 7 | 1 0 5 9 1 Values of NX (crossover point) 8 | 11 12 11 15 11 Values of INMIN (LAHQR vs TTQRE crossover point, >= 11) 9 | 2 3 5 3 2 Values of INWIN (recommended deflation window size) 10 | 0 5 7 3 200 Values of INIBL (nibble crossover point) 11 | 1 2 4 2 1 Values of ISHFTS (number of simultaneous shifts) 12 | 0 1 2 0 1 Values of IACC22 (select structured matrix multiply: 0, 1 or 2) 13 | 20.0 Threshold value 14 | T Put T to test the error exits 15 | 1 Code to interpret the seed 16 | NEP 21 17 | -------------------------------------------------------------------------------- /BLAS/TESTING/cblat3.in: -------------------------------------------------------------------------------- 1 | 'cblat3.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 3 NUMBER OF VALUES OF ALPHA 12 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 13 | 3 NUMBER OF VALUES OF BETA 14 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 15 | CGEMM T PUT F FOR NO TEST. SAME COLUMNS. 16 | CHEMM T PUT F FOR NO TEST. SAME COLUMNS. 17 | CSYMM T PUT F FOR NO TEST. SAME COLUMNS. 18 | CTRMM T PUT F FOR NO TEST. SAME COLUMNS. 19 | CTRSM T PUT F FOR NO TEST. SAME COLUMNS. 20 | CHERK T PUT F FOR NO TEST. SAME COLUMNS. 21 | CSYRK T PUT F FOR NO TEST. SAME COLUMNS. 22 | CHER2K T PUT F FOR NO TEST. SAME COLUMNS. 23 | CSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 24 | CGEMMTR T PUT F FOR NO TEST. SAME COLUMNS. 25 | -------------------------------------------------------------------------------- /BLAS/TESTING/zblat3.in: -------------------------------------------------------------------------------- 1 | 'zblat3.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 3 NUMBER OF VALUES OF ALPHA 12 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 13 | 3 NUMBER OF VALUES OF BETA 14 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 15 | ZGEMM T PUT F FOR NO TEST. SAME COLUMNS. 16 | ZHEMM T PUT F FOR NO TEST. SAME COLUMNS. 17 | ZSYMM T PUT F FOR NO TEST. SAME COLUMNS. 18 | ZTRMM T PUT F FOR NO TEST. SAME COLUMNS. 19 | ZTRSM T PUT F FOR NO TEST. SAME COLUMNS. 20 | ZHERK T PUT F FOR NO TEST. SAME COLUMNS. 21 | ZSYRK T PUT F FOR NO TEST. SAME COLUMNS. 22 | ZHER2K T PUT F FOR NO TEST. SAME COLUMNS. 23 | ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS. 24 | ZGEMMTR T PUT F FOR NO TEST. SAME COLUMNS. 25 | -------------------------------------------------------------------------------- /CBLAS/testing/cin3: -------------------------------------------------------------------------------- 1 | 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 3 NUMBER OF VALUES OF ALPHA 11 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 12 | 3 NUMBER OF VALUES OF BETA 13 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 14 | cblas_cgemm T PUT F FOR NO TEST. SAME COLUMNS. 15 | cblas_chemm T PUT F FOR NO TEST. SAME COLUMNS. 16 | cblas_csymm T PUT F FOR NO TEST. SAME COLUMNS. 17 | cblas_ctrmm T PUT F FOR NO TEST. SAME COLUMNS. 18 | cblas_ctrsm T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_cherk T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_csyrk T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_cher2k T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_csyr2k T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_cgemmtr T PUT F FOR NO TEST. SAME COLUMNS. 24 | -------------------------------------------------------------------------------- /CBLAS/testing/zin3: -------------------------------------------------------------------------------- 1 | 'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 3 NUMBER OF VALUES OF ALPHA 11 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 12 | 3 NUMBER OF VALUES OF BETA 13 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 14 | cblas_zgemm T PUT F FOR NO TEST. SAME COLUMNS. 15 | cblas_zhemm T PUT F FOR NO TEST. SAME COLUMNS. 16 | cblas_zsymm T PUT F FOR NO TEST. SAME COLUMNS. 17 | cblas_ztrmm T PUT F FOR NO TEST. SAME COLUMNS. 18 | cblas_ztrsm T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_zherk T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_zsyrk T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_zher2k T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_zsyr2k T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_zgemmtr T PUT F FOR NO TEST. SAME COLUMNS. 24 | -------------------------------------------------------------------------------- /INSTALL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | project(TIMING Fortran) 3 | 4 | # Add the CMake directory for custom CMake modules 5 | set(CMAKE_MODULE_PATH "${TIMING_SOURCE_DIR}/../CMAKE" ${CMAKE_MODULE_PATH}) 6 | 7 | # Check for any necessary platform specific compiler flags 8 | include(CheckLAPACKCompilerFlags) 9 | CheckLAPACKCompilerFlags() 10 | 11 | add_executable(secondtst_NONE second_NONE.f secondtst.f) 12 | add_executable(secondtst_EXT_ETIME second_EXT_ETIME.f secondtst.f) 13 | add_executable(secondtst_EXT_ETIME_ second_EXT_ETIME_.f secondtst.f) 14 | add_executable(secondtst_INT_ETIME second_INT_ETIME.f secondtst.f) 15 | add_executable(secondtst_INT_CPU_TIME second_INT_CPU_TIME.f secondtst.f) 16 | add_executable(testieee tstiee.f) 17 | add_executable(testversion ilaver.f LAPACK_version.f) 18 | 19 | if( NOT TARGET test_zcomplexabs ) 20 | add_executable( test_zcomplexabs test_zcomplexabs.f ) 21 | endif() 22 | if( NOT TARGET test_zcomplexdiv ) 23 | add_executable( test_zcomplexdiv test_zcomplexdiv.f ) 24 | endif() 25 | if( NOT TARGET test_zcomplexmult ) 26 | add_executable( test_zcomplexmult test_zcomplexmult.f ) 27 | endif() 28 | if( NOT TARGET test_zminMax ) 29 | add_executable( test_zminMax test_zminMax.f ) 30 | endif() 31 | -------------------------------------------------------------------------------- /CMAKE/CheckTimeFunction.cmake: -------------------------------------------------------------------------------- 1 | # - Check if the Fortran function exists. 2 | # CHECK_TIME_FUNCTION(FUNCTION VARIABLE TYPE) 3 | # - macro which checks if the Fortran function exists 4 | # FUNCTION - the name of the Fortran function 5 | # VARIABLE - variable to store the result 6 | # 7 | 8 | macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE) 9 | 10 | try_compile(RES 11 | ${PROJECT_BINARY_DIR}/INSTALL 12 | ${PROJECT_SOURCE_DIR}/INSTALL 13 | TIMING secondtst_${FUNCTION} 14 | CMAKE_FLAGS 15 | -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET} 16 | -DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS} 17 | -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} 18 | -DCMAKE_VERBOSE_MAKEFILE=ON 19 | OUTPUT_VARIABLE OUTPUT) 20 | 21 | if(RES) 22 | set(${VARIABLE} ${FUNCTION} CACHE INTERNAL "Have Fortran function ${FUNCTION}") 23 | message(STATUS "Looking for Fortran ${FUNCTION} - found") 24 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 25 | "Fortran ${FUNCTION} exists. ${OUTPUT} \n\n") 26 | else() 27 | message(STATUS "Looking for Fortran ${FUNCTION} - not found") 28 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 29 | "Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n") 30 | endif() 31 | endmacro() 32 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sger.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_sger.c 4 | * This program is a C interface to sger. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_sger)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, 13 | const float alpha, const float *X, const CBLAS_INT incX, 14 | const float *Y, const CBLAS_INT incY, float *A, const CBLAS_INT lda) 15 | { 16 | #ifdef F77_INT 17 | F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_M M 20 | #define F77_N N 21 | #define F77_incX incX 22 | #define F77_incY incY 23 | #define F77_lda lda 24 | #endif 25 | 26 | extern int CBLAS_CallFromC; 27 | extern int RowMajorStrg; 28 | RowMajorStrg = 0; 29 | 30 | CBLAS_CallFromC = 1; 31 | if (layout == CblasColMajor) 32 | { 33 | F77_sger( &F77_M, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A, 34 | &F77_lda); 35 | } 36 | else if (layout == CblasRowMajor) 37 | { 38 | RowMajorStrg = 1; 39 | F77_sger( &F77_N, &F77_M, &alpha, Y, &F77_incY, X, &F77_incX, A, 40 | &F77_lda); 41 | } 42 | else API_SUFFIX(cblas_xerbla)(1, "cblas_sger", "Illegal layout setting, %d\n", layout); 43 | CBLAS_CallFromC = 0; 44 | RowMajorStrg = 0; 45 | return; 46 | } 47 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_zgeru.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_zgeru.c 3 | * The program is a C interface to zgeru. 4 | * 5 | * Keita Teranishi 5/20/98 6 | * 7 | */ 8 | #include "cblas.h" 9 | #include "cblas_f77.h" 10 | void API_SUFFIX(cblas_zgeru)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, 11 | const void *alpha, const void *X, const CBLAS_INT incX, 12 | const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT lda) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_M M 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #define F77_lda lda 22 | #endif 23 | 24 | extern int CBLAS_CallFromC; 25 | extern int RowMajorStrg; 26 | RowMajorStrg = 0; 27 | CBLAS_CallFromC = 1; 28 | 29 | if (layout == CblasColMajor) 30 | { 31 | F77_zgeru( &F77_M, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, A, 32 | &F77_lda); 33 | } 34 | else if (layout == CblasRowMajor) 35 | { 36 | RowMajorStrg = 1; 37 | F77_zgeru( &F77_N, &F77_M, alpha, Y, &F77_incY, X, &F77_incX, A, 38 | &F77_lda); 39 | } 40 | else API_SUFFIX(cblas_xerbla)(1, "cblas_zgeru", "Illegal layout setting, %d\n", layout); 41 | CBLAS_CallFromC = 0; 42 | RowMajorStrg = 0; 43 | return; 44 | } 45 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_cgeru.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_cgeru.c 3 | * The program is a C interface to cgeru. 4 | * 5 | * Keita Teranishi 5/20/98 6 | * 7 | */ 8 | #include "cblas.h" 9 | #include "cblas_f77.h" 10 | void API_SUFFIX(cblas_cgeru)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, 11 | const void *alpha, const void *X, const CBLAS_INT incX, 12 | const void *Y, const CBLAS_INT incY, void *A, const CBLAS_INT lda) 13 | { 14 | #ifdef F77_INT 15 | F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY; 16 | #else 17 | #define F77_M M 18 | #define F77_N N 19 | #define F77_incX incX 20 | #define F77_incY incY 21 | #define F77_lda lda 22 | #endif 23 | 24 | extern int CBLAS_CallFromC; 25 | extern int RowMajorStrg; 26 | RowMajorStrg = 0; 27 | 28 | CBLAS_CallFromC = 1; 29 | 30 | if (layout == CblasColMajor) 31 | { 32 | F77_cgeru( &F77_M, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, A, 33 | &F77_lda); 34 | } 35 | else if (layout == CblasRowMajor) 36 | { 37 | RowMajorStrg = 1; 38 | F77_cgeru( &F77_N, &F77_M, alpha, Y, &F77_incY, X, &F77_incX, A, 39 | &F77_lda); 40 | } 41 | else API_SUFFIX(cblas_xerbla)(1, "cblas_cgeru","Illegal layout setting, %d\n", layout); 42 | CBLAS_CallFromC = 0; 43 | RowMajorStrg = 0; 44 | return; 45 | } 46 | -------------------------------------------------------------------------------- /SRC/la_xisnan.F90: -------------------------------------------------------------------------------- 1 | module LA_XISNAN 2 | interface LA_ISNAN 3 | 4 | module procedure SISNAN 5 | module procedure DISNAN 6 | 7 | end interface 8 | 9 | contains 10 | 11 | logical function SISNAN( x ) 12 | use LA_CONSTANTS, only: wp=>sp 13 | #ifdef USE_IEEE_INTRINSIC 14 | use, intrinsic :: ieee_arithmetic 15 | #elif USE_ISNAN 16 | intrinsic :: isnan 17 | #endif 18 | real(wp) :: x 19 | #ifdef USE_IEEE_INTRINSIC 20 | sisnan = ieee_is_nan(x) 21 | #elif USE_ISNAN 22 | sisnan = isnan(x) 23 | #else 24 | sisnan = SLAISNAN(x,x) 25 | 26 | contains 27 | logical function SLAISNAN( x, y ) 28 | use LA_CONSTANTS, only: wp=>sp 29 | real(wp) :: x, y 30 | SLAISNAN = ( x.ne.y ) 31 | end function SLAISNAN 32 | #endif 33 | end function SISNAN 34 | 35 | logical function DISNAN( x ) 36 | use LA_CONSTANTS, only: wp=>dp 37 | #ifdef USE_IEEE_INTRINSIC 38 | use, intrinsic :: ieee_arithmetic 39 | #elif USE_ISNAN 40 | intrinsic :: isnan 41 | #endif 42 | real(wp) :: x 43 | #ifdef USE_IEEE_INTRINSIC 44 | DISNAN = ieee_is_nan(x) 45 | #elif USE_ISNAN 46 | DISNAN = isnan(x) 47 | #else 48 | DISNAN = DLAISNAN(x,x) 49 | 50 | contains 51 | logical function DLAISNAN( x, y ) 52 | use LA_CONSTANTS, only: wp=>dp 53 | real(wp) :: x, y 54 | DLAISNAN = ( x.ne.y ) 55 | end function DLAISNAN 56 | #endif 57 | end function DISNAN 58 | 59 | end module LA_XISNAN 60 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dger.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_dger.c 4 | * This program is a C interface to dger. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_dger)(const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, 13 | const double alpha, const double *X, const CBLAS_INT incX, 14 | const double *Y, const CBLAS_INT incY, double *A, const CBLAS_INT lda) 15 | { 16 | #ifdef F77_INT 17 | F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY; 18 | #else 19 | #define F77_M M 20 | #define F77_N N 21 | #define F77_incX incX 22 | #define F77_incY incY 23 | #define F77_lda lda 24 | #endif 25 | 26 | extern int CBLAS_CallFromC; 27 | extern int RowMajorStrg; 28 | RowMajorStrg = 0; 29 | 30 | CBLAS_CallFromC = 1; 31 | if (layout == CblasColMajor) 32 | { 33 | F77_dger( &F77_M, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A, 34 | &F77_lda); 35 | } 36 | else if (layout == CblasRowMajor) 37 | { 38 | RowMajorStrg = 1; 39 | F77_dger( &F77_N, &F77_M ,&alpha, Y, &F77_incY, X, &F77_incX, A, 40 | &F77_lda); 41 | 42 | } 43 | else API_SUFFIX(cblas_xerbla)(1, "cblas_dger", "Illegal layout setting, %d\n", layout); 44 | CBLAS_CallFromC = 0; 45 | RowMajorStrg = 0; 46 | return; 47 | } 48 | -------------------------------------------------------------------------------- /INSTALL/second_NONE.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SECOND returns nothing 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SECOND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> SECOND returns nothing instead of returning the user time for a process in seconds. 20 | *> If you are using that routine, it means that neither EXTERNAL ETIME, 21 | *> EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on 22 | *> your machine. 23 | *> \endverbatim 24 | * 25 | * Authors: 26 | * ======== 27 | * 28 | *> \author Univ. of Tennessee 29 | *> \author Univ. of California Berkeley 30 | *> \author Univ. of Colorado Denver 31 | *> \author NAG Ltd. 32 | * 33 | *> \ingroup second 34 | * 35 | * ===================================================================== 36 | REAL FUNCTION SECOND( ) 37 | IMPLICIT NONE 38 | * 39 | * -- LAPACK auxiliary routine -- 40 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 41 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 42 | * 43 | * ===================================================================== 44 | * 45 | SECOND = 0.0E+0 46 | RETURN 47 | * 48 | * End of SECOND 49 | * 50 | END 51 | -------------------------------------------------------------------------------- /INSTALL/dsecnd_NONE.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DSECND returns nothing 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DSECND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> DSECND returns nothing instead of returning the user time for a process in seconds. 20 | *> If you are using that routine, it means that neither EXTERNAL ETIME, 21 | *> EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on 22 | *> your machine. 23 | *> \endverbatim 24 | * 25 | * Authors: 26 | * ======== 27 | * 28 | *> \author Univ. of Tennessee 29 | *> \author Univ. of California Berkeley 30 | *> \author Univ. of Colorado Denver 31 | *> \author NAG Ltd. 32 | * 33 | *> \ingroup second 34 | * 35 | * ===================================================================== 36 | DOUBLE PRECISION FUNCTION DSECND( ) 37 | IMPLICIT NONE 38 | * 39 | * -- LAPACK auxiliary routine -- 40 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 41 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 42 | * 43 | * ===================================================================== 44 | * 45 | DSECND = 0.0D+0 46 | RETURN 47 | * 48 | * End of DSECND 49 | * 50 | END 51 | -------------------------------------------------------------------------------- /TESTING/runtest.cmake: -------------------------------------------------------------------------------- 1 | # Replace INTDIR with the value of $ENV{CMAKE_CONFIG_TYPE} that is set 2 | # by ctest when -C Debug|Releaes|etc is given, and INDIR is passed 3 | # in from the main cmake run and is the variable that is used 4 | # by the build system to specify the build directory 5 | if(NOT "${INTDIR}" STREQUAL ".") 6 | set(TEST_ORIG "${TEST}") 7 | string(REPLACE "${INTDIR}" "$ENV{CMAKE_CONFIG_TYPE}" TEST "${TEST}") 8 | if("$ENV{CMAKE_CONFIG_TYPE}" STREQUAL "") 9 | if(NOT EXISTS "${TEST}") 10 | message("Warning: CMAKE_CONFIG_TYPE not defined did you forget the -C option for ctest?") 11 | message(FATAL_ERROR "Could not find test executable: ${TEST_ORIG}") 12 | endif() 13 | endif() 14 | endif() 15 | set(ARGS ) 16 | if(DEFINED OUTPUT) 17 | set(ARGS OUTPUT_FILE "${OUTPUT}" ERROR_FILE "${OUTPUT}.err") 18 | endif() 19 | if(DEFINED INPUT) 20 | list(APPEND ARGS INPUT_FILE "${INPUT}") 21 | endif() 22 | message("Running: ${TEST}") 23 | message("ARGS= ${ARGS}") 24 | execute_process(COMMAND "${TEST}" 25 | ${ARGS} 26 | RESULT_VARIABLE RET) 27 | if(DEFINED OUTPUT) 28 | file(READ "${OUTPUT}" TEST_OUTPUT) 29 | file(READ "${OUTPUT}.err" TEST_ERROR) 30 | message("Test OUTPUT:\n${TEST_OUTPUT}") 31 | message("Test ERROR:\n${TEST_ERROR}") 32 | endif() 33 | 34 | # if the test does not return 0, then fail it 35 | if(NOT ${RET} EQUAL 0) 36 | message(FATAL_ERROR "Test ${TEST} returned ${RET}") 37 | endif() 38 | message( "Test ${TEST} returned ${RET}") 39 | -------------------------------------------------------------------------------- /CBLAS/testing/auxiliary.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by T. H. Do, 1/23/98, SGI/CRAY Research. 3 | */ 4 | #include 5 | #include "cblas.h" 6 | #include "cblas_test.h" 7 | 8 | void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans) { 9 | if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) ) 10 | *trans = CblasNoTrans; 11 | else if( (strncmp( type,"t",1 )==0)||(strncmp( type,"T",1 )==0) ) 12 | *trans = CblasTrans; 13 | else if( (strncmp( type,"c",1 )==0)||(strncmp( type,"C",1 )==0) ) 14 | *trans = CblasConjTrans; 15 | else *trans = UNDEFINED; 16 | } 17 | 18 | void get_uplo_type(char *type, CBLAS_UPLO *uplo) { 19 | if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) ) 20 | *uplo = CblasUpper; 21 | else if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) ) 22 | *uplo = CblasLower; 23 | else *uplo = UNDEFINED; 24 | } 25 | void get_diag_type(char *type, CBLAS_DIAG *diag) { 26 | if( (strncmp( type,"u",1 )==0)||(strncmp( type,"U",1 )==0) ) 27 | *diag = CblasUnit; 28 | else if( (strncmp( type,"n",1 )==0)||(strncmp( type,"N",1 )==0) ) 29 | *diag = CblasNonUnit; 30 | else *diag = UNDEFINED; 31 | } 32 | void get_side_type(char *type, CBLAS_SIDE *side) { 33 | if( (strncmp( type,"l",1 )==0)||(strncmp( type,"L",1 )==0) ) 34 | *side = CblasLeft; 35 | else if( (strncmp( type,"r",1 )==0)||(strncmp( type,"R",1 )==0) ) 36 | *side = CblasRight; 37 | else *side = UNDEFINED; 38 | } 39 | -------------------------------------------------------------------------------- /INSTALL/second_INT_CPU_TIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SECOND Using INTERNAL function CPU_TIME. 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SECOND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> SECOND returns the user time for a process in seconds. 20 | *> This version gets the time from the INTERNAL function CPU_TIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | REAL FUNCTION SECOND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * ===================================================================== 42 | * 43 | * .. Local Scalars .. 44 | * 45 | REAL T 46 | * 47 | * .. Intrinsic Functions .. 48 | * 49 | INTRINSIC CPU_TIME 50 | * 51 | * .. Executable Statements .. * 52 | * 53 | CALL CPU_TIME( T ) 54 | SECOND = T 55 | RETURN 56 | * 57 | * End of SECOND 58 | * 59 | END 60 | -------------------------------------------------------------------------------- /INSTALL/dsecnd_INT_CPU_TIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DSECND Using INTERNAL function CPU_TIME. 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DSECND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> DSECND returns the user time for a process in seconds. 20 | *> This version gets the time from the INTERNAL function CPU_TIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | DOUBLE PRECISION FUNCTION DSECND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * ===================================================================== 42 | * 43 | * .. Local Scalars .. 44 | * 45 | REAL T 46 | * 47 | * .. Intrinsic Functions .. 48 | * 49 | INTRINSIC CPU_TIME 50 | * 51 | * .. Executable Statements .. * 52 | * 53 | CALL CPU_TIME( T ) 54 | DSECND = T 55 | RETURN 56 | * 57 | * End of DSECND 58 | * 59 | END 60 | -------------------------------------------------------------------------------- /INSTALL/second_EXT_ETIME_.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SECOND Using ETIME_ 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SECOND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> SECOND returns the user time for a process in seconds. 20 | *> This version gets the time from the system function ETIME_. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | REAL FUNCTION SECOND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. 39 | *===================================================================== 40 | * 41 | * .. Local Scalars .. 42 | REAL T1 43 | * .. 44 | * .. Local Arrays .. 45 | REAL TARRAY( 2 ) 46 | * .. 47 | * .. External Functions .. 48 | REAL ETIME_ 49 | EXTERNAL ETIME_ 50 | * .. 51 | * .. Executable Statements .. 52 | * 53 | T1 = ETIME_( TARRAY ) 54 | SECOND = TARRAY( 1 ) 55 | RETURN 56 | * 57 | * End of SECOND 58 | * 59 | END 60 | 61 | -------------------------------------------------------------------------------- /INSTALL/dsecnd_EXT_ETIME_.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DSECND Using ETIME_ 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DSECND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> DSECND returns the user time for a process in seconds. 20 | *> This version gets the time from the system function ETIME_. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | DOUBLE PRECISION FUNCTION DSECND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. 39 | * ===================================================================== 40 | * 41 | * .. Local Scalars .. 42 | REAL T1 43 | * .. 44 | * .. Local Arrays .. 45 | REAL TARRAY( 2 ) 46 | * .. 47 | * .. External Functions .. 48 | REAL ETIME_ 49 | EXTERNAL ETIME_ 50 | * .. 51 | * .. Executable Statements .. 52 | * 53 | T1 = ETIME_( TARRAY ) 54 | DSECND = TARRAY( 1 ) 55 | RETURN 56 | * 57 | * End of DSECND 58 | * 59 | END 60 | -------------------------------------------------------------------------------- /BLAS/SRC/scabs1.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SCABS1 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SCABS1(Z) 12 | * 13 | * .. Scalar Arguments .. 14 | * COMPLEX Z 15 | * .. 16 | * 17 | * 18 | *> \par Purpose: 19 | * ============= 20 | *> 21 | *> \verbatim 22 | *> 23 | *> SCABS1 computes |Re(.)| + |Im(.)| of a complex number 24 | *> \endverbatim 25 | * 26 | * Arguments: 27 | * ========== 28 | * 29 | *> \param[in] Z 30 | *> \verbatim 31 | *> Z is COMPLEX 32 | *> \endverbatim 33 | * 34 | * Authors: 35 | * ======== 36 | * 37 | *> \author Univ. of Tennessee 38 | *> \author Univ. of California Berkeley 39 | *> \author Univ. of Colorado Denver 40 | *> \author NAG Ltd. 41 | * 42 | *> \ingroup abs1 43 | * 44 | * ===================================================================== 45 | REAL FUNCTION SCABS1(Z) 46 | IMPLICIT NONE 47 | * 48 | * -- Reference BLAS level1 routine -- 49 | * -- Reference BLAS is a software package provided by Univ. of Tennessee, -- 50 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 51 | * 52 | * .. Scalar Arguments .. 53 | COMPLEX Z 54 | * .. 55 | * 56 | * ===================================================================== 57 | * 58 | * .. Intrinsic Functions .. 59 | INTRINSIC ABS,AIMAG,REAL 60 | * .. 61 | SCABS1 = ABS(REAL(Z)) + ABS(AIMAG(Z)) 62 | RETURN 63 | * 64 | * End of SCABS1 65 | * 66 | END 67 | -------------------------------------------------------------------------------- /LAPACKE/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Intel Corp. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 | THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /BLAS/TESTING/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | macro(add_blas_test name src) 2 | get_filename_component(baseNAME ${src} NAME_WE) 3 | set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in") 4 | add_executable(${name} ${src}) 5 | target_link_libraries(${name} ${BLASLIB}) 6 | if(EXISTS "${TEST_INPUT}") 7 | add_test(NAME BLAS-${name} COMMAND "${CMAKE_COMMAND}" 8 | -DTEST=$ 9 | -DINPUT=${TEST_INPUT} 10 | -DINTDIR=${CMAKE_CFG_INTDIR} 11 | -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") 12 | else() 13 | add_test(NAME BLAS-${name} COMMAND "${CMAKE_COMMAND}" 14 | -DTEST=$ 15 | -DINTDIR=${CMAKE_CFG_INTDIR} 16 | -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") 17 | endif() 18 | 19 | # Disable constant propagation for NAG compiler to avoid issues with 20 | # special values (Inf, NaN) returned by SXVALS and DXVALS. 21 | if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") 22 | target_compile_options(${name} PRIVATE "-Onopropagate") 23 | endif() 24 | endmacro() 25 | 26 | if(BUILD_SINGLE) 27 | add_blas_test(xblat1s sblat1.f) 28 | add_blas_test(xblat2s sblat2.f) 29 | add_blas_test(xblat3s sblat3.f) 30 | endif() 31 | 32 | if(BUILD_DOUBLE) 33 | add_blas_test(xblat1d dblat1.f) 34 | add_blas_test(xblat2d dblat2.f) 35 | add_blas_test(xblat3d dblat3.f) 36 | endif() 37 | 38 | if(BUILD_COMPLEX) 39 | add_blas_test(xblat1c cblat1.f) 40 | add_blas_test(xblat2c cblat2.f) 41 | add_blas_test(xblat3c cblat3.f) 42 | endif() 43 | 44 | if(BUILD_COMPLEX16) 45 | add_blas_test(xblat1z zblat1.f) 46 | add_blas_test(xblat2z zblat2.f) 47 | add_blas_test(xblat3z zblat3.f) 48 | endif() 49 | -------------------------------------------------------------------------------- /INSTALL/second_EXT_ETIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SECOND Using ETIME 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SECOND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> SECOND returns the user time for a process in seconds. 20 | *> This version gets the time from the EXTERNAL system function ETIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | REAL FUNCTION SECOND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * ===================================================================== 42 | * 43 | * .. Local Scalars .. 44 | REAL T1 45 | * .. 46 | * .. Local Arrays .. 47 | REAL TARRAY( 2 ) 48 | * .. 49 | * .. External Functions .. 50 | REAL ETIME 51 | EXTERNAL ETIME 52 | * .. 53 | * .. Executable Statements .. 54 | * 55 | T1 = ETIME( TARRAY ) 56 | SECOND = TARRAY( 1 ) 57 | RETURN 58 | * 59 | * End of SECOND 60 | * 61 | END 62 | -------------------------------------------------------------------------------- /BLAS/SRC/dcabs1.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DCABS1 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DCABS1(Z) 12 | * 13 | * .. Scalar Arguments .. 14 | * COMPLEX*16 Z 15 | * .. 16 | * .. 17 | * 18 | * 19 | *> \par Purpose: 20 | * ============= 21 | *> 22 | *> \verbatim 23 | *> 24 | *> DCABS1 computes |Re(.)| + |Im(.)| of a double complex number 25 | *> \endverbatim 26 | * 27 | * Arguments: 28 | * ========== 29 | * 30 | *> \param[in] Z 31 | *> \verbatim 32 | *> Z is COMPLEX*16 33 | *> \endverbatim 34 | * 35 | * Authors: 36 | * ======== 37 | * 38 | *> \author Univ. of Tennessee 39 | *> \author Univ. of California Berkeley 40 | *> \author Univ. of Colorado Denver 41 | *> \author NAG Ltd. 42 | * 43 | *> \ingroup abs1 44 | * 45 | * ===================================================================== 46 | DOUBLE PRECISION FUNCTION DCABS1(Z) 47 | IMPLICIT NONE 48 | * 49 | * -- Reference BLAS level1 routine -- 50 | * -- Reference BLAS is a software package provided by Univ. of Tennessee, -- 51 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 52 | * 53 | * .. Scalar Arguments .. 54 | COMPLEX*16 Z 55 | * .. 56 | * .. 57 | * ===================================================================== 58 | * 59 | * .. Intrinsic Functions .. 60 | INTRINSIC ABS,DBLE,DIMAG 61 | * 62 | DCABS1 = ABS(DBLE(Z)) + ABS(DIMAG(Z)) 63 | RETURN 64 | * 65 | * End of DCABS1 66 | * 67 | END 68 | -------------------------------------------------------------------------------- /CBLAS/testing/din2: -------------------------------------------------------------------------------- 1 | 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 0 TO TEST COLUMN-MAJOR, 1 TO TEST ROW-MAJOR, 2 TO TEST BOTH 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 4 NUMBER OF VALUES OF K 11 | 0 1 2 4 VALUES OF K 12 | 4 NUMBER OF VALUES OF INCX AND INCY 13 | 1 2 -1 -2 VALUES OF INCX AND INCY 14 | 3 NUMBER OF VALUES OF ALPHA 15 | 0.0 1.0 0.7 VALUES OF ALPHA 16 | 3 NUMBER OF VALUES OF BETA 17 | 0.0 1.0 0.9 VALUES OF BETA 18 | cblas_dgemv T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_dgbmv T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_dsymv T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_dsbmv T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_dspmv T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_dtrmv T PUT F FOR NO TEST. SAME COLUMNS. 24 | cblas_dtbmv T PUT F FOR NO TEST. SAME COLUMNS. 25 | cblas_dtpmv T PUT F FOR NO TEST. SAME COLUMNS. 26 | cblas_dtrsv T PUT F FOR NO TEST. SAME COLUMNS. 27 | cblas_dtbsv T PUT F FOR NO TEST. SAME COLUMNS. 28 | cblas_dtpsv T PUT F FOR NO TEST. SAME COLUMNS. 29 | cblas_dger T PUT F FOR NO TEST. SAME COLUMNS. 30 | cblas_dsyr T PUT F FOR NO TEST. SAME COLUMNS. 31 | cblas_dspr T PUT F FOR NO TEST. SAME COLUMNS. 32 | cblas_dsyr2 T PUT F FOR NO TEST. SAME COLUMNS. 33 | cblas_dspr2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | -------------------------------------------------------------------------------- /INSTALL/second_INT_ETIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SECOND Using the INTERNAL function ETIME. 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * REAL FUNCTION SECOND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> SECOND returns the user time for a process in seconds. 20 | *> This version gets the time from the INTERNAL function ETIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | REAL FUNCTION SECOND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * ===================================================================== 42 | * 43 | * .. Local Scalars .. 44 | REAL T1 45 | * .. 46 | * .. Local Arrays .. 47 | REAL TARRAY( 2 ) 48 | * .. 49 | * .. Intrinsic Functions .. 50 | REAL ETIME 51 | INTRINSIC ETIME 52 | * .. 53 | * .. Executable Statements .. 54 | * 55 | T1 = ETIME( TARRAY ) 56 | SECOND = TARRAY( 1 ) 57 | RETURN 58 | * 59 | * End of SECOND 60 | * 61 | END 62 | -------------------------------------------------------------------------------- /CBLAS/testing/sin2: -------------------------------------------------------------------------------- 1 | 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 LOGICAL FLAG, T TO TEST ROW-MAJOR (IF FALSE COLUMN-MAJOR IS TESTED) 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 4 NUMBER OF VALUES OF K 11 | 0 1 2 4 VALUES OF K 12 | 4 NUMBER OF VALUES OF INCX AND INCY 13 | 1 2 -1 -2 VALUES OF INCX AND INCY 14 | 3 NUMBER OF VALUES OF ALPHA 15 | 0.0 1.0 0.7 VALUES OF ALPHA 16 | 3 NUMBER OF VALUES OF BETA 17 | 0.0 1.0 0.9 VALUES OF BETA 18 | cblas_sgemv T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_sgbmv T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_ssymv T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_ssbmv T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_sspmv T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_strmv T PUT F FOR NO TEST. SAME COLUMNS. 24 | cblas_stbmv T PUT F FOR NO TEST. SAME COLUMNS. 25 | cblas_stpmv T PUT F FOR NO TEST. SAME COLUMNS. 26 | cblas_strsv T PUT F FOR NO TEST. SAME COLUMNS. 27 | cblas_stbsv T PUT F FOR NO TEST. SAME COLUMNS. 28 | cblas_stpsv T PUT F FOR NO TEST. SAME COLUMNS. 29 | cblas_sger T PUT F FOR NO TEST. SAME COLUMNS. 30 | cblas_ssyr T PUT F FOR NO TEST. SAME COLUMNS. 31 | cblas_sspr T PUT F FOR NO TEST. SAME COLUMNS. 32 | cblas_ssyr2 T PUT F FOR NO TEST. SAME COLUMNS. 33 | cblas_sspr2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | -------------------------------------------------------------------------------- /INSTALL/dsecnd_EXT_ETIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DSECND Using ETIME 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DSECND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> DSECND returns the user time for a process in seconds. 20 | *> This version gets the time from the EXTERNAL system function ETIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | DOUBLE PRECISION FUNCTION DSECND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * 42 | * ===================================================================== 43 | * 44 | * .. Local Scalars .. 45 | REAL T1 46 | * .. 47 | * .. Local Arrays .. 48 | REAL TARRAY( 2 ) 49 | * .. 50 | * .. External Functions .. 51 | REAL ETIME 52 | EXTERNAL ETIME 53 | * .. 54 | * .. Executable Statements .. 55 | * 56 | T1 = ETIME( TARRAY ) 57 | DSECND = TARRAY( 1 ) 58 | RETURN 59 | * 60 | * End of DSECND 61 | * 62 | END 63 | -------------------------------------------------------------------------------- /BLAS/TESTING/cblat2.in: -------------------------------------------------------------------------------- 1 | 'cblat2.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 4 NUMBER OF VALUES OF K 12 | 0 1 2 4 VALUES OF K 13 | 4 NUMBER OF VALUES OF INCX AND INCY 14 | 1 2 -1 -2 VALUES OF INCX AND INCY 15 | 3 NUMBER OF VALUES OF ALPHA 16 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 17 | 3 NUMBER OF VALUES OF BETA 18 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 19 | CGEMV T PUT F FOR NO TEST. SAME COLUMNS. 20 | CGBMV T PUT F FOR NO TEST. SAME COLUMNS. 21 | CHEMV T PUT F FOR NO TEST. SAME COLUMNS. 22 | CHBMV T PUT F FOR NO TEST. SAME COLUMNS. 23 | CHPMV T PUT F FOR NO TEST. SAME COLUMNS. 24 | CTRMV T PUT F FOR NO TEST. SAME COLUMNS. 25 | CTBMV T PUT F FOR NO TEST. SAME COLUMNS. 26 | CTPMV T PUT F FOR NO TEST. SAME COLUMNS. 27 | CTRSV T PUT F FOR NO TEST. SAME COLUMNS. 28 | CTBSV T PUT F FOR NO TEST. SAME COLUMNS. 29 | CTPSV T PUT F FOR NO TEST. SAME COLUMNS. 30 | CGERC T PUT F FOR NO TEST. SAME COLUMNS. 31 | CGERU T PUT F FOR NO TEST. SAME COLUMNS. 32 | CHER T PUT F FOR NO TEST. SAME COLUMNS. 33 | CHPR T PUT F FOR NO TEST. SAME COLUMNS. 34 | CHER2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | CHPR2 T PUT F FOR NO TEST. SAME COLUMNS. 36 | -------------------------------------------------------------------------------- /BLAS/TESTING/zblat2.in: -------------------------------------------------------------------------------- 1 | 'zblat2.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 4 NUMBER OF VALUES OF K 12 | 0 1 2 4 VALUES OF K 13 | 4 NUMBER OF VALUES OF INCX AND INCY 14 | 1 2 -1 -2 VALUES OF INCX AND INCY 15 | 3 NUMBER OF VALUES OF ALPHA 16 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 17 | 3 NUMBER OF VALUES OF BETA 18 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 19 | ZGEMV T PUT F FOR NO TEST. SAME COLUMNS. 20 | ZGBMV T PUT F FOR NO TEST. SAME COLUMNS. 21 | ZHEMV T PUT F FOR NO TEST. SAME COLUMNS. 22 | ZHBMV T PUT F FOR NO TEST. SAME COLUMNS. 23 | ZHPMV T PUT F FOR NO TEST. SAME COLUMNS. 24 | ZTRMV T PUT F FOR NO TEST. SAME COLUMNS. 25 | ZTBMV T PUT F FOR NO TEST. SAME COLUMNS. 26 | ZTPMV T PUT F FOR NO TEST. SAME COLUMNS. 27 | ZTRSV T PUT F FOR NO TEST. SAME COLUMNS. 28 | ZTBSV T PUT F FOR NO TEST. SAME COLUMNS. 29 | ZTPSV T PUT F FOR NO TEST. SAME COLUMNS. 30 | ZGERC T PUT F FOR NO TEST. SAME COLUMNS. 31 | ZGERU T PUT F FOR NO TEST. SAME COLUMNS. 32 | ZHER T PUT F FOR NO TEST. SAME COLUMNS. 33 | ZHPR T PUT F FOR NO TEST. SAME COLUMNS. 34 | ZHER2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS. 36 | -------------------------------------------------------------------------------- /INSTALL/dsecnd_INT_ETIME.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DSECND Using the INTERNAL function ETIME. 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * DOUBLE PRECISION FUNCTION DSECND( ) 12 | * 13 | * 14 | *> \par Purpose: 15 | * ============= 16 | *> 17 | *> \verbatim 18 | *> 19 | *> DSECND returns the user time for a process in seconds. 20 | *> This version gets the time from the INTERNAL function ETIME. 21 | *> \endverbatim 22 | * 23 | * Authors: 24 | * ======== 25 | * 26 | *> \author Univ. of Tennessee 27 | *> \author Univ. of California Berkeley 28 | *> \author Univ. of Colorado Denver 29 | *> \author NAG Ltd. 30 | * 31 | *> \ingroup second 32 | * 33 | * ===================================================================== 34 | DOUBLE PRECISION FUNCTION DSECND( ) 35 | IMPLICIT NONE 36 | * 37 | * -- LAPACK auxiliary routine -- 38 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 39 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 40 | * 41 | * ===================================================================== 42 | * 43 | * .. Local Scalars .. 44 | REAL T1 45 | * .. 46 | * .. Local Arrays .. 47 | REAL TARRAY( 2 ) 48 | * .. 49 | * .. Intrinsic Functions .. 50 | REAL ETIME 51 | INTRINSIC ETIME 52 | * .. 53 | * .. Executable Statements .. 54 | * 55 | T1 = ETIME( TARRAY ) 56 | DSECND = TARRAY( 1 ) 57 | RETURN 58 | * 59 | * End of DSECND 60 | * 61 | END 62 | -------------------------------------------------------------------------------- /BLAS/TESTING/dblat2.in: -------------------------------------------------------------------------------- 1 | 'dblat2.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 4 NUMBER OF VALUES OF K 12 | 0 1 2 4 VALUES OF K 13 | 4 NUMBER OF VALUES OF INCX AND INCY 14 | 1 2 -1 -2 VALUES OF INCX AND INCY 15 | 3 NUMBER OF VALUES OF ALPHA 16 | 0.0 1.0 0.7 VALUES OF ALPHA 17 | 3 NUMBER OF VALUES OF BETA 18 | 0.0 1.0 0.9 VALUES OF BETA 19 | DGEMV T PUT F FOR NO TEST. SAME COLUMNS. 20 | DGBMV T PUT F FOR NO TEST. SAME COLUMNS. 21 | DSYMV T PUT F FOR NO TEST. SAME COLUMNS. 22 | DSBMV T PUT F FOR NO TEST. SAME COLUMNS. 23 | DSPMV T PUT F FOR NO TEST. SAME COLUMNS. 24 | DTRMV T PUT F FOR NO TEST. SAME COLUMNS. 25 | DTBMV T PUT F FOR NO TEST. SAME COLUMNS. 26 | DTPMV T PUT F FOR NO TEST. SAME COLUMNS. 27 | DTRSV T PUT F FOR NO TEST. SAME COLUMNS. 28 | DTBSV T PUT F FOR NO TEST. SAME COLUMNS. 29 | DTPSV T PUT F FOR NO TEST. SAME COLUMNS. 30 | DGER T PUT F FOR NO TEST. SAME COLUMNS. 31 | DSYR T PUT F FOR NO TEST. SAME COLUMNS. 32 | DSPR T PUT F FOR NO TEST. SAME COLUMNS. 33 | DSYR2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | DSPR2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | DSKEWSYMV T PUT F FOR NO TEST. SAME COLUMNS. 36 | DSKEWSYR2 T PUT F FOR NO TEST. SAME COLUMNS. 37 | -------------------------------------------------------------------------------- /BLAS/TESTING/sblat2.in: -------------------------------------------------------------------------------- 1 | 'sblat2.out' NAME OF SUMMARY OUTPUT FILE 2 | 6 UNIT NUMBER OF SUMMARY FILE 3 | 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 4 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 5 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 6 | F LOGICAL FLAG, T TO STOP ON FAILURES. 7 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 8 | 16.0 THRESHOLD VALUE OF TEST RATIO 9 | 6 NUMBER OF VALUES OF N 10 | 0 1 2 3 5 9 VALUES OF N 11 | 4 NUMBER OF VALUES OF K 12 | 0 1 2 4 VALUES OF K 13 | 4 NUMBER OF VALUES OF INCX AND INCY 14 | 1 2 -1 -2 VALUES OF INCX AND INCY 15 | 3 NUMBER OF VALUES OF ALPHA 16 | 0.0 1.0 0.7 VALUES OF ALPHA 17 | 3 NUMBER OF VALUES OF BETA 18 | 0.0 1.0 0.9 VALUES OF BETA 19 | SGEMV T PUT F FOR NO TEST. SAME COLUMNS. 20 | SGBMV T PUT F FOR NO TEST. SAME COLUMNS. 21 | SSYMV T PUT F FOR NO TEST. SAME COLUMNS. 22 | SSBMV T PUT F FOR NO TEST. SAME COLUMNS. 23 | SSPMV T PUT F FOR NO TEST. SAME COLUMNS. 24 | STRMV T PUT F FOR NO TEST. SAME COLUMNS. 25 | STBMV T PUT F FOR NO TEST. SAME COLUMNS. 26 | STPMV T PUT F FOR NO TEST. SAME COLUMNS. 27 | STRSV T PUT F FOR NO TEST. SAME COLUMNS. 28 | STBSV T PUT F FOR NO TEST. SAME COLUMNS. 29 | STPSV T PUT F FOR NO TEST. SAME COLUMNS. 30 | SGER T PUT F FOR NO TEST. SAME COLUMNS. 31 | SSYR T PUT F FOR NO TEST. SAME COLUMNS. 32 | SSPR T PUT F FOR NO TEST. SAME COLUMNS. 33 | SSYR2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | SSPR2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | SSKEWSYMV T PUT F FOR NO TEST. SAME COLUMNS. 36 | SSKEWSYR2 T PUT F FOR NO TEST. SAME COLUMNS. 37 | -------------------------------------------------------------------------------- /CBLAS/examples/cblas_example1.c: -------------------------------------------------------------------------------- 1 | /* cblas_example.c */ 2 | 3 | #include 4 | #include 5 | #include "cblas.h" 6 | 7 | int main ( ) 8 | { 9 | CBLAS_LAYOUT Layout; 10 | CBLAS_TRANSPOSE transa; 11 | 12 | double *a, *x, *y; 13 | double alpha, beta; 14 | CBLAS_INT m, n, lda, incx, incy, i; 15 | 16 | Layout = CblasColMajor; 17 | transa = CblasNoTrans; 18 | 19 | m = 4; /* Size of Column ( the number of rows ) */ 20 | n = 4; /* Size of Row ( the number of columns ) */ 21 | lda = 4; /* Leading dimension of 5 * 4 matrix is 5 */ 22 | incx = 1; 23 | incy = 1; 24 | alpha = 1; 25 | beta = 0; 26 | 27 | a = (double *)malloc(sizeof(double)*m*n); 28 | x = (double *)malloc(sizeof(double)*n); 29 | y = (double *)malloc(sizeof(double)*n); 30 | /* The elements of the first column */ 31 | a[0] = 1; 32 | a[1] = 2; 33 | a[2] = 3; 34 | a[3] = 4; 35 | /* The elements of the second column */ 36 | a[m] = 1; 37 | a[m+1] = 1; 38 | a[m+2] = 1; 39 | a[m+3] = 1; 40 | /* The elements of the third column */ 41 | a[m*2] = 3; 42 | a[m*2+1] = 4; 43 | a[m*2+2] = 5; 44 | a[m*2+3] = 6; 45 | /* The elements of the fourth column */ 46 | a[m*3] = 5; 47 | a[m*3+1] = 6; 48 | a[m*3+2] = 7; 49 | a[m*3+3] = 8; 50 | /* The elements of x and y */ 51 | x[0] = 1; 52 | x[1] = 2; 53 | x[2] = 1; 54 | x[3] = 1; 55 | y[0] = 0; 56 | y[1] = 0; 57 | y[2] = 0; 58 | y[3] = 0; 59 | 60 | cblas_dgemv( Layout, transa, m, n, alpha, a, lda, x, incx, beta, 61 | y, incy ); 62 | /* Print y */ 63 | for( i = 0; i < n; i++ ) 64 | printf(" y%" CBLAS_IFMT " = %f\n", i, y[i]); 65 | free(a); 66 | free(x); 67 | free(y); 68 | return 0; 69 | } 70 | -------------------------------------------------------------------------------- /CBLAS/examples/cblas_example1_64.c: -------------------------------------------------------------------------------- 1 | /* cblas_example.c */ 2 | 3 | #include 4 | #include 5 | #include "cblas_64.h" 6 | 7 | int main ( ) 8 | { 9 | CBLAS_LAYOUT Layout; 10 | CBLAS_TRANSPOSE transa; 11 | 12 | double *a, *x, *y; 13 | double alpha, beta; 14 | int64_t m, n, lda, incx, incy, i; 15 | 16 | Layout = CblasColMajor; 17 | transa = CblasNoTrans; 18 | 19 | m = 4; /* Size of Column ( the number of rows ) */ 20 | n = 4; /* Size of Row ( the number of columns ) */ 21 | lda = 4; /* Leading dimension of 5 * 4 matrix is 5 */ 22 | incx = 1; 23 | incy = 1; 24 | alpha = 1; 25 | beta = 0; 26 | 27 | a = (double *)malloc(sizeof(double)*m*n); 28 | x = (double *)malloc(sizeof(double)*n); 29 | y = (double *)malloc(sizeof(double)*n); 30 | /* The elements of the first column */ 31 | a[0] = 1; 32 | a[1] = 2; 33 | a[2] = 3; 34 | a[3] = 4; 35 | /* The elements of the second column */ 36 | a[m] = 1; 37 | a[m+1] = 1; 38 | a[m+2] = 1; 39 | a[m+3] = 1; 40 | /* The elements of the third column */ 41 | a[m*2] = 3; 42 | a[m*2+1] = 4; 43 | a[m*2+2] = 5; 44 | a[m*2+3] = 6; 45 | /* The elements of the fourth column */ 46 | a[m*3] = 5; 47 | a[m*3+1] = 6; 48 | a[m*3+2] = 7; 49 | a[m*3+3] = 8; 50 | /* The elements of x and y */ 51 | x[0] = 1; 52 | x[1] = 2; 53 | x[2] = 1; 54 | x[3] = 1; 55 | y[0] = 0; 56 | y[1] = 0; 57 | y[2] = 0; 58 | y[3] = 0; 59 | 60 | cblas_dgemv_64( Layout, transa, m, n, alpha, a, lda, x, incx, beta, 61 | y, incy ); 62 | /* Print y */ 63 | for( i = 0; i < n; i++ ) 64 | printf(" y%d = %f\n", (int) i, y[i]); 65 | free(a); 66 | free(x); 67 | free(y); 68 | return 0; 69 | } 70 | -------------------------------------------------------------------------------- /CBLAS/testing/cin2: -------------------------------------------------------------------------------- 1 | 'CBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 LOGICAL FLAG, T TO TEST ROW-MAJOR (IF FALSE COLUMN-MAJOR IS TESTED) 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 4 NUMBER OF VALUES OF K 11 | 0 1 2 4 VALUES OF K 12 | 4 NUMBER OF VALUES OF INCX AND INCY 13 | 1 2 -1 -2 VALUES OF INCX AND INCY 14 | 3 NUMBER OF VALUES OF ALPHA 15 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 16 | 3 NUMBER OF VALUES OF BETA 17 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 18 | cblas_cgemv T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_cgbmv T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_chemv T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_chbmv T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_chpmv T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_ctrmv T PUT F FOR NO TEST. SAME COLUMNS. 24 | cblas_ctbmv T PUT F FOR NO TEST. SAME COLUMNS. 25 | cblas_ctpmv T PUT F FOR NO TEST. SAME COLUMNS. 26 | cblas_ctrsv T PUT F FOR NO TEST. SAME COLUMNS. 27 | cblas_ctbsv T PUT F FOR NO TEST. SAME COLUMNS. 28 | cblas_ctpsv T PUT F FOR NO TEST. SAME COLUMNS. 29 | cblas_cgerc T PUT F FOR NO TEST. SAME COLUMNS. 30 | cblas_cgeru T PUT F FOR NO TEST. SAME COLUMNS. 31 | cblas_cher T PUT F FOR NO TEST. SAME COLUMNS. 32 | cblas_chpr T PUT F FOR NO TEST. SAME COLUMNS. 33 | cblas_cher2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | cblas_chpr2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | -------------------------------------------------------------------------------- /CBLAS/testing/zin2: -------------------------------------------------------------------------------- 1 | 'ZBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE 2 | -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) 3 | F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. 4 | F LOGICAL FLAG, T TO STOP ON FAILURES. 5 | T LOGICAL FLAG, T TO TEST ERROR EXITS. 6 | 2 LOGICAL FLAG, T TO TEST ROW-MAJOR (IF FALSE COLUMN-MAJOR IS TESTED) 7 | 16.0 THRESHOLD VALUE OF TEST RATIO 8 | 6 NUMBER OF VALUES OF N 9 | 0 1 2 3 5 9 VALUES OF N 10 | 4 NUMBER OF VALUES OF K 11 | 0 1 2 4 VALUES OF K 12 | 4 NUMBER OF VALUES OF INCX AND INCY 13 | 1 2 -1 -2 VALUES OF INCX AND INCY 14 | 3 NUMBER OF VALUES OF ALPHA 15 | (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA 16 | 3 NUMBER OF VALUES OF BETA 17 | (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA 18 | cblas_zgemv T PUT F FOR NO TEST. SAME COLUMNS. 19 | cblas_zgbmv T PUT F FOR NO TEST. SAME COLUMNS. 20 | cblas_zhemv T PUT F FOR NO TEST. SAME COLUMNS. 21 | cblas_zhbmv T PUT F FOR NO TEST. SAME COLUMNS. 22 | cblas_zhpmv T PUT F FOR NO TEST. SAME COLUMNS. 23 | cblas_ztrmv T PUT F FOR NO TEST. SAME COLUMNS. 24 | cblas_ztbmv T PUT F FOR NO TEST. SAME COLUMNS. 25 | cblas_ztpmv T PUT F FOR NO TEST. SAME COLUMNS. 26 | cblas_ztrsv T PUT F FOR NO TEST. SAME COLUMNS. 27 | cblas_ztbsv T PUT F FOR NO TEST. SAME COLUMNS. 28 | cblas_ztpsv T PUT F FOR NO TEST. SAME COLUMNS. 29 | cblas_zgerc T PUT F FOR NO TEST. SAME COLUMNS. 30 | cblas_zgeru T PUT F FOR NO TEST. SAME COLUMNS. 31 | cblas_zher T PUT F FOR NO TEST. SAME COLUMNS. 32 | cblas_zhpr T PUT F FOR NO TEST. SAME COLUMNS. 33 | cblas_zher2 T PUT F FOR NO TEST. SAME COLUMNS. 34 | cblas_zhpr2 T PUT F FOR NO TEST. SAME COLUMNS. 35 | -------------------------------------------------------------------------------- /BLAS/TESTING/Makefile: -------------------------------------------------------------------------------- 1 | TOPSRCDIR = ../.. 2 | include $(TOPSRCDIR)/make.inc 3 | 4 | .PHONY: all single double complex complex16 5 | all: single double complex complex16 6 | single: xblat1s xblat2s xblat3s 7 | double: xblat1d xblat2d xblat3d 8 | complex: xblat1c xblat2c xblat3c 9 | complex16: xblat1z xblat2z xblat3z 10 | 11 | xblat1s: sblat1.o $(BLASLIB) 12 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 13 | xblat1d: dblat1.o $(BLASLIB) 14 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 15 | xblat1c: cblat1.o $(BLASLIB) 16 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 17 | xblat1z: zblat1.o $(BLASLIB) 18 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 19 | 20 | xblat2s: sblat2.o $(BLASLIB) 21 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 22 | xblat2d: dblat2.o $(BLASLIB) 23 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 24 | xblat2c: cblat2.o $(BLASLIB) 25 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 26 | xblat2z: zblat2.o $(BLASLIB) 27 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 28 | 29 | xblat3s: sblat3.o $(BLASLIB) 30 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 31 | xblat3d: dblat3.o $(BLASLIB) 32 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 33 | xblat3c: cblat3.o $(BLASLIB) 34 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 35 | xblat3z: zblat3.o $(BLASLIB) 36 | $(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^ 37 | 38 | .PHONY: run 39 | run: all 40 | ./xblat1s > sblat1.out 41 | ./xblat1d > dblat1.out 42 | ./xblat1c > cblat1.out 43 | ./xblat1z > zblat1.out 44 | ./xblat2s < sblat2.in 45 | ./xblat2d < dblat2.in 46 | ./xblat2c < cblat2.in 47 | ./xblat2z < zblat2.in 48 | ./xblat3s < sblat3.in 49 | ./xblat3d < dblat3.in 50 | ./xblat3c < cblat3.in 51 | ./xblat3z < zblat3.in 52 | 53 | .PHONY: clean cleanobj cleanexe cleantest 54 | clean: cleanobj cleanexe cleantest 55 | cleanobj: 56 | rm -f *.o 57 | cleanexe: 58 | rm -f xblat* 59 | cleantest: 60 | rm -f *.out core 61 | -------------------------------------------------------------------------------- /TESTING/EIG/chkxer.f: -------------------------------------------------------------------------------- 1 | *> \brief \b CHKXER 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK ) 12 | * 13 | * .. Scalar Arguments .. 14 | * LOGICAL LERR, OK 15 | * CHARACTER*(*) SRNAMT 16 | * INTEGER INFOT, NOUT 17 | * 18 | * 19 | *> \par Purpose: 20 | * ============= 21 | *> 22 | *> \verbatim 23 | *> \endverbatim 24 | * 25 | * Arguments: 26 | * ========== 27 | * 28 | * 29 | * Authors: 30 | * ======== 31 | * 32 | *> \author Univ. of Tennessee 33 | *> \author Univ. of California Berkeley 34 | *> \author Univ. of Colorado Denver 35 | *> \author NAG Ltd. 36 | * 37 | *> \ingroup complex_eig 38 | * 39 | * ===================================================================== 40 | SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK ) 41 | IMPLICIT NONE 42 | * 43 | * -- LAPACK test routine -- 44 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 45 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 46 | * 47 | * .. Scalar Arguments .. 48 | LOGICAL LERR, OK 49 | CHARACTER*(*) SRNAMT 50 | INTEGER INFOT, NOUT 51 | * .. 52 | * .. Intrinsic Functions .. 53 | INTRINSIC LEN_TRIM 54 | * .. 55 | * .. Executable Statements .. 56 | IF( .NOT.LERR ) THEN 57 | WRITE( NOUT, FMT = 9999 )INFOT, 58 | $ SRNAMT( 1:LEN_TRIM( SRNAMT ) ) 59 | OK = .FALSE. 60 | END IF 61 | LERR = .FALSE. 62 | RETURN 63 | * 64 | 9999 FORMAT( ' *** Illegal value of parameter number ', I2, 65 | $ ' not detected by ', A, ' ***' ) 66 | * 67 | * End of CHKXER 68 | * 69 | END 70 | -------------------------------------------------------------------------------- /TESTING/LIN/chkxer.f: -------------------------------------------------------------------------------- 1 | *> \brief \b CHKXER 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK ) 12 | * 13 | * .. Scalar Arguments .. 14 | * LOGICAL LERR, OK 15 | * CHARACTER*(*) SRNAMT 16 | * INTEGER INFOT, NOUT 17 | * 18 | * 19 | *> \par Purpose: 20 | * ============= 21 | *> 22 | *> \verbatim 23 | *> \endverbatim 24 | * 25 | * Arguments: 26 | * ========== 27 | * 28 | * 29 | * Authors: 30 | * ======== 31 | * 32 | *> \author Univ. of Tennessee 33 | *> \author Univ. of California Berkeley 34 | *> \author Univ. of Colorado Denver 35 | *> \author NAG Ltd. 36 | * 37 | *> \ingroup complex_lin 38 | * 39 | * ===================================================================== 40 | SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK ) 41 | IMPLICIT NONE 42 | * 43 | * -- LAPACK test routine -- 44 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 45 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 46 | * 47 | * .. Scalar Arguments .. 48 | LOGICAL LERR, OK 49 | CHARACTER*(*) SRNAMT 50 | INTEGER INFOT, NOUT 51 | * .. 52 | * .. Intrinsic Functions .. 53 | INTRINSIC LEN_TRIM 54 | * .. 55 | * .. Executable Statements .. 56 | IF( .NOT.LERR ) THEN 57 | WRITE( NOUT, FMT = 9999 )INFOT, 58 | $ SRNAMT( 1:LEN_TRIM( SRNAMT ) ) 59 | OK = .FALSE. 60 | END IF 61 | LERR = .FALSE. 62 | RETURN 63 | * 64 | 9999 FORMAT( ' *** Illegal value of parameter number ', I2, 65 | $ ' not detected by ', A6, ' ***' ) 66 | * 67 | * End of CHKXER 68 | * 69 | END 70 | -------------------------------------------------------------------------------- /TESTING/EIG/slasum.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SLASUM 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * SUBROUTINE SLASUM( TYPE, IOUNIT, IE, NRUN ) 12 | * 13 | * .. Scalar Arguments .. 14 | * CHARACTER*3 TYPE 15 | * INTEGER IE, IOUNIT, NRUN 16 | * .. 17 | * 18 | * Purpose 19 | * ======= 20 | * 21 | *\details \b Purpose: 22 | *\verbatim 23 | * 24 | * SLASUM prints a summary of the results from one of the test routines. 25 | * 26 | * ===================================================================== 27 | * 28 | * Authors: 29 | * ======== 30 | * 31 | * \author Univ. of Tennessee 32 | * \author Univ. of California Berkeley 33 | * \author Univ. of Colorado Denver 34 | * \author NAG Ltd. 35 | * 36 | 37 | * \ingroup single_eig 38 | * 39 | * ===================================================================== 40 | SUBROUTINE SLASUM( TYPE, IOUNIT, IE, NRUN ) 41 | IMPLICIT NONE 42 | * 43 | * -- LAPACK test routine -- 44 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 45 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 46 | * 47 | * .. Scalar Arguments .. 48 | CHARACTER*3 TYPE 49 | INTEGER IE, IOUNIT, NRUN 50 | * .. 51 | * 52 | * 53 | * .. Executable Statements .. 54 | * 55 | IF( IE.GT.0 ) THEN 56 | WRITE( IOUNIT, FMT = 9999 )TYPE, ': ', IE, ' out of ', NRUN, 57 | $ ' tests failed to pass the threshold' 58 | ELSE 59 | WRITE( IOUNIT, FMT = 9998 )'All tests for ', TYPE, 60 | $ ' passed the threshold ( ', NRUN, ' tests run)' 61 | END IF 62 | 9999 FORMAT( 1X, A3, A2, I4, A8, I5, A35 ) 63 | 9998 FORMAT( / 1X, A14, A3, A24, I5, A11 ) 64 | RETURN 65 | * 66 | * End of SLASUM 67 | * 68 | END 69 | -------------------------------------------------------------------------------- /INSTALL/ilaver.f: -------------------------------------------------------------------------------- 1 | *> \brief \b ILAVER returns the LAPACK version. 2 | ** 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) 12 | * 13 | * INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH 14 | * 15 | * 16 | *> \par Purpose: 17 | * ============= 18 | *> 19 | *> \verbatim 20 | *> 21 | *> This subroutine returns the LAPACK version. 22 | *> \endverbatim 23 | * 24 | * Arguments: 25 | * ========== 26 | * 27 | *> \param[out] VERS_MAJOR 28 | *> VERS_MAJOR is INTEGER 29 | *> return the lapack major version 30 | *> 31 | *> \param[out] VERS_MINOR 32 | *> VERS_MINOR is INTEGER 33 | *> return the lapack minor version from the major version 34 | *> 35 | *> \param[out] VERS_PATCH 36 | *> VERS_PATCH is INTEGER 37 | *> return the lapack patch version from the minor version 38 | * 39 | * Authors: 40 | * ======== 41 | * 42 | *> \author Univ. of Tennessee 43 | *> \author Univ. of California Berkeley 44 | *> \author Univ. of Colorado Denver 45 | *> \author NAG Ltd. 46 | * 47 | *> \ingroup ilaver 48 | * 49 | * ===================================================================== 50 | SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) 51 | IMPLICIT NONE 52 | * 53 | * -- LAPACK computational routine -- 54 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 55 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 56 | * 57 | * ===================================================================== 58 | * 59 | INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH 60 | * ===================================================================== 61 | VERS_MAJOR = 3 62 | VERS_MINOR = 12 63 | VERS_PATCH = 1 64 | * ===================================================================== 65 | * 66 | RETURN 67 | END 68 | -------------------------------------------------------------------------------- /TESTING/EIG/dlasum.f: -------------------------------------------------------------------------------- 1 | *> \brief \b DLASUM 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | * Definition: 9 | * =========== 10 | * 11 | * SUBROUTINE DLASUM( TYPE, IOUNIT, IE, NRUN ) 12 | * 13 | * .. Scalar Arguments .. 14 | * CHARACTER*3 TYPE 15 | * INTEGER IE, IOUNIT, NRUN 16 | * .. 17 | * 18 | * 19 | *> \par Purpose: 20 | * ============= 21 | *> 22 | *> \verbatim 23 | *> 24 | *> DLASUM prints a summary of the results from one of the test routines. 25 | *> \endverbatim 26 | * 27 | * Arguments: 28 | * ========== 29 | * 30 | * 31 | * Authors: 32 | * ======== 33 | * 34 | *> \author Univ. of Tennessee 35 | *> \author Univ. of California Berkeley 36 | *> \author Univ. of Colorado Denver 37 | *> \author NAG Ltd. 38 | * 39 | *> \ingroup double_eig 40 | * 41 | * ===================================================================== 42 | SUBROUTINE DLASUM( TYPE, IOUNIT, IE, NRUN ) 43 | IMPLICIT NONE 44 | * 45 | * -- LAPACK test routine -- 46 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 47 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 48 | * 49 | * .. Scalar Arguments .. 50 | CHARACTER*3 TYPE 51 | INTEGER IE, IOUNIT, NRUN 52 | * .. 53 | * 54 | * ===================================================================== 55 | * 56 | * .. Executable Statements .. 57 | * 58 | IF( IE.GT.0 ) THEN 59 | WRITE( IOUNIT, FMT = 9999 )TYPE, ': ', IE, ' out of ', NRUN, 60 | $ ' tests failed to pass the threshold' 61 | ELSE 62 | WRITE( IOUNIT, FMT = 9998 )'All tests for ', TYPE, 63 | $ ' passed the threshold ( ', NRUN, ' tests run)' 64 | END IF 65 | 9999 FORMAT( 1X, A3, A2, I4, A8, I5, A35 ) 66 | 9998 FORMAT( / 1X, A14, A3, A24, I5, A11 ) 67 | RETURN 68 | * 69 | * End of DLASUM 70 | * 71 | END 72 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dspr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_dspr.c 4 | * This program is a C interface to dspr. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_dspr)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 13 | const CBLAS_INT N, const double alpha, const double *X, 14 | const CBLAS_INT incX, double *Ap) 15 | { 16 | char UL; 17 | #ifdef F77_CHAR 18 | F77_CHAR F77_UL; 19 | #else 20 | #define F77_UL &UL 21 | #endif 22 | 23 | #ifdef F77_INT 24 | F77_INT F77_N=N, F77_incX=incX; 25 | #else 26 | #define F77_N N 27 | #define F77_incX incX 28 | #endif 29 | extern int CBLAS_CallFromC; 30 | extern int RowMajorStrg; 31 | RowMajorStrg = 0; 32 | CBLAS_CallFromC = 1; 33 | if (layout == CblasColMajor) 34 | { 35 | if (Uplo == CblasLower) UL = 'L'; 36 | else if (Uplo == CblasUpper) UL = 'U'; 37 | else 38 | { 39 | API_SUFFIX(cblas_xerbla)(2, "cblas_dspr","Illegal Uplo setting, %d\n",Uplo ); 40 | CBLAS_CallFromC = 0; 41 | RowMajorStrg = 0; 42 | return; 43 | } 44 | #ifdef F77_CHAR 45 | F77_UL = C2F_CHAR(&UL); 46 | #endif 47 | 48 | F77_dspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap); 49 | 50 | } else if (layout == CblasRowMajor) 51 | { 52 | RowMajorStrg = 1; 53 | if (Uplo == CblasLower) UL = 'U'; 54 | else if (Uplo == CblasUpper) UL = 'L'; 55 | else 56 | { 57 | API_SUFFIX(cblas_xerbla)(2, "cblas_dspr","Illegal Uplo setting, %d\n",Uplo ); 58 | CBLAS_CallFromC = 0; 59 | RowMajorStrg = 0; 60 | return; 61 | } 62 | #ifdef F77_CHAR 63 | F77_UL = C2F_CHAR(&UL); 64 | #endif 65 | F77_dspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap); 66 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_dspr", "Illegal layout setting, %d\n", layout); 67 | CBLAS_CallFromC = 0; 68 | RowMajorStrg = 0; 69 | return; 70 | } 71 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sspr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_sspr.c 4 | * This program is a C interface to sspr. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_sspr)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 13 | const CBLAS_INT N, const float alpha, const float *X, 14 | const CBLAS_INT incX, float *Ap) 15 | { 16 | char UL; 17 | #ifdef F77_CHAR 18 | F77_CHAR F77_UL; 19 | #else 20 | #define F77_UL &UL 21 | #endif 22 | 23 | #ifdef F77_INT 24 | F77_INT F77_N=N, F77_incX=incX; 25 | #else 26 | #define F77_N N 27 | #define F77_incX incX 28 | #endif 29 | 30 | extern int CBLAS_CallFromC; 31 | extern int RowMajorStrg; 32 | RowMajorStrg = 0; 33 | 34 | CBLAS_CallFromC = 1; 35 | if (layout == CblasColMajor) 36 | { 37 | if (Uplo == CblasLower) UL = 'L'; 38 | else if (Uplo == CblasUpper) UL = 'U'; 39 | else 40 | { 41 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspr","Illegal Uplo setting, %d\n",Uplo ); 42 | CBLAS_CallFromC = 0; 43 | RowMajorStrg = 0; 44 | return; 45 | } 46 | #ifdef F77_CHAR 47 | F77_UL = C2F_CHAR(&UL); 48 | #endif 49 | 50 | F77_sspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap); 51 | 52 | } else if (layout == CblasRowMajor) 53 | { 54 | RowMajorStrg = 1; 55 | if (Uplo == CblasLower) UL = 'U'; 56 | else if (Uplo == CblasUpper) UL = 'L'; 57 | else 58 | { 59 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspr","Illegal Uplo setting, %d\n",Uplo ); 60 | CBLAS_CallFromC = 0; 61 | RowMajorStrg = 0; 62 | return; 63 | } 64 | #ifdef F77_CHAR 65 | F77_UL = C2F_CHAR(&UL); 66 | #endif 67 | F77_sspr(F77_UL, &F77_N, &alpha, X, &F77_incX, Ap); 68 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_sspr", "Illegal layout setting, %d\n", layout); 69 | CBLAS_CallFromC = 0; 70 | RowMajorStrg = 0; 71 | return; 72 | } 73 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_ssyr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_ssyr.c 4 | * This program is a C interface to ssyr. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_ssyr)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 12 | const CBLAS_INT N, const float alpha, const float *X, 13 | const CBLAS_INT incX, float *A, const CBLAS_INT lda) 14 | { 15 | char UL; 16 | #ifdef F77_CHAR 17 | F77_CHAR F77_UL; 18 | #else 19 | #define F77_UL &UL 20 | #endif 21 | 22 | #ifdef F77_INT 23 | F77_INT F77_N=N, F77_incX=incX, F77_lda=lda; 24 | #else 25 | #define F77_N N 26 | #define F77_incX incX 27 | #define F77_lda lda 28 | #endif 29 | extern int CBLAS_CallFromC; 30 | extern int RowMajorStrg; 31 | RowMajorStrg = 0; 32 | CBLAS_CallFromC = 1; 33 | if (layout == CblasColMajor) 34 | { 35 | if (Uplo == CblasLower) UL = 'L'; 36 | else if (Uplo == CblasUpper) UL = 'U'; 37 | else 38 | { 39 | API_SUFFIX(cblas_xerbla)(2, "cblas_ssyr","Illegal Uplo setting, %d\n",Uplo ); 40 | CBLAS_CallFromC = 0; 41 | RowMajorStrg = 0; 42 | return; 43 | } 44 | #ifdef F77_CHAR 45 | F77_UL = C2F_CHAR(&UL); 46 | #endif 47 | 48 | F77_ssyr(F77_UL, &F77_N, &alpha, X, &F77_incX, A, &F77_lda); 49 | 50 | } else if (layout == CblasRowMajor) 51 | { 52 | RowMajorStrg = 1; 53 | if (Uplo == CblasLower) UL = 'U'; 54 | else if (Uplo == CblasUpper) UL = 'L'; 55 | else 56 | { 57 | API_SUFFIX(cblas_xerbla)(2, "cblas_ssyr","Illegal Uplo setting, %d\n",Uplo ); 58 | CBLAS_CallFromC = 0; 59 | RowMajorStrg = 0; 60 | return; 61 | } 62 | #ifdef F77_CHAR 63 | F77_UL = C2F_CHAR(&UL); 64 | #endif 65 | F77_ssyr(F77_UL, &F77_N, &alpha, X, &F77_incX, A, &F77_lda); 66 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_ssyr", "Illegal layout setting, %d\n", layout); 67 | CBLAS_CallFromC = 0; 68 | RowMajorStrg = 0; 69 | return; 70 | } 71 | -------------------------------------------------------------------------------- /CMAKE/PreventInSourceBuilds.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # This function will prevent in-source builds 3 | function(AssureOutOfSourceBuilds) 4 | # make sure the user doesn't play dirty with symlinks 5 | get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) 6 | get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) 7 | 8 | # disallow in-source builds 9 | if("${srcdir}" STREQUAL "${bindir}") 10 | message("######################################################") 11 | message("# lapack should not be configured & built in the lapack source directory") 12 | message("# You must run cmake in a build directory.") 13 | message("# For example:") 14 | message("# mkdir lapack-Sandbox ; cd lapack-sandbox") 15 | message("# git clone https://github.com/Reference-LAPACK/lapack.git # or download & unpack the source tarball") 16 | message("# mkdir lapack-build") 17 | message("# this will create the following directory structure") 18 | message("#") 19 | message("# lapack-Sandbox") 20 | message("# +--lapack") 21 | message("# +--lapack-build") 22 | message("#") 23 | message("# Then you can proceed to configure and build") 24 | message("# by using the following commands") 25 | message("#") 26 | message("# cd lapack-build") 27 | message("# cmake ../lapack # or ccmake, or cmake-gui ") 28 | message("# make") 29 | message("#") 30 | message("# NOTE: Given that you already tried to make an in-source build") 31 | message("# CMake have already created several files & directories") 32 | message("# in your source tree. run 'git status' to find them and") 33 | message("# remove them by doing:") 34 | message("#") 35 | message("# cd lapack-Sandbox/lapack") 36 | message("# git clean -n -d") 37 | message("# git clean -f -d") 38 | message("# git checkout --") 39 | message("#") 40 | message("######################################################") 41 | message(FATAL_ERROR "Quitting configuration") 42 | endif() 43 | endfunction() 44 | 45 | AssureOutOfSourceBuilds() 46 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dsyr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_dsyr.c 4 | * This program is a C interface to dsyr. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_dsyr)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 13 | const CBLAS_INT N, const double alpha, const double *X, 14 | const CBLAS_INT incX, double *A, const CBLAS_INT lda) 15 | { 16 | char UL; 17 | #ifdef F77_CHAR 18 | F77_CHAR F77_UL; 19 | #else 20 | #define F77_UL &UL 21 | #endif 22 | 23 | #ifdef F77_INT 24 | F77_INT F77_N=N, F77_incX=incX, F77_lda=lda; 25 | #else 26 | #define F77_N N 27 | #define F77_incX incX 28 | #define F77_lda lda 29 | #endif 30 | extern int CBLAS_CallFromC; 31 | extern int RowMajorStrg; 32 | RowMajorStrg = 0; 33 | CBLAS_CallFromC = 1; 34 | if (layout == CblasColMajor) 35 | { 36 | if (Uplo == CblasLower) UL = 'L'; 37 | else if (Uplo == CblasUpper) UL = 'U'; 38 | else 39 | { 40 | API_SUFFIX(cblas_xerbla)(2, "cblas_dsyr","Illegal Uplo setting, %d\n",Uplo ); 41 | CBLAS_CallFromC = 0; 42 | RowMajorStrg = 0; 43 | return; 44 | } 45 | #ifdef F77_CHAR 46 | F77_UL = C2F_CHAR(&UL); 47 | #endif 48 | 49 | F77_dsyr(F77_UL, &F77_N, &alpha, X, &F77_incX, A, &F77_lda); 50 | 51 | } else if (layout == CblasRowMajor) 52 | { 53 | RowMajorStrg = 1; 54 | if (Uplo == CblasLower) UL = 'U'; 55 | else if (Uplo == CblasUpper) UL = 'L'; 56 | else 57 | { 58 | API_SUFFIX(cblas_xerbla)(2, "cblas_dsyr","Illegal Uplo setting, %d\n",Uplo ); 59 | CBLAS_CallFromC = 0; 60 | RowMajorStrg = 0; 61 | return; 62 | } 63 | #ifdef F77_CHAR 64 | F77_UL = C2F_CHAR(&UL); 65 | #endif 66 | F77_dsyr(F77_UL, &F77_N, &alpha, X, &F77_incX, A, &F77_lda); 67 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_dsyr", "Illegal layout setting, %d\n", layout); 68 | CBLAS_CallFromC = 0; 69 | RowMajorStrg = 0; 70 | return; 71 | } 72 | -------------------------------------------------------------------------------- /CBLAS/README: -------------------------------------------------------------------------------- 1 | INSTALLATION 2 | 3 | Make sure to set these variables appropriately in your Make.inc in the LAPACK folder: 4 | 5 | CBLASLIB is your CBLAS library 6 | BLASLIB is your Legacy BLAS library (by default the Reference BLAS shipped within LAPACK) 7 | 8 | Then type: 9 | 10 | prompt> make 11 | 12 | which will create the CBLAS library. 13 | 14 | CREATING THE TESTERS 15 | 16 | type: 17 | 18 | prompt> make cblas_testing 19 | 20 | This will create the BLAS library if necessary, then compile the CBLAS testings. 21 | 22 | EXECUTING THE TESTERS 23 | 24 | type: 25 | 26 | prompt> make runtst 27 | 28 | _______________________________________________________________________________ 29 | 30 | This package contains C interface to Legacy BLAS. 31 | 32 | Written by Keita Teranishi (5/20/98) 33 | _______________________________________________________________________________ 34 | 35 | This release updates an inconsistency between the BLAST document and 36 | the interface. According to the document, the enumerated types for 37 | the C interface to the BLAS are not typedef'ed. 38 | 39 | It also updates the Level 2 and 3 testers which check for correct 40 | exiting of routines when called with bad arguments. This is done by 41 | overriding the Legacy BLAS library's implementation of xerbla(). If 42 | this cannot be done ( for instance one cannot override some calls 43 | to xerbla() in Sun's Performance library), then correct error 44 | exiting cannot be checked. 45 | 46 | Updated by Jeff Horner (3/15/99) 47 | _______________________________________________________________________________ 48 | 49 | Updated by R. Clint Whaley (2/23/03): 50 | 51 | Fixed the i?amax error that I reported three years ago: standard dictates 52 | IAMAX return vals in range 0 <= iamax < N, but reference was mistakenly 53 | returning like F77: 0 < iamax <= N. 54 | _______________________________________________________________________________ 55 | 56 | Updated by Julie Langou (08/22/2014): 57 | 58 | Integrate CBLAS package into LAPACK 59 | Improve headers for mangling 60 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_dspr2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cblas_dspr2.c 3 | * The program is a C interface to dspr2. 4 | * 5 | * Keita Teranishi 5/20/98 6 | * 7 | */ 8 | #include "cblas.h" 9 | #include "cblas_f77.h" 10 | void API_SUFFIX(cblas_dspr2)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 11 | const CBLAS_INT N, const double alpha, const double *X, 12 | const CBLAS_INT incX, const double *Y, const CBLAS_INT incY, double *A) 13 | { 14 | char UL; 15 | #ifdef F77_CHAR 16 | F77_CHAR F77_UL; 17 | #else 18 | #define F77_UL &UL 19 | #endif 20 | 21 | #ifdef F77_INT 22 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 23 | #else 24 | #define F77_N N 25 | #define F77_incX incX 26 | #define F77_incY incY 27 | #endif 28 | 29 | extern int CBLAS_CallFromC; 30 | extern int RowMajorStrg; 31 | RowMajorStrg = 0; 32 | CBLAS_CallFromC = 1; 33 | if (layout == CblasColMajor) 34 | { 35 | if (Uplo == CblasLower) UL = 'L'; 36 | else if (Uplo == CblasUpper) UL = 'U'; 37 | else 38 | { 39 | API_SUFFIX(cblas_xerbla)(2, "cblas_dspr2","Illegal Uplo setting, %d\n",Uplo ); 40 | CBLAS_CallFromC = 0; 41 | RowMajorStrg = 0; 42 | return; 43 | } 44 | #ifdef F77_CHAR 45 | F77_UL = C2F_CHAR(&UL); 46 | #endif 47 | 48 | F77_dspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A); 49 | 50 | } else if (layout == CblasRowMajor) 51 | { 52 | RowMajorStrg = 1; 53 | if (Uplo == CblasLower) UL = 'U'; 54 | else if (Uplo == CblasUpper) UL = 'L'; 55 | else 56 | { 57 | API_SUFFIX(cblas_xerbla)(2, "cblas_dspr2","Illegal Uplo setting, %d\n",Uplo ); 58 | CBLAS_CallFromC = 0; 59 | RowMajorStrg = 0; 60 | return; 61 | } 62 | #ifdef F77_CHAR 63 | F77_UL = C2F_CHAR(&UL); 64 | #endif 65 | F77_dspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A); 66 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_dspr2", "Illegal layout setting, %d\n", layout); 67 | CBLAS_CallFromC = 0; 68 | RowMajorStrg = 0; 69 | return; 70 | } 71 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sspr2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_sspr2.c 4 | * This program is a C interface to sspr2. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | 10 | #include "cblas.h" 11 | #include "cblas_f77.h" 12 | void API_SUFFIX(cblas_sspr2)(const CBLAS_LAYOUT layout, const CBLAS_UPLO Uplo, 13 | const CBLAS_INT N, const float alpha, const float *X, 14 | const CBLAS_INT incX, const float *Y, const CBLAS_INT incY, float *A) 15 | { 16 | char UL; 17 | #ifdef F77_CHAR 18 | F77_CHAR F77_UL; 19 | #else 20 | #define F77_UL &UL 21 | #endif 22 | 23 | #ifdef F77_INT 24 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 25 | #else 26 | #define F77_N N 27 | #define F77_incX incX 28 | #define F77_incY incY 29 | #endif 30 | 31 | extern int CBLAS_CallFromC; 32 | extern int RowMajorStrg; 33 | RowMajorStrg = 0; 34 | CBLAS_CallFromC = 1; 35 | if (layout == CblasColMajor) 36 | { 37 | if (Uplo == CblasLower) UL = 'L'; 38 | else if (Uplo == CblasUpper) UL = 'U'; 39 | else 40 | { 41 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspr2","Illegal Uplo setting, %d\n",Uplo ); 42 | CBLAS_CallFromC = 0; 43 | RowMajorStrg = 0; 44 | return; 45 | } 46 | #ifdef F77_CHAR 47 | F77_UL = C2F_CHAR(&UL); 48 | #endif 49 | 50 | F77_sspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A); 51 | 52 | } else if (layout == CblasRowMajor) 53 | { 54 | RowMajorStrg = 1; 55 | if (Uplo == CblasLower) UL = 'U'; 56 | else if (Uplo == CblasUpper) UL = 'L'; 57 | else 58 | { 59 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspr2","Illegal Uplo setting, %d\n",Uplo ); 60 | CBLAS_CallFromC = 0; 61 | RowMajorStrg = 0; 62 | return; 63 | } 64 | #ifdef F77_CHAR 65 | F77_UL = C2F_CHAR(&UL); 66 | #endif 67 | F77_sspr2(F77_UL, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A); 68 | } else API_SUFFIX(cblas_xerbla)(1, "cblas_sspr2", "Illegal layout setting, %d\n", layout); 69 | CBLAS_CallFromC = 0; 70 | RowMajorStrg = 0; 71 | } 72 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_dlamch.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2011, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ***************************************************************************** 29 | * Contents: Native high-level C interface to LAPACK function dlamch 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | double API_SUFFIX(LAPACKE_dlamch)( char cmach ) 36 | { 37 | return API_SUFFIX(LAPACKE_dlamch_work)( cmach ); 38 | } 39 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_slamch.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2011, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ***************************************************************************** 29 | * Contents: Native high-level C interface to LAPACK function slamch 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | float API_SUFFIX(LAPACKE_slamch)( char cmach ) 36 | { 37 | return API_SUFFIX(LAPACKE_slamch_work)( cmach ); 38 | } 39 | -------------------------------------------------------------------------------- /LAPACKE/utils/lapacke_lsame.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2010, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ****************************************************************************** 29 | * Contents: Native C interface to LAPACK lsame 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | lapack_logical API_SUFFIX(LAPACKE_lsame)( char ca, char cb ) 36 | { 37 | return (lapack_logical) LAPACK_lsame( &ca, &cb ); 38 | } 39 | 40 | 41 | -------------------------------------------------------------------------------- /CTestCustom.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # For further details regarding this file, 3 | # see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest 4 | # 5 | 6 | set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0) 7 | set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0) 8 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 500) 9 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 500) 10 | 11 | # Files to explicitly exclude from code coverage 12 | set(CTEST_CUSTOM_COVERAGE_EXCLUDE 13 | ${CTEST_CUSTOM_COVERAGE_EXCLUDE} 14 | 15 | # Exclude the internal BLAS libraries 16 | "/BLAS/" 17 | 18 | # Exclude the testing code itself from code coverage 19 | "/TESTING/" 20 | ) 21 | 22 | # Warnings to explicitly ignore 23 | set(CTEST_CUSTOM_WARNING_EXCEPTION 24 | ${CTEST_CUSTOM_WARNING_EXCEPTION} 25 | 26 | # Common warning when linking ATLAS built with GNU Fortran 4.1 and building 27 | # with GNU Fortran 4.4. It can be safely ignored. 28 | "libgfortran.*may conflict with libgfortran" 29 | 30 | # Harmless warning often seen on IRIX 31 | "WARNING 84 : .*libm.* is not used for resolving any symbol" 32 | 33 | # Warnings caused by sun compilers when building code to only run on your 34 | # native platform 35 | "xarch=native on this architecture implies -xarch=.*which generates code that does not run" 36 | 37 | # Harmless warnings from the Intel compiler on Windows 38 | "ipo: warning #11010: file format not recognized for .*\\.exe\\.embed\\.manifest\\.res" 39 | "LINK : warning LNK4224: /INCREMENTAL:YES is no longer supported; ignored" 40 | 41 | # Warnings caused by string truncation in the test code. The truncation is 42 | # intentional 43 | "Character string truncated to length 1 on assignment" 44 | 45 | # Warnings caused by NFS build directories have out-of-sync times 46 | "Warning: File .* has modification time .* in the future" 47 | ) 48 | 49 | # Only run post test if suitable python interpreter was found 50 | set(PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@) 51 | set(LAPACK_TESTING_USE_PYTHON @LAPACK_TESTING_USE_PYTHON@) 52 | if(PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) 53 | set(CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING") 54 | endif() 55 | 56 | -------------------------------------------------------------------------------- /SRC/sisnan.f: -------------------------------------------------------------------------------- 1 | *> \brief \b SISNAN tests input for NaN. 2 | * 3 | * =========== DOCUMENTATION =========== 4 | * 5 | * Online html documentation available at 6 | * http://www.netlib.org/lapack/explore-html/ 7 | * 8 | *> Download SISNAN + dependencies 9 | *> 10 | *> [TGZ] 11 | *> 12 | *> [ZIP] 13 | *> 14 | *> [TXT] 15 | * 16 | * Definition: 17 | * =========== 18 | * 19 | * LOGICAL FUNCTION SISNAN( SIN ) 20 | * 21 | * .. Scalar Arguments .. 22 | * REAL, INTENT(IN) :: SIN 23 | * .. 24 | * 25 | * 26 | *> \par Purpose: 27 | * ============= 28 | *> 29 | *> \verbatim 30 | *> 31 | *> SISNAN returns .TRUE. if its argument is NaN, and .FALSE. 32 | *> otherwise. To be replaced by the Fortran 2003 intrinsic in the 33 | *> future. 34 | *> \endverbatim 35 | * 36 | * Arguments: 37 | * ========== 38 | * 39 | *> \param[in] SIN 40 | *> \verbatim 41 | *> SIN is REAL 42 | *> Input to test for NaN. 43 | *> \endverbatim 44 | * 45 | * Authors: 46 | * ======== 47 | * 48 | *> \author Univ. of Tennessee 49 | *> \author Univ. of California Berkeley 50 | *> \author Univ. of Colorado Denver 51 | *> \author NAG Ltd. 52 | * 53 | *> \ingroup isnan 54 | * 55 | * ===================================================================== 56 | LOGICAL FUNCTION SISNAN( SIN ) 57 | IMPLICIT NONE 58 | * 59 | * -- LAPACK auxiliary routine -- 60 | * -- LAPACK is a software package provided by Univ. of Tennessee, -- 61 | * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- 62 | * 63 | * .. Scalar Arguments .. 64 | REAL, INTENT(IN) :: SIN 65 | * .. 66 | * 67 | * ===================================================================== 68 | * 69 | * .. External Functions .. 70 | LOGICAL SLAISNAN 71 | EXTERNAL SLAISNAN 72 | * .. 73 | * .. Executable Statements .. 74 | SISNAN = SLAISNAN(SIN,SIN) 75 | RETURN 76 | END 77 | -------------------------------------------------------------------------------- /CMAKE/CheckFortranTypeSizes.cmake: -------------------------------------------------------------------------------- 1 | # This module performs several try-compiles to determine the default integer 2 | # size being used by the fortran compiler 3 | # 4 | # After execution, the following variables are set. If they are un set then 5 | # size detection was not possible 6 | # 7 | # SIZEOF_INTEGER - Number of bytes used to store the default INTEGER type 8 | # SIZEOF_REAL - Number of bytes used to store the default REAL type 9 | # SIZEOF_LOGICAL - Number of bytes used to store the default LOGICAL type 10 | # SIZEOF_CHARACTER - Number of bytes used to store the default CHARACTER type 11 | # 12 | #============================================================================= 13 | # Author: Chuck Atkins 14 | # Copyright 2011 15 | #============================================================================= 16 | 17 | # Check the size of a single fortran type 18 | macro( _CHECK_FORTRAN_TYPE_SIZE _TYPE_NAME _TEST_SIZES ) 19 | 20 | foreach( __TEST_SIZE ${_TEST_SIZES} ) 21 | set( __TEST_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortran${_TYPE_NAME}Size${__TEST_SIZE}.f90 ) 22 | file( WRITE ${__TEST_FILE} 23 | " 24 | PROGRAM check_size 25 | ${_TYPE_NAME}*${__TEST_SIZE}, TARGET :: a 26 | ${_TYPE_NAME}, POINTER :: pa 27 | pa => a 28 | END PROGRAM 29 | ") 30 | try_compile( SIZEOF_${_TYPE_NAME} ${CMAKE_BINARY_DIR} ${__TEST_FILE} ) 31 | if( SIZEOF_${_TYPE_NAME} ) 32 | message( STATUS "Testing default ${_TYPE_NAME}*${__TEST_SIZE} - found" ) 33 | set( SIZEOF_${_TYPE_NAME} ${__TEST_SIZE} CACHE INTERNAL "Size of the default ${_TYPE_NAME} type" FORCE ) 34 | break() 35 | else() 36 | message( STATUS "Testing default ${_TYPE_NAME}*${__TEST_SIZE} -" ) 37 | endif() 38 | endforeach() 39 | 40 | endmacro() 41 | 42 | 43 | macro( CHECK_FORTRAN_TYPE_SIZES ) 44 | if( NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90 ) 45 | message( FATAL_ERROR "Type size tests require Fortran 90 support" ) 46 | endif() 47 | 48 | _CHECK_FORTRAN_TYPE_SIZE( "INTEGER" "2;4;8;16" ) 49 | _CHECK_FORTRAN_TYPE_SIZE( "REAL" "4;8;12;16" ) 50 | _CHECK_FORTRAN_TYPE_SIZE( "LOGICAL" "1;2;4;8;16" ) 51 | _CHECK_FORTRAN_TYPE_SIZE( "CHARACTER" "1;2;4;8;16" ) 52 | endmacro() 53 | 54 | -------------------------------------------------------------------------------- /CBLAS/src/cblas_sspmv.c: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * cblas_sspmv.c 4 | * This program is a C interface to sspmv. 5 | * Written by Keita Teranishi 6 | * 4/6/1998 7 | * 8 | */ 9 | #include "cblas.h" 10 | #include "cblas_f77.h" 11 | void API_SUFFIX(cblas_sspmv)(const CBLAS_LAYOUT layout, 12 | const CBLAS_UPLO Uplo, const CBLAS_INT N, 13 | const float alpha, const float *AP, 14 | const float *X, const CBLAS_INT incX, const float beta, 15 | float *Y, const CBLAS_INT incY) 16 | { 17 | char UL; 18 | #ifdef F77_CHAR 19 | F77_CHAR F77_UL; 20 | #else 21 | #define F77_UL &UL 22 | #endif 23 | #ifdef F77_INT 24 | F77_INT F77_N=N, F77_incX=incX, F77_incY=incY; 25 | #else 26 | #define F77_N N 27 | #define F77_incX incX 28 | #define F77_incY incY 29 | #endif 30 | extern int CBLAS_CallFromC; 31 | extern int RowMajorStrg; 32 | RowMajorStrg = 0; 33 | 34 | CBLAS_CallFromC = 1; 35 | if (layout == CblasColMajor) 36 | { 37 | if (Uplo == CblasUpper) UL = 'U'; 38 | else if (Uplo == CblasLower) UL = 'L'; 39 | else 40 | { 41 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspmv","Illegal Uplo setting, %d\n",Uplo ); 42 | CBLAS_CallFromC = 0; 43 | RowMajorStrg = 0; 44 | return; 45 | } 46 | #ifdef F77_CHAR 47 | F77_UL = C2F_CHAR(&UL); 48 | #endif 49 | F77_sspmv(F77_UL, &F77_N, &alpha, AP, X, 50 | &F77_incX, &beta, Y, &F77_incY); 51 | } 52 | else if (layout == CblasRowMajor) 53 | { 54 | RowMajorStrg = 1; 55 | if (Uplo == CblasUpper) UL = 'L'; 56 | else if (Uplo == CblasLower) UL = 'U'; 57 | else 58 | { 59 | API_SUFFIX(cblas_xerbla)(2, "cblas_sspmv","Illegal Uplo setting, %d\n", Uplo); 60 | CBLAS_CallFromC = 0; 61 | RowMajorStrg = 0; 62 | return; 63 | } 64 | #ifdef F77_CHAR 65 | F77_UL = C2F_CHAR(&UL); 66 | #endif 67 | F77_sspmv(F77_UL, &F77_N, &alpha, 68 | AP, X,&F77_incX, &beta, Y, &F77_incY); 69 | } 70 | else API_SUFFIX(cblas_xerbla)(1, "cblas_sspmv", "Illegal layout setting, %d\n", layout); 71 | CBLAS_CallFromC = 0; 72 | RowMajorStrg = 0; 73 | } 74 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_dlamch_work.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2011, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ***************************************************************************** 29 | * Contents: Native middle-level C interface to LAPACK function dlamch 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | double API_SUFFIX(LAPACKE_dlamch_work)( char cmach ) 36 | { 37 | double res; 38 | /* Call LAPACK function and adjust info */ 39 | res = LAPACK_dlamch( &cmach ); 40 | return res; 41 | } 42 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_slamch_work.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2011, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ***************************************************************************** 29 | * Contents: Native middle-level C interface to LAPACK function slamch 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | float API_SUFFIX(LAPACKE_slamch_work)( char cmach ) 36 | { 37 | float res; 38 | /* Call LAPACK function and adjust info */ 39 | res = LAPACK_slamch( &cmach ); 40 | return res; 41 | } 42 | -------------------------------------------------------------------------------- /LAPACKE/src/lapacke_slapy2_work.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | Copyright (c) 2011, Intel Corp. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Intel Corporation nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | THE POSSIBILITY OF SUCH DAMAGE. 28 | ***************************************************************************** 29 | * Contents: Native middle-level C interface to LAPACK function slapy2 30 | * Author: Intel Corporation 31 | *****************************************************************************/ 32 | 33 | #include "lapacke_utils.h" 34 | 35 | float API_SUFFIX(LAPACKE_slapy2_work)( float x, float y ) 36 | { 37 | float res = 0.; 38 | /* Call LAPACK function and adjust info */ 39 | res = LAPACK_slapy2( &x, &y ); 40 | return res; 41 | } 42 | --------------------------------------------------------------------------------