Teuchos_BLAS_wrappers.hpp

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