libflame revision_anchor
|
00001 /* 00002 libflame 00003 An object-based infrastructure for developing high-performance 00004 dense linear algebra libraries. 00005 00006 Copyright (C) 2011, The University of Texas 00007 00008 libflame is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU Lesser General Public License as 00010 published by the Free Software Foundation; either version 2.1 of 00011 the License, or (at your option) any later version. 00012 00013 libflame is distributed in the hope that it will be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with libflame; if you did not receive a copy, see 00020 http://www.gnu.org/licenses/. 00021 00022 For more information, please contact us at flame@cs.utexas.edu or 00023 send mail to: 00024 00025 Field G. Van Zee and/or 00026 Robert A. van de Geijn 00027 The University of Texas at Austin 00028 Department of Computer Sciences 00029 1 University Station C0500 00030 Austin TX 78712 00031 */ 00032 00033 // --- Name-mangling macro definitions ----------------------------------------- 00034 00035 // --- Name-mangle level-1 BLAS routines --------------------------- 00036 00037 #define F77_isamax F77_FUNC( isamax , ISAMAX ) 00038 #define F77_idamax F77_FUNC( idamax , IDAMAX ) 00039 #define F77_icamax F77_FUNC( icamax , ICAMAX ) 00040 #define F77_izamax F77_FUNC( izamax , IZAMAX ) 00041 #define F77_sasum F77_FUNC( sasum , SASUM ) 00042 #define F77_dasum F77_FUNC( dasum , DASUM ) 00043 #define F77_scasum F77_FUNC( scasum , SCASUM ) 00044 #define F77_dzasum F77_FUNC( dzasum , DZASUM ) 00045 #define F77_saxpy F77_FUNC( saxpy , SAXPY ) 00046 #define F77_daxpy F77_FUNC( daxpy , DAXPY ) 00047 #define F77_caxpy F77_FUNC( caxpy , CAXPY ) 00048 #define F77_zaxpy F77_FUNC( zaxpy , ZAXPY ) 00049 #define F77_scopy F77_FUNC( scopy , SCOPY ) 00050 #define F77_dcopy F77_FUNC( dcopy , DCOPY ) 00051 #define F77_ccopy F77_FUNC( ccopy , CCOPY ) 00052 #define F77_zcopy F77_FUNC( zcopy , ZCOPY ) 00053 #define F77_sdot F77_FUNC( sdot , SDOT ) 00054 #define F77_ddot F77_FUNC( ddot , DDOT ) 00055 #define F77_cdotu F77_FUNC( cdotu , CDOTU ) 00056 #define F77_cdotc F77_FUNC( cdotc , CDOTC ) 00057 #define F77_zdotu F77_FUNC( zdotu , ZDOTU ) 00058 #define F77_zdotc F77_FUNC( zdotc , ZDOTC ) 00059 #define F77_snrm2 F77_FUNC( snrm2 , SNRM2 ) 00060 #define F77_dnrm2 F77_FUNC( dnrm2 , DNRM2 ) 00061 #define F77_scnrm2 F77_FUNC( scnrm2 , SCNRM2 ) 00062 #define F77_dznrm2 F77_FUNC( dznrm2 , DZNRM2 ) 00063 #define F77_sscal F77_FUNC( sscal , SSCAL ) 00064 #define F77_dscal F77_FUNC( dscal , DSCAL ) 00065 #define F77_cscal F77_FUNC( cscal , CSCAL ) 00066 #define F77_csscal F77_FUNC( csscal , CSSCAL ) 00067 #define F77_zscal F77_FUNC( zscal , ZSCAL ) 00068 #define F77_zdscal F77_FUNC( zdscal , ZDSCAL ) 00069 #define F77_sswap F77_FUNC( sswap , SSWAP ) 00070 #define F77_dswap F77_FUNC( dswap , DSWAP ) 00071 #define F77_cswap F77_FUNC( cswap , CSWAP ) 00072 #define F77_zswap F77_FUNC( zswap , ZSWAP ) 00073 00074 // --- Name-mangle level-2 BLAS routines --------------------------- 00075 00076 #define F77_sgemv F77_FUNC( sgemv , SGEMV ) 00077 #define F77_dgemv F77_FUNC( dgemv , DGEMV ) 00078 #define F77_cgemv F77_FUNC( cgemv , CGEMV ) 00079 #define F77_zgemv F77_FUNC( zgemv , ZGEMV ) 00080 #define F77_sger F77_FUNC( sger , SGER ) 00081 #define F77_dger F77_FUNC( dger , DGER ) 00082 #define F77_cgerc F77_FUNC( cgerc , CGERC ) 00083 #define F77_cgeru F77_FUNC( cgeru , CGERU ) 00084 #define F77_zgerc F77_FUNC( zgerc , ZGERC ) 00085 #define F77_zgeru F77_FUNC( zgeru , ZGERU ) 00086 #define F77_chemv F77_FUNC( chemv , CHEMV ) 00087 #define F77_zhemv F77_FUNC( zhemv , ZHEMV ) 00088 #define F77_cher F77_FUNC( cher , CHER ) 00089 #define F77_zher F77_FUNC( zher , ZHER ) 00090 #define F77_cher2 F77_FUNC( cher2 , CHER2 ) 00091 #define F77_zher2 F77_FUNC( zher2 , ZHER2 ) 00092 #define F77_ssymv F77_FUNC( ssymv , SSYMV ) 00093 #define F77_dsymv F77_FUNC( dsymv , DSYMV ) 00094 #define F77_ssyr F77_FUNC( ssyr , SSYR ) 00095 #define F77_dsyr F77_FUNC( dsyr , DSYR ) 00096 #define F77_ssyr2 F77_FUNC( ssyr2 , SSYR2 ) 00097 #define F77_dsyr2 F77_FUNC( dsyr2 , DSYR2 ) 00098 #define F77_strmv F77_FUNC( strmv , STRMV ) 00099 #define F77_dtrmv F77_FUNC( dtrmv , DTRMV ) 00100 #define F77_ctrmv F77_FUNC( ctrmv , CTRMV ) 00101 #define F77_ztrmv F77_FUNC( ztrmv , ZTRMV ) 00102 #define F77_strsv F77_FUNC( strsv , STRSV ) 00103 #define F77_dtrsv F77_FUNC( dtrsv , DTRSV ) 00104 #define F77_ctrsv F77_FUNC( ctrsv , CTRSV ) 00105 #define F77_ztrsv F77_FUNC( ztrsv , ZTRSV ) 00106 00107 // --- Name-mangle level-3 BLAS routines --------------------------- 00108 00109 #define F77_sgemm F77_FUNC( sgemm , SGEMM ) 00110 #define F77_dgemm F77_FUNC( dgemm , DGEMM ) 00111 #define F77_cgemm F77_FUNC( cgemm , CGEMM ) 00112 #define F77_zgemm F77_FUNC( zgemm , ZGEMM ) 00113 #define F77_chemm F77_FUNC( chemm , CHEMM ) 00114 #define F77_zhemm F77_FUNC( zhemm , ZHEMM ) 00115 #define F77_cherk F77_FUNC( cherk , CHERK ) 00116 #define F77_zherk F77_FUNC( zherk , ZHERK ) 00117 #define F77_cher2k F77_FUNC( cher2k , CHER2K ) 00118 #define F77_zher2k F77_FUNC( zher2k , ZHER2K ) 00119 #define F77_ssymm F77_FUNC( ssymm , SSYMM ) 00120 #define F77_dsymm F77_FUNC( dsymm , DSYMM ) 00121 #define F77_csymm F77_FUNC( csymm , CSYMM ) 00122 #define F77_zsymm F77_FUNC( zsymm , ZSYMM ) 00123 #define F77_ssyrk F77_FUNC( ssyrk , SSYRK ) 00124 #define F77_dsyrk F77_FUNC( dsyrk , DSYRK ) 00125 #define F77_csyrk F77_FUNC( csyrk , CSYRK ) 00126 #define F77_zsyrk F77_FUNC( zsyrk , ZSYRK ) 00127 #define F77_ssyr2k F77_FUNC( ssyr2k , SSYR2K ) 00128 #define F77_dsyr2k F77_FUNC( dsyr2k , DSYR2K ) 00129 #define F77_csyr2k F77_FUNC( csyr2k , CSYR2K ) 00130 #define F77_zsyr2k F77_FUNC( zsyr2k , ZSYR2K ) 00131 #define F77_strmm F77_FUNC( strmm , STRMM ) 00132 #define F77_dtrmm F77_FUNC( dtrmm , DTRMM ) 00133 #define F77_ctrmm F77_FUNC( ctrmm , CTRMM ) 00134 #define F77_ztrmm F77_FUNC( ztrmm , ZTRMM ) 00135 #define F77_strsm F77_FUNC( strsm , STRSM ) 00136 #define F77_dtrsm F77_FUNC( dtrsm , DTRSM ) 00137 #define F77_ctrsm F77_FUNC( ctrsm , CTRSM ) 00138 #define F77_ztrsm F77_FUNC( ztrsm , ZTRSM ) 00139 00140 00141 // --- Prototypes -------------------------------------------------------------- 00142 00143 // --- Level-1 BLAS prototypes ------------------- 00144 00145 // --- amax --- 00146 int F77_isamax ( int* n, float* x, int* incx ); 00147 int F77_idamax ( int* n, double* x, int* incx ); 00148 int F77_icamax ( int* n, scomplex* x, int* incx ); 00149 int F77_izamax ( int* n, dcomplex* x, int* incx ); 00150 // --- asum --- 00151 float F77_sasum ( int* n, float* x, int* incx ); 00152 double F77_dasum ( int* n, double* x, int* incx ); 00153 float F77_scasum ( int* n, scomplex* x, int* incx ); 00154 double F77_dzasum ( int* n, dcomplex* x, int* incx ); 00155 // --- axpy --- 00156 void F77_saxpy ( int* n, float* alpha, float* x, int* incx, float* y, int* incy ); 00157 void F77_daxpy ( int* n, double* alpha, double* x, int* incx, double* y, int* incy ); 00158 void F77_caxpy ( int* n, scomplex* alpha, scomplex* x, int* incx, scomplex* y, int* incy ); 00159 void F77_zaxpy ( int* n, dcomplex* alpha, dcomplex* x, int* incx, dcomplex* y, int* incy ); 00160 // --- copy --- 00161 void F77_scopy ( int* n, float* x, int* incx, float* y, int* incy ); 00162 void F77_dcopy ( int* n, double* x, int* incx, double* y, int* incy ); 00163 void F77_ccopy ( int* n, scomplex* x, int* incx, scomplex* y, int* incy ); 00164 void F77_zcopy ( int* n, dcomplex* x, int* incx, dcomplex* y, int* incy ); 00165 // --- dot --- 00166 float F77_sdot ( int* n, float* x, int* incx, float* y, int* incy ); 00167 double F77_ddot ( int* n, double* x, int* incx, double* y, int* incy ); 00168 scomplex F77_cdotu ( int* n, scomplex* x, int* incx, scomplex* y, int* incy ); 00169 scomplex F77_cdotc ( int* n, scomplex* x, int* incx, scomplex* y, int* incy ); 00170 dcomplex F77_zdotu ( int* n, dcomplex* x, int* incx, dcomplex* y, int* incy ); 00171 dcomplex F77_zdotc ( int* n, dcomplex* x, int* incx, dcomplex* y, int* incy ); 00172 // --- nrm2 --- 00173 float F77_snrm2 ( int* n, float* x, int* incx ); 00174 double F77_dnrm2 ( int* n, double* x, int* incx ); 00175 float F77_scnrm2 ( int* n, scomplex* x, int* incx ); 00176 double F77_dznrm2 ( int* n, dcomplex* x, int* incx ); 00177 // --- scal --- 00178 void F77_sscal ( int* n, float* alpha, float* y, int* incy ); 00179 void F77_dscal ( int* n, double* alpha, double* y, int* incy ); 00180 void F77_cscal ( int* n, scomplex* alpha, scomplex* y, int* incy ); 00181 void F77_csscal ( int* n, float* alpha, scomplex* y, int* incy ); 00182 void F77_zscal ( int* n, dcomplex* alpha, dcomplex* y, int* incy ); 00183 void F77_zdscal ( int* n, double* alpha, dcomplex* y, int* incy ); 00184 // --- swap --- 00185 void F77_sswap ( int* n, float* x, int* incx, float* y, int* incy ); 00186 void F77_dswap ( int* n, double* x, int* incx, double* y, int* incy ); 00187 void F77_cswap ( int* n, scomplex* x, int* incx, scomplex* y, int* incy ); 00188 void F77_zswap ( int* n, dcomplex* x, int* incx, dcomplex* y, int* incy ); 00189 00190 // --- Level-2 BLAS prototypes ------------------- 00191 00192 // --- gemv --- 00193 void F77_sgemv ( char* transa, int* m, int* n, float* alpha, float* a, int* lda, float* x, int* incx, float* beta, float* y, int* incy ); 00194 void F77_dgemv ( char* transa, int* m, int* n, double* alpha, double* a, int* lda, double* x, int* incx, double* beta, double* y, int* incy ); 00195 void F77_cgemv ( char* transa, int* m, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* x, int* incx, scomplex* beta, scomplex* y, int* incy ); 00196 void F77_zgemv ( char* transa, int* m, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* x, int* incx, dcomplex* beta, dcomplex* y, int* incy ); 00197 // --- ger --- 00198 void F77_sger ( int* m, int* n, float* alpha, float* x, int* incx, float* y, int* incy, float* a, int* lda ); 00199 void F77_dger ( int* m, int* n, double* alpha, double* x, int* incx, double* y, int* incy, double* a, int* lda ); 00200 void F77_cgerc ( int* m, int* n, scomplex* alpha, scomplex* x, int* incx, scomplex* y, int* incy, scomplex* a, int* lda ); 00201 void F77_cgeru ( int* m, int* n, scomplex* alpha, scomplex* x, int* incx, scomplex* y, int* incy, scomplex* a, int* lda ); 00202 void F77_zgerc ( int* m, int* n, dcomplex* alpha, dcomplex* x, int* incx, dcomplex* y, int* incy, dcomplex* a, int* lda ); 00203 void F77_zgeru ( int* m, int* n, dcomplex* alpha, dcomplex* x, int* incx, dcomplex* y, int* incy, dcomplex* a, int* lda ); 00204 // --- hemv --- 00205 void F77_chemv ( char* uplo, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* x, int* incx, scomplex* beta, scomplex* y, int* incy ); 00206 void F77_zhemv ( char* uplo, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* x, int* incx, dcomplex* beta, dcomplex* y, int* incy ); 00207 // --- her --- 00208 void F77_cher ( char* uplo, int* n, float* alpha, scomplex* x, int* incx, scomplex* a, int* lda ); 00209 void F77_zher ( char* uplo, int* n, double* alpha, dcomplex* x, int* incx, dcomplex* a, int* lda ); 00210 // --- her2 --- 00211 void F77_cher2 ( char* uplo, int* n, scomplex* alpha, scomplex* x, int* incx, scomplex* y, int* incy, scomplex* a, int* lda ); 00212 void F77_zher2 ( char* uplo, int* n, dcomplex* alpha, dcomplex* x, int* incx, dcomplex* y, int* incy, dcomplex* a, int* lda ); 00213 // --- symv --- 00214 void F77_ssymv ( char* uplo, int* n, float* alpha, float* a, int* lda, float* x, int* incx, float* beta, float* y, int* incy ); 00215 void F77_dsymv ( char* uplo, int* n, double* alpha, double* a, int* lda, double* x, int* incx, double* beta, double* y, int* incy ); 00216 // --- syr --- 00217 void F77_ssyr ( char* uplo, int* n, float* alpha, float* x, int* incx, float* a, int* lda ); 00218 void F77_dsyr ( char* uplo, int* n, double* alpha, double* x, int* incx, double* a, int* lda ); 00219 // --- syr2 --- 00220 void F77_ssyr2 ( char* uplo, int* n, float* alpha, float* x, int* incx, float* y, int* incy, float* a, int* lda ); 00221 void F77_dsyr2 ( char* uplo, int* n, double* alpha, double* x, int* incx, double* y, int* incy, double* a, int* lda ); 00222 // --- trmv --- 00223 void F77_strmv ( char* uplo, char* transa, char* diag, int* n, float* a, int* lda, float* y, int* incy ); 00224 void F77_dtrmv ( char* uplo, char* transa, char* diag, int* n, double* a, int* lda, double* y, int* incy ); 00225 void F77_ctrmv ( char* uplo, char* transa, char* diag, int* n, scomplex* a, int* lda, scomplex* y, int* incy ); 00226 void F77_ztrmv ( char* uplo, char* transa, char* diag, int* n, dcomplex* a, int* lda, dcomplex* y, int* incy ); 00227 // --- trsv --- 00228 void F77_strsv ( char* uplo, char* transa, char* diag, int* n, float* a, int* lda, float* y, int* incy ); 00229 void F77_dtrsv ( char* uplo, char* transa, char* diag, int* n, double* a, int* lda, double* y, int* incy ); 00230 void F77_ctrsv ( char* uplo, char* transa, char* diag, int* n, scomplex* a, int* lda, scomplex* y, int* incy ); 00231 void F77_ztrsv ( char* uplo, char* transa, char* diag, int* n, dcomplex* a, int* lda, dcomplex* y, int* incy ); 00232 00233 // --- Level-3 BLAS prototypes ------------------- 00234 00235 // --- gemm --- 00236 void F77_sgemm ( char* transa, char* transb, int* m, int* n, int* k, float* alpha, float* a, int* lda, float* b, int* ldb, float* beta, float* c, int* ldc ); 00237 void F77_dgemm ( char* transa, char* transb, int* m, int* n, int* k, double* alpha, double* a, int* lda, double* b, int* ldb, double* beta, double* c, int* ldc ); 00238 void F77_cgemm ( char* transa, char* transb, int* m, int* n, int* k, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb, scomplex* beta, scomplex* c, int* ldc ); 00239 void F77_zgemm ( char* transa, char* transb, int* m, int* n, int* k, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb, dcomplex* beta, dcomplex* c, int* ldc ); 00240 // --- hemm --- 00241 void F77_chemm ( char* side, char* uplo, int* m, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb, scomplex* beta, scomplex* c, int* ldc ); 00242 void F77_zhemm ( char* side, char* uplo, int* m, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb, dcomplex* beta, dcomplex* c, int* ldc ); 00243 // --- herk --- 00244 void F77_cherk ( char* uplo, char* transa, int* n, int* k, float* alpha, scomplex* a, int* lda, float* beta, scomplex* c, int* ldc ); 00245 void F77_zherk ( char* uplo, char* transa, int* n, int* k, double* alpha, dcomplex* a, int* lda, double* beta, dcomplex* c, int* ldc ); 00246 // --- her2k --- 00247 void F77_cher2k ( char* uplo, char* transa, int* n, int* k, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb, float* beta, scomplex* c, int* ldc ); 00248 void F77_zher2k ( char* uplo, char* transa, int* n, int* k, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb, double* beta, dcomplex* c, int* ldc ); 00249 // --- symm --- 00250 void F77_ssymm ( char* side, char* uplo, int* m, int* n, float* alpha, float* a, int* lda, float* b, int* ldb, float* beta, float* c, int* ldc ); 00251 void F77_dsymm ( char* side, char* uplo, int* m, int* n, double* alpha, double* a, int* lda, double* b, int* ldb, double* beta, double* c, int* ldc ); 00252 void F77_csymm ( char* side, char* uplo, int* m, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb, scomplex* beta, scomplex* c, int* ldc ); 00253 void F77_zsymm ( char* side, char* uplo, int* m, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb, dcomplex* beta, dcomplex* c, int* ldc ); 00254 // --- syrk --- 00255 void F77_ssyrk ( char* uplo, char* transa, int* n, int* k, float* alpha, float* a, int* lda, float* beta, float* c, int* ldc ); 00256 void F77_dsyrk ( char* uplo, char* transa, int* n, int* k, double* alpha, double* a, int* lda, double* beta, double* c, int* ldc ); 00257 void F77_csyrk ( char* uplo, char* transa, int* n, int* k, scomplex* alpha, scomplex* a, int* lda, scomplex* beta, scomplex* c, int* ldc ); 00258 void F77_zsyrk ( char* uplo, char* transa, int* n, int* k, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* beta, dcomplex* c, int* ldc ); 00259 // --- syr2k --- 00260 void F77_ssyr2k ( char* uplo, char* transa, int* n, int* k, float* alpha, float* a, int* lda, float* b, int* ldb, float* beta, float* c, int* ldc ); 00261 void F77_dsyr2k ( char* uplo, char* transa, int* n, int* k, double* alpha, double* a, int* lda, double* b, int* ldb, double* beta, double* c, int* ldc ); 00262 void F77_csyr2k ( char* uplo, char* transa, int* n, int* k, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb, scomplex* beta, scomplex* c, int* ldc ); 00263 void F77_zsyr2k ( char* uplo, char* transa, int* n, int* k, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb, dcomplex* beta, dcomplex* c, int* ldc ); 00264 // --- trmm --- 00265 void F77_strmm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, float* alpha, float* a, int* lda, float* b, int* ldb ); 00266 void F77_dtrmm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, double* alpha, double* a, int* lda, double* b, int* ldb ); 00267 void F77_ctrmm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb ); 00268 void F77_ztrmm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb ); 00269 // --- trsm --- 00270 void F77_strsm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, float* alpha, float* a, int* lda, float* b, int* ldb ); 00271 void F77_dtrsm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, double* alpha, double* a, int* lda, double* b, int* ldb ); 00272 void F77_ctrsm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, scomplex* alpha, scomplex* a, int* lda, scomplex* b, int* ldb ); 00273 void F77_ztrsm ( char* side, char* uplo, char* transa, char* diag, int* m, int* n, dcomplex* alpha, dcomplex* a, int* lda, dcomplex* b, int* ldb ); 00274