1 /* 2 * cblas_f77.h 3 * Written by Keita Teranishi 4 * 5 * Updated by Jeff Horner 6 * Merged cblas_f77.h and cblas_fortran_header.h 7 */ 8 9 #ifndef CBLAS_F77_H 10 #define CBLAS_F77_H 11 12 #define FCHAR char * 13 #define FINT const int * 14 15 /* 16 * Level 1 BLAS 17 */ 18 // Google-local: Nonstandard xerbla name to avoid collisions with LAPACK. 19 #define F77_xerbla cblas_f77_xerbla_ 20 #define F77_srotg srotg_ 21 #define F77_srotmg srotmg_ 22 #define F77_srot srot_ 23 #define F77_srotm srotm_ 24 #define F77_drotg drotg_ 25 #define F77_drotmg drotmg_ 26 #define F77_drot drot_ 27 #define F77_drotm drotm_ 28 #define F77_sswap sswap_ 29 #define F77_scopy scopy_ 30 #define F77_saxpy saxpy_ 31 #define F77_dswap dswap_ 32 #define F77_dcopy dcopy_ 33 #define F77_daxpy daxpy_ 34 #define F77_cswap cswap_ 35 #define F77_ccopy ccopy_ 36 #define F77_caxpy caxpy_ 37 #define F77_zswap zswap_ 38 #define F77_zcopy zcopy_ 39 #define F77_zaxpy zaxpy_ 40 #define F77_sscal sscal_ 41 #define F77_dscal dscal_ 42 #define F77_cscal cscal_ 43 #define F77_zscal zscal_ 44 #define F77_csscal csscal_ 45 #define F77_zdscal zdscal_ 46 47 // Google-local: Use the function version of these, so that we don't need 48 // the built-in Fortran wrappers. 49 #define F77_sdot sdot_ 50 #define F77_ddot ddot_ 51 #define F77_dsdot dsdot_ 52 #define F77_sdsdot sdsdot_ 53 #define F77_snrm2 snrm2_ 54 #define F77_sasum sasum_ 55 #define F77_dnrm2 dnrm2_ 56 #define F77_dasum dasum_ 57 #define F77_isamax isamax_ 58 #define F77_idamax idamax_ 59 #define F77_icamax icamax_ 60 #define F77_izamax izamax_ 61 #define F77_scnrm2 scnrm2_ 62 #define F77_scasum scasum_ 63 #define F77_dznrm2 dznrm2_ 64 #define F77_dzasum dzasum_ 65 66 // Google-local: Use Eigen's "subroutine" versions of these functions, not 67 // the built-in Fortran wrappers. 68 #define F77_cdotc_sub cdotcw_ 69 #define F77_cdotu_sub cdotuw_ 70 #define F77_zdotu_sub zdotuw_ 71 #define F77_zdotc_sub zdotcw_ 72 73 /* 74 * Level 2 BLAS 75 */ 76 #define F77_ssymv ssymv_ 77 #define F77_ssbmv ssbmv_ 78 #define F77_sspmv sspmv_ 79 #define F77_sger sger_ 80 #define F77_ssyr ssyr_ 81 #define F77_sspr sspr_ 82 #define F77_ssyr2 ssyr2_ 83 #define F77_sspr2 sspr2_ 84 #define F77_dsymv dsymv_ 85 #define F77_dsbmv dsbmv_ 86 #define F77_dspmv dspmv_ 87 #define F77_dger dger_ 88 #define F77_dsyr dsyr_ 89 #define F77_dspr dspr_ 90 #define F77_dsyr2 dsyr2_ 91 #define F77_dspr2 dspr2_ 92 #define F77_chemv chemv_ 93 #define F77_chbmv chbmv_ 94 #define F77_chpmv chpmv_ 95 #define F77_cgeru cgeru_ 96 #define F77_cgerc cgerc_ 97 #define F77_cher cher_ 98 #define F77_chpr chpr_ 99 #define F77_cher2 cher2_ 100 #define F77_chpr2 chpr2_ 101 #define F77_zhemv zhemv_ 102 #define F77_zhbmv zhbmv_ 103 #define F77_zhpmv zhpmv_ 104 #define F77_zgeru zgeru_ 105 #define F77_zgerc zgerc_ 106 #define F77_zher zher_ 107 #define F77_zhpr zhpr_ 108 #define F77_zher2 zher2_ 109 #define F77_zhpr2 zhpr2_ 110 #define F77_sgemv sgemv_ 111 #define F77_sgbmv sgbmv_ 112 #define F77_strmv strmv_ 113 #define F77_stbmv stbmv_ 114 #define F77_stpmv stpmv_ 115 #define F77_strsv strsv_ 116 #define F77_stbsv stbsv_ 117 #define F77_stpsv stpsv_ 118 #define F77_dgemv dgemv_ 119 #define F77_dgbmv dgbmv_ 120 #define F77_dtrmv dtrmv_ 121 #define F77_dtbmv dtbmv_ 122 #define F77_dtpmv dtpmv_ 123 #define F77_dtrsv dtrsv_ 124 #define F77_dtbsv dtbsv_ 125 #define F77_dtpsv dtpsv_ 126 #define F77_cgemv cgemv_ 127 #define F77_cgbmv cgbmv_ 128 #define F77_ctrmv ctrmv_ 129 #define F77_ctbmv ctbmv_ 130 #define F77_ctpmv ctpmv_ 131 #define F77_ctrsv ctrsv_ 132 #define F77_ctbsv ctbsv_ 133 #define F77_ctpsv ctpsv_ 134 #define F77_zgemv zgemv_ 135 #define F77_zgbmv zgbmv_ 136 #define F77_ztrmv ztrmv_ 137 #define F77_ztbmv ztbmv_ 138 #define F77_ztpmv ztpmv_ 139 #define F77_ztrsv ztrsv_ 140 #define F77_ztbsv ztbsv_ 141 #define F77_ztpsv ztpsv_ 142 /* 143 * Level 3 BLAS 144 */ 145 #define F77_chemm chemm_ 146 #define F77_cherk cherk_ 147 #define F77_cher2k cher2k_ 148 #define F77_zhemm zhemm_ 149 #define F77_zherk zherk_ 150 #define F77_zher2k zher2k_ 151 #define F77_sgemm sgemm_ 152 #define F77_ssymm ssymm_ 153 #define F77_ssyrk ssyrk_ 154 #define F77_ssyr2k ssyr2k_ 155 #define F77_strmm strmm_ 156 #define F77_strsm strsm_ 157 #define F77_dgemm dgemm_ 158 #define F77_dsymm dsymm_ 159 #define F77_dsyrk dsyrk_ 160 #define F77_dsyr2k dsyr2k_ 161 #define F77_dtrmm dtrmm_ 162 #define F77_dtrsm dtrsm_ 163 #define F77_cgemm cgemm_ 164 #define F77_csymm csymm_ 165 #define F77_csyrk csyrk_ 166 #define F77_csyr2k csyr2k_ 167 #define F77_ctrmm ctrmm_ 168 #define F77_ctrsm ctrsm_ 169 #define F77_zgemm zgemm_ 170 #define F77_zsymm zsymm_ 171 #define F77_zsyrk zsyrk_ 172 #define F77_zsyr2k zsyr2k_ 173 #define F77_ztrmm ztrmm_ 174 #define F77_ztrsm ztrsm_ 175 176 #ifdef __cplusplus 177 extern "C" { 178 #endif 179 180 void F77_xerbla(FCHAR, void *); 181 /* 182 * Level 1 Fortran Prototypes 183 */ 184 185 /* Single Precision */ 186 187 void F77_srot(FINT, float *, FINT, float *, FINT, const float *, const float *); 188 void F77_srotg(float *,float *,float *,float *); 189 void F77_srotm( FINT, float *, FINT, float *, FINT, const float *); 190 void F77_srotmg(float *,float *,float *,const float *, float *); 191 void F77_sswap( FINT, float *, FINT, float *, FINT); 192 void F77_scopy( FINT, const float *, FINT, float *, FINT); 193 void F77_saxpy( FINT, const float *, const float *, FINT, float *, FINT); 194 void F77_sscal( FINT, const float *, float *, FINT); 195 196 // Google-local: Use the function version of these, so that we don't need 197 // the built-in Fortran wrappers. 198 float F77_sdot(FINT, const float *, FINT, const float *, FINT); 199 float F77_sdsdot( FINT, const float *, const float *, FINT, const float *, FINT); 200 float F77_snrm2( FINT, const float *, FINT); 201 float F77_sasum( FINT, const float *, FINT); 202 int F77_isamax( FINT, const float *, FINT); 203 204 /* Double Precision */ 205 206 void F77_drot(FINT, double *, FINT, double *, FINT, const double *, const double *); 207 void F77_drotg(double *,double *,double *,double *); 208 void F77_drotm( FINT, double *, FINT, double *, FINT, const double *); 209 void F77_drotmg(double *,double *,double *,const double *, double *); 210 void F77_dswap( FINT, double *, FINT, double *, FINT); 211 void F77_dcopy( FINT, const double *, FINT, double *, FINT); 212 void F77_daxpy( FINT, const double *, const double *, FINT, double *, FINT); 213 void F77_dswap( FINT, double *, FINT, double *, FINT); 214 void F77_dscal( FINT, const double *, double *, FINT); 215 216 // Google-local: Use the function version of these, so that we don't need 217 // the built-in Fortran wrappers. 218 double F77_ddot(FINT, const double *, FINT, const double *, FINT); 219 double F77_dsdot(FINT, const float *, FINT, const float *, FINT); 220 double F77_dnrm2( FINT, const double *, FINT); 221 double F77_dasum( FINT, const double *, FINT); 222 int F77_idamax( FINT, const double * , FINT); 223 224 /* Single Complex Precision */ 225 226 void F77_cswap( FINT, void *, FINT, void *, FINT); 227 void F77_ccopy( FINT, const void *, FINT, void *, FINT); 228 void F77_caxpy( FINT, const void *, const void *, FINT, void *, FINT); 229 void F77_cswap( FINT, void *, FINT, void *, FINT); 230 void F77_cdotc_sub( FINT, const void *, FINT, const void *, FINT, void *); 231 void F77_cdotu_sub( FINT, const void *, FINT, const void *, FINT, void *); 232 void F77_cscal( FINT, const void *, void *, FINT); 233 void F77_csscal( FINT, const float *, void *, FINT); 234 235 // Google-local: Use the function version of these, so that we don't need 236 // the built-in Fortran wrappers. 237 int F77_icamax( FINT, const void *, FINT); 238 float F77_scnrm2( FINT, const void *, FINT); 239 float F77_scasum( FINT, const void *, FINT); 240 241 /* Double Complex Precision */ 242 243 void F77_zswap( FINT, void *, FINT, void *, FINT); 244 void F77_zcopy( FINT, const void *, FINT, void *, FINT); 245 void F77_zaxpy( FINT, const void *, const void *, FINT, void *, FINT); 246 void F77_zswap( FINT, void *, FINT, void *, FINT); 247 void F77_zdotc_sub( FINT, const void *, FINT, const void *, FINT, void *); 248 void F77_zdotu_sub( FINT, const void *, FINT, const void *, FINT, void *); 249 void F77_zdscal( FINT, const double *, void *, FINT); 250 void F77_zscal( FINT, const void *, void *, FINT); 251 252 // Google-local: Use the function version of these, so that we don't need 253 // the built-in Fortran wrappers. 254 int F77_izamax( FINT, const void *, FINT); 255 double F77_dznrm2( FINT, const void *, FINT); 256 double F77_dzasum( FINT, const void *, FINT); 257 258 /* 259 * Level 2 Fortran Prototypes 260 */ 261 262 /* Single Precision */ 263 264 void F77_sgemv(FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 265 void F77_sgbmv(FCHAR, FINT, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 266 void F77_ssymv(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 267 void F77_ssbmv(FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 268 void F77_sspmv(FCHAR, FINT, const float *, const float *, const float *, FINT, const float *, float *, FINT); 269 void F77_strmv( FCHAR, FCHAR, FCHAR, FINT, const float *, FINT, float *, FINT); 270 void F77_stbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, FINT, float *, FINT); 271 void F77_strsv( FCHAR, FCHAR, FCHAR, FINT, const float *, FINT, float *, FINT); 272 void F77_stbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, FINT, float *, FINT); 273 void F77_stpmv( FCHAR, FCHAR, FCHAR, FINT, const float *, float *, FINT); 274 void F77_stpsv( FCHAR, FCHAR, FCHAR, FINT, const float *, float *, FINT); 275 void F77_sger( FINT, FINT, const float *, const float *, FINT, const float *, FINT, float *, FINT); 276 void F77_ssyr(FCHAR, FINT, const float *, const float *, FINT, float *, FINT); 277 void F77_sspr(FCHAR, FINT, const float *, const float *, FINT, float *); 278 void F77_sspr2(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, float *); 279 void F77_ssyr2(FCHAR, FINT, const float *, const float *, FINT, const float *, FINT, float *, FINT); 280 281 /* Double Precision */ 282 283 void F77_dgemv(FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 284 void F77_dgbmv(FCHAR, FINT, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 285 void F77_dsymv(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 286 void F77_dsbmv(FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 287 void F77_dspmv(FCHAR, FINT, const double *, const double *, const double *, FINT, const double *, double *, FINT); 288 void F77_dtrmv( FCHAR, FCHAR, FCHAR, FINT, const double *, FINT, double *, FINT); 289 void F77_dtbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, FINT, double *, FINT); 290 void F77_dtrsv( FCHAR, FCHAR, FCHAR, FINT, const double *, FINT, double *, FINT); 291 void F77_dtbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, FINT, double *, FINT); 292 void F77_dtpmv( FCHAR, FCHAR, FCHAR, FINT, const double *, double *, FINT); 293 void F77_dtpsv( FCHAR, FCHAR, FCHAR, FINT, const double *, double *, FINT); 294 void F77_dger( FINT, FINT, const double *, const double *, FINT, const double *, FINT, double *, FINT); 295 void F77_dsyr(FCHAR, FINT, const double *, const double *, FINT, double *, FINT); 296 void F77_dspr(FCHAR, FINT, const double *, const double *, FINT, double *); 297 void F77_dspr2(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, double *); 298 void F77_dsyr2(FCHAR, FINT, const double *, const double *, FINT, const double *, FINT, double *, FINT); 299 300 /* Single Complex Precision */ 301 302 void F77_cgemv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 303 void F77_cgbmv(FCHAR, FINT, FINT, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 304 void F77_chemv(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 305 void F77_chbmv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 306 void F77_chpmv(FCHAR, FINT, const void *, const void *, const void *, FINT, const void *, void *, FINT); 307 void F77_ctrmv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT); 308 void F77_ctbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT); 309 void F77_ctpmv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT); 310 void F77_ctrsv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT); 311 void F77_ctbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT); 312 void F77_ctpsv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *,FINT); 313 void F77_cgerc( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 314 void F77_cgeru( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 315 void F77_cher(FCHAR, FINT, const float *, const void *, FINT, void *, FINT); 316 void F77_cher2(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 317 void F77_chpr(FCHAR, FINT, const float *, const void *, FINT, void *); 318 void F77_chpr2(FCHAR, FINT, const float *, const void *, FINT, const void *, FINT, void *); 319 320 /* Double Complex Precision */ 321 322 void F77_zgemv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 323 void F77_zgbmv(FCHAR, FINT, FINT, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 324 void F77_zhemv(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 325 void F77_zhbmv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT); 326 void F77_zhpmv(FCHAR, FINT, const void *, const void *, const void *, FINT, const void *, void *, FINT); 327 void F77_ztrmv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT); 328 void F77_ztbmv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT); 329 void F77_ztpmv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT); 330 void F77_ztrsv( FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT); 331 void F77_ztbsv( FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT); 332 void F77_ztpsv( FCHAR, FCHAR, FCHAR, FINT, const void *, void *,FINT); 333 void F77_zgerc( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 334 void F77_zgeru( FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 335 void F77_zher(FCHAR, FINT, const double *, const void *, FINT, void *, FINT); 336 void F77_zher2(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT); 337 void F77_zhpr(FCHAR, FINT, const double *, const void *, FINT, void *); 338 void F77_zhpr2(FCHAR, FINT, const double *, const void *, FINT, const void *, FINT, void *); 339 340 /* 341 * Level 3 Fortran Prototypes 342 */ 343 344 /* Single Precision */ 345 346 void F77_sgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 347 void F77_ssymm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 348 void F77_ssyrk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT); 349 void F77_ssyr2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 350 void F77_strmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT); 351 void F77_strsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT); 352 353 /* Double Precision */ 354 355 void F77_dgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 356 void F77_dsymm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 357 void F77_dsyrk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT); 358 void F77_dsyr2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 359 void F77_dtrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT); 360 void F77_dtrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT); 361 362 /* Single Complex Precision */ 363 364 void F77_cgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 365 void F77_csymm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 366 void F77_chemm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 367 void F77_csyrk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT); 368 void F77_cherk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT); 369 void F77_csyr2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 370 void F77_cher2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT); 371 void F77_ctrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT); 372 void F77_ctrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT); 373 374 /* Double Complex Precision */ 375 376 void F77_zgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 377 void F77_zsymm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 378 void F77_zhemm(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 379 void F77_zsyrk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT); 380 void F77_zherk(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, double *, FINT); 381 void F77_zsyr2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 382 void F77_zher2k(FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT); 383 void F77_ztrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT); 384 void F77_ztrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const double *, const double *, FINT, double *, FINT); 385 386 #ifdef __cplusplus 387 } 388 #endif 389 390 #endif /* CBLAS_F77_H */ 391