Commit 2c993d0e90c23b8bdfa0dc9725569dd25afd452c
1 parent
204ded3d3d
Exists in
master
umfpack : Correct declaration problem for zgeru resulting in a warning or error
Showing 1 changed file with 1 additions and 1 deletions Inline Diff
fvn_sparse/UMFPACK/Source/cholmod_blas.h
| /* ========================================================================== */ | 1 | 1 | /* ========================================================================== */ | |
| /* === Include/cholmod_blas.h =============================================== */ | 2 | 2 | /* === Include/cholmod_blas.h =============================================== */ | |
| /* ========================================================================== */ | 3 | 3 | /* ========================================================================== */ | |
| 4 | 4 | |||
| /* ----------------------------------------------------------------------------- | 5 | 5 | /* ----------------------------------------------------------------------------- | |
| * CHOLMOD/Include/cholmod_blas.h. | 6 | 6 | * CHOLMOD/Include/cholmod_blas.h. | |
| * Copyright (C) Univ. of Florida. Author: Timothy A. Davis | 7 | 7 | * Copyright (C) Univ. of Florida. Author: Timothy A. Davis | |
| * CHOLMOD/Include/cholmod_blas.h is licensed under Version 2.1 of the GNU | 8 | 8 | * CHOLMOD/Include/cholmod_blas.h is licensed under Version 2.1 of the GNU | |
| * Lesser General Public License. See lesser.txt for a text of the license. | 9 | 9 | * Lesser General Public License. See lesser.txt for a text of the license. | |
| * CHOLMOD is also available under other licenses; contact authors for details. | 10 | 10 | * CHOLMOD is also available under other licenses; contact authors for details. | |
| * http://www.cise.ufl.edu/research/sparse | 11 | 11 | * http://www.cise.ufl.edu/research/sparse | |
| * -------------------------------------------------------------------------- */ | 12 | 12 | * -------------------------------------------------------------------------- */ | |
| 13 | 13 | |||
| /* This does not need to be included in the user's program. */ | 14 | 14 | /* This does not need to be included in the user's program. */ | |
| 15 | 15 | |||
| #ifndef CHOLMOD_BLAS_H | 16 | 16 | #ifndef CHOLMOD_BLAS_H | |
| #define CHOLMOD_BLAS_H | 17 | 17 | #define CHOLMOD_BLAS_H | |
| 18 | 18 | |||
| /* ========================================================================== */ | 19 | 19 | /* ========================================================================== */ | |
| /* === Architecture ========================================================= */ | 20 | 20 | /* === Architecture ========================================================= */ | |
| /* ========================================================================== */ | 21 | 21 | /* ========================================================================== */ | |
| 22 | 22 | |||
| #if defined (__sun) || defined (MSOL2) || defined (ARCH_SOL2) | 23 | 23 | #if defined (__sun) || defined (MSOL2) || defined (ARCH_SOL2) | |
| #define CHOLMOD_SOL2 | 24 | 24 | #define CHOLMOD_SOL2 | |
| #define CHOLMOD_ARCHITECTURE "Sun Solaris" | 25 | 25 | #define CHOLMOD_ARCHITECTURE "Sun Solaris" | |
| 26 | 26 | |||
| #elif defined (__sgi) || defined (MSGI) || defined (ARCH_SGI) | 27 | 27 | #elif defined (__sgi) || defined (MSGI) || defined (ARCH_SGI) | |
| #define CHOLMOD_SGI | 28 | 28 | #define CHOLMOD_SGI | |
| #define CHOLMOD_ARCHITECTURE "SGI Irix" | 29 | 29 | #define CHOLMOD_ARCHITECTURE "SGI Irix" | |
| 30 | 30 | |||
| #elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86) | 31 | 31 | #elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86) | |
| #define CHOLMOD_LINUX | 32 | 32 | #define CHOLMOD_LINUX | |
| #define CHOLMOD_ARCHITECTURE "Linux" | 33 | 33 | #define CHOLMOD_ARCHITECTURE "Linux" | |
| 34 | 34 | |||
| #elif defined (_AIX) || defined (MIBM_RS) || defined (ARCH_IBM_RS) | 35 | 35 | #elif defined (_AIX) || defined (MIBM_RS) || defined (ARCH_IBM_RS) | |
| #define CHOLMOD_AIX | 36 | 36 | #define CHOLMOD_AIX | |
| #define CHOLMOD_ARCHITECTURE "IBM AIX" | 37 | 37 | #define CHOLMOD_ARCHITECTURE "IBM AIX" | |
| #define BLAS_NO_UNDERSCORE | 38 | 38 | #define BLAS_NO_UNDERSCORE | |
| 39 | 39 | |||
| #elif defined (__alpha) || defined (MALPHA) || defined (ARCH_ALPHA) | 40 | 40 | #elif defined (__alpha) || defined (MALPHA) || defined (ARCH_ALPHA) | |
| #define CHOLMOD_ALPHA | 41 | 41 | #define CHOLMOD_ALPHA | |
| #define CHOLMOD_ARCHITECTURE "Compaq Alpha" | 42 | 42 | #define CHOLMOD_ARCHITECTURE "Compaq Alpha" | |
| 43 | 43 | |||
| #elif defined (_WIN32) || defined (WIN32) || defined (_WIN64) || defined (WIN64) | 44 | 44 | #elif defined (_WIN32) || defined (WIN32) || defined (_WIN64) || defined (WIN64) | |
| #if defined (__MINGW32__) || defined (__MINGW32__) | 45 | 45 | #if defined (__MINGW32__) || defined (__MINGW32__) | |
| #define CHOLMOD_MINGW | 46 | 46 | #define CHOLMOD_MINGW | |
| #elif defined (__CYGWIN32__) || defined (__CYGWIN32__) | 47 | 47 | #elif defined (__CYGWIN32__) || defined (__CYGWIN32__) | |
| #define CHOLMOD_CYGWIN | 48 | 48 | #define CHOLMOD_CYGWIN | |
| #else | 49 | 49 | #else | |
| #define CHOLMOD_WINDOWS | 50 | 50 | #define CHOLMOD_WINDOWS | |
| #define BLAS_NO_UNDERSCORE | 51 | 51 | #define BLAS_NO_UNDERSCORE | |
| #endif | 52 | 52 | #endif | |
| #define CHOLMOD_ARCHITECTURE "Microsoft Windows" | 53 | 53 | #define CHOLMOD_ARCHITECTURE "Microsoft Windows" | |
| 54 | 54 | |||
| #elif defined (__hppa) || defined (__hpux) || defined (MHPUX) || defined (ARCH_HPUX) | 55 | 55 | #elif defined (__hppa) || defined (__hpux) || defined (MHPUX) || defined (ARCH_HPUX) | |
| #define CHOLMOD_HP | 56 | 56 | #define CHOLMOD_HP | |
| #define CHOLMOD_ARCHITECTURE "HP Unix" | 57 | 57 | #define CHOLMOD_ARCHITECTURE "HP Unix" | |
| #define BLAS_NO_UNDERSCORE | 58 | 58 | #define BLAS_NO_UNDERSCORE | |
| 59 | 59 | |||
| #elif defined (__hp700) || defined (MHP700) || defined (ARCH_HP700) | 60 | 60 | #elif defined (__hp700) || defined (MHP700) || defined (ARCH_HP700) | |
| #define CHOLMOD_HP | 61 | 61 | #define CHOLMOD_HP | |
| #define CHOLMOD_ARCHITECTURE "HP 700 Unix" | 62 | 62 | #define CHOLMOD_ARCHITECTURE "HP 700 Unix" | |
| #define BLAS_NO_UNDERSCORE | 63 | 63 | #define BLAS_NO_UNDERSCORE | |
| 64 | 64 | |||
| #else | 65 | 65 | #else | |
| /* If the architecture is unknown, and you call the BLAS, you may need to */ | 66 | 66 | /* If the architecture is unknown, and you call the BLAS, you may need to */ | |
| /* define BLAS_BY_VALUE, BLAS_NO_UNDERSCORE, and/or BLAS_CHAR_ARG yourself. */ | 67 | 67 | /* define BLAS_BY_VALUE, BLAS_NO_UNDERSCORE, and/or BLAS_CHAR_ARG yourself. */ | |
| #define CHOLMOD_ARCHITECTURE "unknown" | 68 | 68 | #define CHOLMOD_ARCHITECTURE "unknown" | |
| #endif | 69 | 69 | #endif | |
| 70 | 70 | |||
| 71 | 71 | |||
| /* ========================================================================== */ | 72 | 72 | /* ========================================================================== */ | |
| /* === BLAS and LAPACK names ================================================ */ | 73 | 73 | /* === BLAS and LAPACK names ================================================ */ | |
| /* ========================================================================== */ | 74 | 74 | /* ========================================================================== */ | |
| 75 | 75 | |||
| /* Prototypes for the various versions of the BLAS. */ | 76 | 76 | /* Prototypes for the various versions of the BLAS. */ | |
| 77 | 77 | |||
| /* Determine if the 64-bit Sun Performance BLAS is to be used */ | 78 | 78 | /* Determine if the 64-bit Sun Performance BLAS is to be used */ | |
| #if defined(CHOLMOD_SOL2) && !defined(NSUNPERF) && defined(LONG) && defined(LONGBLAS) | 79 | 79 | #if defined(CHOLMOD_SOL2) && !defined(NSUNPERF) && defined(LONG) && defined(LONGBLAS) | |
| #define SUN64 | 80 | 80 | #define SUN64 | |
| #endif | 81 | 81 | #endif | |
| 82 | 82 | |||
| #ifdef SUN64 | 83 | 83 | #ifdef SUN64 | |
| 84 | 84 | |||
| #define BLAS_DTRSV dtrsv_64_ | 85 | 85 | #define BLAS_DTRSV dtrsv_64_ | |
| #define BLAS_DGEMV dgemv_64_ | 86 | 86 | #define BLAS_DGEMV dgemv_64_ | |
| #define BLAS_DTRSM dtrsm_64_ | 87 | 87 | #define BLAS_DTRSM dtrsm_64_ | |
| #define BLAS_DGEMM dgemm_64_ | 88 | 88 | #define BLAS_DGEMM dgemm_64_ | |
| #define BLAS_DSYRK dsyrk_64_ | 89 | 89 | #define BLAS_DSYRK dsyrk_64_ | |
| #define BLAS_DGER dger_64_ | 90 | 90 | #define BLAS_DGER dger_64_ | |
| #define BLAS_DSCAL dscal_64_ | 91 | 91 | #define BLAS_DSCAL dscal_64_ | |
| #define LAPACK_DPOTRF dpotrf_64_ | 92 | 92 | #define LAPACK_DPOTRF dpotrf_64_ | |
| 93 | 93 | |||
| #define BLAS_ZTRSV ztrsv_64_ | 94 | 94 | #define BLAS_ZTRSV ztrsv_64_ | |
| #define BLAS_ZGEMV zgemv_64_ | 95 | 95 | #define BLAS_ZGEMV zgemv_64_ | |
| #define BLAS_ZTRSM ztrsm_64_ | 96 | 96 | #define BLAS_ZTRSM ztrsm_64_ | |
| #define BLAS_ZGEMM zgemm_64_ | 97 | 97 | #define BLAS_ZGEMM zgemm_64_ | |
| #define BLAS_ZHERK zherk_64_ | 98 | 98 | #define BLAS_ZHERK zherk_64_ | |
| #define BLAS_ZGER zgeru_64_ | 99 | 99 | #define BLAS_ZGER zgeru_64_ | |
| #define BLAS_ZSCAL zscal_64_ | 100 | 100 | #define BLAS_ZSCAL zscal_64_ | |
| #define LAPACK_ZPOTRF zpotrf_64_ | 101 | 101 | #define LAPACK_ZPOTRF zpotrf_64_ | |
| 102 | 102 | |||
| #elif defined (BLAS_NO_UNDERSCORE) | 103 | 103 | #elif defined (BLAS_NO_UNDERSCORE) | |
| 104 | 104 | |||
| #define BLAS_DTRSV dtrsv | 105 | 105 | #define BLAS_DTRSV dtrsv | |
| #define BLAS_DGEMV dgemv | 106 | 106 | #define BLAS_DGEMV dgemv | |
| #define BLAS_DTRSM dtrsm | 107 | 107 | #define BLAS_DTRSM dtrsm | |
| #define BLAS_DGEMM dgemm | 108 | 108 | #define BLAS_DGEMM dgemm | |
| #define BLAS_DSYRK dsyrk | 109 | 109 | #define BLAS_DSYRK dsyrk | |
| #define BLAS_DGER dger | 110 | 110 | #define BLAS_DGER dger | |
| #define BLAS_DSCAL dscal | 111 | 111 | #define BLAS_DSCAL dscal | |
| #define LAPACK_DPOTRF dpotrf | 112 | 112 | #define LAPACK_DPOTRF dpotrf | |
| 113 | 113 | |||
| #define BLAS_ZTRSV ztrsv | 114 | 114 | #define BLAS_ZTRSV ztrsv | |
| #define BLAS_ZGEMV zgemv | 115 | 115 | #define BLAS_ZGEMV zgemv | |
| #define BLAS_ZTRSM ztrsm | 116 | 116 | #define BLAS_ZTRSM ztrsm | |
| #define BLAS_ZGEMM zgemm | 117 | 117 | #define BLAS_ZGEMM zgemm | |
| #define BLAS_ZHERK zherk | 118 | 118 | #define BLAS_ZHERK zherk | |
| #define BLAS_ZGER zgeru | 119 | 119 | #define BLAS_ZGER zgeru | |
| #define BLAS_ZSCAL zscal | 120 | 120 | #define BLAS_ZSCAL zscal | |
| #define LAPACK_ZPOTRF zpotrf | 121 | 121 | #define LAPACK_ZPOTRF zpotrf | |
| 122 | 122 | |||
| #else | 123 | 123 | #else | |
| 124 | 124 | |||
| #define BLAS_DTRSV dtrsv_ | 125 | 125 | #define BLAS_DTRSV dtrsv_ | |
| #define BLAS_DGEMV dgemv_ | 126 | 126 | #define BLAS_DGEMV dgemv_ | |
| #define BLAS_DTRSM dtrsm_ | 127 | 127 | #define BLAS_DTRSM dtrsm_ | |
| #define BLAS_DGEMM dgemm_ | 128 | 128 | #define BLAS_DGEMM dgemm_ | |
| #define BLAS_DSYRK dsyrk_ | 129 | 129 | #define BLAS_DSYRK dsyrk_ | |
| #define BLAS_DGER dger_ | 130 | 130 | #define BLAS_DGER dger_ | |
| #define BLAS_DSCAL dscal_ | 131 | 131 | #define BLAS_DSCAL dscal_ | |
| #define LAPACK_DPOTRF dpotrf_ | 132 | 132 | #define LAPACK_DPOTRF dpotrf_ | |
| 133 | 133 | |||
| #define BLAS_ZTRSV ztrsv_ | 134 | 134 | #define BLAS_ZTRSV ztrsv_ | |
| #define BLAS_ZGEMV zgemv_ | 135 | 135 | #define BLAS_ZGEMV zgemv_ | |
| #define BLAS_ZTRSM ztrsm_ | 136 | 136 | #define BLAS_ZTRSM ztrsm_ | |
| #define BLAS_ZGEMM zgemm_ | 137 | 137 | #define BLAS_ZGEMM zgemm_ | |
| #define BLAS_ZHERK zherk_ | 138 | 138 | #define BLAS_ZHERK zherk_ | |
| #define BLAS_ZGER zgeru_ | 139 | 139 | #define BLAS_ZGER zgeru_ | |
| #define BLAS_ZSCAL zscal_ | 140 | 140 | #define BLAS_ZSCAL zscal_ | |
| #define LAPACK_ZPOTRF zpotrf_ | 141 | 141 | #define LAPACK_ZPOTRF zpotrf_ | |
| 142 | 142 | |||
| #endif | 143 | 143 | #endif | |
| 144 | 144 | |||
| #ifdef PGIW32 | 145 | 145 | #ifdef PGIW32 | |
| 146 | 146 | |||
| #undef BLAS_DTRSV | 147 | 147 | #undef BLAS_DTRSV | |
| #undef BLAS_DGEMV | 148 | 148 | #undef BLAS_DGEMV | |
| #undef BLAS_DTRSM | 149 | 149 | #undef BLAS_DTRSM | |
| #undef BLAS_DGEMM | 150 | 150 | #undef BLAS_DGEMM | |
| #undef BLAS_DSYRK | 151 | 151 | #undef BLAS_DSYRK | |
| #undef BLAS_DGER | 152 | 152 | #undef BLAS_DGER | |
| #undef BLAS_DSCAL | 153 | 153 | #undef BLAS_DSCAL | |
| #undef LAPACK_DPOTRF | 154 | 154 | #undef LAPACK_DPOTRF | |
| 155 | 155 | |||
| #undef BLAS_ZTRSV | 156 | 156 | #undef BLAS_ZTRSV | |
| #undef BLAS_ZGEMV | 157 | 157 | #undef BLAS_ZGEMV | |
| #undef BLAS_ZTRSM | 158 | 158 | #undef BLAS_ZTRSM | |
| #undef BLAS_ZGEMM | 159 | 159 | #undef BLAS_ZGEMM | |
| #undef BLAS_ZHERK | 160 | 160 | #undef BLAS_ZHERK | |
| #undef BLAS_ZGER | 161 | 161 | #undef BLAS_ZGER | |
| #undef BLAS_ZSCAL | 162 | 162 | #undef BLAS_ZSCAL | |
| #undef LAPACK_ZPOTRF | 163 | 163 | #undef LAPACK_ZPOTRF | |
| 164 | 164 | |||
| 165 | 165 | |||
| 166 | 166 | |||
| #define BLAS_DTRSV dtrsv_ | 167 | 167 | #define BLAS_DTRSV dtrsv_ | |
| #define BLAS_DGEMV dgemv_ | 168 | 168 | #define BLAS_DGEMV dgemv_ | |
| #define BLAS_DTRSM dtrsm_ | 169 | 169 | #define BLAS_DTRSM dtrsm_ | |
| #define BLAS_DGEMM dgemm_ | 170 | 170 | #define BLAS_DGEMM dgemm_ | |
| #define BLAS_DSYRK dsyrk_ | 171 | 171 | #define BLAS_DSYRK dsyrk_ | |
| #define BLAS_DGER dger_ | 172 | 172 | #define BLAS_DGER dger_ | |
| #define BLAS_DSCAL dscal_ | 173 | 173 | #define BLAS_DSCAL dscal_ | |
| #define LAPACK_DPOTRF dpotrf_ | 174 | 174 | #define LAPACK_DPOTRF dpotrf_ | |
| 175 | 175 | |||
| #define BLAS_ZTRSV ztrsv_ | 176 | 176 | #define BLAS_ZTRSV ztrsv_ | |
| #define BLAS_ZGEMV zgemv_ | 177 | 177 | #define BLAS_ZGEMV zgemv_ | |
| #define BLAS_ZTRSM ztrsm_ | 178 | 178 | #define BLAS_ZTRSM ztrsm_ | |
| #define BLAS_ZGEMM zgemm_ | 179 | 179 | #define BLAS_ZGEMM zgemm_ | |
| #define BLAS_ZHERK zherk_ | 180 | 180 | #define BLAS_ZHERK zherk_ | |
| #define BLAS_ZGER zgeru_ | 181 | 181 | #define BLAS_ZGER zgeru_ | |
| #define BLAS_ZSCAL zscal_ | 182 | 182 | #define BLAS_ZSCAL zscal_ | |
| #define LAPACK_ZPOTRF zpotrf_ | 183 | 183 | #define LAPACK_ZPOTRF zpotrf_ | |
| 184 | 184 | |||
| #endif | 185 | 185 | #endif | |
| /* ========================================================================== */ | 186 | 186 | /* ========================================================================== */ | |
| /* === BLAS and LAPACK integer arguments ==================================== */ | 187 | 187 | /* === BLAS and LAPACK integer arguments ==================================== */ | |
| /* ========================================================================== */ | 188 | 188 | /* ========================================================================== */ | |
| 189 | 189 | |||
| /* CHOLMOD can be compiled with -D'LONGBLAS=long' for the Sun Performance | 190 | 190 | /* CHOLMOD can be compiled with -D'LONGBLAS=long' for the Sun Performance | |
| * Library, or -D'LONGBLAS=long long' for SGI's SCSL BLAS. This defines the | 191 | 191 | * Library, or -D'LONGBLAS=long long' for SGI's SCSL BLAS. This defines the | |
| * integer used in the BLAS for the cholmod_l_* routines. | 192 | 192 | * integer used in the BLAS for the cholmod_l_* routines. | |
| * | 193 | 193 | * | |
| * The "int" version of CHOLMOD always uses the "int" version of the BLAS. | 194 | 194 | * The "int" version of CHOLMOD always uses the "int" version of the BLAS. | |
| */ | 195 | 195 | */ | |
| 196 | 196 | |||
| #if defined (LONGBLAS) && defined (LONG) | 197 | 197 | #if defined (LONGBLAS) && defined (LONG) | |
| #define BLAS_INT LONGBLAS | 198 | 198 | #define BLAS_INT LONGBLAS | |
| #else | 199 | 199 | #else | |
| #define BLAS_INT int | 200 | 200 | #define BLAS_INT int | |
| #endif | 201 | 201 | #endif | |
| 202 | 202 | |||
| /* If the BLAS integer is smaller than the basic CHOLMOD integer, then we need | 203 | 203 | /* If the BLAS integer is smaller than the basic CHOLMOD integer, then we need | |
| * to check for integer overflow when converting from one to the other. If | 204 | 204 | * to check for integer overflow when converting from one to the other. If | |
| * any integer overflows, the externally-defined blas_ok variable is set to | 205 | 205 | * any integer overflows, the externally-defined blas_ok variable is set to | |
| * FALSE. blas_ok should be set to TRUE before calling any BLAS_* macro. | 206 | 206 | * FALSE. blas_ok should be set to TRUE before calling any BLAS_* macro. | |
| */ | 207 | 207 | */ | |
| 208 | 208 | |||
| #define CHECK_BLAS_INT (sizeof (BLAS_INT) < sizeof (Int)) | 209 | 209 | #define CHECK_BLAS_INT (sizeof (BLAS_INT) < sizeof (Int)) | |
| #define EQ(K,k) (((BLAS_INT) K) == ((Int) k)) | 210 | 210 | #define EQ(K,k) (((BLAS_INT) K) == ((Int) k)) | |
| 211 | 211 | |||
| /* ========================================================================== */ | 212 | 212 | /* ========================================================================== */ | |
| /* === BLAS and LAPACK prototypes and macros ================================ */ | 213 | 213 | /* === BLAS and LAPACK prototypes and macros ================================ */ | |
| /* ========================================================================== */ | 214 | 214 | /* ========================================================================== */ | |
| 215 | 215 | |||
| void BLAS_DGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, | 216 | 216 | void BLAS_DGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, | |
| double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, | 217 | 217 | double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, | |
| double *Y, BLAS_INT *incy) ; | 218 | 218 | double *Y, BLAS_INT *incy) ; | |
| 219 | 219 | |||
| #define BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ | 220 | 220 | #define BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ | |
| { \ | 221 | 221 | { \ | |
| BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ | 222 | 222 | BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ | |
| if (CHECK_BLAS_INT) \ | 223 | 223 | if (CHECK_BLAS_INT) \ | |
| { \ | 224 | 224 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ | 225 | 225 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ | |
| && EQ (INCY,incy) ; \ | 226 | 226 | && EQ (INCY,incy) ; \ | |
| } \ | 227 | 227 | } \ | |
| if (blas_ok) \ | 228 | 228 | if (blas_ok) \ | |
| { \ | 229 | 229 | { \ | |
| BLAS_DGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ | 230 | 230 | BLAS_DGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ | |
| } \ | 231 | 231 | } \ | |
| } | 232 | 232 | } | |
| 233 | 233 | |||
| void BLAS_ZGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, | 234 | 234 | void BLAS_ZGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, | |
| double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, | 235 | 235 | double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, | |
| double *Y, BLAS_INT *incy) ; | 236 | 236 | double *Y, BLAS_INT *incy) ; | |
| 237 | 237 | |||
| #define BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ | 238 | 238 | #define BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ | |
| { \ | 239 | 239 | { \ | |
| BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ | 240 | 240 | BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ | |
| if (CHECK_BLAS_INT) \ | 241 | 241 | if (CHECK_BLAS_INT) \ | |
| { \ | 242 | 242 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ | 243 | 243 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ | |
| && EQ (INCY,incy) ; \ | 244 | 244 | && EQ (INCY,incy) ; \ | |
| } \ | 245 | 245 | } \ | |
| if (blas_ok) \ | 246 | 246 | if (blas_ok) \ | |
| { \ | 247 | 247 | { \ | |
| BLAS_ZGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ | 248 | 248 | BLAS_ZGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ | |
| } \ | 249 | 249 | } \ | |
| } | 250 | 250 | } | |
| 251 | 251 | |||
| void BLAS_DTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, | 252 | 252 | void BLAS_DTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, | |
| BLAS_INT *lda, double *X, BLAS_INT *incx) ; | 253 | 253 | BLAS_INT *lda, double *X, BLAS_INT *incx) ; | |
| 254 | 254 | |||
| #define BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx) \ | 255 | 255 | #define BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx) \ | |
| { \ | 256 | 256 | { \ | |
| BLAS_INT N = n, LDA = lda, INCX = incx ; \ | 257 | 257 | BLAS_INT N = n, LDA = lda, INCX = incx ; \ | |
| if (CHECK_BLAS_INT) \ | 258 | 258 | if (CHECK_BLAS_INT) \ | |
| { \ | 259 | 259 | { \ | |
| blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ | 260 | 260 | blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ | |
| } \ | 261 | 261 | } \ | |
| if (blas_ok) \ | 262 | 262 | if (blas_ok) \ | |
| { \ | 263 | 263 | { \ | |
| BLAS_DTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ | 264 | 264 | BLAS_DTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ | |
| } \ | 265 | 265 | } \ | |
| } | 266 | 266 | } | |
| 267 | 267 | |||
| void BLAS_ZTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, | 268 | 268 | void BLAS_ZTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, | |
| BLAS_INT *lda, double *X, BLAS_INT *incx) ; | 269 | 269 | BLAS_INT *lda, double *X, BLAS_INT *incx) ; | |
| 270 | 270 | |||
| #define BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx) \ | 271 | 271 | #define BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx) \ | |
| { \ | 272 | 272 | { \ | |
| BLAS_INT N = n, LDA = lda, INCX = incx ; \ | 273 | 273 | BLAS_INT N = n, LDA = lda, INCX = incx ; \ | |
| if (CHECK_BLAS_INT) \ | 274 | 274 | if (CHECK_BLAS_INT) \ | |
| { \ | 275 | 275 | { \ | |
| blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ | 276 | 276 | blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ | |
| } \ | 277 | 277 | } \ | |
| if (blas_ok) \ | 278 | 278 | if (blas_ok) \ | |
| { \ | 279 | 279 | { \ | |
| BLAS_ZTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ | 280 | 280 | BLAS_ZTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ | |
| } \ | 281 | 281 | } \ | |
| } | 282 | 282 | } | |
| 283 | 283 | |||
| void BLAS_DTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, | 284 | 284 | void BLAS_DTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, | |
| BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, | 285 | 285 | BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, | |
| BLAS_INT *ldb) ; | 286 | 286 | BLAS_INT *ldb) ; | |
| 287 | 287 | |||
| #define BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ | 288 | 288 | #define BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ | |
| { \ | 289 | 289 | { \ | |
| BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ | 290 | 290 | BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ | |
| if (CHECK_BLAS_INT) \ | 291 | 291 | if (CHECK_BLAS_INT) \ | |
| { \ | 292 | 292 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ | 293 | 293 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ | |
| } \ | 294 | 294 | } \ | |
| if (blas_ok) \ | 295 | 295 | if (blas_ok) \ | |
| { \ | 296 | 296 | { \ | |
| BLAS_DTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ | 297 | 297 | BLAS_DTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ | |
| } \ | 298 | 298 | } \ | |
| } | 299 | 299 | } | |
| 300 | 300 | |||
| void BLAS_ZTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, | 301 | 301 | void BLAS_ZTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, | |
| BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, | 302 | 302 | BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, | |
| BLAS_INT *ldb) ; | 303 | 303 | BLAS_INT *ldb) ; | |
| 304 | 304 | |||
| #define BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ | 305 | 305 | #define BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ | |
| { \ | 306 | 306 | { \ | |
| BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ | 307 | 307 | BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ | |
| if (CHECK_BLAS_INT) \ | 308 | 308 | if (CHECK_BLAS_INT) \ | |
| { \ | 309 | 309 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ | 310 | 310 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ | |
| } \ | 311 | 311 | } \ | |
| if (blas_ok) \ | 312 | 312 | if (blas_ok) \ | |
| { \ | 313 | 313 | { \ | |
| BLAS_ZTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ | 314 | 314 | BLAS_ZTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ | |
| } \ | 315 | 315 | } \ | |
| } | 316 | 316 | } | |
| 317 | 317 | |||
| void BLAS_DGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, | 318 | 318 | void BLAS_DGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, | |
| BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, | 319 | 319 | BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, | |
| BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; | 320 | 320 | BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; | |
| 321 | 321 | |||
| #define BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ | 322 | 322 | #define BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ | |
| { \ | 323 | 323 | { \ | |
| BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ | 324 | 324 | BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ | |
| if (CHECK_BLAS_INT) \ | 325 | 325 | if (CHECK_BLAS_INT) \ | |
| { \ | 326 | 326 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ | 327 | 327 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ | |
| && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ | 328 | 328 | && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ | |
| } \ | 329 | 329 | } \ | |
| if (blas_ok) \ | 330 | 330 | if (blas_ok) \ | |
| { \ | 331 | 331 | { \ | |
| BLAS_DGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ | 332 | 332 | BLAS_DGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ | |
| C, &LDC) ; \ | 333 | 333 | C, &LDC) ; \ | |
| } \ | 334 | 334 | } \ | |
| } | 335 | 335 | } | |
| 336 | 336 | |||
| void BLAS_ZGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, | 337 | 337 | void BLAS_ZGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, | |
| BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, | 338 | 338 | BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, | |
| BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; | 339 | 339 | BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; | |
| 340 | 340 | |||
| #define BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ | 341 | 341 | #define BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ | |
| { \ | 342 | 342 | { \ | |
| BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ | 343 | 343 | BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ | |
| if (CHECK_BLAS_INT) \ | 344 | 344 | if (CHECK_BLAS_INT) \ | |
| { \ | 345 | 345 | { \ | |
| blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ | 346 | 346 | blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ | |
| && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ | 347 | 347 | && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ | |
| } \ | 348 | 348 | } \ | |
| if (blas_ok) \ | 349 | 349 | if (blas_ok) \ | |
| { \ | 350 | 350 | { \ | |
| BLAS_ZGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ | 351 | 351 | BLAS_ZGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ | |
| C, &LDC) ; \ | 352 | 352 | C, &LDC) ; \ | |
| } \ | 353 | 353 | } \ | |
| } | 354 | 354 | } | |
| 355 | 355 | |||
| void BLAS_DSYRK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, | 356 | 356 | void BLAS_DSYRK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, | |
| double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, | 357 | 357 | double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, | |
| BLAS_INT *ldc) ; | 358 | 358 | BLAS_INT *ldc) ; | |
| 359 | 359 | |||
| #define BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ | 360 | 360 | #define BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ | |
| { \ | 361 | 361 | { \ | |
| BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ | 362 | 362 | BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ | |
| if (CHECK_BLAS_INT) \ | 363 | 363 | if (CHECK_BLAS_INT) \ | |
| { \ | 364 | 364 | { \ | |
| blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ | 365 | 365 | blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ | |
| } \ | 366 | 366 | } \ | |
| if (blas_ok) \ | 367 | 367 | if (blas_ok) \ | |
| { \ | 368 | 368 | { \ | |
| BLAS_DSYRK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ | 369 | 369 | BLAS_DSYRK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ | |
| } \ | 370 | 370 | } \ | |
| } \ | 371 | 371 | } \ | |
| 372 | 372 | |||
| void BLAS_ZHERK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, | 373 | 373 | void BLAS_ZHERK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, | |
| double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, | 374 | 374 | double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, | |
| BLAS_INT *ldc) ; | 375 | 375 | BLAS_INT *ldc) ; | |
| 376 | 376 | |||
| #define BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ | 377 | 377 | #define BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ | |
| { \ | 378 | 378 | { \ | |
| BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ | 379 | 379 | BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ | |
| if (CHECK_BLAS_INT) \ | 380 | 380 | if (CHECK_BLAS_INT) \ | |
| { \ | 381 | 381 | { \ | |
| blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ | 382 | 382 | blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ | |
| } \ | 383 | 383 | } \ | |
| if (blas_ok) \ | 384 | 384 | if (blas_ok) \ | |
| { \ | 385 | 385 | { \ | |
| BLAS_ZHERK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ | 386 | 386 | BLAS_ZHERK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ | |
| } \ | 387 | 387 | } \ | |
| } \ | 388 | 388 | } \ | |
| 389 | 389 | |||
| void LAPACK_DPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, | 390 | 390 | void LAPACK_DPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, | |
| BLAS_INT *info) ; | 391 | 391 | BLAS_INT *info) ; | |
| 392 | 392 | |||
| #define LAPACK_dpotrf(uplo,n,A,lda,info) \ | 393 | 393 | #define LAPACK_dpotrf(uplo,n,A,lda,info) \ | |
| { \ | 394 | 394 | { \ | |
| BLAS_INT N = n, LDA = lda, INFO = 1 ; \ | 395 | 395 | BLAS_INT N = n, LDA = lda, INFO = 1 ; \ | |
| if (CHECK_BLAS_INT) \ | 396 | 396 | if (CHECK_BLAS_INT) \ | |
| { \ | 397 | 397 | { \ | |
| blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ | 398 | 398 | blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ | |
| } \ | 399 | 399 | } \ | |
| if (blas_ok) \ | 400 | 400 | if (blas_ok) \ | |
| { \ | 401 | 401 | { \ | |
| LAPACK_DPOTRF (uplo, &N, A, &LDA, &INFO) ; \ | 402 | 402 | LAPACK_DPOTRF (uplo, &N, A, &LDA, &INFO) ; \ | |
| } \ | 403 | 403 | } \ | |
| info = INFO ; \ | 404 | 404 | info = INFO ; \ | |
| } | 405 | 405 | } | |
| 406 | 406 | |||
| void LAPACK_ZPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, | 407 | 407 | void LAPACK_ZPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, | |
| BLAS_INT *info) ; | 408 | 408 | BLAS_INT *info) ; | |
| 409 | 409 | |||
| #define LAPACK_zpotrf(uplo,n,A,lda,info) \ | 410 | 410 | #define LAPACK_zpotrf(uplo,n,A,lda,info) \ | |
| { \ | 411 | 411 | { \ | |
| BLAS_INT N = n, LDA = lda, INFO = 1 ; \ | 412 | 412 | BLAS_INT N = n, LDA = lda, INFO = 1 ; \ | |
| if (CHECK_BLAS_INT) \ | 413 | 413 | if (CHECK_BLAS_INT) \ | |
| { \ | 414 | 414 | { \ | |
| blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ | 415 | 415 | blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ | |
| } \ | 416 | 416 | } \ | |
| if (blas_ok) \ | 417 | 417 | if (blas_ok) \ | |
| { \ | 418 | 418 | { \ | |
| LAPACK_ZPOTRF (uplo, &N, A, &LDA, &INFO) ; \ | 419 | 419 | LAPACK_ZPOTRF (uplo, &N, A, &LDA, &INFO) ; \ |