|
Teuchos Package Browser (Single Doxygen Collection)
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 // Redistribution and use in source and binary forms, with or without 00012 // modification, are permitted provided that the following conditions are 00013 // met: 00014 // 00015 // 1. Redistributions of source code must retain the above copyright 00016 // notice, this list of conditions and the following disclaimer. 00017 // 00018 // 2. Redistributions in binary form must reproduce the above copyright 00019 // notice, this list of conditions and the following disclaimer in the 00020 // documentation and/or other materials provided with the distribution. 00021 // 00022 // 3. Neither the name of the Corporation nor the names of the 00023 // contributors may be used to endorse or promote products derived from 00024 // this software without specific prior written permission. 00025 // 00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00037 // 00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00039 // 00040 // *********************************************************************** 00041 // @HEADER 00042 */ 00043 00044 #ifndef _TEUCHOS_BLAS_WRAPPERS_HPP_ 00045 #define _TEUCHOS_BLAS_WRAPPERS_HPP_ 00046 00047 #include "Teuchos_ConfigDefs.hpp" 00048 #ifdef _MSC_VER 00049 /* disable warning for C-linkage returning complex class */ 00050 #pragma warning ( disable : 4190 ) 00051 #endif 00052 00057 /* Define fcd (Fortran Teuchos_fcd descriptor) for non-standard situations */ 00058 00059 #if defined(CRAY_T3X) || defined(INTEL_CXML) || defined(INTEL_MKL) 00060 00061 00062 #if defined(CRAY_T3X) 00063 00064 #include <fortran.h> 00065 #define PREFIX 00066 #define Teuchos_fcd fcd 00067 00068 #define DROTG_F77 F77_BLAS_MANGLE(srotg,SROTG) 00069 #define DROT_F77 F77_BLAS_MANGLE(srot,SROT) 00070 #define DASUM_F77 F77_BLAS_MANGLE(sasum,SASUM) 00071 #define DAXPY_F77 F77_BLAS_MANGLE(saxpy,SAXPY) 00072 #define DCOPY_F77 F77_BLAS_MANGLE(scopy,SCOPY) 00073 #define DDOT_F77 F77_BLAS_MANGLE(sdot,SDOT) 00074 #define DNRM2_F77 F77_BLAS_MANGLE(snrm2,SNRM2) 00075 #define DSCAL_F77 F77_BLAS_MANGLE(sscal,SSCAL) 00076 #define IDAMAX_F77 F77_BLAS_MANGLE(isamax,ISAMAX) 00077 #define DGEMV_F77 F77_BLAS_MANGLE(sgemv,SGEMV) 00078 #define DGER_F77 F77_BLAS_MANGLE(sger,SGER) 00079 #define DTRMV_F77 F77_BLAS_MANGLE(strmv,STRMV) 00080 #define DGEMM_F77 F77_BLAS_MANGLE(sgemm,SGEMM) 00081 #define DSYMM_F77 F77_BLAS_MANGLE(ssymm,SSYMM) 00082 #define DSYRK_F77 F77_BLAS_MANGLE(ssyrk,SSYRK) 00083 #define DTRMM_F77 F77_BLAS_MANGLE(strmm,STRMM) 00084 #define DTRSM_F77 F77_BLAS_MANGLE(strsm,STRSM) 00085 00086 #ifdef HAVE_TEUCHOS_COMPLEX 00087 00088 #define ZROTG_F77 F77_BLAS_MANGLE(crotg,CROTG) 00089 #define ZROT_F77 F77_BLAS_MANGLE(crot,CROT) 00090 #define ZASUM_F77 F77_BLAS_MANGLE(scasum,SCASUM) 00091 #define ZAXPY_F77 F77_BLAS_MANGLE(caxpy,CAXPY) 00092 #define ZCOPY_F77 F77_BLAS_MANGLE(ccopy,CCOPY) 00093 #define ZDOT_F77 F77_BLAS_MANGLE(cdotc,CDOTC) 00094 #define ZNRM2_F77 F77_BLAS_MANGLE(scnrm2,SCNRM2) 00095 #define ZSCAL_F77 F77_BLAS_MANGLE(cscal,CSCAL) 00096 #define IZAMAX_F77 F77_BLAS_MANGLE(icamax,ICAMAX) 00097 #define ZGEMV_F77 F77_BLAS_MANGLE(cgemv,CGEMV) 00098 #define ZGER_F77 F77_BLAS_MANGLE(cgeru,CGERU) 00099 #define ZTRMV_F77 F77_BLAS_MANGLE(ctrmv,CTRMV) 00100 #define ZGEMM_F77 F77_BLAS_MANGLE(cgemm,CGEMM) 00101 #define ZSYMM_F77 F77_BLAS_MANGLE(csymm,CSYMM) 00102 #define ZSYRK_F77 F77_BLAS_MANGLE(csyrk,CSYRK) 00103 #define ZTRMM_F77 F77_BLAS_MANGLE(ctrmm,CTRMM) 00104 #define ZTRSM_F77 F77_BLAS_MANGLE(ctrsm,CTRSM) 00105 00106 #endif /* HAVE_TEUCHOS_COMPLEX */ 00107 00108 #elif defined(INTEL_CXML) 00109 00110 #define PREFIX __stdcall 00111 #define Teuchos_fcd const char *, unsigned int 00112 00113 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00114 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00115 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00116 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00117 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00118 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00119 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00120 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00121 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00122 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00123 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00124 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00125 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00126 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00127 #define DSYRK_F77 F77_BLAS_MANGLE(dsyrk,DSYRK) 00128 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00129 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00130 00131 #ifdef HAVE_TEUCHOS_COMPLEX 00132 00133 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00134 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00135 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00136 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00137 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00138 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00139 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00140 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00141 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00142 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00143 #define ZGER_F77 F77_BLAS_MANGLE(zgeru,ZGERU) 00144 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00145 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00146 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00147 #define ZSYRK_F77 F77_BLAS_MANGLE(zsyrk,ZSYRK) 00148 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00149 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00150 00151 #endif /* HAVE_TEUCHOS_COMPLEX */ 00152 00153 #elif defined(INTEL_MKL) 00154 00155 #define PREFIX 00156 #define Teuchos_fcd const char * 00157 00158 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00159 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00160 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00161 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00162 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00163 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00164 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00165 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00166 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00167 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00168 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00169 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00170 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00171 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00172 #define DSYRK_F77 F77_BLAS_MANGLE(dsyrk,DSYRK) 00173 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00174 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00175 00176 #ifdef HAVE_TEUCHOS_COMPLEX 00177 00178 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00179 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00180 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00181 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00182 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00183 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00184 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00185 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00186 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00187 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00188 #define ZGER_F77 F77_BLAS_MANGLE(zgeru,ZGERU) 00189 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00190 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00191 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00192 #define ZSYRK_F77 F77_BLAS_MANGLE(zsyrk,ZSYRK) 00193 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00194 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00195 00196 #endif /* HAVE_TEUCHOS_COMPLEX */ 00197 00198 #endif 00199 00200 /* All three of these machines use a simple uppercase mangling of Fortran names */ 00201 00202 /* if F77_BLAS_MANGLE is defined undefine it because we want to redefine */ 00203 00204 #ifdef F77_FUNC 00205 #undef F77_FUNC 00206 #endif 00207 00208 #ifdef F77_BLAS_MANGLE 00209 #undef F77_BLAS_MANGLE 00210 #endif 00211 00212 #define F77_FUNC(lcase,UCASE) PREFIX UCASE 00213 #define F77_BLAS_MANGLE(lcase,UCASE) PREFIX UCASE 00214 00215 #else /* Define Teuchos_fcd for all other machines */ 00216 00217 #define PREFIX 00218 #define Teuchos_fcd const char * 00219 00220 #ifdef TRILINOS_NO_CONFIG_H 00221 00222 #ifdef F77_FUNC 00223 #undef F77_FUNC 00224 #endif 00225 00226 #ifdef F77_BLAS_MANGLE 00227 #undef F77_BLAS_MANGLE 00228 #endif 00229 00230 #ifdef TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE 00231 # define F77_FUNC(lcase,UCASE) lcase 00232 # define F77_BLAS_MANGLE(lcase,UCASE) lcase 00233 #else /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE not defined*/ 00234 # define F77_FUNC(lcase,UCASE) lcase ## _ 00235 # define F77_BLAS_MANGLE(lcase,UCASE) lcase ## _ 00236 #endif /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE */ 00237 00238 #endif /* TRILINOS_NO_CONFIG_H */ 00239 00240 #define DROTG_F77 F77_BLAS_MANGLE(drotg,DROTG) 00241 #define DROT_F77 F77_BLAS_MANGLE(drot,DROT) 00242 #define DASUM_F77 F77_BLAS_MANGLE(dasum,DASUM) 00243 #define DAXPY_F77 F77_BLAS_MANGLE(daxpy,DAXPY) 00244 #define DCOPY_F77 F77_BLAS_MANGLE(dcopy,DCOPY) 00245 #define DDOT_F77 F77_BLAS_MANGLE(ddot,DDOT) 00246 #define DNRM2_F77 F77_BLAS_MANGLE(dnrm2,DNRM2) 00247 #define DSCAL_F77 F77_BLAS_MANGLE(dscal,DSCAL) 00248 #define IDAMAX_F77 F77_BLAS_MANGLE(idamax,IDAMAX) 00249 #define DGEMV_F77 F77_BLAS_MANGLE(dgemv,DGEMV) 00250 #define DGER_F77 F77_BLAS_MANGLE(dger,DGER) 00251 #define DTRMV_F77 F77_BLAS_MANGLE(dtrmv,DTRMV) 00252 #define DGEMM_F77 F77_BLAS_MANGLE(dgemm,DGEMM) 00253 #define DSYMM_F77 F77_BLAS_MANGLE(dsymm,DSYMM) 00254 #define DSYRK_F77 F77_BLAS_MANGLE(dsyrk,DSYRK) 00255 #define DTRMM_F77 F77_BLAS_MANGLE(dtrmm,DTRMM) 00256 #define DTRSM_F77 F77_BLAS_MANGLE(dtrsm,DTRSM) 00257 00258 #ifdef HAVE_TEUCHOS_COMPLEX 00259 00260 #define ZROTG_F77 F77_BLAS_MANGLE(zrotg,ZROTG) 00261 #define ZROT_F77 F77_BLAS_MANGLE(zrot,ZROT) 00262 #define ZASUM_F77 F77_BLAS_MANGLE(dzasum,DZASUM) 00263 #define ZAXPY_F77 F77_BLAS_MANGLE(zaxpy,ZAXPY) 00264 #define ZCOPY_F77 F77_BLAS_MANGLE(zcopy,ZCOPY) 00265 #define ZDOT_F77 F77_BLAS_MANGLE(zdotc,ZDOTC) 00266 #define ZNRM2_F77 F77_BLAS_MANGLE(dznrm2,DZNRM2) 00267 #define ZSCAL_F77 F77_BLAS_MANGLE(zscal,ZSCAL) 00268 #define IZAMAX_F77 F77_BLAS_MANGLE(izamax,IZAMAX) 00269 #define ZGEMV_F77 F77_BLAS_MANGLE(zgemv,ZGEMV) 00270 #define ZGER_F77 F77_BLAS_MANGLE(zgeru,ZGERU) 00271 #define ZTRMV_F77 F77_BLAS_MANGLE(ztrmv,ZTRMV) 00272 #define ZGEMM_F77 F77_BLAS_MANGLE(zgemm,ZGEMM) 00273 #define ZSYMM_F77 F77_BLAS_MANGLE(zsymm,ZSYMM) 00274 #define ZSYRK_F77 F77_BLAS_MANGLE(zsyrk,ZSYRK) 00275 #define ZTRMM_F77 F77_BLAS_MANGLE(ztrmm,ZTRMM) 00276 #define ZTRSM_F77 F77_BLAS_MANGLE(ztrsm,ZTRSM) 00277 00278 #endif /* HAVE_TEUCHOS_COMPLEX */ 00279 00280 #endif 00281 00282 00283 /* Explicitly define each F77 name for all BLAS kernels */ 00284 00285 #define SROTG_F77 F77_BLAS_MANGLE(srotg,SROTG) 00286 #define SROT_F77 F77_BLAS_MANGLE(srot,SROT) 00287 #define SSCAL_F77 F77_BLAS_MANGLE(sscal,SSCAL) 00288 #define SCOPY_F77 F77_BLAS_MANGLE(scopy,SCOPY) 00289 #define SAXPY_F77 F77_BLAS_MANGLE(saxpy,SAXPY) 00290 #define SDOT_F77 F77_BLAS_MANGLE(sdot,SDOT) 00291 #define SNRM2_F77 F77_BLAS_MANGLE(snrm2,SNRM2) 00292 #define SASUM_F77 F77_BLAS_MANGLE(sasum,SASUM) 00293 #define ISAMAX_F77 F77_BLAS_MANGLE(isamax,ISAMAX) 00294 00295 #define SGEMV_F77 F77_BLAS_MANGLE(sgemv,SGEMV) 00296 #define SGER_F77 F77_BLAS_MANGLE(sger,SGER) 00297 #define STRMV_F77 F77_BLAS_MANGLE(strmv,STRMV) 00298 #define SGEMM_F77 F77_BLAS_MANGLE(sgemm,SGEMM) 00299 #define SSYMM_F77 F77_BLAS_MANGLE(ssymm,SSYMM) 00300 #define SSYRK_F77 F77_BLAS_MANGLE(ssyrk,SSYRK) 00301 #define STRMM_F77 F77_BLAS_MANGLE(strmm,STRMM) 00302 #define STRSM_F77 F77_BLAS_MANGLE(strsm,STRSM) 00303 00304 #ifdef HAVE_TEUCHOS_COMPLEX 00305 00306 #define CROTG_F77 F77_BLAS_MANGLE(crotg,CROTG) 00307 #define CROT_F77 F77_BLAS_MANGLE(crot,CROT) 00308 #define CASUM_F77 F77_BLAS_MANGLE(scasum,SCASUM) 00309 #define CAXPY_F77 F77_BLAS_MANGLE(caxpy,CAXPY) 00310 #define CCOPY_F77 F77_BLAS_MANGLE(ccopy,CCOPY) 00311 #define CDOT_F77 F77_BLAS_MANGLE(cdotc,CDOTC) 00312 #define CNRM2_F77 F77_BLAS_MANGLE(scnrm2,SCNRM2) 00313 #define CSCAL_F77 F77_BLAS_MANGLE(cscal,CSCAL) 00314 #define ICAMAX_F77 F77_BLAS_MANGLE(icamax,ICAMAX) 00315 #define CGEMV_F77 F77_BLAS_MANGLE(cgemv,CGEMV) 00316 #define CGER_F77 F77_BLAS_MANGLE(cgeru,CGERU) 00317 #define CTRMV_F77 F77_BLAS_MANGLE(ctrmv,CTRMV) 00318 #define CGEMM_F77 F77_BLAS_MANGLE(cgemm,CGEMM) 00319 #define CSYMM_F77 F77_BLAS_MANGLE(csymm,CSYMM) 00320 #define CSYRK_F77 F77_BLAS_MANGLE(csyrk,CSYRK) 00321 #define CTRMM_F77 F77_BLAS_MANGLE(ctrmm,CTRMM) 00322 #define CTRSM_F77 F77_BLAS_MANGLE(ctrsm,CTRSM) 00323 00324 #endif /* HAVE_TEUCHOS_COMPLEX */ 00325 00326 #ifdef __cplusplus 00327 extern "C" { 00328 #endif 00329 00330 00331 /* Double precision BLAS 1 */ 00332 void PREFIX DROTG_F77(double* da, double* db, double* c, double* s); 00333 void PREFIX DROT_F77(const int* n, double* dx, const int* incx, double* dy, const int* incy, double* c, double* s); 00334 double PREFIX DASUM_F77(const int* n, const double x[], const int* incx); 00335 void PREFIX DAXPY_F77(const int* n, const double* alpha, const double x[], const int* incx, double y[], const int* incy); 00336 void PREFIX DCOPY_F77(const int* n, const double *x, const int* incx, double *y, const int* incy); 00337 double PREFIX DDOT_F77(const int* n, const double x[], const int* incx, const double y[], const int* incy); 00338 double PREFIX DNRM2_F77(const int* n, const double x[], const int* incx); 00339 void PREFIX DSCAL_F77(const int* n, const double* alpha, double *x, const int* incx); 00340 int PREFIX IDAMAX_F77(const int* n, const double *x, const int* incx); 00341 00342 /* Double std::complex precision BLAS 1 */ 00343 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00344 00345 void PREFIX ZROTG_F77(std::complex<double>* da, std::complex<double>* db, double* c, std::complex<double>* s); 00346 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); 00347 double PREFIX ZASUM_F77(const int* n, const std::complex<double> x[], const int* incx); 00348 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); 00349 void PREFIX ZCOPY_F77(const int* n, const std::complex<double> *x, const int* incx, std::complex<double> *y, const int* incy); 00350 #if defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM) 00351 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); 00352 #else 00353 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); 00354 #endif 00355 double PREFIX ZNRM2_F77(const int* n, const std::complex<double> x[], const int* incx); 00356 void PREFIX ZSCAL_F77(const int* n, const std::complex<double>* alpha, std::complex<double> *x, const int* incx); 00357 int PREFIX IZAMAX_F77(const int* n, const std::complex<double> *x, const int* incx); 00358 00359 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00360 00361 /* Single precision BLAS 1 */ 00362 void PREFIX SROTG_F77(float* da, float* db, float* c, float* s); 00363 void PREFIX SROT_F77(const int* n, float* dx, const int* incx, float* dy, const int* incy, float* c, float* s); 00364 float PREFIX SASUM_F77(const int* n, const float x[], const int* incx); 00365 void PREFIX SAXPY_F77(const int* n, const float* alpha, const float x[], const int* incx, float y[], const int* incy); 00366 void PREFIX SCOPY_F77(const int* n, const float *x, const int* incx, float *y, const int* incy); 00367 float PREFIX SDOT_F77(const int* n, const float x[], const int* incx, const float y[], const int* incy); 00368 float PREFIX SNRM2_F77(const int* n, const float x[], const int* incx); 00369 void PREFIX SSCAL_F77(const int* n, const float* alpha, float *x, const int* incx); 00370 int PREFIX ISAMAX_F77(const int* n, const float *x, const int* incx); 00371 00372 /* Single std::complex precision BLAS 1 */ 00373 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00374 00375 void PREFIX CROTG_F77(std::complex<float>* da, std::complex<float>* db, float* c, std::complex<float>* s); 00376 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); 00377 float PREFIX CASUM_F77(const int* n, const std::complex<float> x[], const int* incx); 00378 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); 00379 void PREFIX CCOPY_F77(const int* n, const std::complex<float> *x, const int* incx, std::complex<float> *y, const int* incy); 00380 #if defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM) 00381 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); 00382 #else 00383 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); 00384 #endif 00385 float PREFIX CNRM2_F77(const int* n, const std::complex<float> x[], const int* incx); 00386 void PREFIX CSCAL_F77(const int* n, const std::complex<float>* alpha, std::complex<float> *x, const int* incx); 00387 int PREFIX ICAMAX_F77(const int* n, const std::complex<float> *x, const int* incx); 00388 00389 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00390 00391 /* Double precision BLAS 2 */ 00392 void PREFIX DGEMV_F77(Teuchos_fcd, const int* m, const int* n, const double* alpha, const double A[], const int* lda, 00393 const double x[], const int* incx, const double* beta, double y[], const int* incy); 00394 void PREFIX DTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00395 const double *a, const int *lda, double *x, const int *incx); 00396 void PREFIX DGER_F77(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y, 00397 const int *incy, double *a, const int *lda); 00398 00399 /* Double precision BLAS 2 */ 00400 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00401 00402 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, 00403 const std::complex<double> x[], const int* incx, const std::complex<double>* beta, std::complex<double> y[], const int* incy); 00404 void PREFIX ZTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00405 const std::complex<double> *a, const int *lda, std::complex<double> *x, const int *incx); 00406 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, 00407 const int *incy, std::complex<double> *a, const int *lda); 00408 00409 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00410 00411 /* Single precision BLAS 2 */ 00412 void PREFIX SGEMV_F77(Teuchos_fcd, const int* m, const int* n, const float* alpha, const float A[], const int* lda, 00413 const float x[], const int* incx, const float* beta, float y[], const int* incy); 00414 void PREFIX STRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00415 const float *a, const int *lda, float *x, const int *incx); 00416 void PREFIX SGER_F77(const int *m, const int *n, const float *alpha, const float *x, const int *incx, const float *y, 00417 const int *incy, float *a, const int *lda); 00418 00419 /* Single std::complex precision BLAS 2 */ 00420 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00421 00422 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, 00423 const std::complex<float> x[], const int* incx, const std::complex<float>* beta, std::complex<float> y[], const int* incy); 00424 void PREFIX CTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 00425 const std::complex<float> *a, const int *lda, std::complex<float> *x, const int *incx); 00426 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, 00427 const int *incy, std::complex<float> *a, const int *lda); 00428 00429 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00430 00431 /* Double precision BLAS 3 */ 00432 void PREFIX DGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00433 n, const int *k, const double *alpha, const double *a, const int *lda, 00434 const double *b, const int *ldb, const double *beta, double *c, const int *ldc); 00435 void PREFIX DSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00436 const double *alpha, const double *a, const int *lda, 00437 const double *b, const int *ldb, const double *beta, double *c, const int *ldc); 00438 void PREFIX DSYRK_F77(Teuchos_fcd, Teuchos_fcd, const int *n, const int * k, 00439 const double *alpha, const double *a, const int *lda, 00440 const double *beta, double *c, const int *ldc); 00441 void PREFIX DTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00442 const int *m, const int *n, const double *alpha, const double *a, const int * lda, double *b, const int *ldb); 00443 void PREFIX DTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00444 const int *m, const int *n, const double *alpha, const double *a, const int * 00445 lda, double *b, const int *ldb); 00446 00447 /* Double std::complex precision BLAS 3 */ 00448 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00449 00450 void PREFIX ZGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00451 n, const int *k, const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 00452 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc); 00453 void PREFIX ZSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00454 const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 00455 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc); 00456 void PREFIX ZSYRK_F77(Teuchos_fcd, Teuchos_fcd, const int *n, const int * k, 00457 const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 00458 const std::complex<double> *beta, std::complex<double> *c, const int *ldc); 00459 void PREFIX ZTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00460 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); 00461 void PREFIX ZTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00462 const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *a, const int * 00463 lda, std::complex<double> *b, const int *ldb); 00464 00465 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00466 00467 /* Single precision BLAS 3 */ 00468 void PREFIX SGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00469 n, const int *k, const float *alpha, const float *a, const int *lda, 00470 const float *b, const int *ldb, const float *beta, float *c, const int *ldc); 00471 void PREFIX SSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00472 const float *alpha, const float *a, const int *lda, 00473 const float *b, const int *ldb, const float *beta, float *c, const int *ldc); 00474 void PREFIX SSYRK_F77(Teuchos_fcd, Teuchos_fcd, const int *n, const int * k, 00475 const float *alpha, const float *a, const int *lda, 00476 const float *beta, float *c, const int *ldc); 00477 void PREFIX STRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00478 const int *m, const int *n, const float *alpha, const float *a, const int * lda, float *b, const int *ldb); 00479 void PREFIX STRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00480 const int *m, const int *n, const float *alpha, const float *a, const int * 00481 lda, float *b, const int *ldb); 00482 00483 /* Single std::complex precision BLAS 3 */ 00484 00485 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) 00486 00487 void PREFIX CGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 00488 n, const int *k, const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 00489 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc); 00490 void PREFIX CSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n, 00491 const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 00492 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc); 00493 void PREFIX CTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00494 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); 00495 void PREFIX CSYRK_F77(Teuchos_fcd, Teuchos_fcd, const int *n, const int * k, 00496 const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 00497 const std::complex<float> *beta, std::complex<float> *c, const int *ldc); 00498 void PREFIX CTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 00499 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int * 00500 lda, std::complex<float> *b, const int *ldb); 00501 00502 #endif /* defined(HAVE_TEUCHOS_COMPLEX) && defined(__cplusplus) */ 00503 00504 #ifdef __cplusplus 00505 } 00506 #endif 00507 00508 #endif /* end of TEUCHOS_BLAS_WRAPPERS_HPP_ */
1.7.6.1