|
Teuchos - Trilinos Tools Package Version of the Day
|
00001 /* 00002 // @HEADER 00003 // *********************************************************************** 00004 // 00005 // Teuchos: Common Tools Package 00006 // Copyright (2004) Sandia Corporation 00007 // 00008 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00009 // license for use of this work by or on behalf of the U.S. Government. 00010 // 00011 // This library is free software; you can redistribute it and/or modify 00012 // it under the terms of the GNU Lesser General Public License as 00013 // published by the Free Software Foundation; either version 2.1 of the 00014 // License, or (at your option) any later version. 00015 // 00016 // This library is distributed in the hope that it will be useful, but 00017 // WITHOUT ANY WARRANTY; without even the implied warranty of 00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 // Lesser General Public License for more details. 00020 // 00021 // You should have received a copy of the GNU Lesser General Public 00022 // License along with this library; if not, write to the Free Software 00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00024 // USA 00025 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00026 // 00027 // *********************************************************************** 00028 // @HEADER 00029 */ 00030 00031 #ifndef _TEUCHOS_BLAS_WRAPPERS_HPP_ 00032 #define _TEUCHOS_BLAS_WRAPPERS_HPP_ 00033 00034 #include "Teuchos_ConfigDefs.hpp" 00035 #ifdef _MSC_VER 00036 /* disable warning for C-linkage returning complex class */ 00037 #pragma warning ( disable : 4190 ) 00038 #endif 00039 00044 /* Define fcd (Fortran Teuchos_fcd descriptor) for non-standard situations */ 00045 00046 #if defined(CRAY_T3X) || defined(INTEL_CXML) || defined(INTEL_MKL) 00047 00048 00049 #if defined(CRAY_T3X) 00050 00051 #include <fortran.h> 00052 #define PREFIX 00053 #define Teuchos_fcd fcd 00054 00055 #define DROTG_F77 F77_BLAS_MANGLE(srotg,SROTG) 00056 #define DROT_F77 F77_BLAS_MANGLE(srot,SROT) 00057 #define DASUM_F77 F77_BLAS_MANGLE(sasum,SASUM) 00058 #define DAXPY_F77 F77_BLAS_MANGLE(saxpy,SAXPY) 00059 #define DCOPY_F77 F77_BLAS_MANGLE(scopy,SCOPY) 00060 #define DDOT_F77 F77_BLAS_MANGLE(sdot,SDOT) 00061 #define DNRM2_F77 F77_BLAS_MANGLE(snrm2,SNRM2) 00062 #define DSCAL_F77 F77_BLAS_MANGLE(sscal,SSCAL) 00063 #define IDAMAX_F77 F77_BLAS_MANGLE(isamax,ISAMAX) 00064 #define DGEMV_F77 F77_BLAS_MANGLE(sgemv,SGEMV) 00065 #define DGER_F77 F77_BLAS_MANGLE(sger,SGER) 00066 #define DTRMV_F77 F77_BLAS_MANGLE(strmv,STRMV) 00067 #define DGEMM_F77 F77_BLAS_MANGLE(sgemm,SGEMM) 00068 #define DSYMM_F77 F77_BLAS_MANGLE(ssymm,SSYMM) 00069 #define DTRMM_F77 F77_BLAS_MANGLE(strmm,STRMM) 00070 #define DTRSM_F77 F77_BLAS_MANGLE(strsm,STRSM) 00071 00072 #ifdef HAVE_TEUCHOS_COMPLEX 00073 00074 #define ZROTG_F77 F77_BLAS_MANGLE(crotg,CROTG) 00075 #define ZROT_F77 F77_BLAS_MANGLE(crot,CROT) 00076 #define ZASUM_F77 F77_BLAS_MANGLE(scasum,SCASUM) 00077 #define ZAXPY_F77 F77_BLAS_MANGLE(caxpy,CAXPY) 00078 #define ZCOPY_F77 F77_BLAS_MANGLE(ccopy,CCOPY) 00079 #define ZDOT_F77 F77_BLAS_MANGLE(cdotc,CDOTC) 00080 #define ZNRM2_F77 F77_BLAS_MANGLE(scnrm2,SCNRM2) 00081 #define ZSCAL_F77 F77_BLAS_MANGLE(cscal,CSCAL) 00082 #define IZAMAX_F77 F77_BLAS_MANGLE(icamax,ICAMAX) 00083 #define ZGEMV_F77 F77_BLAS_MANGLE(cgemv,CGEMV) 00084 #define ZGER_F77 F77_BLAS_MANGLE(cgerc,CGERC) 00085 #define ZTRMV_F77 F77_BLAS_MANGLE(ctrmv,CTRMV) 00086 #define ZGEMM_F77 F77_BLAS_MANGLE(cgemm,CGEMM) 00087 #define ZSYMM_F77 F77_BLAS_MANGLE(csymm,CSYMM) 00088 #define ZTRMM_F77 F77_BLAS_MANGLE(ctrmm,CTRMM) 00089 #define ZTRSM_F77 F77_BLAS_MANGLE(ctrsm,CTRSM) 00090 00091 #endif /* HAVE_TEUCHOS_COMPLEX */ 00092 00093 #elif defined(INTEL_CXML) 00094 00095 #define PREFIX __stdcall 00096 #define Teuchos_fcd const char *, unsigned int 00097 00098 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00099 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00100 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00101 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00102 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00103 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00104 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00105 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00106 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00107 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00108 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00109 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00110 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00111 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00112 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00113 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00114 00115 #ifdef HAVE_TEUCHOS_COMPLEX 00116 00117 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00118 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00119 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00120 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00121 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00122 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00123 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00124 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00125 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00126 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00127 #define ZGER_F77 F77_BLAS_MANGLE(zgerc,ZGERC) 00128 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00129 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00130 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00131 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00132 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00133 00134 #endif /* HAVE_TEUCHOS_COMPLEX */ 00135 00136 #elif defined(INTEL_MKL) 00137 00138 #define PREFIX 00139 #define Teuchos_fcd const char * 00140 00141 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00142 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00143 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00144 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00145 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00146 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00147 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00148 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00149 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00150 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00151 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00152 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00153 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00154 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00155 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00156 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00157 00158 #ifdef HAVE_TEUCHOS_COMPLEX 00159 00160 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00161 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00162 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00163 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00164 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00165 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00166 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00167 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00168 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00169 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00170 #define ZGER_F77 F77_BLAS_MANGLE(zgerc,ZGERC) 00171 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00172 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00173 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00174 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00175 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00176 00177 #endif /* HAVE_TEUCHOS_COMPLEX */ 00178 00179 #endif 00180 00181 /* All three of these machines use a simple uppercase mangling of Fortran names */ 00182 00183 /* if F77_BLAS_MANGLE is defined undefine it because we want to redefine */ 00184 00185 #ifdef F77_FUNC 00186 #undef F77_FUNC 00187 #endif 00188 00189 #ifdef F77_BLAS_MANGLE 00190 #undef F77_BLAS_MANGLE 00191 #endif 00192 00193 #define F77_FUNC(lcase,UCASE) PREFIX UCASE 00194 #define F77_BLAS_MANGLE(lcase,UCASE) PREFIX UCASE 00195 00196 #else /* Define Teuchos_fcd for all other machines */ 00197 00198 #define PREFIX 00199 #define Teuchos_fcd const char * 00200 00201 #ifdef TRILINOS_NO_CONFIG_H 00202 00203 #ifdef F77_FUNC 00204 #undef F77_FUNC 00205 #endif 00206 00207 #ifdef F77_BLAS_MANGLE 00208 #undef F77_BLAS_MANGLE 00209 #endif 00210 00211 #ifdef TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE 00212 # define F77_FUNC(lcase,UCASE) lcase 00213 # define F77_BLAS_MANGLE(lcase,UCASE) lcase 00214 #else /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE not defined*/ 00215 # define F77_FUNC(lcase,UCASE) lcase ## _ 00216 # define F77_BLAS_MANGLE(lcase,UCASE) lcase ## _ 00217 #endif /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE */ 00218 00219 #endif /* TRILINOS_NO_CONFIG_H */ 00220 00221 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00222 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00223 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00224 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00225 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00226 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00227 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00228 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00229 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00230 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00231 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00232 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00233 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00234 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00235 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00236 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00237 00238 #ifdef HAVE_TEUCHOS_COMPLEX 00239 00240 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00241 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00242 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00243 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00244 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00245 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00246 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00247 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00248 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00249 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00250 #define ZGER_F77 F77_BLAS_MANGLE(zgerc,ZGERC) 00251 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00252 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00253 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00254 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00255 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00256 00257 #endif /* HAVE_TEUCHOS_COMPLEX */ 00258 00259 #endif 00260 00261 00262 /* Explicitly define each F77 name for all BLAS kernels */ 00263 00264 #define SROTG_F77 F77_BLAS_MANGLE(srotg,SROTG) 00265 #define SROT_F77 F77_BLAS_MANGLE(srot,SROT) 00266 #define SSCAL_F77 F77_BLAS_MANGLE(sscal,SSCAL) 00267 #define SCOPY_F77 F77_BLAS_MANGLE(scopy,SCOPY) 00268 #define SAXPY_F77 F77_BLAS_MANGLE(saxpy,SAXPY) 00269 #define SDOT_F77 F77_BLAS_MANGLE(sdot,SDOT) 00270 #define SNRM2_F77 F77_BLAS_MANGLE(snrm2,SNRM2) 00271 #define SASUM_F77 F77_BLAS_MANGLE(sasum,SASUM) 00272 #define ISAMAX_F77 F77_BLAS_MANGLE(isamax,ISAMAX) 00273 00274 #define SGEMV_F77 F77_BLAS_MANGLE(sgemv,SGEMV) 00275 #define SGER_F77 F77_BLAS_MANGLE(sger,SGER) 00276 #define STRMV_F77 F77_BLAS_MANGLE(strmv,STRMV) 00277 #define SGEMM_F77 F77_BLAS_MANGLE(sgemm,SGEMM) 00278 #define SSYMM_F77 F77_BLAS_MANGLE(ssymm,SSYMM) 00279 #define STRMM_F77 F77_BLAS_MANGLE(strmm,STRMM) 00280 #define STRSM_F77 F77_BLAS_MANGLE(strsm,STRSM) 00281 00282 #ifdef HAVE_TEUCHOS_COMPLEX 00283 00284 #define CROTG_F77 F77_BLAS_MANGLE(crotg,CROTG) 00285 #define CROT_F77 F77_BLAS_MANGLE(crot,CROT) 00286 #define CASUM_F77 F77_BLAS_MANGLE(scasum,SCASUM) 00287 #define CAXPY_F77 F77_BLAS_MANGLE(caxpy,CAXPY) 00288 #define CCOPY_F77 F77_BLAS_MANGLE(ccopy,CCOPY) 00289 #define CDOT_F77 F77_BLAS_MANGLE(cdotc,CDOTC) 00290 #define CNRM2_F77 F77_BLAS_MANGLE(scnrm2,SCNRM2) 00291 #define CSCAL_F77 F77_BLAS_MANGLE(cscal,CSCAL) 00292 #define ICAMAX_F77 F77_BLAS_MANGLE(icamax,ICAMAX) 00293 #define CGEMV_F77 F77_BLAS_MANGLE(cgemv,CGEMV) 00294 #define CGER_F77 F77_BLAS_MANGLE(cgerc,CGERC) 00295 #define CTRMV_F77 F77_BLAS_MANGLE(ctrmv,CTRMV) 00296 #define CGEMM_F77 F77_BLAS_MANGLE(cgemm,CGEMM) 00297 #define CSYMM_F77 F77_BLAS_MANGLE(csymm,CSYMM) 00298 #define CTRMM_F77 F77_BLAS_MANGLE(ctrmm,CTRMM) 00299 #define CTRSM_F77 F77_BLAS_MANGLE(ctrsm,CTRSM) 00300 00301 #endif /* HAVE_TEUCHOS_COMPLEX */ 00302 00303 #ifdef __cplusplus 00304 extern "C" { 00305 #endif 00306 00307 00308 /* Double precision BLAS 1 */ 00309 void PREFIX DROTG_F77(double* da, double* db, double* c, double* s); 00310 void PREFIX DROT_F77(const int* n, double* dx, const int* incx, double* dy, const int* incy, double* c, double* s); 00311 double PREFIX DASUM_F77(const int* n, const double x[], const int* incx); 00312 void PREFIX DAXPY_F77(const int* n, const double* alpha, const double x[], const int* incx, double y[], const int* incy); 00313 void PREFIX DCOPY_F77(const int* n, const double *x, const int* incx, double *y, const int* incy); 00314 double PREFIX DDOT_F77(const int* n, const double x[], const int* incx, const double y[], const int* incy); 00315 double PREFIX DNRM2_F77(const int* n, const double x[], const int* incx); 00316 void PREFIX DSCAL_F77(const int* n, const double* alpha, double *x, const int* incx); 00317 int PREFIX IDAMAX_F77(const int* n, const double *x, const int* incx); 00318 00319 /* Double std::complex precision BLAS 1 */ 00320 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00321 00322 void PREFIX ZROTG_F77(std::complex<double>* da, std::complex<double>* db, double* c, std::complex<double>* s); 00323 void PREFIX ZROT_F77(const int* n, std::complex<double>* dx, const int* incx, std::complex<double>* dy, const int* incy, double* c, std::complex<double>* s); 00324 double PREFIX ZASUM_F77(const int* n, const std::complex<double> x[], const int* incx); 00325 void PREFIX ZAXPY_F77(const int* n, const std::complex<double>* alpha, const std::complex<double> x[], const int* incx, std::complex<double> y[], const int* incy); 00326 void PREFIX ZCOPY_F77(const int* n, const std::complex<double> *x, const int* incx, std::complex<double> *y, const int* incy); 00327 #if defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM) 00328 void PREFIX ZDOT_F77(std::complex<double> *ret, const int* n, const std::complex<double> x[], const int* incx, const std::complex<double> y[], const int* incy); 00329 #else 00330 std::complex<double> PREFIX ZDOT_F77(const int* n, const std::complex<double> x[], const int* incx, const std::complex<double> y[], const int* incy); 00331 #endif 00332 double PREFIX ZNRM2_F77(const int* n, const std::complex<double> x[], const int* incx); 00333 void PREFIX ZSCAL_F77(const int* n, const std::complex<double>* alpha, std::complex<double> *x, const int* incx); 00334 int PREFIX IZAMAX_F77(const int* n, const std::complex<double> *x, const int* incx); 00335 00336 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00337 00338 /* Single precision BLAS 1 */ 00339 void PREFIX SROTG_F77(float* da, float* db, float* c, float* s); 00340 void PREFIX SROT_F77(const int* n, float* dx, const int* incx, float* dy, const int* incy, float* c, float* s); 00341 float PREFIX SASUM_F77(const int* n, const float x[], const int* incx); 00342 void PREFIX SAXPY_F77(const int* n, const float* alpha, const float x[], const int* incx, float y[], const int* incy); 00343 void PREFIX SCOPY_F77(const int* n, const float *x, const int* incx, float *y, const int* incy); 00344 float PREFIX SDOT_F77(const int* n, const float x[], const int* incx, const float y[], const int* incy); 00345 float PREFIX SNRM2_F77(const int* n, const float x[], const int* incx); 00346 void PREFIX SSCAL_F77(const int* n, const float* alpha, float *x, const int* incx); 00347 int PREFIX ISAMAX_F77(const int* n, const float *x, const int* incx); 00348 00349 /* Single std::complex precision BLAS 1 */ 00350 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00351 00352 void PREFIX CROTG_F77(std::complex<float>* da, std::complex<float>* db, float* c, std::complex<float>* s); 00353 void PREFIX CROT_F77(const int* n, std::complex<float>* dx, const int* incx, std::complex<float>* dy, const int* incy, float* c, std::complex<float>* s); 00354 float PREFIX CASUM_F77(const int* n, const std::complex<float> x[], const int* incx); 00355 void PREFIX CAXPY_F77(const int* n, const std::complex<float>* alpha, const std::complex<float> x[], const int* incx, std::complex<float> y[], const int* incy); 00356 void PREFIX CCOPY_F77(const int* n, const std::complex<float> *x, const int* incx, std::complex<float> *y, const int* incy); 00357 #if defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM) 00358 void PREFIX CDOT_F77(std::complex<float> *ret, const int* n, const std::complex<float> x[], const int* incx, const std::complex<float> y[], const int* incy); 00359 #else 00360 std::complex<float> PREFIX CDOT_F77(const int* n, const std::complex<float> x[], const int* incx, const std::complex<float> y[], const int* incy); 00361 #endif 00362 float PREFIX CNRM2_F77(const int* n, const std::complex<float> x[], const int* incx); 00363 void PREFIX CSCAL_F77(const int* n, const std::complex<float>* alpha, std::complex<float> *x, const int* incx); 00364 int PREFIX ICAMAX_F77(const int* n, const std::complex<float> *x, const int* incx); 00365 00366 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00367 00368 /* Double precision BLAS 2 */ 00369 void PREFIX DGEMV_F77(Teuchos_fcd, const int* m, const int* n, const double* alpha, const double A[], const int* lda, 00370 const double x[], const int* incx, const double* beta, double y[], const int* incy); 00371 void PREFIX DTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00372 const double *a, const int *lda, double *x, const int *incx); 00373 void PREFIX DGER_F77(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y, 00374 const int *incy, double *a, const int *lda); 00375 00376 /* Double precision BLAS 2 */ 00377 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00378 00379 void PREFIX ZGEMV_F77(Teuchos_fcd, const int* m, const int* n, const std::complex<double>* alpha, const std::complex<double> A[], const int* lda, 00380 const std::complex<double> x[], const int* incx, const std::complex<double>* beta, std::complex<double> y[], const int* incy); 00381 void PREFIX ZTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00382 const std::complex<double> *a, const int *lda, std::complex<double> *x, const int *incx); 00383 void PREFIX ZGER_F77(const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *x, const int *incx, const std::complex<double> *y, 00384 const int *incy, std::complex<double> *a, const int *lda); 00385 00386 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00387 00388 /* Single precision BLAS 2 */ 00389 void PREFIX SGEMV_F77(Teuchos_fcd, const int* m, const int* n, const float* alpha, const float A[], const int* lda, 00390 const float x[], const int* incx, const float* beta, float y[], const int* incy); 00391 void PREFIX STRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00392 const float *a, const int *lda, float *x, const int *incx); 00393 void PREFIX SGER_F77(const int *m, const int *n, const float *alpha, const float *x, const int *incx, const float *y, 00394 const int *incy, float *a, const int *lda); 00395 00396 /* Single std::complex precision BLAS 2 */ 00397 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00398 00399 void PREFIX CGEMV_F77(Teuchos_fcd, const int* m, const int* n, const std::complex<float>* alpha, const std::complex<float> A[], const int* lda, 00400 const std::complex<float> x[], const int* incx, const std::complex<float>* beta, std::complex<float> y[], const int* incy); 00401 void PREFIX CTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00402 const std::complex<float> *a, const int *lda, std::complex<float> *x, const int *incx); 00403 void PREFIX CGER_F77(const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *x, const int *incx, const std::complex<float> *y, 00404 const int *incy, std::complex<float> *a, const int *lda); 00405 00406 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00407 00408 /* Double precision BLAS 3 */ 00409 void PREFIX DGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00410 n, const int *k, const double *alpha, const double *a, const int *lda, 00411 const double *b, const int *ldb, const double *beta, double *c, const int *ldc); 00412 void PREFIX DSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00413 const double *alpha, const double *a, const int *lda, 00414 const double *b, const int *ldb, const double *beta, double *c, const int *ldc); 00415 void PREFIX DTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00416 const int *m, const int *n, const double *alpha, const double *a, const int * lda, double *b, const int *ldb); 00417 void PREFIX DTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00418 const int *m, const int *n, const double *alpha, const double *a, const int * 00419 lda, double *b, const int *ldb); 00420 00421 /* Double std::complex precision BLAS 3 */ 00422 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00423 00424 void PREFIX ZGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00425 n, const int *k, const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 00426 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc); 00427 void PREFIX ZSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00428 const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 00429 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc); 00430 void PREFIX ZTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00431 const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *a, const int * lda, std::complex<double> *b, const int *ldb); 00432 void PREFIX ZTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00433 const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *a, const int * 00434 lda, std::complex<double> *b, const int *ldb); 00435 00436 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00437 00438 /* Single precision BLAS 3 */ 00439 void PREFIX SGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00440 n, const int *k, const float *alpha, const float *a, const int *lda, 00441 const float *b, const int *ldb, const float *beta, float *c, const int *ldc); 00442 void PREFIX SSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00443 const float *alpha, const float *a, const int *lda, 00444 const float *b, const int *ldb, const float *beta, float *c, const int *ldc); 00445 void PREFIX STRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00446 const int *m, const int *n, const float *alpha, const float *a, const int * lda, float *b, const int *ldb); 00447 void PREFIX STRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00448 const int *m, const int *n, const float *alpha, const float *a, const int * 00449 lda, float *b, const int *ldb); 00450 00451 /* Single std::complex precision BLAS 3 */ 00452 00453 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00454 00455 void PREFIX CGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00456 n, const int *k, const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 00457 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc); 00458 void PREFIX CSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00459 const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 00460 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc); 00461 void PREFIX CTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00462 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int * lda, std::complex<float> *b, const int *ldb); 00463 void PREFIX CTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00464 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int * 00465 lda, std::complex<float> *b, const int *ldb); 00466 00467 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00468 00469 #ifdef __cplusplus 00470 } 00471 #endif 00472 00473 #endif /* end of TEUCHOS_BLAS_WRAPPERS_HPP_ */
1.7.4