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 // Kris
00030 // 07.08.03 -- Move into Teuchos package/namespace
00031 
00032 #ifndef _TEUCHOS_BLAS_WRAPPERS_HPP_
00033 #define _TEUCHOS_BLAS_WRAPPERS_HPP_
00034 
00035 #include "Teuchos_ConfigDefs.hpp"
00036 
00041 /* Define fcd (Fortran Teuchos_fcd descriptor) for non-standard situations */
00042 
00043 #if defined(CRAY_T3X) || defined(INTEL_CXML) || defined(INTEL_MKL)
00044 
00045 
00046 #if defined(CRAY_T3X)
00047 
00048 #include <fortran.h>
00049 #define PREFIX
00050 #define Teuchos_fcd fcd 
00051 
00052 #define DROTG_F77   F77_BLAS_MANGLE(srotg,SROTG)
00053 #define DROT_F77    F77_BLAS_MANGLE(srot,SROT)
00054 #define DASUM_F77   F77_BLAS_MANGLE(sasum,SASUM) 
00055 #define DAXPY_F77   F77_BLAS_MANGLE(saxpy,SAXPY)
00056 #define DCOPY_F77   F77_BLAS_MANGLE(scopy,SCOPY)
00057 #define DDOT_F77    F77_BLAS_MANGLE(sdot,SDOT)
00058 #define DNRM2_F77   F77_BLAS_MANGLE(snrm2,SNRM2)
00059 #define DSCAL_F77   F77_BLAS_MANGLE(sscal,SSCAL)
00060 #define IDAMAX_F77  F77_BLAS_MANGLE(isamax,ISAMAX)
00061 #define DGEMV_F77   F77_BLAS_MANGLE(sgemv,SGEMV)
00062 #define DGER_F77    F77_BLAS_MANGLE(sger,SGER)
00063 #define DTRMV_F77   F77_BLAS_MANGLE(strmv,STRMV)
00064 #define DGEMM_F77   F77_BLAS_MANGLE(sgemm,SGEMM)
00065 #define DSYMM_F77   F77_BLAS_MANGLE(ssymm,SSYMM)
00066 #define DTRMM_F77   F77_BLAS_MANGLE(strmm,STRMM)
00067 #define DTRSM_F77   F77_BLAS_MANGLE(strsm,STRSM)
00068  
00069 #ifdef HAVE_TEUCHOS_COMPLEX
00070 
00071 #define ZROTG_F77   F77_BLAS_MANGLE(crotg,CROTG)
00072 #define ZROT_F77    F77_BLAS_MANGLE(crot,CROT)
00073 #define ZASUM_F77   F77_BLAS_MANGLE(scasum,SCASUM) 
00074 #define ZAXPY_F77   F77_BLAS_MANGLE(caxpy,CAXPY)
00075 #define ZCOPY_F77   F77_BLAS_MANGLE(ccopy,CCOPY)
00076 #define ZDOT_F77    F77_BLAS_MANGLE(cdotc,CDOTC)
00077 #define ZNRM2_F77   F77_BLAS_MANGLE(scnrm2,SCNRM2)
00078 #define ZSCAL_F77   F77_BLAS_MANGLE(cscal,CSCAL)
00079 #define IZAMAX_F77  F77_BLAS_MANGLE(icamax,ICAMAX)
00080 #define ZGEMV_F77   F77_BLAS_MANGLE(cgemv,CGEMV)
00081 #define ZGER_F77    F77_BLAS_MANGLE(cgerc,CGERC)
00082 #define ZTRMV_F77   F77_BLAS_MANGLE(ctrmv,CTRMV)
00083 #define ZGEMM_F77   F77_BLAS_MANGLE(cgemm,CGEMM)
00084 #define ZSYMM_F77   F77_BLAS_MANGLE(csymm,CSYMM)
00085 #define ZTRMM_F77   F77_BLAS_MANGLE(ctrmm,CTRMM)
00086 #define ZTRSM_F77   F77_BLAS_MANGLE(ctrsm,CTRSM)
00087 
00088 #endif /* HAVE_TEUCHOS_COMPLEX */
00089 
00090 #elif defined(INTEL_CXML)
00091 
00092 #define PREFIX __stdcall 
00093 #define Teuchos_fcd const char *, unsigned int 
00094 
00095 #define DROTG_F77   F77_BLAS_MANGLE(drotg,DROTG)
00096 #define DROT_F77    F77_BLAS_MANGLE(drot,DROT)
00097 #define DASUM_F77   F77_BLAS_MANGLE(dasum,DASUM)
00098 #define DAXPY_F77   F77_BLAS_MANGLE(daxpy,DAXPY)
00099 #define DCOPY_F77   F77_BLAS_MANGLE(dcopy,DCOPY)
00100 #define DDOT_F77    F77_BLAS_MANGLE(ddot,DDOT)  
00101 #define DNRM2_F77   F77_BLAS_MANGLE(dnrm2,DNRM2)
00102 #define DSCAL_F77   F77_BLAS_MANGLE(dscal,DSCAL)
00103 #define IDAMAX_F77  F77_BLAS_MANGLE(idamax,IDAMAX)
00104 #define DGEMV_F77   F77_BLAS_MANGLE(dgemv,DGEMV)
00105 #define DGER_F77    F77_BLAS_MANGLE(dger,DGER)
00106 #define DTRMV_F77   F77_BLAS_MANGLE(dtrmv,DTRMV)
00107 #define DGEMM_F77   F77_BLAS_MANGLE(dgemm,DGEMM)
00108 #define DSYMM_F77   F77_BLAS_MANGLE(dsymm,DSYMM)
00109 #define DTRMM_F77   F77_BLAS_MANGLE(dtrmm,DTRMM)
00110 #define DTRSM_F77   F77_BLAS_MANGLE(dtrsm,DTRSM)
00111 
00112 #ifdef HAVE_TEUCHOS_COMPLEX
00113 
00114 #define ZROTG_F77   F77_BLAS_MANGLE(zrotg,ZROTG)
00115 #define ZROT_F77    F77_BLAS_MANGLE(zrot,ZROT)
00116 #define ZASUM_F77   F77_BLAS_MANGLE(dzasum,DZASUM)
00117 #define ZAXPY_F77   F77_BLAS_MANGLE(zaxpy,ZAXPY)
00118 #define ZCOPY_F77   F77_BLAS_MANGLE(zcopy,ZCOPY)
00119 #define ZDOT_F77    F77_BLAS_MANGLE(zdotc,ZDOTC)  
00120 #define ZNRM2_F77   F77_BLAS_MANGLE(dznrm2,DZNRM2)
00121 #define ZSCAL_F77   F77_BLAS_MANGLE(zscal,ZSCAL)
00122 #define IZAMAX_F77  F77_BLAS_MANGLE(izamax,IZAMAX)
00123 #define ZGEMV_F77   F77_BLAS_MANGLE(zgemv,ZGEMV)
00124 #define ZGER_F77    F77_BLAS_MANGLE(zgerc,ZGERC)
00125 #define ZTRMV_F77   F77_BLAS_MANGLE(ztrmv,ZTRMV)
00126 #define ZGEMM_F77   F77_BLAS_MANGLE(zgemm,ZGEMM)
00127 #define ZSYMM_F77   F77_BLAS_MANGLE(zsymm,ZSYMM)
00128 #define ZTRMM_F77   F77_BLAS_MANGLE(ztrmm,ZTRMM)
00129 #define ZTRSM_F77   F77_BLAS_MANGLE(ztrsm,ZTRSM)
00130 
00131 #endif /* HAVE_TEUCHOS_COMPLEX */
00132 
00133 #elif defined(INTEL_MKL)
00134 
00135 #define PREFIX
00136 #define Teuchos_fcd const char *
00137 
00138 #define DROTG_F77   F77_BLAS_MANGLE(drotg,DROTG)
00139 #define DROT_F77    F77_BLAS_MANGLE(drot,DROT)
00140 #define DASUM_F77   F77_BLAS_MANGLE(dasum,DASUM)
00141 #define DAXPY_F77   F77_BLAS_MANGLE(daxpy,DAXPY)
00142 #define DCOPY_F77   F77_BLAS_MANGLE(dcopy,DCOPY)
00143 #define DDOT_F77    F77_BLAS_MANGLE(ddot,DDOT)  
00144 #define DNRM2_F77   F77_BLAS_MANGLE(dnrm2,DNRM2)
00145 #define DSCAL_F77   F77_BLAS_MANGLE(dscal,DSCAL)
00146 #define IDAMAX_F77  F77_BLAS_MANGLE(idamax,IDAMAX)
00147 #define DGEMV_F77   F77_BLAS_MANGLE(dgemv,DGEMV)
00148 #define DGER_F77    F77_BLAS_MANGLE(dger,DGER)
00149 #define DTRMV_F77   F77_BLAS_MANGLE(dtrmv,DTRMV)
00150 #define DGEMM_F77   F77_BLAS_MANGLE(dgemm,DGEMM)
00151 #define DSYMM_F77   F77_BLAS_MANGLE(dsymm,DSYMM)
00152 #define DTRMM_F77   F77_BLAS_MANGLE(dtrmm,DTRMM)
00153 #define DTRSM_F77   F77_BLAS_MANGLE(dtrsm,DTRSM)
00154 
00155 #ifdef HAVE_TEUCHOS_COMPLEX
00156 
00157 #define ZROTG_F77   F77_BLAS_MANGLE(zrotg,ZROTG)
00158 #define ZROT_F77    F77_BLAS_MANGLE(zrot,ZROT)
00159 #define ZASUM_F77   F77_BLAS_MANGLE(dzasum,DZASUM)
00160 #define ZAXPY_F77   F77_BLAS_MANGLE(zaxpy,ZAXPY)
00161 #define ZCOPY_F77   F77_BLAS_MANGLE(zcopy,ZCOPY)
00162 #define ZDOT_F77    F77_BLAS_MANGLE(zdotc,ZDOTC)  
00163 #define ZNRM2_F77   F77_BLAS_MANGLE(dznrm2,DZNRM2)
00164 #define ZSCAL_F77   F77_BLAS_MANGLE(zscal,ZSCAL)
00165 #define IZAMAX_F77  F77_BLAS_MANGLE(izamax,IZAMAX)
00166 #define ZGEMV_F77   F77_BLAS_MANGLE(zgemv,ZGEMV)
00167 #define ZGER_F77    F77_BLAS_MANGLE(zgerc,ZGERC)
00168 #define ZTRMV_F77   F77_BLAS_MANGLE(ztrmv,ZTRMV)
00169 #define ZGEMM_F77   F77_BLAS_MANGLE(zgemm,ZGEMM)
00170 #define ZSYMM_F77   F77_BLAS_MANGLE(zsymm,ZSYMM)
00171 #define ZTRMM_F77   F77_BLAS_MANGLE(ztrmm,ZTRMM)
00172 #define ZTRSM_F77   F77_BLAS_MANGLE(ztrsm,ZTRSM)
00173 
00174 #endif /* HAVE_TEUCHOS_COMPLEX */
00175 
00176 #endif 
00177 
00178 /* All three of these machines use a simple uppercase mangling of Fortran names */
00179 
00180 /* if F77_BLAS_MANGLE is defined undefine it because we want to redefine */
00181 
00182 #ifdef F77_FUNC
00183 #undef F77_FUNC
00184 #endif
00185 
00186 #ifdef F77_BLAS_MANGLE
00187 #undef F77_BLAS_MANGLE
00188 #endif
00189 
00190 #define F77_FUNC(lcase,UCASE) PREFIX UCASE
00191 #define F77_BLAS_MANGLE(lcase,UCASE) PREFIX UCASE
00192 
00193 #else /* Define Teuchos_fcd for all other machines */
00194 
00195 #define PREFIX
00196 #define Teuchos_fcd const char * 
00197 
00198 #ifdef TRILINOS_NO_CONFIG_H
00199 
00200 #ifdef F77_FUNC
00201 #undef F77_FUNC
00202 #endif
00203 
00204 #ifdef F77_BLAS_MANGLE
00205 #undef F77_BLAS_MANGLE 
00206 #endif
00207 
00208 #ifdef TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE
00209 #define F77_FUNC(lcase,UCASE) lcase
00210 #define F77_BLAS_MANGLE(lcase,UCASE) lcase
00211 #else /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE not defined*/
00212 #define F77_FUNC(lcase,UCASE) lcase ## _
00213 #define F77_BLAS_MANGLE(lcase,UCASE) lcase ## _
00214 #endif /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE */
00215 
00216 #endif /* TRILINOS_NO_CONFIG_H */
00217 
00218 #define DROTG_F77   F77_BLAS_MANGLE(drotg,DROTG)
00219 #define DROT_F77    F77_BLAS_MANGLE(drot,DROT)
00220 #define DASUM_F77   F77_BLAS_MANGLE(dasum,DASUM)
00221 #define DAXPY_F77   F77_BLAS_MANGLE(daxpy,DAXPY)
00222 #define DCOPY_F77   F77_BLAS_MANGLE(dcopy,DCOPY)
00223 #define DDOT_F77    F77_BLAS_MANGLE(ddot,DDOT)
00224 #define DNRM2_F77   F77_BLAS_MANGLE(dnrm2,DNRM2)
00225 #define DSCAL_F77   F77_BLAS_MANGLE(dscal,DSCAL)
00226 #define IDAMAX_F77  F77_BLAS_MANGLE(idamax,IDAMAX)
00227 #define DGEMV_F77   F77_BLAS_MANGLE(dgemv,DGEMV)
00228 #define DGER_F77    F77_BLAS_MANGLE(dger,DGER)
00229 #define DTRMV_F77   F77_BLAS_MANGLE(dtrmv,DTRMV)
00230 #define DGEMM_F77   F77_BLAS_MANGLE(dgemm,DGEMM) 
00231 #define DSYMM_F77   F77_BLAS_MANGLE(dsymm,DSYMM)
00232 #define DTRMM_F77   F77_BLAS_MANGLE(dtrmm,DTRMM)
00233 #define DTRSM_F77   F77_BLAS_MANGLE(dtrsm,DTRSM)
00234 
00235 #ifdef HAVE_TEUCHOS_COMPLEX
00236 
00237 #define ZROTG_F77   F77_BLAS_MANGLE(zrotg,ZROTG)
00238 #define ZROT_F77    F77_BLAS_MANGLE(zrot,ZROT)
00239 #define ZASUM_F77   F77_BLAS_MANGLE(dzasum,DZASUM)
00240 #define ZAXPY_F77   F77_BLAS_MANGLE(zaxpy,ZAXPY)
00241 #define ZCOPY_F77   F77_BLAS_MANGLE(zcopy,ZCOPY)
00242 #define ZDOT_F77    F77_BLAS_MANGLE(zdotc,ZDOTC)  
00243 #define ZNRM2_F77   F77_BLAS_MANGLE(dznrm2,DZNRM2)
00244 #define ZSCAL_F77   F77_BLAS_MANGLE(zscal,ZSCAL)
00245 #define IZAMAX_F77  F77_BLAS_MANGLE(izamax,IZAMAX)
00246 #define ZGEMV_F77   F77_BLAS_MANGLE(zgemv,ZGEMV)
00247 #define ZGER_F77    F77_BLAS_MANGLE(zgerc,ZGERC)
00248 #define ZTRMV_F77   F77_BLAS_MANGLE(ztrmv,ZTRMV)
00249 #define ZGEMM_F77   F77_BLAS_MANGLE(zgemm,ZGEMM)
00250 #define ZSYMM_F77   F77_BLAS_MANGLE(zsymm,ZSYMM)
00251 #define ZTRMM_F77   F77_BLAS_MANGLE(ztrmm,ZTRMM)
00252 #define ZTRSM_F77   F77_BLAS_MANGLE(ztrsm,ZTRSM)
00253 
00254 #endif /* HAVE_TEUCHOS_COMPLEX */
00255 
00256 #endif
00257 
00258 
00259 /* Explicitly define each F77 name for all BLAS kernels */
00260 
00261 #define SROTG_F77   F77_BLAS_MANGLE(srotg,SROTG)
00262 #define SROT_F77    F77_BLAS_MANGLE(srot,SROT)
00263 #define SSCAL_F77   F77_BLAS_MANGLE(sscal,SSCAL) 
00264 #define SCOPY_F77   F77_BLAS_MANGLE(scopy,SCOPY)
00265 #define SAXPY_F77   F77_BLAS_MANGLE(saxpy,SAXPY)
00266 #define SDOT_F77    F77_BLAS_MANGLE(sdot,SDOT)
00267 #define SNRM2_F77   F77_BLAS_MANGLE(snrm2,SNRM2)
00268 #define SASUM_F77   F77_BLAS_MANGLE(sasum,SASUM)
00269 #define ISAMAX_F77  F77_BLAS_MANGLE(isamax,ISAMAX)
00270 
00271 #define SGEMV_F77   F77_BLAS_MANGLE(sgemv,SGEMV)
00272 #define SGER_F77    F77_BLAS_MANGLE(sger,SGER)
00273 #define STRMV_F77   F77_BLAS_MANGLE(strmv,STRMV)
00274 #define SGEMM_F77   F77_BLAS_MANGLE(sgemm,SGEMM)
00275 #define SSYMM_F77   F77_BLAS_MANGLE(ssymm,SSYMM)
00276 #define STRMM_F77   F77_BLAS_MANGLE(strmm,STRMM)
00277 #define STRSM_F77   F77_BLAS_MANGLE(strsm,STRSM)
00278 
00279 #ifdef HAVE_TEUCHOS_COMPLEX
00280 
00281 #define CROTG_F77   F77_BLAS_MANGLE(crotg,CROTG)
00282 #define CROT_F77    F77_BLAS_MANGLE(crot,CROT)
00283 #define CASUM_F77   F77_BLAS_MANGLE(scasum,SCASUM) 
00284 #define CAXPY_F77   F77_BLAS_MANGLE(caxpy,CAXPY)
00285 #define CCOPY_F77   F77_BLAS_MANGLE(ccopy,CCOPY)
00286 #define CDOT_F77    F77_BLAS_MANGLE(cdotc,CDOTC)
00287 #define CNRM2_F77   F77_BLAS_MANGLE(scnrm2,SCNRM2)
00288 #define CSCAL_F77   F77_BLAS_MANGLE(cscal,CSCAL)
00289 #define ICAMAX_F77  F77_BLAS_MANGLE(icamax,ICAMAX)
00290 #define CGEMV_F77   F77_BLAS_MANGLE(cgemv,CGEMV)
00291 #define CGER_F77    F77_BLAS_MANGLE(cgerc,CGERC)
00292 #define CTRMV_F77   F77_BLAS_MANGLE(ctrmv,CTRMV)
00293 #define CGEMM_F77   F77_BLAS_MANGLE(cgemm,CGEMM)
00294 #define CSYMM_F77   F77_BLAS_MANGLE(csymm,CSYMM)
00295 #define CTRMM_F77   F77_BLAS_MANGLE(ctrmm,CTRMM)
00296 #define CTRSM_F77   F77_BLAS_MANGLE(ctrsm,CTRSM)
00297 
00298 #endif /* HAVE_TEUCHOS_COMPLEX */
00299 
00300 #ifdef __cplusplus
00301 extern "C" {
00302 #endif
00303 
00304 
00305 /* Double precision BLAS 1 */
00306 void PREFIX DROTG_F77(double* da, double* db, double* c, double* s);
00307 void PREFIX DROT_F77(const int* n, double* dx, const int* incx, double* dy, const int* incy, double* c, double* s);
00308 double PREFIX DASUM_F77(const int* n, const double x[], const int* incx);
00309 void PREFIX DAXPY_F77(const int* n, const double* alpha, const double x[], const int* incx, double y[], const int* incy);
00310 void PREFIX DCOPY_F77(const int* n, const double *x, const int* incx, double *y, const int* incy);
00311 double PREFIX DDOT_F77(const int* n, const double x[], const int* incx, const double y[], const int* incy);
00312 double PREFIX DNRM2_F77(const int* n, const double x[], const int* incx); 
00313 void PREFIX DSCAL_F77(const int* n, const double* alpha, double *x, const int* incx);
00314 int PREFIX IDAMAX_F77(const int* n, const double *x, const int* incx);
00315 
00316 /* Double std::complex precision BLAS 1 */
00317 #ifdef HAVE_TEUCHOS_COMPLEX
00318 
00319 void PREFIX ZROTG_F77(std::complex<double>* da, std::complex<double>* db, double* c, std::complex<double>* s);
00320 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);
00321 double PREFIX ZASUM_F77(const int* n, const std::complex<double> x[], const int* incx);
00322 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);
00323 void PREFIX ZCOPY_F77(const int* n, const std::complex<double> *x, const int* incx, std::complex<double> *y, const int* incy);
00324 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);
00325 double PREFIX ZNRM2_F77(const int* n, const std::complex<double> x[], const int* incx); 
00326 void PREFIX ZSCAL_F77(const int* n, const std::complex<double>* alpha, std::complex<double> *x, const int* incx);
00327 int PREFIX IZAMAX_F77(const int* n, const std::complex<double> *x, const int* incx);
00328 
00329 #endif // HAVE_TEUCHOS_COMPLEX
00330 
00331 #ifdef HAVE_TEUCHOS_BLASFLOAT
00332 
00333 /* Single precision BLAS 1 */ 
00334 void PREFIX SROTG_F77(float* da, float* db, float* c, float* s);
00335 void PREFIX SROT_F77(const int* n, float* dx, const int* incx, float* dy, const int* incy, float* c, float* s);
00336 float PREFIX SASUM_F77(const int* n, const float x[], const int* incx);
00337 void PREFIX SAXPY_F77(const int* n, const float* alpha, const float x[], const int* incx, float y[], const int* incy);
00338 void PREFIX SCOPY_F77(const int* n, const float *x, const int* incx, float *y, const int* incy);
00339 float PREFIX SDOT_F77(const int* n, const float x[], const int* incx, const float y[], const int* incy);
00340 float PREFIX SNRM2_F77(const int* n, const float x[], const int* incx); 
00341 void PREFIX SSCAL_F77(const int* n, const float* alpha, float *x, const int* incx);
00342 int PREFIX ISAMAX_F77(const int* n, const float *x, const int* incx);
00343 
00344 #endif // HAVE_TEUCHOS_BLASFLOAT
00345 
00346 /* Single std::complex precision BLAS 1 */ 
00347 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00348 
00349 void PREFIX CROTG_F77(std::complex<float>* da, std::complex<float>* db, float* c, std::complex<float>* s);
00350 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);
00351 float PREFIX CASUM_F77(const int* n, const std::complex<float> x[], const int* incx);
00352 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);
00353 void PREFIX CCOPY_F77(const int* n, const std::complex<float> *x, const int* incx, std::complex<float> *y, const int* incy);
00354 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);
00355 float PREFIX CNRM2_F77(const int* n, const std::complex<float> x[], const int* incx); 
00356 void PREFIX CSCAL_F77(const int* n, const std::complex<float>* alpha, std::complex<float> *x, const int* incx);
00357 int PREFIX ICAMAX_F77(const int* n, const std::complex<float> *x, const int* incx);
00358 
00359 #endif //  defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00360 
00361 /* Double precision BLAS 2 */
00362 void PREFIX DGEMV_F77(Teuchos_fcd, const int* m, const int* n, const double* alpha, const double A[], const int* lda,
00363                  const double x[], const int* incx, const double* beta, double y[], const int* incy);
00364 void PREFIX DTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 
00365                 const double *a, const int *lda, double *x, const int *incx); 
00366 void PREFIX DGER_F77(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y,
00367                const int *incy, double *a, const int *lda);
00368 
00369 /* Double precision BLAS 2 */
00370 #ifdef HAVE_TEUCHOS_COMPLEX
00371 
00372 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,
00373                  const std::complex<double> x[], const int* incx, const std::complex<double>* beta, std::complex<double> y[], const int* incy);
00374 void PREFIX ZTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 
00375                 const std::complex<double> *a, const int *lda, std::complex<double> *x, const int *incx); 
00376 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,
00377                const int *incy, std::complex<double> *a, const int *lda);
00378 
00379 #endif /* HAVE_TEUCHOS_COMPLEX */
00380 
00381 #ifdef HAVE_TEUCHOS_BLASFLOAT
00382 
00383 /* Single precision BLAS 2 */
00384 void PREFIX SGEMV_F77(Teuchos_fcd, const int* m, const int* n, const float* alpha, const float A[], const int* lda,
00385                  const float x[], const int* incx, const float* beta, float y[], const int* incy);
00386 void PREFIX STRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n,
00387                 const float *a, const int *lda, float *x, const int *incx); 
00388 void PREFIX SGER_F77(const int *m, const int *n, const float *alpha, const float *x, const int *incx, const float *y,
00389                const int *incy, float *a, const int *lda);
00390 
00391 #endif // HAVE_TEUCHOS_BLASFLOAT
00392 
00393 /* Single std::complex precision BLAS 2 */
00394 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00395 
00396 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,
00397                  const std::complex<float> x[], const int* incx, const std::complex<float>* beta, std::complex<float> y[], const int* incy);
00398 void PREFIX CTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n,
00399                 const std::complex<float> *a, const int *lda, std::complex<float> *x, const int *incx); 
00400 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,
00401                const int *incy, std::complex<float> *a, const int *lda);
00402 
00403 #endif // defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00404 
00405 /* Double precision BLAS 3 */
00406 void PREFIX DGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 
00407                 n, const int *k, const double *alpha, const double *a, const int *lda, 
00408                 const double *b, const int *ldb, const double *beta, double *c, const int *ldc);
00409 void PREFIX DSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00410                 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 DTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,  
00413                 const int *m, const int *n, const double *alpha, const double *a, const int * lda, double *b, const int *ldb);
00414 void PREFIX DTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 
00415                 const int *m, const int *n, const double *alpha, const double *a, const int *
00416                 lda, double *b, const int *ldb);
00417 
00418 /* Double std::complex precision BLAS 3 */
00419 #ifdef HAVE_TEUCHOS_COMPLEX
00420 
00421 void PREFIX ZGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 
00422                 n, const int *k, const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 
00423                 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc);
00424 void PREFIX ZSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00425                 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 ZTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,  
00428                 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);
00429 void PREFIX ZTRSM_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 *
00431                 lda, std::complex<double> *b, const int *ldb);
00432 
00433 #endif /* HAVE_TEUCHOS_COMPLEX */
00434 
00435 #ifdef HAVE_TEUCHOS_BLASFLOAT
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 #endif // HAVE_TEUCHOS_BLASFLOAT
00451 
00452 /* Single std::complex precision BLAS 3 */
00453 
00454 #ifdef HAVE_TEUCHOS_COMPLEX
00455 
00456 void PREFIX CGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int *
00457                 n, const int *k, const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 
00458                 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc);
00459 void PREFIX CSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00460                 const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 
00461                 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc);
00462 void PREFIX CTRMM_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 * lda, std::complex<float> *b, const int *ldb);
00464 void PREFIX CTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,
00465                 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int *
00466                 lda, std::complex<float> *b, const int *ldb);
00467 
00468 #endif /* HAVE_TEUCHOS_COMPLEX */
00469 
00470 #ifdef __cplusplus
00471 }
00472 #endif
00473 
00474 #endif // end of TEUCHOS_BLAS_WRAPPERS_HPP_

Generated on Wed May 12 21:40:31 2010 for Teuchos - Trilinos Tools Package by  doxygen 1.4.7