diff --git a/deps/AMICI/.gitignore b/deps/AMICI/.gitignore index 4dc28844..453f29a5 100644 --- a/deps/AMICI/.gitignore +++ b/deps/AMICI/.gitignore @@ -182,6 +182,7 @@ ThirdParty/sundials/build/* ThirdParty/SuiteSparse/lib/* ThirdParty/SuiteSparse/include/ ThirdParty/SuiteSparse/share/* +ThirdParty/SuiteSparse/install/* ThirdParty/SuperLU_MT_3.1/ ThirdParty/superlu_mt_3.1.tar.gz ThirdParty/swig-* diff --git a/deps/AMICI/.gitrepo b/deps/AMICI/.gitrepo index c0360eb0..62d4a1d3 100644 --- a/deps/AMICI/.gitrepo +++ b/deps/AMICI/.gitrepo @@ -5,8 +5,8 @@ ; [subrepo] remote = git@github.com:ICB-DCM/AMICI.git - branch = release_0.26.2 - commit = 51a53d2252fccf1b85049dc8f9e3cfe2cfb07a8c - parent = 77df2430ef62965d7fc252856307601e330d6c68 + branch = ss_install + commit = d1668b20a139064be635a9db572382f61b2646db + parent = 786a7f3a8e2a4547f4c66efa10bb0efdb7c1cd06 cmdver = 0.4.6 method = merge diff --git a/deps/AMICI/.pre-commit-config.yaml b/deps/AMICI/.pre-commit-config.yaml index 449f94ca..f16458b2 100644 --- a/deps/AMICI/.pre-commit-config.yaml +++ b/deps/AMICI/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.4.1 + rev: v0.6.7 hooks: # Run the linter. - id: ruff @@ -28,7 +28,7 @@ repos: - python/sdist/pyproject.toml - repo: https://github.com/asottile/pyupgrade - rev: v3.15.2 + rev: v3.17.0 hooks: - id: pyupgrade args: ["--py310-plus"] diff --git a/deps/AMICI/CHANGELOG.md b/deps/AMICI/CHANGELOG.md index 50a934bd..a9f1cde5 100644 --- a/deps/AMICI/CHANGELOG.md +++ b/deps/AMICI/CHANGELOG.md @@ -4,21 +4,6 @@ See also our [versioning policy](https://amici.readthedocs.io/en/latest/versioni ## v0.X Series -### v0.26.2 (2024-09-25) - -**Fixes** - -* Fixed some warnings from recent CMake versions - - by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2492 - -* Fixed a potential issue when including AMICI in a CMake project - - by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2493 - -**Full Changelog**: https://github.com/AMICI-dev/AMICI/compare/v0.26.1...v0.26.2 - - ### v0.26.1 (2024-07-11) **Fixes** diff --git a/deps/AMICI/ThirdParty/SuiteSparse/AMD/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/AMD/CMakeLists.txt index 32537591..57140086 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/AMD/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/AMD/CMakeLists.txt @@ -12,10 +12,10 @@ cmake_minimum_required ( VERSION 3.22 ) -set ( AMD_DATE "Jan 10, 2024" ) +set ( AMD_DATE "June 20, 2024" ) set ( AMD_VERSION_MAJOR 3 CACHE STRING "" FORCE ) set ( AMD_VERSION_MINOR 3 CACHE STRING "" FORCE ) -set ( AMD_VERSION_SUB 1 CACHE STRING "" FORCE ) +set ( AMD_VERSION_SUB 3 CACHE STRING "" FORCE ) message ( STATUS "Building AMD version: v" ${AMD_VERSION_MAJOR}. @@ -49,10 +49,10 @@ endif ( ) #------------------------------------------------------------------------------- if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) - find_package ( SuiteSparse_config 7.5.0 + find_package ( SuiteSparse_config 7.8.0 PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::SuiteSparseConfig ) - find_package ( SuiteSparse_config 7.5.0 REQUIRED ) + find_package ( SuiteSparse_config 7.8.0 REQUIRED ) endif ( ) endif ( ) @@ -90,7 +90,8 @@ if ( BUILD_SHARED_LIBS ) OUTPUT_NAME amd SOVERSION ${AMD_VERSION_MAJOR} PUBLIC_HEADER "Include/amd.h" - WINDOWS_EXPORT_ALL_SYMBOLS ON ) + WINDOWS_EXPORT_ALL_SYMBOLS ON + LINKER_LANGUAGE C ) if ( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.25" ) set_target_properties ( AMD PROPERTIES EXPORT_NO_SYSTEM ON ) @@ -111,9 +112,10 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD 11 C_STANDARD_REQUIRED ON OUTPUT_NAME amd - PUBLIC_HEADER "Include/amd.h" ) + PUBLIC_HEADER "Include/amd.h" + LINKER_LANGUAGE C ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( AMD_static PROPERTIES OUTPUT_NAME amd_static ) endif ( ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Config/amd.h.in b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Config/amd.h.in index 3192e113..ffbfbf26 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Config/amd.h.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Config/amd.h.in @@ -392,8 +392,8 @@ void amd_version (int version [3]) ; #define AMD__VERSION SUITESPARSE__VERCODE(@AMD_VERSION_MAJOR@,@AMD_VERSION_MINOR@,@AMD_VERSION_SUB@) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0)) -#error "AMD @AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@ requires SuiteSparse_config 7.5.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "AMD @AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@ requires SuiteSparse_config 7.8.0 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/ChangeLog b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/ChangeLog index 3828f5ab..4b80d7e8 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/ChangeLog +++ b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/ChangeLog @@ -1,3 +1,11 @@ +June 20, 2024: version 3.3.3 + + * minor update for MATLAB on Windows + +Mar 22, 2024: version 3.3.2 + + * minor updates to build system + Jan 10, 2024: version 3.3.1 * minor updates to build system diff --git a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/amd_version.tex b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/amd_version.tex index 31528c9f..26f2346a 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/amd_version.tex +++ b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Doc/amd_version.tex @@ -1,2 +1,2 @@ % version of SuiteSparse/AMD -\date{VERSION 3.3.1, Jan 10, 2024} +\date{VERSION 3.3.3, June 20, 2024} diff --git a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Include/amd.h b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Include/amd.h index 188ee5a6..1417b3a2 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/AMD/Include/amd.h +++ b/deps/AMICI/ThirdParty/SuiteSparse/AMD/Include/amd.h @@ -382,18 +382,18 @@ void amd_version (int version [3]) ; * Versions 1.1 and earlier of AMD do not include a #define'd version number. */ -#define AMD_DATE "Jan 10, 2024" +#define AMD_DATE "June 20, 2024" #define AMD_MAIN_VERSION 3 #define AMD_SUB_VERSION 3 -#define AMD_SUBSUB_VERSION 1 +#define AMD_SUBSUB_VERSION 3 #define AMD_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub) #define AMD_VERSION AMD_VERSION_CODE(3,3) -#define AMD__VERSION SUITESPARSE__VERCODE(3,3,1) +#define AMD__VERSION SUITESPARSE__VERCODE(3,3,3) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0)) -#error "AMD 3.3.1 requires SuiteSparse_config 7.5.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "AMD 3.3.3 requires SuiteSparse_config 7.8.0 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/BTF/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/BTF/CMakeLists.txt index 059bb80c..043569d8 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/BTF/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/BTF/CMakeLists.txt @@ -12,10 +12,10 @@ cmake_minimum_required ( VERSION 3.22 ) -set ( BTF_DATE "Jan 10, 2024" ) +set ( BTF_DATE "Mar 22, 2024" ) set ( BTF_VERSION_MAJOR 2 CACHE STRING "" FORCE ) set ( BTF_VERSION_MINOR 3 CACHE STRING "" FORCE ) -set ( BTF_VERSION_SUB 1 CACHE STRING "" FORCE ) +set ( BTF_VERSION_SUB 2 CACHE STRING "" FORCE ) message ( STATUS "Building BTF version: v" ${BTF_VERSION_MAJOR}. @@ -44,10 +44,10 @@ include ( SuiteSparsePolicy ) #------------------------------------------------------------------------------- if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) - find_package ( SuiteSparse_config 7.5.0 + find_package ( SuiteSparse_config 7.7.0 PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::SuiteSparseConfig ) - find_package ( SuiteSparse_config 7.5.0 REQUIRED ) + find_package ( SuiteSparse_config 7.7.0 REQUIRED ) endif ( ) endif ( ) @@ -104,7 +104,7 @@ if ( BUILD_STATIC_LIBS ) OUTPUT_NAME btf PUBLIC_HEADER "Include/btf.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( BTF_static PROPERTIES OUTPUT_NAME btf_static ) endif ( ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Config/btf.h.in b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Config/btf.h.in index a5985db8..668eac0a 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Config/btf.h.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Config/btf.h.in @@ -274,8 +274,8 @@ void btf_version (int version [3]) ; #define BTF__VERSION SUITESPARSE__VERCODE(@BTF_VERSION_MAJOR@,@BTF_VERSION_MINOR@,@BTF_VERSION_SUB@) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0)) -#error "BTF @BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@ requires SuiteSparse_config 7.5.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,7,0)) +#error "BTF @BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@ requires SuiteSparse_config 7.7.0 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Doc/ChangeLog b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Doc/ChangeLog index d857cbc6..a7c2bf76 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Doc/ChangeLog +++ b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Doc/ChangeLog @@ -1,3 +1,7 @@ +Mar 22, 2024: version 2.3.2 + + * minor updates to build system + Jan 10, 2024: version 2.3.1 * minor updates to build system diff --git a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Include/btf.h b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Include/btf.h index c152e879..823a135c 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/BTF/Include/btf.h +++ b/deps/AMICI/ThirdParty/SuiteSparse/BTF/Include/btf.h @@ -264,18 +264,18 @@ void btf_version (int version [3]) ; * #endif */ -#define BTF_DATE "Jan 10, 2024" +#define BTF_DATE "Mar 22, 2024" #define BTF_MAIN_VERSION 2 #define BTF_SUB_VERSION 3 -#define BTF_SUBSUB_VERSION 1 +#define BTF_SUBSUB_VERSION 2 #define BTF_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub) #define BTF_VERSION BTF_VERSION_CODE(2,3) -#define BTF__VERSION SUITESPARSE__VERCODE(2,3,1) +#define BTF__VERSION SUITESPARSE__VERCODE(2,3,2) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,5,0)) -#error "BTF 2.3.1 requires SuiteSparse_config 7.5.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,7,0)) +#error "BTF 2.3.2 requires SuiteSparse_config 7.7.0 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/CITATION.bib b/deps/AMICI/ThirdParty/SuiteSparse/CITATION.bib index 13b13d93..45fe575c 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/CITATION.bib +++ b/deps/AMICI/ThirdParty/SuiteSparse/CITATION.bib @@ -474,7 +474,7 @@ @article{10.1145/3337792 @article{10.1145/3519024, author = {Lourenco, Christopher and Chen, Jinhao and Moreno-Centeno, Erick and Davis, Timothy A.}, -title = {Algorithm 1XXX: SPEX Left LU, Exactly Solving Sparse Linear Systems via a Sparse Left-Looking Integer-Preserving LU Factorization}, +title = {Algorithm 1021: SPEX Left LU, Exactly Solving Sparse Linear Systems via a Sparse Left-Looking Integer-Preserving LU Factorization}, year = {2022}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, @@ -482,9 +482,8 @@ @article{10.1145/3519024 url = {https://doi.org/10.1145/3519024}, doi = {10.1145/3519024}, abstract = {SPEX Left LU is a software package for exactly solving unsymmetric sparse linear systems. As a component of the sparse exact (SPEX) software package, SPEX Left LU can be applied to any input matrix, A, whose entries are integral, rational, or decimal, and provides a solution to the system Ax = b which is either exact or accurate to user-specified precision. SPEX Left LU preorders the matrix A with a user-specified fill-reducing ordering and computes a left-looking LU factorization with the special property that each operation used to compute the L and U matrices is integral. Notable additional applications of this package include benchmarking the stability and accuracy of state-of-the-art linear solvers, and determining whether singular-to-double-precision matrices are indeed singular. Computationally, this paper evaluates the impact of several novel pivoting schemes in exact arithmetic, benchmarks the exact iterative solvers within Linbox, and benchmarks the accuracy of MATLAB sparse backslash. Most importantly, it is shown that SPEX Left LU outperforms the exact iterative solvers in run time on easy instances and in stability as the iterative solver fails on a sizeable subset of the tested (both easy and hard) instances. The SPEX Left LU package is written in ANSI C, comes with a MATLAB interface, and is distributed via GitHub, as a component of the SPEX software package, and as a component of SuiteSparse.}, -note = {Just Accepted}, journal = {ACM Trans. Math. Softw.}, -month = {feb}, +month = {jun}, keywords = {exact matrix factorization, sparse linear systems, sparse matrix algorithms, exactly solving linear systems, roundoff errors} } diff --git a/deps/AMICI/ThirdParty/SuiteSparse/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/CMakeLists.txt index 0a23a5a4..2a73790b 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/CMakeLists.txt @@ -85,6 +85,7 @@ option ( SUITESPARSE_USE_SYSTEM_CAMD "ON: use CAMD libraries installed on the bu option ( SUITESPARSE_USE_SYSTEM_CCOLAMD "ON: use CCOLAMD libraries installed on the build system. OFF (default): Automatically build CCOLAMD as dependency if needed." OFF ) option ( SUITESPARSE_USE_SYSTEM_GRAPHBLAS "ON: use GraphBLAS libraries installed on the build system. OFF (default): Automatically build GraphBLAS as dependency if needed." OFF ) option ( SUITESPARSE_USE_SYSTEM_SUITESPARSE_CONFIG "ON: use SuiteSparse_config libraries installed on the build system. OFF (default): Automatically build SuiteSparse_config as dependency if needed." OFF ) +option ( SUITESPARSE_USE_SYSTEM_UMFPACK "ON: use UMFPACK libraries installed on the build system. OFF (default): Automatically build UMFPACK as dependency if needed." OFF ) #------------------------------------------------------------------------------- # global variables @@ -110,7 +111,7 @@ include ( SuiteSparsePolicy ) if ( SUITESPARSE_USE_SYSTEM_GRAPHBLAS ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "graphblas" ) - find_package ( GraphBLAS 9.0.1 REQUIRED ) + find_package ( GraphBLAS 9.3.1 REQUIRED ) else ( ) if ( "lagraph" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) # LAGraph requires GraphBLAS. @@ -123,7 +124,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_BTF ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "btf" ) - find_package ( BTF 2.3.1 REQUIRED ) + find_package ( BTF 2.3.2 REQUIRED ) else ( ) if ( "klu" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) # KLU requires BTF. @@ -134,9 +135,22 @@ else ( ) endif ( ) endif ( ) +if ( SUITESPARSE_USE_SYSTEM_UMFPACK ) + list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "umfpack" ) + find_package ( UMFPACK 6.3.4 REQUIRED ) +else ( ) + if ( "paru" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) + # ParU requires UMFPACK. + if ( NOT "umfpack" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) + message ( STATUS "Adding \"umfpack\" to the list of built targets." ) + list ( APPEND SUITESPARSE_ENABLE_PROJECTS "umfpack" ) + endif ( ) + endif ( ) +endif ( ) + if ( SUITESPARSE_USE_SYSTEM_CHOLMOD ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "cholmod" ) - find_package ( CHOLMOD 5.2.0 REQUIRED ) + find_package ( CHOLMOD 5.3.0 REQUIRED ) else ( ) if ( ( KLU_USE_CHOLMOD AND "klu" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) OR ( UMFPACK_USE_CHOLMOD AND "umfpack" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) @@ -154,7 +168,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_AMD ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "amd" ) - find_package ( AMD 3.3.1 REQUIRED ) + find_package ( AMD 3.3.3 REQUIRED ) else ( ) if ( "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS OR "ldl" IN_LIST SUITESPARSE_ENABLE_PROJECTS @@ -170,7 +184,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_COLAMD ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "colamd" ) - find_package ( COLAMD 3.3.2 REQUIRED ) + find_package ( COLAMD 3.3.4 REQUIRED ) else ( ) if ( "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS OR "spex" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) @@ -184,7 +198,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_CAMD ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "camd" ) - find_package ( CAMD 3.3.1 REQUIRED ) + find_package ( CAMD 3.3.3 REQUIRED ) else ( ) if ( CHOLMOD_CAMD AND "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) # CHOLMOD can optionally use CAMD. @@ -197,7 +211,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_CCOLAMD ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "ccolamd" ) - find_package ( CCOLAMD 3.3.2 REQUIRED ) + find_package ( CCOLAMD 3.3.4 REQUIRED ) else ( ) if ( CHOLMOD_CAMD AND "cholmod" IN_LIST SUITESPARSE_ENABLE_PROJECTS ) # CHOLMOD can optionally use CCOLAMD. @@ -210,7 +224,7 @@ endif ( ) if ( SUITESPARSE_USE_SYSTEM_SUITESPARSE_CONFIG ) list ( REMOVE_ITEM SUITESPARSE_ENABLE_PROJECTS "suitesparse_config" ) - find_package ( SuiteSparse_config 7.6.0 REQUIRED ) + find_package ( SuiteSparse_config 7.8.2 REQUIRED ) else ( ) if ( "mongoose" IN_LIST SUITESPARSE_ENABLE_PROJECTS OR "amd" IN_LIST SUITESPARSE_ENABLE_PROJECTS diff --git a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/CMakeLists.txt index 39ac72ed..5848678a 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/CMakeLists.txt @@ -11,10 +11,10 @@ cmake_minimum_required ( VERSION 3.22 ) -set ( COLAMD_DATE "Jan 20, 2024" ) +set ( COLAMD_DATE "June 20, 2024" ) set ( COLAMD_VERSION_MAJOR 3 CACHE STRING "" FORCE ) set ( COLAMD_VERSION_MINOR 3 CACHE STRING "" FORCE ) -set ( COLAMD_VERSION_SUB 2 CACHE STRING "" FORCE ) +set ( COLAMD_VERSION_SUB 4 CACHE STRING "" FORCE ) message ( STATUS "Building COLAMD version: v" ${COLAMD_VERSION_MAJOR}. @@ -43,10 +43,10 @@ include ( SuiteSparsePolicy ) #------------------------------------------------------------------------------- if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) - find_package ( SuiteSparse_config 7.6.0 + find_package ( SuiteSparse_config 7.8.0 PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::SuiteSparseConfig ) - find_package ( SuiteSparse_config 7.6.0 REQUIRED ) + find_package ( SuiteSparse_config 7.8.0 REQUIRED ) endif ( ) endif ( ) @@ -104,7 +104,7 @@ if ( BUILD_STATIC_LIBS ) C_STANDARD_REQUIRED ON PUBLIC_HEADER "Include/colamd.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( COLAMD_static PROPERTIES OUTPUT_NAME colamd_static ) endif ( ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Config/colamd.h.in b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Config/colamd.h.in index 2d9a0c07..8ee81174 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Config/colamd.h.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Config/colamd.h.in @@ -75,8 +75,8 @@ #define COLAMD__VERSION SUITESPARSE__VERCODE(@COLAMD_VERSION_MAJOR@,@COLAMD_VERSION_MINOR@,@COLAMD_VERSION_SUB@) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0)) -#error "COLAMD @COLAMD_VERSION_MAJOR@.@COLAMD_VERSION_MINOR@.@COLAMD_VERSION_SUB@ requires SuiteSparse_config 7.6.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "COLAMD @COLAMD_VERSION_MAJOR@.@COLAMD_VERSION_MINOR@.@COLAMD_VERSION_SUB@ requires SuiteSparse_config 7.8.0 or later" #endif /* ========================================================================== */ diff --git a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Doc/ChangeLog b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Doc/ChangeLog index 9904daca..dc7f12e6 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Doc/ChangeLog +++ b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Doc/ChangeLog @@ -1,3 +1,11 @@ +June 20, 2024: version 3.3.4 + + * minor update for MATLAB on Windows + +Mar 22, 2024: version 3.3.3 + + * minor updates to build system + Jan 20, 2024: version 3.3.2 * minor updates to build system diff --git a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Include/colamd.h b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Include/colamd.h index 93c2c08e..a60ef6f0 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Include/colamd.h +++ b/deps/AMICI/ThirdParty/SuiteSparse/COLAMD/Include/colamd.h @@ -65,18 +65,18 @@ * Versions 2.3 and earlier of COLAMD do not include a #define'd version number. */ -#define COLAMD_DATE "Jan 20, 2024" +#define COLAMD_DATE "June 20, 2024" #define COLAMD_MAIN_VERSION 3 #define COLAMD_SUB_VERSION 3 -#define COLAMD_SUBSUB_VERSION 2 +#define COLAMD_SUBSUB_VERSION 4 #define COLAMD_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub) #define COLAMD_VERSION COLAMD_VERSION_CODE(3,3) -#define COLAMD__VERSION SUITESPARSE__VERCODE(3,3,2) +#define COLAMD__VERSION SUITESPARSE__VERCODE(3,3,4) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0)) -#error "COLAMD 3.3.2 requires SuiteSparse_config 7.6.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "COLAMD 3.3.4 requires SuiteSparse_config 7.8.0 or later" #endif /* ========================================================================== */ diff --git a/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTING.md b/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTING.md index a81e104c..6348f2f4 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTING.md +++ b/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTING.md @@ -6,13 +6,13 @@ you can use the issue tracker on github.com, at (https://github.com/DrTimothyAldenDavis/SuiteSparse/issues). To contribute code, you can submit a pull request. To do so, -you must first agree to the Contributor License Agreement -[`CONTRIBUTOR-LICENSE.txt`](CONTRIBUTOR-LICENSE.txt). -Print a copy of the txt file (as a PDF), sign and date it, -and email it to me at DrTimothyAldenDavis@gmail.com. Pull -requests will only be included into SuiteSparse after I receive -your email with the signed PDF. +you must first agree to the Contributor License +in the [`Contributor_License`](Contributor_License) folder. +Sign and date it the PDF, and email it to me at +DrTimothyAldenDavis@gmail.com. Pull requests will only be +included into SuiteSparse after I receive your email with +the signed PDF. Do not submit a pull request to the default branch. -Instead, use the dev or dev2 branches. +Instead, use the dev2 branch. diff --git a/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTOR-LICENSE.txt b/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTOR-LICENSE.txt deleted file mode 100644 index 7cd19eec..00000000 --- a/deps/AMICI/ThirdParty/SuiteSparse/CONTRIBUTOR-LICENSE.txt +++ /dev/null @@ -1,177 +0,0 @@ -SuiteSparse Individual Contributor License Agreement - -Thank you for your interest in contributing to SuiteSparse ("We" or "Us"). - -This contributor agreement ("Agreement") documents the rights granted by -contributors to Us. To make this document effective, please sign it and send it -to Us by electronic submission. This is a legally binding document, so please -read it carefully before agreeing to it. The Agreement may cover more than one -software project managed by Us. - -1. Definitions - - "You" means the individual who Submits a Contribution to Us. - - "Contribution" means any work of authorship that is Submitted by You to Us - in which You own or assert ownership of the Copyright. - - "Copyright" means all rights protecting works of authorship owned or - controlled by You, including copyright, moral and neighboring rights, as - appropriate, for the full term of their existence including any extensions - by You. - - "Material" means the work of authorship which is made available by Us to - third parties. When this Agreement covers more than one software project, - the Material means the work of authorship to which the Contribution was - Submitted. After You Submit the Contribution, it may be included in the - Material. - - "Submit" means any form of electronic, verbal, or written communication - sent to Us or our representatives, including but not limited to electronic - mailing lists, source code control systems, and issue tracking systems that - are managed by, or on behalf of, Us for the purpose of discussing and - improving the Material, but excluding communication that is conspicuously - marked or otherwise designated in writing by You as "Not a Contribution." - - "Submission Date" means the date on which You Submit a Contribution to Us. - - "Effective Date" means the date You execute this Agreement or the date You - first Submit a Contribution to Us, whichever is earlier. - -2. Grant of Rights - - 2.1 Copyright License - - (a) You retain ownership of the Copyright in Your Contribution and have - the same rights to use or license the Contribution which You would have - had without entering into the Agreement. - - (b) To the maximum extent permitted by the relevant law, You grant to - Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, - irrevocable license under the Copyright covering the Contribution, with - the right to sublicense such rights through multiple tiers of - sublicensees, to reproduce, modify, display, perform and distribute the - Contribution as part of the Material; provided that this license is - conditioned upon compliance with Section 2.3. - - 2.2 Patent License - - For patent claims including, without limitation, method, process, and - apparatus claims which You own, control or have the right to grant, now - or in the future, You grant to Us a perpetual, worldwide, - non-exclusive, transferable, royalty-free, irrevocable patent license, - with the right to sublicense these rights to multiple tiers of - sublicensees, to make, have made, use, sell, offer for sale, import and - otherwise transfer the Contribution and the Contribution in combination - with the Material (and portions of such combination). This license is - granted only to the extent that the exercise of the licensed rights - infringes such patent claims; and provided that this license is - conditioned upon compliance with Section 2.3. - - 2.3 Outbound License - - Based on the grant of rights in Sections 2.1 and 2.2, if We include - Your Contribution in a Material, We may license the Contribution under - any license, including copyleft, permissive, commercial, or proprietary - licenses. - - 2.4 Moral Rights. - - If moral rights apply to the Contribution, to the maximum extent - permitted by law, You waive and agree not to assert such moral rights - against Us or our successors in interest, or any of our licensees, - either direct or indirect. - - 2.5 Our Rights. - - You acknowledge that We are not obligated to use Your Contribution as - part of the Material and may decide to include any Contribution We - consider appropriate. - - 2.6 Reservation of Rights. - - Any rights not expressly licensed under this section are expressly - reserved by You. - -3. Agreement - - You confirm that: - - (a) You have the legal authority to enter into this Agreement. - - (b) You own the Copyright and patent claims covering the Contribution which - are required to grant the rights under Section 2. - - (c) The grant of rights under Section 2 does not violate any grant of - rights which You have made to third parties, including Your employer. If - You are an employee, You have had Your employer approve this Agreement or - sign the Entity version of this document. If You are less than eighteen - years old, please have Your parents or guardian sign the Agreement. - -4. Disclaimer - - EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS - PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES - INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY - DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE - DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD - PERMITTED BY LAW. - -5. Consequential Damage Waiver - - TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE - LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, - INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING - OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY - (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. - -6. Miscellaneous - - 6.1 This Agreement will be governed by and construed in accordance with the - laws of the State of Texas excluding its conflicts of law provisions. Under - certain circumstances, the governing law in this section might be - superseded by the United Nations Convention on Contracts for the - International Sale of Goods ("UN Convention") and the parties intend to - avoid the application of the UN Convention to this Agreement and, thus, - exclude the application of the UN Convention in its entirety to this - Agreement. - - 6.2 This Agreement sets out the entire agreement between You and Us for - Your Contributions to Us and overrides all other agreements or - understandings. - - 6.3 If You or We assign the rights or obligations received through this - Agreement to a third party, as a condition of the assignment, that third - party must agree in writing to abide by all the rights and obligations in - the Agreement. - - 6.4 The failure of either party to require performance by the other party - of any provision of this Agreement in one situation shall not affect the - right of a party to require such performance at any time in the future. A - waiver of performance under a provision in one situation shall not be - considered a waiver of the performance of the provision in the future or a - waiver of the provision in its entirety. - - 6.5 If any provision of this Agreement is found void and unenforceable, - such provision will be replaced to the extent possible with a provision - that comes closest to the meaning of the original provision and which is - enforceable. The terms and conditions set forth in this Agreement shall - apply notwithstanding any failure of essential purpose of this Agreement or - any limited remedy to the maximum extent possible under law. - -Us -Timothy A. Davis, and all SuiteSparse co-authors (varies according to -the SuiteSparse package) - - -You: - - Your Name (printed): - - - Your Signature: - - - Date: - diff --git a/deps/AMICI/ThirdParty/SuiteSparse/ChangeLog b/deps/AMICI/ThirdParty/SuiteSparse/ChangeLog index 0f1eb879..d8a7ed8b 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/ChangeLog +++ b/deps/AMICI/ThirdParty/SuiteSparse/ChangeLog @@ -1,3 +1,154 @@ +Aug 20, 2024: version 7.8.2 + + * LAGraph 1.1.4: bug fix for LAGraph_MMWrite when matrix is dense + * SPEX 3.2.1: release date revised, sync with primary SPEX repo + * SuiteSparse_config, Example: modified to reflect the release of + LAGraph 1.1.4 and SPEX 3.2.1 + * ParU 0.3.0: added parameter to ParU_Get + * Package versions in this release: (* denotes a new version) + SuiteSparse_config 7.8.2 * + AMD 3.3.3 + BTF 2.3.2 + CAMD 3.3.3 + CCOLAMD 3.3.4 + CHOLMOD 5.3.0 + COLAMD 3.3.4 + CSparse 4.3.2 + CXSparse 4.4.1 + Example 1.8.2 * + GraphBLAS 9.3.1 + KLU 2.3.4 + LDL 3.3.2 + LAGraph 1.1.4 * + SuiteSparse_Mongoose 3.3.4 + ParU 0.3.0 * + RBio 4.3.3 + SPEX 3.2.1 * + SPQR 4.3.4 + UMFPACK 6.3.4 + +Aug 12, 2024: version 7.8.1 + + * GraphBLAS 9.3.1: bug fix in creation of JIT package + * SuiteSparse_config, Example: modified to reflect the release of + GraphBLAS 9.3.1 + * Package versions in this release: (* denotes a new version) + SuiteSparse_config 7.8.1 * + AMD 3.3.3 + BTF 2.3.2 + CAMD 3.3.3 + CCOLAMD 3.3.4 + CHOLMOD 5.3.0 + COLAMD 3.3.4 + CSparse 4.3.2 + CXSparse 4.4.1 + Example 1.8.1 * + GraphBLAS 9.3.1 * + KLU 2.3.4 + LDL 3.3.2 + LAGraph 1.1.3 + SuiteSparse_Mongoose 3.3.4 + ParU 0.2.0 + RBio 4.3.3 + SPEX 3.2.0 + SPQR 4.3.4 + UMFPACK 6.3.4 + +Aug 2, 2024: version 7.8.0 + + * ParU 0.2.0: many changes; nearing a stable release. + * CHOLMOD 5.3.0: added cholmod_query, and #define's in cholmod.h, + to query which Modules and features have been configured. + * GraphBLAS 9.3.0: simpler MATLAB install; sanitize environment variables; + code restructuring. + * SPQR 4.3.4: changes to reflect updates to CHOLMOD + * SPEX 3.2.0: control Python interface, fix build issues on Mac, + split SPEX Cholesky into LDL and Cholesky. + * SuiteSparse_config: changes to SuiteSparse timer, BLA_VENDOR. Added + SUITESPARSE_USE_PYTHON option. Split BLAS prototypes and macros. + * .github: new CI runner for riscv64, and other changes in CI workflows. + * AMD, CAMD, COLAMD, CCOLAMD, CXSparse, KLU, SuiteSparse_Mongoose, + RBio, UMFPACK: minor changes for MATLAB in Windows + * no changes to: BTF, CSparse, LDL, and LAGraph + * Package versions in this release: (* denotes a new version) + SuiteSparse_config 7.8.0 * + AMD 3.3.3 * + BTF 2.3.2 same as SuiteSparse 7.7.0 + CAMD 3.3.3 * + CCOLAMD 3.3.4 * + CHOLMOD 5.3.0 * + COLAMD 3.3.4 * + CSparse 4.3.2 same as SuiteSparse 7.7.0 + CXSparse 4.4.1 * + Example 1.8.0 * + GraphBLAS 9.3.0 * + KLU 2.3.4 * + LDL 3.3.2 same as SuiteSparse 7.7.0 + LAGraph 1.1.3 same as SuiteSparse 7.7.0 + SuiteSparse_Mongoose 3.3.4 * + ParU 0.2.0 * + RBio 4.3.3 * + SPEX 3.2.0 * + SPQR 4.3.4 * + UMFPACK 6.3.4 * + +Mar 22, 2024: version 7.7.0 + + * SPEX 3.1.0: major revision to API, new methods. Added SPEX_Cholesky, + SPEX_Backslash, and python interface. MATLAB interface revised. + * Example 1.7.0: revised for change in SPEX API + * GraphBLAS 9.1.0: revised defn of C11 or MSVC complex type, bug fix + * CXSparse 4.4.0: revise malloc/calloc/realloc/free wrappers + * All others: minor changes to build system + * Package versions in this release: + SuiteSparse_config 7.7.0 + AMD 3.3.2 + BTF 2.3.2 + CAMD 3.3.2 + CCOLAMD 3.3.3 + CHOLMOD 5.2.1 + COLAMD 3.3.3 + CSparse 4.3.2 + CXSparse 4.4.0 + Example 1.7.0 + GraphBLAS 9.1.0 + KLU 2.3.3 + LDL 3.3.2 + LAGraph 1.1.3 + SuiteSparse_Mongoose 3.3.3 + ParU 0.1.3 + RBio 4.3.2 + SPEX 3.1.0 + SPQR 4.3.3 + UMFPACK 6.3.3 + +Mar 2, 2024: version 7.6.1 + + * GraphBLAS 9.0.3: performance bug fix (JIT kernels were not compiled with + OpenMP, since v8.3.1), and fix to Makefile ("make static") + * SuiteSparse_config 7.6.1: version number, added link to math.js in README + * Package versions in this release: + SuiteSparse_config 7.6.1 + AMD 3.3.1 + BTF 2.3.1 + CAMD 3.3.1 + CCOLAMD 3.3.2 + CHOLMOD 5.2.0 + COLAMD 3.3.2 + CSparse 4.3.1 + CXSparse 4.3.1 + Example 1.6.2 + GraphBLAS 9.0.3 + KLU 2.3.2 + LDL 3.3.1 + LAGraph 1.1.2 + SuiteSparse_Mongoose 3.3.2 + ParU 0.1.2 + RBio 4.3.1 + SPEX 2.3.2 + SPQR 4.3.2 + UMFPACK 6.3.2 + Jan 20, 2024: version 7.6.0 * CHOLMOD 5.2.0: bug fix (restore ABI compatibility with 5.0.x, i.e., 5.2.0 diff --git a/deps/AMICI/ThirdParty/SuiteSparse/KLU/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/KLU/CMakeLists.txt index 05025e37..9e52f2b0 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/KLU/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/KLU/CMakeLists.txt @@ -12,10 +12,10 @@ cmake_minimum_required ( VERSION 3.22 ) -set ( KLU_DATE "Jan 20, 2024" ) +set ( KLU_DATE "June 20, 2024" ) set ( KLU_VERSION_MAJOR 2 CACHE STRING "" FORCE ) set ( KLU_VERSION_MINOR 3 CACHE STRING "" FORCE ) -set ( KLU_VERSION_SUB 2 CACHE STRING "" FORCE ) +set ( KLU_VERSION_SUB 4 CACHE STRING "" FORCE ) message ( STATUS "Building KLU version: v" ${KLU_VERSION_MAJOR}. @@ -43,28 +43,28 @@ include ( SuiteSparsePolicy ) #------------------------------------------------------------------------------- if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) - find_package ( SuiteSparse_config 7.6.0 + find_package ( SuiteSparse_config 7.8.0 PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::SuiteSparseConfig ) - find_package ( SuiteSparse_config 7.6.0 REQUIRED ) + find_package ( SuiteSparse_config 7.8.0 REQUIRED ) endif ( ) - find_package ( AMD 3.3.1 + find_package ( AMD 3.3.2 PATHS ${CMAKE_SOURCE_DIR}/../AMD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::AMD ) - find_package ( AMD 3.3.1 REQUIRED ) + find_package ( AMD 3.3.2 REQUIRED ) endif ( ) - find_package ( COLAMD 3.3.2 + find_package ( COLAMD 3.3.3 PATHS ${CMAKE_SOURCE_DIR}/../COLAMD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::COLAMD ) - find_package ( COLAMD 3.3.2 REQUIRED ) + find_package ( COLAMD 3.3.3 REQUIRED ) endif ( ) - find_package ( BTF 2.3.1 + find_package ( BTF 2.3.2 PATHS ${CMAKE_SOURCE_DIR}/../BTF/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::BTF ) - find_package ( BTF 2.3.1 REQUIRED ) + find_package ( BTF 2.3.2 REQUIRED ) endif ( ) endif ( ) @@ -77,10 +77,10 @@ if ( SUITESPARSE_ROOT_CMAKELISTS ) else ( ) if ( KLU_USE_CHOLMOD ) # look for CHOLMOD (optional fill-reducing orderings) - find_package ( CHOLMOD 5.2.0 + find_package ( CHOLMOD 5.2.1 PATHS ${CMAKE_SOURCE_DIR}/../CHOLMOD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::CHOLMOD ) - find_package ( CHOLMOD 5.2.0 ) + find_package ( CHOLMOD 5.2.1 ) endif ( ) if ( NOT CHOLMOD_FOUND ) # CHOLMOD not found so disable it @@ -162,7 +162,7 @@ if ( BUILD_STATIC_LIBS ) OUTPUT_NAME klu PUBLIC_HEADER "Include/klu.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( KLU_static PROPERTIES OUTPUT_NAME klu_static ) endif ( ) @@ -213,7 +213,7 @@ if ( KLU_HAS_CHOLMOD ) OUTPUT_NAME klu_cholmod PUBLIC_HEADER "User/klu_cholmod.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( KLU_CHOLMOD_static PROPERTIES OUTPUT_NAME klu_cholmod_static ) endif ( ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Config/klu.h.in b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Config/klu.h.in index 1f02c4be..09c8780e 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Config/klu.h.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Config/klu.h.in @@ -833,23 +833,23 @@ void klu_version (int version [3]) ; #define KLU__VERSION SUITESPARSE__VERCODE(@KLU_VERSION_MAJOR@,@KLU_VERSION_MINOR@,@KLU_VERSION_SUB@) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0)) -#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires SuiteSparse_config 7.6.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires SuiteSparse_config 7.8.0 or later" #endif #if !defined (AMD__VERSION) || \ - (AMD__VERSION < SUITESPARSE__VERCODE(3,3,1)) -#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires AMD 3.3.1 or later" + (AMD__VERSION < SUITESPARSE__VERCODE(3,3,3)) +#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires AMD 3.3.3 or later" #endif #if !defined (COLAMD__VERSION) || \ - (COLAMD__VERSION < SUITESPARSE__VERCODE(3,3,2)) -#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires COLAMD 3.3.2 or later" + (COLAMD__VERSION < SUITESPARSE__VERCODE(3,3,4)) +#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires COLAMD 3.3.4 or later" #endif #if !defined (BTF__VERSION) || \ - (BTF__VERSION < SUITESPARSE__VERCODE(2,3,1)) -#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires BTF 2.3.1 or later" + (BTF__VERSION < SUITESPARSE__VERCODE(2,3,2)) +#error "KLU @KLU_VERSION_MAJOR@.@KLU_VERSION_MINOR@.@KLU_VERSION_SUB@ requires BTF 2.3.2 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/ChangeLog b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/ChangeLog index d4313dbc..bb6ebb83 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/ChangeLog +++ b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/ChangeLog @@ -1,3 +1,11 @@ +June 20, 2024: version 2.3.4 + + * minor update for MATLAB on Windows + +Mar 22, 2024: version 2.3.3 + + * minor update to build system + Jan 20, 2024: version 2.3.2 * revise version numbers for dependencies diff --git a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/klu_version.tex b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/klu_version.tex index 5e71c34b..6f663b4a 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/klu_version.tex +++ b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Doc/klu_version.tex @@ -1,2 +1,2 @@ % version of SuiteSparse/KLU -\date{VERSION 2.3.2, Jan 20, 2024} +\date{VERSION 2.3.4, June 20, 2024} diff --git a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Include/klu.h b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Include/klu.h index 22155ff8..da3ae6f3 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/KLU/Include/klu.h +++ b/deps/AMICI/ThirdParty/SuiteSparse/KLU/Include/klu.h @@ -823,33 +823,33 @@ void klu_version (int version [3]) ; * #endif */ -#define KLU_DATE "Jan 20, 2024" +#define KLU_DATE "June 20, 2024" #define KLU_MAIN_VERSION 2 #define KLU_SUB_VERSION 3 -#define KLU_SUBSUB_VERSION 2 +#define KLU_SUBSUB_VERSION 4 #define KLU_VERSION_CODE(main,sub) SUITESPARSE_VER_CODE(main,sub) #define KLU_VERSION KLU_VERSION_CODE(2,3) -#define KLU__VERSION SUITESPARSE__VERCODE(2,3,2) +#define KLU__VERSION SUITESPARSE__VERCODE(2,3,4) #if !defined (SUITESPARSE__VERSION) || \ - (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,6,0)) -#error "KLU 2.3.2 requires SuiteSparse_config 7.6.0 or later" + (SUITESPARSE__VERSION < SUITESPARSE__VERCODE(7,8,0)) +#error "KLU 2.3.4 requires SuiteSparse_config 7.8.0 or later" #endif #if !defined (AMD__VERSION) || \ - (AMD__VERSION < SUITESPARSE__VERCODE(3,3,1)) -#error "KLU 2.3.2 requires AMD 3.3.1 or later" + (AMD__VERSION < SUITESPARSE__VERCODE(3,3,3)) +#error "KLU 2.3.4 requires AMD 3.3.3 or later" #endif #if !defined (COLAMD__VERSION) || \ - (COLAMD__VERSION < SUITESPARSE__VERCODE(3,3,2)) -#error "KLU 2.3.2 requires COLAMD 3.3.2 or later" + (COLAMD__VERSION < SUITESPARSE__VERCODE(3,3,4)) +#error "KLU 2.3.4 requires COLAMD 3.3.4 or later" #endif #if !defined (BTF__VERSION) || \ - (BTF__VERSION < SUITESPARSE__VERCODE(2,3,1)) -#error "KLU 2.3.2 requires BTF 2.3.1 or later" + (BTF__VERSION < SUITESPARSE__VERCODE(2,3,2)) +#error "KLU 2.3.4 requires BTF 2.3.2 or later" #endif #endif diff --git a/deps/AMICI/ThirdParty/SuiteSparse/LICENSE.txt b/deps/AMICI/ThirdParty/SuiteSparse/LICENSE.txt index 8c6d4734..722cb63d 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/LICENSE.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/LICENSE.txt @@ -2,15 +2,14 @@ This file lists all licenses for all packages in SuiteSparse, for your convenience. Each package has its own separate license, which can be found in the lists below. -==> SPEX/License/license.txt <== +==> SPEX/LICENSE <== - SPEX: a Sparse Left-looking Integer-Preserving LU Factorization + SPEX: a SParse EXact Factorization Framework for solving SLEs - Copyright (c) 2019-2023, Christopher Lourenco, JinHao Chen, Erick Moreno- - Centeno, and Timothy A. Davis. + Copyright (c) 2019-2024, Christopher Lourenco, Jinhao Chen, + Lorena Mejia Domenzain, Erick Moreno-Centeno, and Timothy A. Davis. Available at: - https://github.com/clouren/SPEX http://suitesparse.com diff --git a/deps/AMICI/ThirdParty/SuiteSparse/README.md b/deps/AMICI/ThirdParty/SuiteSparse/README.md index 29c74df1..c8239dbf 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/README.md +++ b/deps/AMICI/ThirdParty/SuiteSparse/README.md @@ -2,7 +2,7 @@ SuiteSparse: A Suite of Sparse matrix packages at http://suitesparse.com ----------------------------------------------------------------------------- -Jan 20, 2024, SuiteSparse VERSION 7.6.0 +Aug 20, 2024, SuiteSparse VERSION 7.8.2 SuiteSparse is a set of sparse-matrix-related packages written or co-authored by Tim Davis, available at https://github.com/DrTimothyAldenDavis/SuiteSparse . @@ -713,9 +713,9 @@ particular BLAS library use either: cd Package ; cmake -DBLA_VENDOR=OpenBLAS .. make To use the default (hunt for a BLAS), do not set `BLA_VENDOR`, or set it to -`ANY`. In this case, if `SUITESPARSE_USE_64BIT_BLAS` is ON, preference is -given to a 64-bit BLAS, but a 32-bit BLAS library will be used if no 64-bit -library is found. However, if both `SUITESPARSE_USE_64BIT_BLAS` and +an empty string. In this case, if `SUITESPARSE_USE_64BIT_BLAS` is ON, +preference is given to a 64-bit BLAS, but a 32-bit BLAS library will be used if +no 64-bit library is found. However, if both `SUITESPARSE_USE_64BIT_BLAS` and `SUITESPARSE_USE_STRICT` are ON, then only a 64-bit BLAS is considered. When selecting a particular BLAS library, the `SUITESPARSE_USE_64BIT_BLAS` @@ -979,6 +979,12 @@ build type). The static libraries will not be built (since If `ON`, look for a 64-bit BLAS. If `OFF`: 32-bit only. Default: `OFF`. +* `SUITESPARSE_USE_PYTHON`: + + If `ON`, build Python interfaces for any package in SuiteSparse that has + one (currently only SPEX). If `OFF`: do not build any Python interface. + Default: `ON`. + * `SUITESPARSE_USE_OPENMP`: If `ON`, OpenMP is used by default if it is available. Default: `ON`. @@ -1023,6 +1029,11 @@ build type). The static libraries will not be built (since If `ON`, OpenMP is used in ParU if it is available. Default: `SUITESPARSE_USE_OPENMP`. +* `SPEX_USE_OPENMP`: + + If `ON`, OpenMP is used in SPEX if it is available. + Default: `SUITESPARSE_USE_OPENMP`. + * `SUITESPARSE_DEMOS`: If `ON`, build the demo programs for each package. Default: `OFF`. @@ -1072,10 +1083,32 @@ build type). The static libraries will not be built (since If `ON`, use the Fortran compiler to determine how C calls Fortan, and to build several optional Fortran routines. If `OFF`, use - `SUITESPARSE_C_TO_FORTRAN` to define how C calls Fortran (see - `SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake` for details). + `SUITESPARSE_C_TO_FORTRAN` to define how C calls Fortran. Default: `ON`. +* `SUITESPARSE_C_TO_FORTRAN` + + A string that defines how C calls Fortran (i.e., functions exported by the + BLAS library). This setting is used if no working Fortran compiler could be + detected or `SUITESPARSE_USE_FORTRAN` is set to `OFF`. This string is to be + read as the argument list and the body of a preprocessor macro. The first + argument to that macro is any Fortran function name in lowercase letters. + The second argument is the same function name in uppercase letters. The body + defines by which function name Fortran functions are called. This is + necessary because Fortran is case-insensitive, and different Fortran + compilers use different name mangling conventions. If a MSVC C/C++ compiler + is used, this defaults to `"(name,NAME) name"` (i.e., lower case without + trailing underscore). That is the name mangling convention for the Intel + Fortran compiler on Windows. If any other C/C++ compilers are used, this + defaults to `"(name,NAME) name##_"` (i.e., lower case with trailing + underscore). That is the name mangling convention for most of the commonly + used Fortran compilers (like `ifx` on platforms other than Windows, + `gfortran`, `flang`, ...). The latter name mangling convention is also used + by default by OpenBLAS (independent on the platform or the compiler used to + build OpenBLAS). You might need to configure with + `-DSUITESPARSE_C_TO_FORTRAN="(name,NAME) name##_"` if you'd like to build + SuiteSparse using a MSVC compiler and link to OpenBLAS. + Additional options are available for specific packages: * `UMFPACK_USE_CHOLMOD`: @@ -1182,7 +1215,7 @@ Julia interface: https://github.com/JuliaSparse/SparseArrays.jl -python interface to GraphBLAS by Anaconda and NVIDIA: +Python interface to GraphBLAS by Anaconda and NVIDIA: https://pypi.org/project/python-graphblas @@ -1195,6 +1228,10 @@ See scikit-sparse and scikit-umfpack for the Python interface via SciPy: https://github.com/scikit-sparse/scikit-sparse https://github.com/scikit-umfpack/scikit-umfpack +See math.js by Jos de Jong for a JavaScript port of CSparse: + + https://github.com/josdejong/mathjs + See russell for a Rust interface: https://github.com/cpmech/russell diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/CMakeLists.txt b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/CMakeLists.txt index 8e5c119b..f76fd0e0 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/CMakeLists.txt +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/CMakeLists.txt @@ -15,10 +15,10 @@ cmake_minimum_required ( VERSION 3.22 ) # version of both SuiteSparse and SuiteSparse_config -set ( SUITESPARSE_DATE "Jan 20, 2024" ) +set ( SUITESPARSE_DATE "Aug 20, 2024" ) set ( SUITESPARSE_VERSION_MAJOR 7 ) -set ( SUITESPARSE_VERSION_MINOR 6 ) -set ( SUITESPARSE_VERSION_SUB 0 ) +set ( SUITESPARSE_VERSION_MINOR 8 ) +set ( SUITESPARSE_VERSION_SUB 2 ) set ( SUITESPARSE_CONFIG_VERSION_MAJOR ${SUITESPARSE_VERSION_MAJOR} CACHE STRING "" FORCE ) set ( SUITESPARSE_CONFIG_VERSION_MINOR ${SUITESPARSE_VERSION_MINOR} CACHE STRING "" FORCE ) set ( SUITESPARSE_CONFIG_VERSION_PATCH ${SUITESPARSE_VERSION_SUB} CACHE STRING "" FORCE ) @@ -112,7 +112,14 @@ else ( ) endif ( ) endif ( ) -if ( NOT SUITESPARSE_CONFIG_USE_OPENMP AND NOT SUITESPARSE_HAVE_CLOCK_GETTIME ) +if ( SUITESPARSE_CONFIG_USE_OPENMP OR SUITESPARSE_HAVE_CLOCK_GETTIME ) + set ( SUITESPARSE_TIMER_ENABLED ON ) + if ( SUITESPARSE_CONFIG_USE_OPENMP ) + set ( SUITESPARSE_CONFIG_TIMER "omp_get_wtime" ) + else ( ) + set ( SUITESPARSE_CONFIG_TIMER "clock_gettime" ) + endif ( ) +else ( ) message ( STATUS "No OpenMP and no clock_gettime available. Timing functions won't work." ) endif ( ) @@ -174,7 +181,7 @@ if ( BUILD_STATIC_LIBS ) OUTPUT_NAME suitesparseconfig PUBLIC_HEADER "SuiteSparse_config.h" ) - if ( MSVC ) + if ( MSVC OR ("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") ) set_target_properties ( SuiteSparseConfig_static PROPERTIES OUTPUT_NAME suitesparseconfig_static ) endif ( ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/README.md.in b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/README.md.in index bc0c9142..e7be286e 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/README.md.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/README.md.in @@ -713,9 +713,9 @@ particular BLAS library use either: cd Package ; cmake -DBLA_VENDOR=OpenBLAS .. make To use the default (hunt for a BLAS), do not set `BLA_VENDOR`, or set it to -`ANY`. In this case, if `SUITESPARSE_USE_64BIT_BLAS` is ON, preference is -given to a 64-bit BLAS, but a 32-bit BLAS library will be used if no 64-bit -library is found. However, if both `SUITESPARSE_USE_64BIT_BLAS` and +an empty string. In this case, if `SUITESPARSE_USE_64BIT_BLAS` is ON, +preference is given to a 64-bit BLAS, but a 32-bit BLAS library will be used if +no 64-bit library is found. However, if both `SUITESPARSE_USE_64BIT_BLAS` and `SUITESPARSE_USE_STRICT` are ON, then only a 64-bit BLAS is considered. When selecting a particular BLAS library, the `SUITESPARSE_USE_64BIT_BLAS` @@ -979,6 +979,12 @@ build type). The static libraries will not be built (since If `ON`, look for a 64-bit BLAS. If `OFF`: 32-bit only. Default: `OFF`. +* `SUITESPARSE_USE_PYTHON`: + + If `ON`, build Python interfaces for any package in SuiteSparse that has + one (currently only SPEX). If `OFF`: do not build any Python interface. + Default: `ON`. + * `SUITESPARSE_USE_OPENMP`: If `ON`, OpenMP is used by default if it is available. Default: `ON`. @@ -1023,6 +1029,11 @@ build type). The static libraries will not be built (since If `ON`, OpenMP is used in ParU if it is available. Default: `SUITESPARSE_USE_OPENMP`. +* `SPEX_USE_OPENMP`: + + If `ON`, OpenMP is used in SPEX if it is available. + Default: `SUITESPARSE_USE_OPENMP`. + * `SUITESPARSE_DEMOS`: If `ON`, build the demo programs for each package. Default: `OFF`. @@ -1072,10 +1083,32 @@ build type). The static libraries will not be built (since If `ON`, use the Fortran compiler to determine how C calls Fortan, and to build several optional Fortran routines. If `OFF`, use - `SUITESPARSE_C_TO_FORTRAN` to define how C calls Fortran (see - `SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake` for details). + `SUITESPARSE_C_TO_FORTRAN` to define how C calls Fortran. Default: `ON`. +* `SUITESPARSE_C_TO_FORTRAN` + + A string that defines how C calls Fortran (i.e., functions exported by the + BLAS library). This setting is used if no working Fortran compiler could be + detected or `SUITESPARSE_USE_FORTRAN` is set to `OFF`. This string is to be + read as the argument list and the body of a preprocessor macro. The first + argument to that macro is any Fortran function name in lowercase letters. + The second argument is the same function name in uppercase letters. The body + defines by which function name Fortran functions are called. This is + necessary because Fortran is case-insensitive, and different Fortran + compilers use different name mangling conventions. If a MSVC C/C++ compiler + is used, this defaults to `"(name,NAME) name"` (i.e., lower case without + trailing underscore). That is the name mangling convention for the Intel + Fortran compiler on Windows. If any other C/C++ compilers are used, this + defaults to `"(name,NAME) name##_"` (i.e., lower case with trailing + underscore). That is the name mangling convention for most of the commonly + used Fortran compilers (like `ifx` on platforms other than Windows, + `gfortran`, `flang`, ...). The latter name mangling convention is also used + by default by OpenBLAS (independent on the platform or the compiler used to + build OpenBLAS). You might need to configure with + `-DSUITESPARSE_C_TO_FORTRAN="(name,NAME) name##_"` if you'd like to build + SuiteSparse using a MSVC compiler and link to OpenBLAS. + Additional options are available for specific packages: * `UMFPACK_USE_CHOLMOD`: @@ -1182,7 +1215,7 @@ Julia interface: https://github.com/JuliaSparse/SparseArrays.jl -python interface to GraphBLAS by Anaconda and NVIDIA: +Python interface to GraphBLAS by Anaconda and NVIDIA: https://pypi.org/project/python-graphblas @@ -1195,6 +1228,10 @@ See scikit-sparse and scikit-umfpack for the Python interface via SciPy: https://github.com/scikit-sparse/scikit-sparse https://github.com/scikit-umfpack/scikit-umfpack +See math.js by Jos de Jong for a JavaScript port of CSparse: + + https://github.com/josdejong/mathjs + See russell for a Rust interface: https://github.com/cpmech/russell diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/SuiteSparse_config.h.in b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/SuiteSparse_config.h.in index 0d203f55..d0576a22 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/SuiteSparse_config.h.in +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/Config/SuiteSparse_config.h.in @@ -19,11 +19,6 @@ #ifndef SUITESPARSE_CONFIG_H #define SUITESPARSE_CONFIG_H -#ifdef __cplusplus -extern "C" -{ -#endif - //------------------------------------------------------------------------------ // SuiteSparse-wide ANSI C11 #include files //------------------------------------------------------------------------------ @@ -263,6 +258,11 @@ extern "C" #endif +#ifdef __cplusplus +extern "C" +{ +#endif + //============================================================================== // SuiteSparse_config parameters and functions //============================================================================== @@ -372,20 +372,34 @@ int SuiteSparse_divcomplex // but other packages can themselves use OpenMP. In this case, // those packages should use omp_get_wtime() directly. This can // be done via the SUITESPARSE_TIME macro, defined below: + #cmakedefine SUITESPARSE_TIMER_ENABLED #cmakedefine SUITESPARSE_HAVE_CLOCK_GETTIME - #if defined ( _OPENMP ) - #define SUITESPARSE_TIMER_ENABLED - #define SUITESPARSE_TIME (omp_get_wtime ( )) - #elif defined ( SUITESPARSE_HAVE_CLOCK_GETTIME ) - #define SUITESPARSE_TIMER_ENABLED - #define SUITESPARSE_TIME (SuiteSparse_time ( )) + #cmakedefine SUITESPARSE_CONFIG_TIMER @SUITESPARSE_CONFIG_TIMER@ + #if defined ( SUITESPARSE_TIMER_ENABLED ) + #if defined ( _OPENMP ) + // Avoid indirection through the library if the compilation unit + // including this header happens to use OpenMP. + #define SUITESPARSE_TIME (omp_get_wtime ( )) + #else + #define SUITESPARSE_TIME (SuiteSparse_time ( )) + #endif #else // No timer is available #define SUITESPARSE_TIME (0) #endif #else - // The timer is explictly disabled - #define SUITESPARSE_TIME (0) + // The SuiteSparse_config timer is explictly disabled; + // use the OpenMP timer omp_get_wtime if available. + #undef SUITESPARSE_TIMER_ENABLED + #undef SUITESPARSE_HAVE_CLOCK_GETTIME + #undef SUITESPARSE_CONFIG_TIMER + #if defined ( _OPENMP ) + #define SUITESPARSE_CONFIG_TIMER omp_get_wtime + #define SUITESPARSE_TIME (omp_get_wtime ( )) + #else + #define SUITESPARSE_CONFIG_TIMER none + #define SUITESPARSE_TIME (0) + #endif #endif // SuiteSparse printf macro @@ -653,7 +667,7 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION #define SUITESPARSE_LAPACK_CLARFB SUITESPARSE_BLAS ( clarfb , CLARFB ) //------------------------------------------------------------------------------ -// prototypes of BLAS and SUITESPARSE_LAPACK functions +// prototypes and macros for BLAS and SUITESPARSE_LAPACK functions //------------------------------------------------------------------------------ // For complex functions, the (void *) parameters are actually pointers to @@ -668,14 +682,26 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION // library and integer size is used. However, these definitions should not // (normally) be exposed to the user application. -// If a user application wishes to use these definitions, simply add - +// If a user application wishes to use these definitions, simply add the +// following prior to #include'ing any SuiteSparse headers (amd.h, and so on): +// // #define SUITESPARSE_BLAS_DEFINITIONS // #include "SuiteSparse_config.h" -// prior to #include'ing any SuiteSparse headers (amd.h, and so on). - #if defined ( SUITESPARSE_BLAS_DEFINITIONS ) +#ifndef SUITESPARSE_BLAS_PROTOTYPES +#define SUITESPARSE_BLAS_PROTOTYPES +#endif +#ifndef SUITESPARSE_BLAS_MACROS +#define SUITESPARSE_BLAS_MACROS +#endif +#endif + +//------------------------------------------------------------------------------ +// prototypes of BLAS and SUITESPARSE_LAPACK functions +//------------------------------------------------------------------------------ + +#if defined ( SUITESPARSE_BLAS_PROTOTYPES ) //------------------------------------------------------------------------------ // gemv: Y = alpha*A*x + beta*Y @@ -699,20 +725,6 @@ void SUITESPARSE_BLAS_DGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGEMV ( // input: @@ -731,20 +743,6 @@ void SUITESPARSE_BLAS_SGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_sgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGEMV ( // input: @@ -763,20 +761,6 @@ void SUITESPARSE_BLAS_ZGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGEMV ( // input: @@ -795,20 +779,6 @@ void SUITESPARSE_BLAS_CGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_cgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // trsv: solve Lx=b, Ux=b, L'x=b, or U'x=b //------------------------------------------------------------------------------ @@ -828,18 +798,6 @@ void SUITESPARSE_BLAS_DTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_STRSV ( // input: @@ -855,18 +813,6 @@ void SUITESPARSE_BLAS_STRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_strsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_STRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZTRSV ( // input: @@ -882,18 +828,6 @@ void SUITESPARSE_BLAS_ZTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CTRSV ( // input: @@ -909,18 +843,6 @@ void SUITESPARSE_BLAS_CTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_ctrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // trsm: solve LX=B, UX=B, L'X=B, or U'X=B //------------------------------------------------------------------------------ @@ -943,19 +865,6 @@ void SUITESPARSE_BLAS_DTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_STRSM ( // input: @@ -974,19 +883,6 @@ void SUITESPARSE_BLAS_STRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_strsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_STRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZTRSM ( // input: @@ -1005,19 +901,6 @@ void SUITESPARSE_BLAS_ZTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CTRSM ( // input: @@ -1036,19 +919,6 @@ void SUITESPARSE_BLAS_CTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_ctrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // gemm: C = alpha*A*B + beta*C //------------------------------------------------------------------------------ @@ -1073,23 +943,6 @@ void SUITESPARSE_BLAS_DGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGEMM ( // input: @@ -1110,23 +963,6 @@ void SUITESPARSE_BLAS_SGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_sgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGEMM ( // input: @@ -1147,23 +983,6 @@ void SUITESPARSE_BLAS_ZGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGEMM ( // input: @@ -1184,23 +1003,6 @@ void SUITESPARSE_BLAS_CGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_cgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // syrk/herk: C = alpha*A*A' + beta*C ; or C = alpha*A'*A + beta*C //------------------------------------------------------------------------------ @@ -1222,19 +1024,6 @@ void SUITESPARSE_BLAS_DSYRK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SSYRK ( // input: @@ -1252,19 +1041,6 @@ void SUITESPARSE_BLAS_SSYRK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_ssyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZHERK ( // input: @@ -1282,19 +1058,6 @@ void SUITESPARSE_BLAS_ZHERK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CHERK ( // input: @@ -1312,19 +1075,6 @@ void SUITESPARSE_BLAS_CHERK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_cherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // potrf: Cholesky factorization //------------------------------------------------------------------------------ @@ -1342,20 +1092,6 @@ void SUITESPARSE_LAPACK_DPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_dpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_DPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = (Int) LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_SPOTRF ( // input: @@ -1369,20 +1105,6 @@ void SUITESPARSE_LAPACK_SPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_spotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_SPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = (Int) LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_ZPOTRF ( // input: @@ -1396,20 +1118,6 @@ void SUITESPARSE_LAPACK_ZPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_zpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_ZPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_CPOTRF ( // input: @@ -1423,20 +1131,6 @@ void SUITESPARSE_LAPACK_CPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_cpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_CPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = LAPACK_Info ; \ - } \ -} - //------------------------------------------------------------------------------ // scal: Y = alpha*Y //------------------------------------------------------------------------------ @@ -1452,16 +1146,6 @@ void SUITESPARSE_BLAS_DSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_dscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SSCAL ( // input: @@ -1473,16 +1157,6 @@ void SUITESPARSE_BLAS_SSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_sscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZSCAL ( // input: @@ -1494,16 +1168,6 @@ void SUITESPARSE_BLAS_ZSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_zscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CSCAL ( // input: @@ -1515,16 +1179,6 @@ void SUITESPARSE_BLAS_CSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_cscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // ger/geru: A = alpha*x*y' + A //------------------------------------------------------------------------------ @@ -1545,20 +1199,6 @@ void SUITESPARSE_BLAS_DGER const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGER (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGER ( // input: @@ -1575,20 +1215,6 @@ void SUITESPARSE_BLAS_SGER const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_sger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGER (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGERU ( // input: @@ -1605,20 +1231,6 @@ void SUITESPARSE_BLAS_ZGERU const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGERU (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGERU ( // input: @@ -1635,20 +1247,6 @@ void SUITESPARSE_BLAS_CGERU const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_cgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGERU (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larft: T = block Householder factor //------------------------------------------------------------------------------ @@ -1669,19 +1267,6 @@ void SUITESPARSE_LAPACK_DLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_dlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFT ( // input: @@ -1698,19 +1283,6 @@ void SUITESPARSE_LAPACK_SLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_slarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFT ( // input: @@ -1727,19 +1299,6 @@ void SUITESPARSE_LAPACK_ZLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_zlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFT ( // input: @@ -1756,19 +1315,6 @@ void SUITESPARSE_LAPACK_CLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_clarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larfb: apply block Householder reflector //------------------------------------------------------------------------------ @@ -1797,24 +1343,6 @@ void SUITESPARSE_LAPACK_DLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_dlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFB ( // input: @@ -1839,24 +1367,6 @@ void SUITESPARSE_LAPACK_SLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_slarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFB ( // input: @@ -1881,24 +1391,6 @@ void SUITESPARSE_LAPACK_ZLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_zlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFB ( // input: @@ -1923,24 +1415,6 @@ void SUITESPARSE_LAPACK_CLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_clarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // nrm2: vector 2-norm //------------------------------------------------------------------------------ @@ -1953,17 +1427,6 @@ double SUITESPARSE_BLAS_DNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dnrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_DNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - float SUITESPARSE_BLAS_SNRM2 ( // input: @@ -1972,17 +1435,6 @@ float SUITESPARSE_BLAS_SNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_snrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_SNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - double SUITESPARSE_BLAS_DZNRM2 ( // input: @@ -1991,17 +1443,6 @@ double SUITESPARSE_BLAS_DZNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dznrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_DZNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - float SUITESPARSE_BLAS_SCNRM2 ( // input: @@ -2010,17 +1451,6 @@ float SUITESPARSE_BLAS_SCNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_scnrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_SCNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larfg: generate Householder reflector //------------------------------------------------------------------------------ @@ -2038,17 +1468,6 @@ void SUITESPARSE_LAPACK_DLARFG double *tau ) ; -#define SUITESPARSE_LAPACK_dlarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFG ( // input: @@ -2062,17 +1481,6 @@ void SUITESPARSE_LAPACK_SLARFG float *tau ) ; -#define SUITESPARSE_LAPACK_slarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFG ( // input: @@ -2086,17 +1494,6 @@ void SUITESPARSE_LAPACK_ZLARFG void *tau ) ; -#define SUITESPARSE_LAPACK_zlarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFG ( // input: @@ -2110,17 +1507,6 @@ void SUITESPARSE_LAPACK_CLARFG void *tau ) ; -#define SUITESPARSE_LAPACK_clarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - //------------------------------------------------------------------------------ // larf: apply Householder reflector //------------------------------------------------------------------------------ @@ -2142,19 +1528,6 @@ void SUITESPARSE_LAPACK_DLARF double *Work ) ; -#define SUITESPARSE_LAPACK_dlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARF ( // input: @@ -2172,19 +1545,6 @@ void SUITESPARSE_LAPACK_SLARF float *Work ) ; -#define SUITESPARSE_LAPACK_slarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARF ( // input: @@ -2202,19 +1562,6 @@ void SUITESPARSE_LAPACK_ZLARF void *Work ) ; -#define SUITESPARSE_LAPACK_zlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARF ( // input: @@ -2232,19 +1579,705 @@ void SUITESPARSE_LAPACK_CLARF void *Work ) ; -#define SUITESPARSE_LAPACK_clarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +#endif + +//------------------------------------------------------------------------------ +// macros for BLAS and SUITESPARSE_LAPACK functions +//------------------------------------------------------------------------------ + +#if defined ( SUITESPARSE_BLAS_MACROS ) + +#define SUITESPARSE_BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ { \ SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ if (ok) \ { \ - SUITESPARSE_LAPACK_CLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + SUITESPARSE_BLAS_DGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ } \ } +#define SUITESPARSE_BLAS_cgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_strsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_STRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ctrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_strsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_STRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ctrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ssyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_DPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = (Int) LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_spotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_SPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = (Int) LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_ZPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_cpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_CPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_BLAS_dscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DGER (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGER (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGERU (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGERU (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dnrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_DNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_snrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_SNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dznrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_DZNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_scnrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_SCNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} #endif //------------------------------------------------------------------------------ diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/SuiteSparse_config.h b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/SuiteSparse_config.h index d2300dcf..8e532262 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/SuiteSparse_config.h +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/SuiteSparse_config.h @@ -19,11 +19,6 @@ #ifndef SUITESPARSE_CONFIG_H #define SUITESPARSE_CONFIG_H -#ifdef __cplusplus -extern "C" -{ -#endif - //------------------------------------------------------------------------------ // SuiteSparse-wide ANSI C11 #include files //------------------------------------------------------------------------------ @@ -263,6 +258,11 @@ extern "C" #endif +#ifdef __cplusplus +extern "C" +{ +#endif + //============================================================================== // SuiteSparse_config parameters and functions //============================================================================== @@ -372,20 +372,34 @@ int SuiteSparse_divcomplex // but other packages can themselves use OpenMP. In this case, // those packages should use omp_get_wtime() directly. This can // be done via the SUITESPARSE_TIME macro, defined below: + #define SUITESPARSE_TIMER_ENABLED #define SUITESPARSE_HAVE_CLOCK_GETTIME - #if defined ( _OPENMP ) - #define SUITESPARSE_TIMER_ENABLED - #define SUITESPARSE_TIME (omp_get_wtime ( )) - #elif defined ( SUITESPARSE_HAVE_CLOCK_GETTIME ) - #define SUITESPARSE_TIMER_ENABLED - #define SUITESPARSE_TIME (SuiteSparse_time ( )) + #define SUITESPARSE_CONFIG_TIMER clock_gettime + #if defined ( SUITESPARSE_TIMER_ENABLED ) + #if defined ( _OPENMP ) + // Avoid indirection through the library if the compilation unit + // including this header happens to use OpenMP. + #define SUITESPARSE_TIME (omp_get_wtime ( )) + #else + #define SUITESPARSE_TIME (SuiteSparse_time ( )) + #endif #else // No timer is available #define SUITESPARSE_TIME (0) #endif #else - // The timer is explictly disabled - #define SUITESPARSE_TIME (0) + // The SuiteSparse_config timer is explictly disabled; + // use the OpenMP timer omp_get_wtime if available. + #undef SUITESPARSE_TIMER_ENABLED + #undef SUITESPARSE_HAVE_CLOCK_GETTIME + #undef SUITESPARSE_CONFIG_TIMER + #if defined ( _OPENMP ) + #define SUITESPARSE_CONFIG_TIMER omp_get_wtime + #define SUITESPARSE_TIME (omp_get_wtime ( )) + #else + #define SUITESPARSE_CONFIG_TIMER none + #define SUITESPARSE_TIME (0) + #endif #endif // SuiteSparse printf macro @@ -420,19 +434,19 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION #define SUITESPARSE_HAS_VERSION_FUNCTION -#define SUITESPARSE_DATE "Jan 20, 2024" +#define SUITESPARSE_DATE "Aug 20, 2024" #define SUITESPARSE_MAIN_VERSION 7 -#define SUITESPARSE_SUB_VERSION 6 -#define SUITESPARSE_SUBSUB_VERSION 0 +#define SUITESPARSE_SUB_VERSION 8 +#define SUITESPARSE_SUBSUB_VERSION 2 // version format x.y #define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub)) -#define SUITESPARSE_VERSION SUITESPARSE_VER_CODE(7, 6) +#define SUITESPARSE_VERSION SUITESPARSE_VER_CODE(7, 8) // version format x.y.z #define SUITESPARSE__VERCODE(main,sub,patch) \ (((main)*1000ULL + (sub))*1000ULL + (patch)) -#define SUITESPARSE__VERSION SUITESPARSE__VERCODE(7,6,0) +#define SUITESPARSE__VERSION SUITESPARSE__VERCODE(7,8,2) //============================================================================== // SuiteSparse interface to the BLAS and LAPACK libraries @@ -653,7 +667,7 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION #define SUITESPARSE_LAPACK_CLARFB SUITESPARSE_BLAS ( clarfb , CLARFB ) //------------------------------------------------------------------------------ -// prototypes of BLAS and SUITESPARSE_LAPACK functions +// prototypes and macros for BLAS and SUITESPARSE_LAPACK functions //------------------------------------------------------------------------------ // For complex functions, the (void *) parameters are actually pointers to @@ -668,14 +682,26 @@ int SuiteSparse_version // returns SUITESPARSE_VERSION // library and integer size is used. However, these definitions should not // (normally) be exposed to the user application. -// If a user application wishes to use these definitions, simply add - +// If a user application wishes to use these definitions, simply add the +// following prior to #include'ing any SuiteSparse headers (amd.h, and so on): +// // #define SUITESPARSE_BLAS_DEFINITIONS // #include "SuiteSparse_config.h" -// prior to #include'ing any SuiteSparse headers (amd.h, and so on). - #if defined ( SUITESPARSE_BLAS_DEFINITIONS ) +#ifndef SUITESPARSE_BLAS_PROTOTYPES +#define SUITESPARSE_BLAS_PROTOTYPES +#endif +#ifndef SUITESPARSE_BLAS_MACROS +#define SUITESPARSE_BLAS_MACROS +#endif +#endif + +//------------------------------------------------------------------------------ +// prototypes of BLAS and SUITESPARSE_LAPACK functions +//------------------------------------------------------------------------------ + +#if defined ( SUITESPARSE_BLAS_PROTOTYPES ) //------------------------------------------------------------------------------ // gemv: Y = alpha*A*x + beta*Y @@ -699,20 +725,6 @@ void SUITESPARSE_BLAS_DGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGEMV ( // input: @@ -731,20 +743,6 @@ void SUITESPARSE_BLAS_SGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_sgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGEMV ( // input: @@ -763,20 +761,6 @@ void SUITESPARSE_BLAS_ZGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGEMV ( // input: @@ -795,20 +779,6 @@ void SUITESPARSE_BLAS_CGEMV const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_cgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ - &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // trsv: solve Lx=b, Ux=b, L'x=b, or U'x=b //------------------------------------------------------------------------------ @@ -828,18 +798,6 @@ void SUITESPARSE_BLAS_DTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_STRSV ( // input: @@ -855,18 +813,6 @@ void SUITESPARSE_BLAS_STRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_strsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_STRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZTRSV ( // input: @@ -882,18 +828,6 @@ void SUITESPARSE_BLAS_ZTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CTRSV ( // input: @@ -909,18 +843,6 @@ void SUITESPARSE_BLAS_CTRSV const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_ctrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CTRSV (uplo, trans, diag, &N_blas_int, A, \ - &LDA_blas_int, X, &INCX_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // trsm: solve LX=B, UX=B, L'X=B, or U'X=B //------------------------------------------------------------------------------ @@ -943,19 +865,6 @@ void SUITESPARSE_BLAS_DTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_STRSM ( // input: @@ -974,19 +883,6 @@ void SUITESPARSE_BLAS_STRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_strsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_STRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZTRSM ( // input: @@ -1005,19 +901,6 @@ void SUITESPARSE_BLAS_ZTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CTRSM ( // input: @@ -1036,19 +919,6 @@ void SUITESPARSE_BLAS_CTRSM const SUITESPARSE_BLAS_INT *ldb ) ; -#define SUITESPARSE_BLAS_ctrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CTRSM (side, uplo, transa, diag, &M_blas_int, \ - &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // gemm: C = alpha*A*B + beta*C //------------------------------------------------------------------------------ @@ -1073,23 +943,6 @@ void SUITESPARSE_BLAS_DGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGEMM ( // input: @@ -1110,23 +963,6 @@ void SUITESPARSE_BLAS_SGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_sgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGEMM ( // input: @@ -1147,23 +983,6 @@ void SUITESPARSE_BLAS_ZGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGEMM ( // input: @@ -1184,23 +1003,6 @@ void SUITESPARSE_BLAS_CGEMM const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_cgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ - C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGEMM (transa, transb, &M_blas_int, &N_blas_int, \ - &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ - &LDC_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // syrk/herk: C = alpha*A*A' + beta*C ; or C = alpha*A'*A + beta*C //------------------------------------------------------------------------------ @@ -1222,19 +1024,6 @@ void SUITESPARSE_BLAS_DSYRK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SSYRK ( // input: @@ -1252,19 +1041,6 @@ void SUITESPARSE_BLAS_SSYRK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_ssyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZHERK ( // input: @@ -1282,19 +1058,6 @@ void SUITESPARSE_BLAS_ZHERK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CHERK ( // input: @@ -1312,19 +1075,6 @@ void SUITESPARSE_BLAS_CHERK const SUITESPARSE_BLAS_INT *ldc ) ; -#define SUITESPARSE_BLAS_cherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ - A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // potrf: Cholesky factorization //------------------------------------------------------------------------------ @@ -1342,20 +1092,6 @@ void SUITESPARSE_LAPACK_DPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_dpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_DPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = (Int) LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_SPOTRF ( // input: @@ -1369,20 +1105,6 @@ void SUITESPARSE_LAPACK_SPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_spotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_SPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = (Int) LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_ZPOTRF ( // input: @@ -1396,20 +1118,6 @@ void SUITESPARSE_LAPACK_ZPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_zpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_ZPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = LAPACK_Info ; \ - } \ -} - void SUITESPARSE_LAPACK_CPOTRF ( // input: @@ -1423,20 +1131,6 @@ void SUITESPARSE_LAPACK_CPOTRF SUITESPARSE_BLAS_INT *info ) ; -#define SUITESPARSE_LAPACK_cpotrf(uplo,n,A,lda,info,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - info = 1 ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ - SUITESPARSE_LAPACK_CPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ - &LAPACK_Info) ; \ - info = LAPACK_Info ; \ - } \ -} - //------------------------------------------------------------------------------ // scal: Y = alpha*Y //------------------------------------------------------------------------------ @@ -1452,16 +1146,6 @@ void SUITESPARSE_BLAS_DSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_dscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SSCAL ( // input: @@ -1473,16 +1157,6 @@ void SUITESPARSE_BLAS_SSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_sscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZSCAL ( // input: @@ -1494,16 +1168,6 @@ void SUITESPARSE_BLAS_ZSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_zscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CSCAL ( // input: @@ -1515,16 +1179,6 @@ void SUITESPARSE_BLAS_CSCAL const SUITESPARSE_BLAS_INT *incy ) ; -#define SUITESPARSE_BLAS_cscal(n,alpha,Y,incy,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // ger/geru: A = alpha*x*y' + A //------------------------------------------------------------------------------ @@ -1545,20 +1199,6 @@ void SUITESPARSE_BLAS_DGER const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_DGER (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_SGER ( // input: @@ -1575,20 +1215,6 @@ void SUITESPARSE_BLAS_SGER const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_sger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_SGER (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_ZGERU ( // input: @@ -1605,20 +1231,6 @@ void SUITESPARSE_BLAS_ZGERU const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_ZGERU (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - void SUITESPARSE_BLAS_CGERU ( // input: @@ -1635,20 +1247,6 @@ void SUITESPARSE_BLAS_CGERU const SUITESPARSE_BLAS_INT *lda ) ; -#define SUITESPARSE_BLAS_cgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_BLAS_CGERU (&M_blas_int, &N_blas_int, alpha, X, \ - &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larft: T = block Householder factor //------------------------------------------------------------------------------ @@ -1669,19 +1267,6 @@ void SUITESPARSE_LAPACK_DLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_dlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFT ( // input: @@ -1698,19 +1283,6 @@ void SUITESPARSE_LAPACK_SLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_slarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFT ( // input: @@ -1727,19 +1299,6 @@ void SUITESPARSE_LAPACK_ZLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_zlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFT ( // input: @@ -1756,19 +1315,6 @@ void SUITESPARSE_LAPACK_CLARFT const SUITESPARSE_BLAS_INT *ldt ) ; -#define SUITESPARSE_LAPACK_clarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFT (direct, storev, &N_blas_int, &K_blas_int, \ - V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larfb: apply block Householder reflector //------------------------------------------------------------------------------ @@ -1797,24 +1343,6 @@ void SUITESPARSE_LAPACK_DLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_dlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFB ( // input: @@ -1839,24 +1367,6 @@ void SUITESPARSE_LAPACK_SLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_slarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFB ( // input: @@ -1881,24 +1391,6 @@ void SUITESPARSE_LAPACK_ZLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_zlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFB ( // input: @@ -1923,24 +1415,6 @@ void SUITESPARSE_LAPACK_CLARFB const SUITESPARSE_BLAS_INT *ldwork ) ; -#define SUITESPARSE_LAPACK_clarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ - C,ldc,Work,ldwork,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFB (side, trans, direct, storev, &M_blas_int, \ - &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ - &LDC_blas_int, Work, &LDWORK_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // nrm2: vector 2-norm //------------------------------------------------------------------------------ @@ -1953,17 +1427,6 @@ double SUITESPARSE_BLAS_DNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dnrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_DNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - float SUITESPARSE_BLAS_SNRM2 ( // input: @@ -1972,17 +1435,6 @@ float SUITESPARSE_BLAS_SNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_snrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_SNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - double SUITESPARSE_BLAS_DZNRM2 ( // input: @@ -1991,17 +1443,6 @@ double SUITESPARSE_BLAS_DZNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_dznrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_DZNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - float SUITESPARSE_BLAS_SCNRM2 ( // input: @@ -2010,17 +1451,6 @@ float SUITESPARSE_BLAS_SCNRM2 const SUITESPARSE_BLAS_INT *incx ) ; -#define SUITESPARSE_BLAS_scnrm2(result,n,X,incx,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - result = 0 ; \ - if (ok) \ - { \ - result = SUITESPARSE_BLAS_SCNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ - } \ -} - //------------------------------------------------------------------------------ // larfg: generate Householder reflector //------------------------------------------------------------------------------ @@ -2038,17 +1468,6 @@ void SUITESPARSE_LAPACK_DLARFG double *tau ) ; -#define SUITESPARSE_LAPACK_dlarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARFG ( // input: @@ -2062,17 +1481,6 @@ void SUITESPARSE_LAPACK_SLARFG float *tau ) ; -#define SUITESPARSE_LAPACK_slarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARFG ( // input: @@ -2086,17 +1494,6 @@ void SUITESPARSE_LAPACK_ZLARFG void *tau ) ; -#define SUITESPARSE_LAPACK_zlarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARFG ( // input: @@ -2110,17 +1507,6 @@ void SUITESPARSE_LAPACK_CLARFG void *tau ) ; -#define SUITESPARSE_LAPACK_clarfg(n,alpha,X,incx,tau,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_CLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ - tau) ; \ - } \ -} - //------------------------------------------------------------------------------ // larf: apply Householder reflector //------------------------------------------------------------------------------ @@ -2142,19 +1528,6 @@ void SUITESPARSE_LAPACK_DLARF double *Work ) ; -#define SUITESPARSE_LAPACK_dlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_DLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_SLARF ( // input: @@ -2172,19 +1545,6 @@ void SUITESPARSE_LAPACK_SLARF float *Work ) ; -#define SUITESPARSE_LAPACK_slarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_SLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_ZLARF ( // input: @@ -2202,19 +1562,6 @@ void SUITESPARSE_LAPACK_ZLARF void *Work ) ; -#define SUITESPARSE_LAPACK_zlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ -{ \ - SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ - SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ - if (ok) \ - { \ - SUITESPARSE_LAPACK_ZLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ - } \ -} - void SUITESPARSE_LAPACK_CLARF ( // input: @@ -2232,19 +1579,705 @@ void SUITESPARSE_LAPACK_CLARF void *Work ) ; -#define SUITESPARSE_LAPACK_clarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +#endif + +//------------------------------------------------------------------------------ +// macros for BLAS and SUITESPARSE_LAPACK functions +//------------------------------------------------------------------------------ + +#if defined ( SUITESPARSE_BLAS_MACROS ) + +#define SUITESPARSE_BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ { \ SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ - SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ - SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ if (ok) \ { \ - SUITESPARSE_LAPACK_CLARF (side, &M_blas_int, &N_blas_int, V, \ - &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + SUITESPARSE_BLAS_DGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ } \ } +#define SUITESPARSE_BLAS_cgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGEMV (trans, &M_blas_int, &N_blas_int, alpha, A, \ + &LDA_blas_int, X, &INCX_blas_int, beta, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_strsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_STRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ctrsv(uplo,trans,diag,n,A,lda,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CTRSV (uplo, trans, diag, &N_blas_int, A, \ + &LDA_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_strsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_STRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ctrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb,ok)\ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CTRSM (side, uplo, transa, diag, &M_blas_int, \ + &N_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta, \ + C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDB_blas_int, ldb, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGEMM (transa, transb, &M_blas_int, &N_blas_int, \ + &K_blas_int, alpha, A, &LDA_blas_int, B, &LDB_blas_int, beta, C, \ + &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_ssyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SSYRK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CHERK (uplo, trans, &N_blas_int, &K_blas_int, alpha, \ + A, &LDA_blas_int, beta, C, &LDC_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_DPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = (Int) LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_spotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_SPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = (Int) LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_ZPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_LAPACK_cpotrf(uplo,n,A,lda,info,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + info = 1 ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_INT LAPACK_Info = -999 ; \ + SUITESPARSE_LAPACK_CPOTRF (uplo, &N_blas_int, A, &LDA_blas_int, \ + &LAPACK_Info) ; \ + info = LAPACK_Info ; \ + } \ +} + +#define SUITESPARSE_BLAS_dscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cscal(n,alpha,Y,incy,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CSCAL (&N_blas_int, alpha, Y, &INCY_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_DGER (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_sger(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_SGER (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_ZGERU (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_cgeru(m,n,alpha,X,incx,Y,incy,A,lda,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCY_blas_int, incy, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDA_blas_int, lda, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_BLAS_CGERU (&M_blas_int, &N_blas_int, alpha, X, \ + &INCX_blas_int, Y, &INCY_blas_int, A, &LDA_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarft(direct,storev,n,k,V,ldv,Tau,T,ldt,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFT (direct, storev, &N_blas_int, &K_blas_int, \ + V, &LDV_blas_int, Tau, T, &LDT_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarfb(side,trans,direct,storev,m,n,k,V,ldv,T,ldt, \ + C,ldc,Work,ldwork,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (K_blas_int, k, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDV_blas_int, ldv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDT_blas_int, ldt, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDWORK_blas_int, ldwork, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFB (side, trans, direct, storev, &M_blas_int, \ + &N_blas_int, &K_blas_int, V, &LDV_blas_int, T, &LDT_blas_int, C, \ + &LDC_blas_int, Work, &LDWORK_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dnrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_DNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_snrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_SNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_dznrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_DZNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_BLAS_scnrm2(result,n,X,incx,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + result = 0 ; \ + if (ok) \ + { \ + result = SUITESPARSE_BLAS_SCNRM2 (&N_blas_int, X, &INCX_blas_int) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarfg(n,alpha,X,incx,tau,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCX_blas_int, incx, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARFG (&N_blas_int, alpha, X, &INCX_blas_int, \ + tau) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_dlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_DLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_slarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_SLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_zlarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_ZLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} + +#define SUITESPARSE_LAPACK_clarf(side,m,n,V,incv,tau,C,ldc,Work,ok) \ +{ \ + SUITESPARSE_TO_BLAS_INT (M_blas_int, m, ok) ; \ + SUITESPARSE_TO_BLAS_INT (N_blas_int, n, ok) ; \ + SUITESPARSE_TO_BLAS_INT (INCV_blas_int, incv, ok) ; \ + SUITESPARSE_TO_BLAS_INT (LDC_blas_int, ldc, ok) ; \ + if (ok) \ + { \ + SUITESPARSE_LAPACK_CLARF (side, &M_blas_int, &N_blas_int, V, \ + &INCV_blas_int, tau, C, &LDC_blas_int, Work) ; \ + } \ +} #endif //------------------------------------------------------------------------------ diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake index 2225f537..327dfdf7 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparseBLAS.cmake @@ -21,8 +21,6 @@ cmake_minimum_required ( VERSION 3.22 ) if ( DEFINED ENV{BLA_VENDOR} ) set ( BLA_VENDOR $ENV{BLA_VENDOR} ) endif ( ) -set ( BLA_VENDOR "ANY" CACHE STRING - "if ANY (default): searches for any BLAS. Otherwise: search for a specific BLAS" ) # To allow the use of a BLAS with 64-bit integers, set this to ON option ( SUITESPARSE_USE_64BIT_BLAS @@ -33,9 +31,6 @@ option ( BLA_STATIC "OFF (default): dynamic linking of BLAS. ON: static linking of BLAS" OFF ) if ( DEFINED BLAS_LIBRARIES OR DEFINED BLAS_INCLUDE_DIRS ) - # AMICI -- silence cmake "Manually-specified variables were not used by the project" - set(amici_ignore "${BLAS_LIBRARIES} ${BLAS_INCLUDE_DIRS}") - # User supplied variables for libraries and/or include directories. # Use them as-is. if ( SUITESPARSE_USE_64BIT_BLAS ) @@ -53,7 +48,7 @@ endif ( ) # To request specific BLAS, use either (for example): # # CMAKE_OPTIONS="-DBLA_VENDOR=Apple" make -# cd build && cmake -DBLA_VENDOR=Apple .. ; make +# cd build && cmake -DBLA_VENDOR=Apple .. ; cmake --build . # # Use SUITESPARSE_USE_64BIT_BLAS to select 64-bit or 32-bit BLAS. If # BLA_VENDOR is also defined, this setting is strictly enforced. If set to @@ -66,7 +61,7 @@ endif ( ) # # The default for SUITESPARSE_USE_64BIT_BLAS is OFF. -if ( NOT (BLA_VENDOR STREQUAL "ANY" ) ) +if ( NOT ( "${BLA_VENDOR} " STREQUAL " " ) ) # only look for the BLAS from a single vendor if ( ( BLA_VENDOR MATCHES "64ilp" ) OR ( BLA_VENDOR MATCHES "ilp64" ) ) diff --git a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake index b6b19540..26f22bb6 100644 --- a/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake +++ b/deps/AMICI/ThirdParty/SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake @@ -132,6 +132,10 @@ set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} # Use OpenMP option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP in libraries by default if available. OFF: Do not use OpenMP by default." ON ) +# control the use of Python interfaces in SuiteSparse packages (currently only +# for SPEX) +option ( SUITESPARSE_USE_PYTHON "ON (default): build Python interfaces for SuiteSparse packages (SPEX). OFF: do not build Python interfaces for SuiteSparse packages" ON ) + # strict usage option ( SUITESPARSE_USE_STRICT "ON: treat all _USE__ settings as strict if they are ON. OFF (default): consider *_USE_* as preferences, not strict" OFF ) diff --git a/deps/AMICI/cmake/AmiciConfig.cmake.in b/deps/AMICI/cmake/AmiciConfig.cmake.in index d1e86c15..d7605877 100644 --- a/deps/AMICI/cmake/AmiciConfig.cmake.in +++ b/deps/AMICI/cmake/AmiciConfig.cmake.in @@ -7,23 +7,8 @@ find_package(OpenMP) # Current SUNDIALSConfig.cmake doesn't use KLU's FindKLU, but hardcodes paths, # and is not relocatable. This does not work with Python package installation in # tmpdirs. -list(APPEND CMAKE_MODULE_PATH - @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/lib/cmake/SuiteSparse/) -if(NOT DEFINED SUITESPARSE_CONFIG_ROOT) - set(SUITESPARSE_CONFIG_ROOT @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/) -endif() -if(NOT DEFINED AMD_ROOT) - set(AMD_ROOT @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/) -endif() -if(NOT DEFINED BTF_ROOT) - set(BTF_ROOT @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/) -endif() -if(NOT DEFINED COLAMD_ROOT) - set(COLAMD_ROOT @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/) -endif() -if(NOT DEFINED KLU_ROOT) - set(KLU_ROOT @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/) -endif() +list(APPEND CMAKE_PREFIX_PATH + @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/install/) find_dependency(SuiteSparse_config REQUIRED) find_dependency(AMD REQUIRED) find_dependency(BTF REQUIRED) diff --git a/deps/AMICI/python/sdist/amici/splines.py b/deps/AMICI/python/sdist/amici/splines.py index 5d423a19..f8d6c38e 100644 --- a/deps/AMICI/python/sdist/amici/splines.py +++ b/deps/AMICI/python/sdist/amici/splines.py @@ -31,7 +31,7 @@ from abc import ABC, abstractmethod from itertools import count from numbers import Integral - +from numbers import Real import libsbml import numpy as np import sympy as sp @@ -902,7 +902,11 @@ def squared_L2_norm_of_curvature(self) -> sp.Basic: def integrate(self, x0: Real | sp.Basic, x1: Real | sp.Basic) -> sp.Basic: """Integrate the spline between the points `x0` and `x1`.""" - x = sp.Dummy("x") + # Use integer values to prevent sympy-comparison issues down the line + if isinstance(x0, Real) and x0 % 1 == 0: + x0 = int(x0) + if isinstance(x1, Real) and x1 % 1 == 0: + x1 = int(x1) x0, x1 = sp.sympify((x0, x1)) if x0 > x1: @@ -911,6 +915,8 @@ def integrate(self, x0: Real | sp.Basic, x1: Real | sp.Basic) -> sp.Basic: if x0 == x1: return sp.sympify(0) + x = sp.Dummy("x") + if self.extrapolate != ("periodic", "periodic"): return self._formula(x=x, cache=False).integrate((x, x0, x1)) diff --git a/deps/AMICI/python/tests/test_splines.py b/deps/AMICI/python/tests/test_splines.py index 66104b82..a54a0e6e 100644 --- a/deps/AMICI/python/tests/test_splines.py +++ b/deps/AMICI/python/tests/test_splines.py @@ -103,6 +103,7 @@ def test_multiple_splines(**kwargs): os.path.dirname(os.path.abspath(__file__)), "test_splines_precomputed.npz", ) - kwargs["groundtruth"] = dict(np.load(precomputed_path)) + with np.load(precomputed_path) as data: + kwargs["groundtruth"] = dict(data) return check_splines_full(splines, params, tols, **kwargs) diff --git a/deps/AMICI/python/tests/test_splines_short.py b/deps/AMICI/python/tests/test_splines_short.py index 43b0ccd2..61851e09 100644 --- a/deps/AMICI/python/tests/test_splines_short.py +++ b/deps/AMICI/python/tests/test_splines_short.py @@ -12,6 +12,7 @@ from splines_utils import check_splines_full, example_spline_1 +@skip_on_valgrind def test_spline_piecewise(**kwargs): """ Test a SBML model containing a single spline. diff --git a/deps/AMICI/scripts/buildSuiteSparse.sh b/deps/AMICI/scripts/buildSuiteSparse.sh index 93341810..bce7ca1f 100755 --- a/deps/AMICI/scripts/buildSuiteSparse.sh +++ b/deps/AMICI/scripts/buildSuiteSparse.sh @@ -8,14 +8,21 @@ script_path=$(dirname "$BASH_SOURCE") amici_path=$(cd "$script_path/.." && pwd) suitesparse_root="${amici_path}/ThirdParty/SuiteSparse" -for subdir in SuiteSparse_config BTF AMD COLAMD KLU; do - export CMAKE_OPTIONS="-DSUITESPARSE_USE_CUDA=OFF -DSUITESPARSE_USE_FORTRAN=OFF" - if [ $subdir = "SuiteSparse_config" ]; then - export CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBLA_VENDOR=All -DSUITESPARSE_USE_64BIT_BLAS=ON -DBLAS_LIBRARIES=dummy" - elif [ $subdir = "KLU" ]; then - export CMAKE_OPTIONS="$CMAKE_OPTIONS -DKLU_USE_CHOLMOD=OFF" - fi +cd "${suitesparse_root}/build" +cmake -DSUITESPARSE_ENABLE_PROJECTS="amd;btf;colamd;klu" \ + -DCMAKE_INSTALL_PREFIX="${suitesparse_root}/install" \ + -DCHOLMOD_CAMD=OFF \ + -DKLU_USE_CHOLMOD=OFF \ + -DSUITESPARSE_CONFIG_USE_OPENMP=OFF \ + -DSUITESPARSE_USE_CUDA=OFF \ + -DSUITESPARSE_USE_FORTRAN=OFF \ + -DSUITESPARSE_USE_PYTHON=OFF \ + -DSUITESPARSE_USE_OPENMP=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DSUITESPARSE_USE_64BIT_BLAS=ON \ + -DBLAS_LIBRARIES=dummy \ + .. - cd "${suitesparse_root}/${subdir}" && make local install -done +cmake --build . +cmake --install . diff --git a/deps/AMICI/scripts/buildSundials.sh b/deps/AMICI/scripts/buildSundials.sh index f3410ef3..6fe031cf 100755 --- a/deps/AMICI/scripts/buildSundials.sh +++ b/deps/AMICI/scripts/buildSundials.sh @@ -47,8 +47,8 @@ ${cmake} -DCMAKE_INSTALL_PREFIX="${sundials_build_path}" \ -DEXAMPLES_ENABLE_C=OFF \ -DEXAMPLES_INSTALL=OFF \ -DENABLE_KLU=ON \ - -DKLU_LIBRARY_DIR="${suitesparse_root}/lib" \ - -DKLU_INCLUDE_DIR="${suitesparse_root}/include/suitesparse" \ + -DKLU_LIBRARY_DIR="${suitesparse_root}/install/lib" \ + -DKLU_INCLUDE_DIR="${suitesparse_root}/install/include/suitesparse" \ ${SuperLUMT} \ .. diff --git a/deps/AMICI/scripts/run-valgrind-py.sh b/deps/AMICI/scripts/run-valgrind-py.sh index 9621c24d..7ca73c42 100755 --- a/deps/AMICI/scripts/run-valgrind-py.sh +++ b/deps/AMICI/scripts/run-valgrind-py.sh @@ -16,8 +16,8 @@ if [ $# -eq 0 ] # No arguments supplied, run all tests cd "${amici_path}"/python/tests source "${amici_path}"/venv/bin/activate - command=(python -m pytest -vv --ignore-glob=*petab* -W 'ignore:Signature ') - # ^ ignores the following warning that occurs only under valgrind, + command=(python -m pytest -vv --durations=10 --ignore-glob=*petab* -W 'ignore:Signature ') + # ^ ignores the following warning that occurs only under valgrind, # e.g. `valgrind python -c "import h5py"`: # UserWarning: Signature b'\x00\xd0\xcc\xcc\xcc\xcc\xcc\xcc\xfb\xbf\x00\x00\x00\x00\x00\x00' # for does not match any known type: falling back to type probe function. diff --git a/deps/AMICI/version.txt b/deps/AMICI/version.txt index 894542aa..30f6cf8d 100644 --- a/deps/AMICI/version.txt +++ b/deps/AMICI/version.txt @@ -1 +1 @@ -0.26.2 +0.26.1